diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000000..e69de29bb2 diff --git a/404.html b/404.html new file mode 100644 index 0000000000..fe31964ea3 --- /dev/null +++ b/404.html @@ -0,0 +1,20 @@ + + + + + +Page Not Found | Tracetest Docs + + + + + + +
+
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + + + + + \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 0000000000..27a0ce65ea --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +docs.tracetest.io diff --git a/advanced-selectors/index.html b/advanced-selectors/index.html new file mode 100644 index 0000000000..4cf160e663 --- /dev/null +++ b/advanced-selectors/index.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/analyzer/concepts/index.html b/analyzer/concepts/index.html new file mode 100644 index 0000000000..5f15cc4490 --- /dev/null +++ b/analyzer/concepts/index.html @@ -0,0 +1,20 @@ + + + + + +Trace Analyzer Concepts | Tracetest Docs + + + + + + +
+
Skip to main content

Trace Analyzer Concepts

The Tracetest Analyzer is a plugin-based framework used to analyze OpenTelemetry traces to help teams improve their instrumentation data, find potential problems and provide tips to fix the problems.

Plugins​

Problem​

Today, implementing open telemetry instrumentation in any application can become overwhelming as most of the documentation is not centralized, can be confusing and as the problem is relatively new there aren’t many good tutorials or guides to follow.

Usually, there are official libraries for the most common languages that can be used to add basic auto-instrumentation. Still, when it comes to adding custom instrumentation it can be confusing to understand if what is added is aligned to the Otel standard in terms of having the right information and/or not leaking any sensitive data.

Another problem is that adding instrumentation is the very first step to achieving and improving an application architecture, having visibility is just a way to understand what’s going on, but then it can become a little more difficult to understand what's next.

Solution​

Having a linting rule that is fully plugin-based to evaluate Tracetest to find problems. Allowing simple ways for users to understand the quality of their instrumentation data across the whole framework, catching possible security breaches, and providing tips and guidance on how to fix them.

Concepts​

Plugin​

Is the encapsulation of an N number of rules, with a name and a category that defines its specific goal.

Rule​

Contains the set of validations to be evaluated using one or multiple traces depending on the rule type. The result when applying a rule should be if it passed or failed, displaying extra information using tips for user guidance.

Each rule has a name, description, and logic to evaluate the whole trace or a specific span.

Rule Types​

There are two main rule types:

  • Multi Trace. Requires a historic number of traces to identify and evaluate the rule.
  • Single Trace. Encapsulated to the current trace, no external data is required.

Analyzer Resource​

Allows the user to configure the analyzer framework, a global on/off switch, an opt-in/out for specific plugins or rules, setting up required and optional rules, etc.

+ + + + + + \ No newline at end of file diff --git a/analyzer/plugins/common-problems/index.html b/analyzer/plugins/common-problems/index.html new file mode 100644 index 0000000000..7967ebf621 --- /dev/null +++ b/analyzer/plugins/common-problems/index.html @@ -0,0 +1,20 @@ + + + + + +Common Problems | Tracetest Docs + + + + + + +
+
Skip to main content

Common Problems

The Common Problems plugin is responsible of analyzing the spans that are part of a trace in order to identify frequent mistakes in the distributed system.

Rules​

+ + + + + + \ No newline at end of file diff --git a/analyzer/plugins/otel-semantic-conventions/index.html b/analyzer/plugins/otel-semantic-conventions/index.html new file mode 100644 index 0000000000..4d955b20eb --- /dev/null +++ b/analyzer/plugins/otel-semantic-conventions/index.html @@ -0,0 +1,20 @@ + + + + + +OTel Semantic Conventions | Tracetest Docs + + + + + + +
+
Skip to main content
+ + + + + + \ No newline at end of file diff --git a/analyzer/plugins/security/index.html b/analyzer/plugins/security/index.html new file mode 100644 index 0000000000..e186109c9d --- /dev/null +++ b/analyzer/plugins/security/index.html @@ -0,0 +1,20 @@ + + + + + +Security | Tracetest Docs + + + + + + +
+
Skip to main content
+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/attribute-naming/index.html b/analyzer/rules/attribute-naming/index.html new file mode 100644 index 0000000000..a88c86826e --- /dev/null +++ b/analyzer/rules/attribute-naming/index.html @@ -0,0 +1,20 @@ + + + + + +attribute-naming | Tracetest Docs + + + + + + +
+
Skip to main content

attribute-naming

Enforce attribute keys to follow common specifications.

Rule Details​

AnΒ AttributeΒ is a key-value pair, which is encapsulated as part of a span. The attribute key should follow a set of common specifications to be considered valid.

The following OpenTelemetry Semantic Conventions for attribute keys are defined:

  • It must be a non-nullΒ and non-empty string.
  • It must be a valid Unicode sequence.
  • It should use namespacing to avoid name clashes. Delimit the namespaces using a dot character. For exampleΒ service.versionΒ denotes the service version whereΒ serviceΒ is the namespace andΒ versionΒ is an attribute in that namespace.
  • Namespaces can be nested. For exampleΒ telemetry.sdkΒ is a namespace inside top-levelΒ telemetryΒ namespace andΒ telemetry.sdk.nameΒ is an attribute insideΒ telemetry.sdkΒ namespace.
  • For each multi-word separate the words by underscores (use snake_case). For exampleΒ http.status_codeΒ denotes the status code in the http namespace.
  • Names should not coincide with namespaces. For example ifΒ service.instance.idΒ is an attribute name then it is no longer valid to have an attribute namedΒ service.instanceΒ becauseΒ service.instanceΒ is already a namespace.

Options​

This rule has the following options:

  • "error" requires attribute keys to follow the OTel semantic convention
  • "disabled" disables the attribute keys verification
  • "warning" verifies attribute keys to follow the OTel semantic convention but does not impact the analyzer score

When Not To Use It​

If you don’t want to enforce OTel attribute keys, don’t enable this rule.

+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/no-api-key-leak/index.html b/analyzer/rules/no-api-key-leak/index.html new file mode 100644 index 0000000000..3551539a12 --- /dev/null +++ b/analyzer/rules/no-api-key-leak/index.html @@ -0,0 +1,20 @@ + + + + + +no-api-key-leak | Tracetest Docs + + + + + + +
+
Skip to main content

no-api-key-leak

Disallow leaked API keys for HTTP spans.

Rule Details​

This rule disallows the recording of API keys in HTTP spans.

HTTP spans:​

The following attributes are evaluated:

- http.response.header.authorization
- http.response.header.x-api-key
- http.request.header.authorization
- http.request.header.x-api-key

Options​

This rule has the following options:

  • "error" requires no leaked API keys for HTTP spans
  • "disabled" disables the no leaked API keys verification for HTTP spans
  • "warning" verifies no leaked API keys for HTTPS spans but does not impact the analyzer score

When Not To Use It​

If you intentionally record API keys for HTTP spans then you can disable this rule.

+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/no-empty-attributes/index.html b/analyzer/rules/no-empty-attributes/index.html new file mode 100644 index 0000000000..016c13365d --- /dev/null +++ b/analyzer/rules/no-empty-attributes/index.html @@ -0,0 +1,20 @@ + + + + + +no-empty-attributes | Tracetest Docs + + + + + + +
+
Skip to main content

no-empty-attributes

Disallow empty attribute values.

Rule Details​

AnΒ AttributeΒ is a key-value pair, which is encapsulated as part of a span. The attribute value should not be empty to be considered valid.

Options​

This rule has the following options:

  • "error" requires attribute values to not be empty
  • "disabled" disables the attribute values verification
  • "warning" verifies attribute values to not be empty but does not impact the analyzer score

When Not To Use It​

If you intentionally use empty attribute values then you can disable this rule.

+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/prefer-dns/index.html b/analyzer/rules/prefer-dns/index.html new file mode 100644 index 0000000000..f5cf7fccee --- /dev/null +++ b/analyzer/rules/prefer-dns/index.html @@ -0,0 +1,20 @@ + + + + + +prefer-dns | Tracetest Docs + + + + + + +
+
Skip to main content

prefer-dns

Enforce usage of DNS instead of IP addresses.

Rule Details​

When connecting to remote servers, ensure the usage of DNS instead of IP addresses to avoid issues.

The following attributes are evaluated:

- http.url
- db.connection_string

If span kind is "client", the following attributes are evaluated:

- net.peer.name

Options​

This rule has the following options:

  • "error" requires DNS over IP addresses
  • "disabled" disables the DNS over IP addresses verification
  • "warning" verifies DNS over IP addresses but does not impact the analyzer score

When Not To Use It​

If you intentionally use and record IP addresses then you can disable this rule.

+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/required-attributes/index.html b/analyzer/rules/required-attributes/index.html new file mode 100644 index 0000000000..ad7988a636 --- /dev/null +++ b/analyzer/rules/required-attributes/index.html @@ -0,0 +1,20 @@ + + + + + +required-attributes | Tracetest Docs + + + + + + +
+
Skip to main content

required-attributes

Enforce required attributes by span type.

Rule Details​

All instrumentations must populate the required attributes by span type based on the semantic conventions.

The following OTel semantic conventions for span required attributes are defined:

HTTP spans:​

- http.method

If span kind is "server", the required attributes include:

- http.target
- http.scheme
- net.host.name

If span kind is "client", the required attributes include:

- http.url
- net.peer.name

Database spans:​

- db.system

RPC spans:​

- rpc.system
- neet.peer.name

Messaging spans:​

- messaging.system
- messaging.operation

FaaS spans:​

If span kind is "server", the required attributes include:

- faas.trigger

If span kind is "client", the required attributes include:

- faas.invoked_name
- faas.invoked_provider

Options​

This rule has the following options:

  • "error" requires span attributes to follow the OTel semantic convention
  • "disabled" disables the span required attributes verification
  • "warning" verifies required attributes to follow the OTel semantic convention but does not impact the analyzer score

When Not To Use It​

If you don’t want to enforce OTel span required attributes, don’t enable this rule.

+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/secure-https-protocol/index.html b/analyzer/rules/secure-https-protocol/index.html new file mode 100644 index 0000000000..a2d79e28bf --- /dev/null +++ b/analyzer/rules/secure-https-protocol/index.html @@ -0,0 +1,20 @@ + + + + + +secure-https-protocol | Tracetest Docs + + + + + + +
+
Skip to main content

secure-https-protocol

Enforce usage of secure protocol for HTTP server spans.

Rule Details​

This rule enforces usage of a secure protocol for an HTTP server span. The URI scheme that identifies the used protocol should be "https".

HTTP spans:​

If span kind is "server", the following attributes are evaluated:

- http.scheme = "https"
- http.url = "https"

Options​

This rule has the following options:

  • "error" requires secure protocol for HTTP server spans
  • "disabled" disables the secure protocol verification for HTTP server spans
  • "warning" verifies secure protocol for HTTPS server spans but does not impact the analyzer score

When Not To Use It​

If you intentionally use non secure protocol for HTTP server spans then you can disable this rule.

+ + + + + + \ No newline at end of file diff --git a/analyzer/rules/span-naming/index.html b/analyzer/rules/span-naming/index.html new file mode 100644 index 0000000000..9c46200d9b --- /dev/null +++ b/analyzer/rules/span-naming/index.html @@ -0,0 +1,20 @@ + + + + + +span-naming | Tracetest Docs + + + + + + +
+
Skip to main content

span-naming

Enforce span names that identify aΒ class of Spans, rather than individual Span instances.

Rule Details​

TheΒ span nameΒ concisely identifies the work represented by the Span, for example, an RPC method name, a function name, or the name of a subtask or stage within a larger computation. The span name SHOULD be the most general string that identifies aΒ class of Spans, rather than individual Span instances while still being human-readable.

The following OTel semantic conventions for span names are defined:

HTTP spans:​

If span kind is "server", the name should follow this format:

{http.method} {http.route}

If span kind is "client", the name should follow this format:

{http.method}

Database spans:​

{db.operation} {db.name}.{db.sql.table}

If db.sql.table is not available, the name should follow this format:

{db.operation} {db.name}

RPC spans:​

{package}.{service}/{method}

Messaging spans:​

{destination name} {operation name}

Options​

This rule has the following options:

  • "error" requires span names to follow the OTel semantic convention
  • "disabled" disables the span name verification
  • "warning" verifies span names to follow the OTel semantic convention but does not impact the analyzer score

When Not To Use It​

If you don’t want to enforce OTel span names, don’t enable this rule.

+ + + + + + \ No newline at end of file diff --git a/assets/css/styles.e1acdf03.css b/assets/css/styles.e1acdf03.css new file mode 100644 index 0000000000..0d72dcf03c --- /dev/null +++ b/assets/css/styles.e1acdf03.css @@ -0,0 +1 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:#0000000d;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-code-font-size:95%;--docusaurus-highlighted-code-line-bg:#0000001a;--ifm-color-primary:#b20d31;--ifm-color-primary-dark:#a00c2c;--ifm-color-primary-darker:#970b2a;--ifm-color-primary-darkest:#7d0922;--ifm-color-primary-light:#c40e36;--ifm-color-primary-lighter:#cd0f38;--ifm-color-primary-lightest:#e71140;--docusaurus-announcement-bar-height:auto;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:#656c85cc;--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 #ffffff80,0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 #45629b1f;--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base)}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul,.tabList__CuJ{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_tbUL,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover),.redocusaurus h2,.redocusaurus h3,.redocusaurus h4,.redocusaurus table>tbody>tr{color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_S0QG>:last-child,.collapsibleContent_i85q>:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter);content:""}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;right:0;transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"Β« "}.pagination-nav__link--next .pagination-nav__label:after{content:" Β»"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:#090a11cc;--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 #494c6a80,0 -4px 8px 0 #0003;--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}:root footer{background-color:#fff!important}[data-theme=dark]{--ifm-color-primary:#f27e9b;--ifm-color-primary-dark:#ef5d81;--ifm-color-primary-darker:#ed4c74;--ifm-color-primary-darkest:#e81a4d;--ifm-color-primary-light:#f59fb5;--ifm-color-primary-lighter:#f7b0c2;--ifm-color-primary-lightest:#fce2e9}[data-theme=dark],html[data-theme=dark] footer{background-color:#242526!important}.docusaurus-highlight-code-line{background-color:#484d5b;display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.redocusaurus table tbody tr table,.redocusaurus table tbody tr table tbody tr,.redocusaurus table.security-details tr:nth-child(odd),.skipToContent_fXgn{background-color:var(--ifm-background-surface-color)}.redocusaurus>div:first-child>svg{margin-top:10px;max-height:4rem;max-width:4rem}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_b6E3,.redocusaurus-has-logo .menu-content>div:first-child,.redocusaurus-styles,.sidebarLogo_isFc,.themedImage_ToTc,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.skipToContent_fXgn{color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;text-decoration:underline}.DocSearch-Container a,.tag_zVej:hover{text-decoration:none}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedImage--dark_i4oU,[data-theme=light] .themedImage--light_HNdA{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.redocusaurus code,html:not([data-theme=dark]) .redocusaurus div[id^=react-tabs]>div:first-child>pre:nth-child(2){background-color:initial}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.docMainContainer_gTbr,.docPage__5DB{display:flex;width:100%}.docPage__5DB{flex:1 0}.docsWrapper_BCFX{display:flex;flex:1 0 auto}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.redocusaurus .redoc-wrap{border-bottom:1px solid var(--ifm-toc-border-color)}.redocusaurus h5,.redocusaurus h5>span{color:var(--ifm-font-color-secondary)!important}html[data-theme=dark] .redocusaurus h1>a:first-child:before,html[data-theme=dark] .redocusaurus h2>a:first-child:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGFzcz0ibGF5ZXIiPjxwYXRoIGQ9Im00NTkuNyAyMzMuNC05MC41IDkwLjVjLTUwIDUwLTEzMSA1MC0xODEgMC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNS0yNC45LTI1LTY1LjUtMjUtOTAuNSAwbC0zMi4yIDMyLjJjLTI2LjEtMTAuMi01NC4yLTEyLjktODEuNi04LjlsNjguNi02OC42YzUwLTUwIDEzMS01MCAxODEgMCA0OS44IDQ5LjkgNDkuOCAxMzEtLjEgMTgxek0yMjAuMyAzODIuMmwtMzIuMiAzMi4yYy0yNSAyNC45LTY1LjYgMjQuOS05MC41IDAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44LTUwLTUwLTEzMS01MC0xODEgMGwtOTAuNSA5MC41Yy01MCA1MC01MCAxMzEgMCAxODFzMTMxIDUwIDE4MSAwbDY4LjYtNjguNmMtMjcuNCA0LTU1LjYgMS4yLTgxLjctOC45eiIgZmlsbD0iI2ZmZiIvPjwvZz48L3N2Zz4=")}.redocusaurus .menu-content{border-right:1px solid var(--ifm-toc-border-color)}.redocusaurus .operation-type{font-size:8px;margin-top:6px}.redocusaurus code{padding:0}.redocusaurus ul>li.react-tabs__tab--selected:not(.tab-error):not(.tab-success){color:#303846!important}html:not([data-theme=dark]) .redocusaurus .redoc-wrap .api-content>div>div:first-child>div:nth-child(2) h3{color:var(--ifm-font-color-base-inverse)}html[data-theme=dark] .redocusaurus div[id^=operation]>div>div:nth-child(2)>div:first-child>div:nth-child(2),html[data-theme=dark] .redocusaurus div[id^=tag]>div>div:nth-child(2)>div:first-child>div:nth-child(2){background-color:#1b2028;color:var(--ifm-font-color-secondary)}.redocusaurus table tr,html[data-theme=dark] .redocusaurus div[id^=operation]>div>div:nth-child(2)>div:first-child>div:nth-child(2)>div>div:nth-child(2)>div,html[data-theme=dark] .redocusaurus div[id^=tag]>div>div:nth-child(2)>div:first-child>div:nth-child(2)>div>div:nth-child(2)>div{background-color:var(--ifm-background-color)}.redocusaurus .react-tabs__tab-panel--selected{margin-bottom:10px}html:not([data-theme=dark]) .redocusaurus div[id^=react-tabs] code{color:var(--ifm-color-emphasis-0)}.redocusaurus table th{border:none}.redocusaurus table td{border-right:none;border-top:none}.redocusaurus table td:first-child{border-bottom:none}.redocusaurus table td:nth-child(2){border-left:none}.redocusaurus tr.last+tr>td>div{background-color:var(--ifm-background-color)!important}.redocusaurus span.dropdown-selector-value{color:var(--ifm-font-color-secondary)}[data-theme=dark] .redocusaurus .api-content div h5+svg polygon{filter:invert(1)}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:#0000;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards a;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:#0000}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"Β» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@keyframes a{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}.img_ev3q{height:auto}.admonition_LlT9{margin-bottom:1em}.admonitionHeading_tbUL{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.3rem}.admonitionHeading_tbUL code{text-transform:none}.admonitionIcon_kALy{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_kALy svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_m80_{background-color:var(--docusaurus-collapse-button-bg)}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_BlDH,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_BlDH{transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_Xe31{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/images/Dynatrace-settings-6a9e99866d9a2b96b291819c73d47eeb.png b/assets/images/Dynatrace-settings-6a9e99866d9a2b96b291819c73d47eeb.png new file mode 100644 index 0000000000..91c3e55f88 Binary files /dev/null and b/assets/images/Dynatrace-settings-6a9e99866d9a2b96b291819c73d47eeb.png differ diff --git a/assets/images/ElasticAPM-settings-02a5cb5d2edf87c9069f0783ec3ec242.png b/assets/images/ElasticAPM-settings-02a5cb5d2edf87c9069f0783ec3ec242.png new file mode 100644 index 0000000000..3294f5e3ef Binary files /dev/null and b/assets/images/ElasticAPM-settings-02a5cb5d2edf87c9069f0783ec3ec242.png differ diff --git a/assets/images/Jaeger-settings-1477bdfe17b0675850681e0cfb85859a.png b/assets/images/Jaeger-settings-1477bdfe17b0675850681e0cfb85859a.png new file mode 100644 index 0000000000..266c5208a2 Binary files /dev/null and b/assets/images/Jaeger-settings-1477bdfe17b0675850681e0cfb85859a.png differ diff --git a/assets/images/Lightstep-settings-c866e393a26cc5d1f52f1bd9c8800ccd.png b/assets/images/Lightstep-settings-c866e393a26cc5d1f52f1bd9c8800ccd.png new file mode 100644 index 0000000000..6acfa8f3b9 Binary files /dev/null and b/assets/images/Lightstep-settings-c866e393a26cc5d1f52f1bd9c8800ccd.png differ diff --git a/assets/images/New-Relic-settings-1ecba0b658acfd9b197eb3abcc79a753.png b/assets/images/New-Relic-settings-1ecba0b658acfd9b197eb3abcc79a753.png new file mode 100644 index 0000000000..a657cf4486 Binary files /dev/null and b/assets/images/New-Relic-settings-1ecba0b658acfd9b197eb3abcc79a753.png differ diff --git a/assets/images/SignalFX-settings-8acd421c68d79b1214a9b95518a37120.png b/assets/images/SignalFX-settings-8acd421c68d79b1214a9b95518a37120.png new file mode 100644 index 0000000000..c7b87c8e6b Binary files /dev/null and b/assets/images/SignalFX-settings-8acd421c68d79b1214a9b95518a37120.png differ diff --git a/assets/images/Signoz-settings-7360d2e5be8a9bc38eddb08021a21132.png b/assets/images/Signoz-settings-7360d2e5be8a9bc38eddb08021a21132.png new file mode 100644 index 0000000000..7ea8af6c4f Binary files /dev/null and b/assets/images/Signoz-settings-7360d2e5be8a9bc38eddb08021a21132.png differ diff --git a/assets/images/Tempo-settings-5694016647d4bc7b0e8c34cd68e833c1.png b/assets/images/Tempo-settings-5694016647d4bc7b0e8c34cd68e833c1.png new file mode 100644 index 0000000000..57ea785a7a Binary files /dev/null and b/assets/images/Tempo-settings-5694016647d4bc7b0e8c34cd68e833c1.png differ diff --git a/assets/images/add-item-into-shopping-cart-api-test-spec-23f4a07c151df2fc7e0a0ad393060673.png b/assets/images/add-item-into-shopping-cart-api-test-spec-23f4a07c151df2fc7e0a0ad393060673.png new file mode 100644 index 0000000000..574562d868 Binary files /dev/null and b/assets/images/add-item-into-shopping-cart-api-test-spec-23f4a07c151df2fc7e0a0ad393060673.png differ diff --git a/assets/images/add-item-into-shopping-cart-db-test-spec-5ccf61bac2522cf7c1f3cd93e04f72c8.png b/assets/images/add-item-into-shopping-cart-db-test-spec-5ccf61bac2522cf7c1f3cd93e04f72c8.png new file mode 100644 index 0000000000..1a0883275e Binary files /dev/null and b/assets/images/add-item-into-shopping-cart-db-test-spec-5ccf61bac2522cf7c1f3cd93e04f72c8.png differ diff --git a/assets/images/add-item-into-shopping-cart-trace-34b3e9a3a5e271a19425b5df3f6ba6ed.png b/assets/images/add-item-into-shopping-cart-trace-34b3e9a3a5e271a19425b5df3f6ba6ed.png new file mode 100644 index 0000000000..7da2f4bed2 Binary files /dev/null and b/assets/images/add-item-into-shopping-cart-trace-34b3e9a3a5e271a19425b5df3f6ba6ed.png differ diff --git a/assets/images/add-pokemon-api-test-spec-e38a05b28ff40c3c081f7b2e36fdc642.png b/assets/images/add-pokemon-api-test-spec-e38a05b28ff40c3c081f7b2e36fdc642.png new file mode 100644 index 0000000000..dfe32fc5ef Binary files /dev/null and b/assets/images/add-pokemon-api-test-spec-e38a05b28ff40c3c081f7b2e36fdc642.png differ diff --git a/assets/images/add-pokemon-database-test-spec-680807e20e2d638867ccb8c3f5738884.png b/assets/images/add-pokemon-database-test-spec-680807e20e2d638867ccb8c3f5738884.png new file mode 100644 index 0000000000..256f7eda06 Binary files /dev/null and b/assets/images/add-pokemon-database-test-spec-680807e20e2d638867ccb8c3f5738884.png differ diff --git a/assets/images/add-pokemon-trace-57bd6b1bca1b5d66ab92b47b45d18450.png b/assets/images/add-pokemon-trace-57bd6b1bca1b5d66ab92b47b45d18450.png new file mode 100644 index 0000000000..61284538e6 Binary files /dev/null and b/assets/images/add-pokemon-trace-57bd6b1bca1b5d66ab92b47b45d18450.png differ diff --git a/assets/images/add-test-spec-0.11-06c42a7246fbf55897d741ff2ceaf620.png b/assets/images/add-test-spec-0.11-06c42a7246fbf55897d741ff2ceaf620.png new file mode 100644 index 0000000000..79d2a3f55d Binary files /dev/null and b/assets/images/add-test-spec-0.11-06c42a7246fbf55897d741ff2ceaf620.png differ diff --git a/assets/images/affected-spans-form-7ae58cf443598ceb8f053614f75cf24d.png b/assets/images/affected-spans-form-7ae58cf443598ceb8f053614f75cf24d.png new file mode 100644 index 0000000000..abc3790cab Binary files /dev/null and b/assets/images/affected-spans-form-7ae58cf443598ceb8f053614f75cf24d.png differ diff --git a/assets/images/affected-spans-form-dag-1b7b7217b9e3476edf67d7a397a579ac.png b/assets/images/affected-spans-form-dag-1b7b7217b9e3476edf67d7a397a579ac.png new file mode 100644 index 0000000000..5f82632c10 Binary files /dev/null and b/assets/images/affected-spans-form-dag-1b7b7217b9e3476edf67d7a397a579ac.png differ diff --git a/assets/images/affected-spans-select-1be02bb9421639a80869fe21cc20b371.png b/assets/images/affected-spans-select-1be02bb9421639a80869fe21cc20b371.png new file mode 100644 index 0000000000..49b39c0ee0 Binary files /dev/null and b/assets/images/affected-spans-select-1be02bb9421639a80869fe21cc20b371.png differ diff --git a/assets/images/affected-spans-select-dag-895c639b73d80047a95f0f33c1cf7042.png b/assets/images/affected-spans-select-dag-895c639b73d80047a95f0f33c1cf7042.png new file mode 100644 index 0000000000..461c8ccce1 Binary files /dev/null and b/assets/images/affected-spans-select-dag-895c639b73d80047a95f0f33c1cf7042.png differ diff --git a/assets/images/all-tests-list-0.11-231fc1c1fef9683f263210d9f57f291e.png b/assets/images/all-tests-list-0.11-231fc1c1fef9683f263210d9f57f291e.png new file mode 100644 index 0000000000..e547d81b45 Binary files /dev/null and b/assets/images/all-tests-list-0.11-231fc1c1fef9683f263210d9f57f291e.png differ diff --git a/assets/images/all-vars-adedc9d4444f070a7d7828736d7f36b2.png b/assets/images/all-vars-adedc9d4444f070a7d7828736d7f36b2.png new file mode 100644 index 0000000000..995c6d0d32 Binary files /dev/null and b/assets/images/all-vars-adedc9d4444f070a7d7828736d7f36b2.png differ diff --git a/assets/images/analytics-settings-0.11.3-cfff50e2b821343237f5658457432f0c.png b/assets/images/analytics-settings-0.11.3-cfff50e2b821343237f5658457432f0c.png new file mode 100644 index 0000000000..7f6f1bd59c Binary files /dev/null and b/assets/images/analytics-settings-0.11.3-cfff50e2b821343237f5658457432f0c.png differ diff --git a/assets/images/analyzer-create-new-http-request-6634de6ef48da2b7b916e59a1b57c4ea.png b/assets/images/analyzer-create-new-http-request-6634de6ef48da2b7b916e59a1b57c4ea.png new file mode 100644 index 0000000000..3ab6a1e6ff Binary files /dev/null and b/assets/images/analyzer-create-new-http-request-6634de6ef48da2b7b916e59a1b57c4ea.png differ diff --git a/assets/images/analyzer-create-test-62c79cdfa3e636e5d7ee4c9ec656b706.png b/assets/images/analyzer-create-test-62c79cdfa3e636e5d7ee4c9ec656b706.png new file mode 100644 index 0000000000..39bc5c27a2 Binary files /dev/null and b/assets/images/analyzer-create-test-62c79cdfa3e636e5d7ee4c9ec656b706.png differ diff --git a/assets/images/analyzer-expanded-ed1647909d5c988f75260c8738a04f4b.png b/assets/images/analyzer-expanded-ed1647909d5c988f75260c8738a04f4b.png new file mode 100644 index 0000000000..5ebc5c6418 Binary files /dev/null and b/assets/images/analyzer-expanded-ed1647909d5c988f75260c8738a04f4b.png differ diff --git a/assets/images/analyzer-pokeshop-list-54c7607e361c0adfbed904f369e42965.png b/assets/images/analyzer-pokeshop-list-54c7607e361c0adfbed904f369e42965.png new file mode 100644 index 0000000000..f974dae07d Binary files /dev/null and b/assets/images/analyzer-pokeshop-list-54c7607e361c0adfbed904f369e42965.png differ diff --git a/assets/images/analyzer-pokeshop-list-create-run-b2a0e27bc4df77b3f96a9a3545419e4a.png b/assets/images/analyzer-pokeshop-list-create-run-b2a0e27bc4df77b3f96a9a3545419e4a.png new file mode 100644 index 0000000000..16daad789b Binary files /dev/null and b/assets/images/analyzer-pokeshop-list-create-run-b2a0e27bc4df77b3f96a9a3545419e4a.png differ diff --git a/assets/images/analyzer-pokeshop-list-next-42a36f06cc99a6b333cb65ef889f906c.png b/assets/images/analyzer-pokeshop-list-next-42a36f06cc99a6b333cb65ef889f906c.png new file mode 100644 index 0000000000..4502e276e2 Binary files /dev/null and b/assets/images/analyzer-pokeshop-list-next-42a36f06cc99a6b333cb65ef889f906c.png differ diff --git a/assets/images/analyzer-results-9b388e578a149358959e2a23be8cceff.png b/assets/images/analyzer-results-9b388e578a149358959e2a23be8cceff.png new file mode 100644 index 0000000000..3a7543bc51 Binary files /dev/null and b/assets/images/analyzer-results-9b388e578a149358959e2a23be8cceff.png differ diff --git a/assets/images/analyzer-settings-2-809849b80885a21e9a917ffb342a6048.png b/assets/images/analyzer-settings-2-809849b80885a21e9a917ffb342a6048.png new file mode 100644 index 0000000000..e428aa35bc Binary files /dev/null and b/assets/images/analyzer-settings-2-809849b80885a21e9a917ffb342a6048.png differ diff --git a/assets/images/analyzer-settings-db544d7e91b923b24f35769774a1bf95.png b/assets/images/analyzer-settings-db544d7e91b923b24f35769774a1bf95.png new file mode 100644 index 0000000000..e7f6c984a9 Binary files /dev/null and b/assets/images/analyzer-settings-db544d7e91b923b24f35769774a1bf95.png differ diff --git a/assets/images/appinsights-direct-f4e1f7a199145d67ebbb7673d9b05d06.png b/assets/images/appinsights-direct-f4e1f7a199145d67ebbb7673d9b05d06.png new file mode 100644 index 0000000000..279bd28b91 Binary files /dev/null and b/assets/images/appinsights-direct-f4e1f7a199145d67ebbb7673d9b05d06.png differ diff --git a/assets/images/appinsights-otel-a92aa102262a82cc6992c19e498507ee.png b/assets/images/appinsights-otel-a92aa102262a82cc6992c19e498507ee.png new file mode 100644 index 0000000000..aa214bcbb8 Binary files /dev/null and b/assets/images/appinsights-otel-a92aa102262a82cc6992c19e498507ee.png differ diff --git a/assets/images/assertion-attributes-0.11-70b59a9e08b0209252b6b753fd08b2b6.png b/assets/images/assertion-attributes-0.11-70b59a9e08b0209252b6b753fd08b2b6.png new file mode 100644 index 0000000000..7be961858a Binary files /dev/null and b/assets/images/assertion-attributes-0.11-70b59a9e08b0209252b6b753fd08b2b6.png differ diff --git a/assets/images/assertion-operators-0.11-98717360e132b63e4888085fa504d402.png b/assets/images/assertion-operators-0.11-98717360e132b63e4888085fa504d402.png new file mode 100644 index 0000000000..7463cd19d0 Binary files /dev/null and b/assets/images/assertion-operators-0.11-98717360e132b63e4888085fa504d402.png differ diff --git a/assets/images/assertion-values-0.11-7943bee09c7387d2137cf020dcd595a4.png b/assets/images/assertion-values-0.11-7943bee09c7387d2137cf020dcd595a4.png new file mode 100644 index 0000000000..543210cf71 Binary files /dev/null and b/assets/images/assertion-values-0.11-7943bee09c7387d2137cf020dcd595a4.png differ diff --git a/assets/images/automate-tab-66face0bd265d12c5c525c1ba17c753d.png b/assets/images/automate-tab-66face0bd265d12c5c525c1ba17c753d.png new file mode 100644 index 0000000000..5300a1129e Binary files /dev/null and b/assets/images/automate-tab-66face0bd265d12c5c525c1ba17c753d.png differ diff --git a/assets/images/awaiting-trace-0.11-3299e680a39d9c9fae62b3e0453bf694.png b/assets/images/awaiting-trace-0.11-3299e680a39d9c9fae62b3e0453bf694.png new file mode 100644 index 0000000000..809d91436a Binary files /dev/null and b/assets/images/awaiting-trace-0.11-3299e680a39d9c9fae62b3e0453bf694.png differ diff --git a/assets/images/aws-step-functions-2ac976fdcc905a02959c81073f996577.png b/assets/images/aws-step-functions-2ac976fdcc905a02959c81073f996577.png new file mode 100644 index 0000000000..72ac368055 Binary files /dev/null and b/assets/images/aws-step-functions-2ac976fdcc905a02959c81073f996577.png differ diff --git a/assets/images/awsxray-settings-2c5641bea0e40ce72679da99925b8a97.png b/assets/images/awsxray-settings-2c5641bea0e40ce72679da99925b8a97.png new file mode 100644 index 0000000000..aaa315cb72 Binary files /dev/null and b/assets/images/awsxray-settings-2c5641bea0e40ce72679da99925b8a97.png differ diff --git a/assets/images/check-shopping-cart-contents-item-lenght-33e6123291430b6b901dda80e48402e0.png b/assets/images/check-shopping-cart-contents-item-lenght-33e6123291430b6b901dda80e48402e0.png new file mode 100644 index 0000000000..6b85918498 Binary files /dev/null and b/assets/images/check-shopping-cart-contents-item-lenght-33e6123291430b6b901dda80e48402e0.png differ diff --git a/assets/images/check-shopping-cart-contents-product-catalog-0582743911bbdd3d848651669029e22b.png b/assets/images/check-shopping-cart-contents-product-catalog-0582743911bbdd3d848651669029e22b.png new file mode 100644 index 0000000000..da4c7bf80a Binary files /dev/null and b/assets/images/check-shopping-cart-contents-product-catalog-0582743911bbdd3d848651669029e22b.png differ diff --git a/assets/images/check-shopping-cart-contents-trace-c68512eb7e71171e211107ef3633cace.png b/assets/images/check-shopping-cart-contents-trace-c68512eb7e71171e211107ef3633cace.png new file mode 100644 index 0000000000..758fbd2ed3 Binary files /dev/null and b/assets/images/check-shopping-cart-contents-trace-c68512eb7e71171e211107ef3633cace.png differ diff --git a/assets/images/checkout-api-test-spec-1a4b02a141cc2634cf64c08bf57c2bea.png b/assets/images/checkout-api-test-spec-1a4b02a141cc2634cf64c08bf57c2bea.png new file mode 100644 index 0000000000..c39969927a Binary files /dev/null and b/assets/images/checkout-api-test-spec-1a4b02a141cc2634cf64c08bf57c2bea.png differ diff --git a/assets/images/checkout-cart-empty-test-spec-976a9d6fe05555fc253e2925ce3e5e88.png b/assets/images/checkout-cart-empty-test-spec-976a9d6fe05555fc253e2925ce3e5e88.png new file mode 100644 index 0000000000..db7dfdbe54 Binary files /dev/null and b/assets/images/checkout-cart-empty-test-spec-976a9d6fe05555fc253e2925ce3e5e88.png differ diff --git a/assets/images/checkout-payment-test-spec-49a39841e3a2075f4d4ee52391e7dc68.png b/assets/images/checkout-payment-test-spec-49a39841e3a2075f4d4ee52391e7dc68.png new file mode 100644 index 0000000000..6bc6b6bbcf Binary files /dev/null and b/assets/images/checkout-payment-test-spec-49a39841e3a2075f4d4ee52391e7dc68.png differ diff --git a/assets/images/checkout-shipping-test-spec-32a6b79d975979e27e5fbf6679590a10.png b/assets/images/checkout-shipping-test-spec-32a6b79d975979e27e5fbf6679590a10.png new file mode 100644 index 0000000000..17f9ed8b01 Binary files /dev/null and b/assets/images/checkout-shipping-test-spec-32a6b79d975979e27e5fbf6679590a10.png differ diff --git a/assets/images/checkout-trace-711ae31b0c68ecfe788a596a869ca3aa.png b/assets/images/checkout-trace-711ae31b0c68ecfe788a596a869ca3aa.png new file mode 100644 index 0000000000..88b29a4935 Binary files /dev/null and b/assets/images/checkout-trace-711ae31b0c68ecfe788a596a869ca3aa.png differ diff --git a/assets/images/choose-example-0.11-db237068b0c1ca899c21b5bcff0da9a1.png b/assets/images/choose-example-0.11-db237068b0c1ca899c21b5bcff0da9a1.png new file mode 100644 index 0000000000..bfbdf05004 Binary files /dev/null and b/assets/images/choose-example-0.11-db237068b0c1ca899c21b5bcff0da9a1.png differ diff --git a/assets/images/choose-example-pokemon-0.11-e189c60f4ac214a33969414a726f76ba.png b/assets/images/choose-example-pokemon-0.11-e189c60f4ac214a33969414a726f76ba.png new file mode 100644 index 0000000000..1182d8156f Binary files /dev/null and b/assets/images/choose-example-pokemon-0.11-e189c60f4ac214a33969414a726f76ba.png differ diff --git a/assets/images/choose-example-pokemon-import-0.11-5a0a248e8905ec04399957dbc413baa5.png b/assets/images/choose-example-pokemon-import-0.11-5a0a248e8905ec04399957dbc413baa5.png new file mode 100644 index 0000000000..90e08570b4 Binary files /dev/null and b/assets/images/choose-example-pokemon-import-0.11-5a0a248e8905ec04399957dbc413baa5.png differ diff --git a/assets/images/choose-trigger-0.13-e97ba46b0552c78fb0758fafc6d556f6.png b/assets/images/choose-trigger-0.13-e97ba46b0552c78fb0758fafc6d556f6.png new file mode 100644 index 0000000000..c793be071a Binary files /dev/null and b/assets/images/choose-trigger-0.13-e97ba46b0552c78fb0758fafc6d556f6.png differ diff --git a/assets/images/configure-awsxray-0.11.3-17bc975852015044585afca712990447.png b/assets/images/configure-awsxray-0.11.3-17bc975852015044585afca712990447.png new file mode 100644 index 0000000000..ca4c43e231 Binary files /dev/null and b/assets/images/configure-awsxray-0.11.3-17bc975852015044585afca712990447.png differ diff --git a/assets/images/configure-datadog-0.11.3-7a90065a744e45034fbaad8e274b5f43.png b/assets/images/configure-datadog-0.11.3-7a90065a744e45034fbaad8e274b5f43.png new file mode 100644 index 0000000000..4ecb9337be Binary files /dev/null and b/assets/images/configure-datadog-0.11.3-7a90065a744e45034fbaad8e274b5f43.png differ diff --git a/assets/images/create-button-0.11-e551a0ebce3bae9cf7392488d776e4db.png b/assets/images/create-button-0.11-e551a0ebce3bae9cf7392488d776e4db.png new file mode 100644 index 0000000000..c2f0337f26 Binary files /dev/null and b/assets/images/create-button-0.11-e551a0ebce3bae9cf7392488d776e4db.png differ diff --git a/assets/images/create-grpc-d0ac8db6677436dd601053bdc1ddc7e0.png b/assets/images/create-grpc-d0ac8db6677436dd601053bdc1ddc7e0.png new file mode 100644 index 0000000000..5228859add Binary files /dev/null and b/assets/images/create-grpc-d0ac8db6677436dd601053bdc1ddc7e0.png differ diff --git a/assets/images/create-test-0.13-18e81d633f0532851146ababbb7619ee.png b/assets/images/create-test-0.13-18e81d633f0532851146ababbb7619ee.png new file mode 100644 index 0000000000..8fa5adfbb4 Binary files /dev/null and b/assets/images/create-test-0.13-18e81d633f0532851146ababbb7619ee.png differ diff --git a/assets/images/create-test-spec-0.11-76e9ab352c1565608e34435ea388588f.png b/assets/images/create-test-spec-0.11-76e9ab352c1565608e34435ea388588f.png new file mode 100644 index 0000000000..13c9b867ef Binary files /dev/null and b/assets/images/create-test-spec-0.11-76e9ab352c1565608e34435ea388588f.png differ diff --git a/assets/images/create-test-spec-assertions-3d718497ce13b7260b8a094be21218cf.png b/assets/images/create-test-spec-assertions-3d718497ce13b7260b8a094be21218cf.png new file mode 100644 index 0000000000..2114022f2a Binary files /dev/null and b/assets/images/create-test-spec-assertions-3d718497ce13b7260b8a094be21218cf.png differ diff --git a/assets/images/create-testsuite-a73c1cb4486f61fa23a467b5ff5664cc.png b/assets/images/create-testsuite-a73c1cb4486f61fa23a467b5ff5664cc.png new file mode 100644 index 0000000000..e415cdf2fe Binary files /dev/null and b/assets/images/create-testsuite-a73c1cb4486f61fa23a467b5ff5664cc.png differ diff --git a/assets/images/create-vars-form-fff5bc50f55634a45394339131762990.png b/assets/images/create-vars-form-fff5bc50f55634a45394339131762990.png new file mode 100644 index 0000000000..86ed0f3010 Binary files /dev/null and b/assets/images/create-vars-form-fff5bc50f55634a45394339131762990.png differ diff --git a/assets/images/creatingatestdiagram-a00bfc411846c23dc33130634eba14e8.gif b/assets/images/creatingatestdiagram-a00bfc411846c23dc33130634eba14e8.gif new file mode 100644 index 0000000000..7c22fe9000 Binary files /dev/null and b/assets/images/creatingatestdiagram-a00bfc411846c23dc33130634eba14e8.gif differ diff --git a/assets/images/data-vars-8274aec4312034f43867d567cfbe8d42.png b/assets/images/data-vars-8274aec4312034f43867d567cfbe8d42.png new file mode 100644 index 0000000000..3aadd062e4 Binary files /dev/null and b/assets/images/data-vars-8274aec4312034f43867d567cfbe8d42.png differ diff --git a/assets/images/datadog-recipe-apm-front-page-eb3cdbdad6efa34856f07a1cd0d1b5a4.png b/assets/images/datadog-recipe-apm-front-page-eb3cdbdad6efa34856f07a1cd0d1b5a4.png new file mode 100644 index 0000000000..6e9915f978 Binary files /dev/null and b/assets/images/datadog-recipe-apm-front-page-eb3cdbdad6efa34856f07a1cd0d1b5a4.png differ diff --git a/assets/images/datadog-recipe-apm-trace-drilldown-97a709e3a918dc076ea359f1210cc9f6.png b/assets/images/datadog-recipe-apm-trace-drilldown-97a709e3a918dc076ea359f1210cc9f6.png new file mode 100644 index 0000000000..7a87b1d18a Binary files /dev/null and b/assets/images/datadog-recipe-apm-trace-drilldown-97a709e3a918dc076ea359f1210cc9f6.png differ diff --git a/assets/images/datadog-recipe-failed-test-23031370c2172cb217548d9c238449bf.png b/assets/images/datadog-recipe-failed-test-23031370c2172cb217548d9c238449bf.png new file mode 100644 index 0000000000..bf53dfb832 Binary files /dev/null and b/assets/images/datadog-recipe-failed-test-23031370c2172cb217548d9c238449bf.png differ diff --git a/assets/images/datadog-recipe-successful-test-3e0574377a09678fea7e8b80ba175b84.png b/assets/images/datadog-recipe-successful-test-3e0574377a09678fea7e8b80ba175b84.png new file mode 100644 index 0000000000..d291896947 Binary files /dev/null and b/assets/images/datadog-recipe-successful-test-3e0574377a09678fea7e8b80ba175b84.png differ diff --git a/assets/images/definition-vars-fa71a9a2d7ebaa981e441725f57ba244.png b/assets/images/definition-vars-fa71a9a2d7ebaa981e441725f57ba244.png new file mode 100644 index 0000000000..9025138e23 Binary files /dev/null and b/assets/images/definition-vars-fa71a9a2d7ebaa981e441725f57ba244.png differ diff --git a/assets/images/demo-settings-0.11.3-0d9cc9836f349c43fefe42d145662c10.png b/assets/images/demo-settings-0.11.3-0d9cc9836f349c43fefe42d145662c10.png new file mode 100644 index 0000000000..ffb8b504d3 Binary files /dev/null and b/assets/images/demo-settings-0.11.3-0d9cc9836f349c43fefe42d145662c10.png differ diff --git a/assets/images/dynatrace-distributed-traces-app-1f9cf77ab3854ff7d011d9bbba4ac31e.png b/assets/images/dynatrace-distributed-traces-app-1f9cf77ab3854ff7d011d9bbba4ac31e.png new file mode 100644 index 0000000000..a5ad312af7 Binary files /dev/null and b/assets/images/dynatrace-distributed-traces-app-1f9cf77ab3854ff7d011d9bbba4ac31e.png differ diff --git a/assets/images/dynatrace-failed-test-23031370c2172cb217548d9c238449bf.png b/assets/images/dynatrace-failed-test-23031370c2172cb217548d9c238449bf.png new file mode 100644 index 0000000000..bf53dfb832 Binary files /dev/null and b/assets/images/dynatrace-failed-test-23031370c2172cb217548d9c238449bf.png differ diff --git a/assets/images/dynatrace-successful-test-3e0574377a09678fea7e8b80ba175b84.png b/assets/images/dynatrace-successful-test-3e0574377a09678fea7e8b80ba175b84.png new file mode 100644 index 0000000000..d291896947 Binary files /dev/null and b/assets/images/dynatrace-successful-test-3e0574377a09678fea7e8b80ba175b84.png differ diff --git a/assets/images/dynatrace-trace-drilldown-c5229314a7a61f4ae9f6e9d6d8de368b.png b/assets/images/dynatrace-trace-drilldown-c5229314a7a61f4ae9f6e9d6d8de368b.png new file mode 100644 index 0000000000..2c7ab9eb35 Binary files /dev/null and b/assets/images/dynatrace-trace-drilldown-c5229314a7a61f4ae9f6e9d6d8de368b.png differ diff --git a/assets/images/edit-test-form-12a4a16a9b227b53273d7c4f075d697d.png b/assets/images/edit-test-form-12a4a16a9b227b53273d7c4f075d697d.png new file mode 100644 index 0000000000..436c00090e Binary files /dev/null and b/assets/images/edit-test-form-12a4a16a9b227b53273d7c4f075d697d.png differ diff --git a/assets/images/edit-test-home-dropdown-8713d84c2e495d5667ca232f3aa857ec.png b/assets/images/edit-test-home-dropdown-8713d84c2e495d5667ca232f3aa857ec.png new file mode 100644 index 0000000000..f05c5c4e77 Binary files /dev/null and b/assets/images/edit-test-home-dropdown-8713d84c2e495d5667ca232f3aa857ec.png differ diff --git a/assets/images/edit-test-trace-bdfc2f590992f2cf80e2702a6c0bae2e.png b/assets/images/edit-test-trace-bdfc2f590992f2cf80e2702a6c0bae2e.png new file mode 100644 index 0000000000..6c54673335 Binary files /dev/null and b/assets/images/edit-test-trace-bdfc2f590992f2cf80e2702a6c0bae2e.png differ diff --git a/assets/images/edit-test-trace-dropdown-097a020dca2de2c338412ca865de5252.png b/assets/images/edit-test-trace-dropdown-097a020dca2de2c338412ca865de5252.png new file mode 100644 index 0000000000..0659abfd9d Binary files /dev/null and b/assets/images/edit-test-trace-dropdown-097a020dca2de2c338412ca865de5252.png differ diff --git a/assets/images/export-trace-options-0.11-f21433509377c25a88694b8b950c4e47.png b/assets/images/export-trace-options-0.11-f21433509377c25a88694b8b950c4e47.png new file mode 100644 index 0000000000..6b69f56571 Binary files /dev/null and b/assets/images/export-trace-options-0.11-f21433509377c25a88694b8b950c4e47.png differ diff --git a/assets/images/exports-junit-0.11-6fe5e85e2c6d47361912698dae3d3266.png b/assets/images/exports-junit-0.11-6fe5e85e2c6d47361912698dae3d3266.png new file mode 100644 index 0000000000..25507cce82 Binary files /dev/null and b/assets/images/exports-junit-0.11-6fe5e85e2c6d47361912698dae3d3266.png differ diff --git a/assets/images/exports-junit-b9e427516121a5310af5cbec3d8bf780.png b/assets/images/exports-junit-b9e427516121a5310af5cbec3d8bf780.png new file mode 100644 index 0000000000..f63a905e86 Binary files /dev/null and b/assets/images/exports-junit-b9e427516121a5310af5cbec3d8bf780.png differ diff --git a/assets/images/exports-test-definition-0.11-6a9f3ff3ecd2c0350d8ff0ec6930da80.png b/assets/images/exports-test-definition-0.11-6a9f3ff3ecd2c0350d8ff0ec6930da80.png new file mode 100644 index 0000000000..852e33a85c Binary files /dev/null and b/assets/images/exports-test-definition-0.11-6a9f3ff3ecd2c0350d8ff0ec6930da80.png differ diff --git a/assets/images/exports-test-definition-17e5df5e4f432d6096272a6406944556.png b/assets/images/exports-test-definition-17e5df5e4f432d6096272a6406944556.png new file mode 100644 index 0000000000..c381956f76 Binary files /dev/null and b/assets/images/exports-test-definition-17e5df5e4f432d6096272a6406944556.png differ diff --git a/assets/images/exports-trace-options-94e1015a6002079400ab91cd6903a578.png b/assets/images/exports-trace-options-94e1015a6002079400ab91cd6903a578.png new file mode 100644 index 0000000000..3d3b351230 Binary files /dev/null and b/assets/images/exports-trace-options-94e1015a6002079400ab91cd6903a578.png differ diff --git a/assets/images/finished-trace-0.11-eb55625a356d02c881e960b49541d8dc.png b/assets/images/finished-trace-0.11-eb55625a356d02c881e960b49541d8dc.png new file mode 100644 index 0000000000..c76cef8eec Binary files /dev/null and b/assets/images/finished-trace-0.11-eb55625a356d02c881e960b49541d8dc.png differ diff --git a/assets/images/get-pokemon-by-id-api-test-spec-28803fd335ae3e027dbe1e09d3ec8cb9.png b/assets/images/get-pokemon-by-id-api-test-spec-28803fd335ae3e027dbe1e09d3ec8cb9.png new file mode 100644 index 0000000000..31046e2955 Binary files /dev/null and b/assets/images/get-pokemon-by-id-api-test-spec-28803fd335ae3e027dbe1e09d3ec8cb9.png differ diff --git a/assets/images/get-pokemon-by-id-db-no-query-test-spec-8ed173ccda4aeb6df1d14f8e50c30023.png b/assets/images/get-pokemon-by-id-db-no-query-test-spec-8ed173ccda4aeb6df1d14f8e50c30023.png new file mode 100644 index 0000000000..1dab64a61a Binary files /dev/null and b/assets/images/get-pokemon-by-id-db-no-query-test-spec-8ed173ccda4aeb6df1d14f8e50c30023.png differ diff --git a/assets/images/get-pokemon-by-id-db-query-test-spec-58f77885b9ae58ae62ccb836f1766c94.png b/assets/images/get-pokemon-by-id-db-query-test-spec-58f77885b9ae58ae62ccb836f1766c94.png new file mode 100644 index 0000000000..f3e6b8f628 Binary files /dev/null and b/assets/images/get-pokemon-by-id-db-query-test-spec-58f77885b9ae58ae62ccb836f1766c94.png differ diff --git a/assets/images/get-pokemon-by-id-redis-query-test-spec-9a71452c55098fd744926666c9343170.png b/assets/images/get-pokemon-by-id-redis-query-test-spec-9a71452c55098fd744926666c9343170.png new file mode 100644 index 0000000000..1639d80610 Binary files /dev/null and b/assets/images/get-pokemon-by-id-redis-query-test-spec-9a71452c55098fd744926666c9343170.png differ diff --git a/assets/images/get-pokemon-by-id-redis-set-test-spec-e8a50d2f17ca3604bfaa10054d19dd0d.png b/assets/images/get-pokemon-by-id-redis-set-test-spec-e8a50d2f17ca3604bfaa10054d19dd0d.png new file mode 100644 index 0000000000..be34e4b067 Binary files /dev/null and b/assets/images/get-pokemon-by-id-redis-set-test-spec-e8a50d2f17ca3604bfaa10054d19dd0d.png differ diff --git a/assets/images/get-pokemon-by-id-trace-cachehit-d3709b282862f0c259c6e4ac212b856b.png b/assets/images/get-pokemon-by-id-trace-cachehit-d3709b282862f0c259c6e4ac212b856b.png new file mode 100644 index 0000000000..32178f7fb8 Binary files /dev/null and b/assets/images/get-pokemon-by-id-trace-cachehit-d3709b282862f0c259c6e4ac212b856b.png differ diff --git a/assets/images/get-pokemon-by-id-trace-cachemiss-05b6015135529457df14833d58199f2b.png b/assets/images/get-pokemon-by-id-trace-cachemiss-05b6015135529457df14833d58199f2b.png new file mode 100644 index 0000000000..4d0c069b0e Binary files /dev/null and b/assets/images/get-pokemon-by-id-trace-cachemiss-05b6015135529457df14833d58199f2b.png differ diff --git a/assets/images/get-recommended-products-feature-flagger-test-spec-c858e453dc7cd2e78f813c6a66d94570.png b/assets/images/get-recommended-products-feature-flagger-test-spec-c858e453dc7cd2e78f813c6a66d94570.png new file mode 100644 index 0000000000..6143e695f2 Binary files /dev/null and b/assets/images/get-recommended-products-feature-flagger-test-spec-c858e453dc7cd2e78f813c6a66d94570.png differ diff --git a/assets/images/get-recommended-products-get-product-test-spec-53951fd0269678842ffd35394f162598.png b/assets/images/get-recommended-products-get-product-test-spec-53951fd0269678842ffd35394f162598.png new file mode 100644 index 0000000000..42c5847b4d Binary files /dev/null and b/assets/images/get-recommended-products-get-product-test-spec-53951fd0269678842ffd35394f162598.png differ diff --git a/assets/images/get-recommended-products-trace-d068772054e457b60ab936c103b15392.png b/assets/images/get-recommended-products-trace-d068772054e457b60ab936c103b15392.png new file mode 100644 index 0000000000..a298e5e279 Binary files /dev/null and b/assets/images/get-recommended-products-trace-d068772054e457b60ab936c103b15392.png differ diff --git a/assets/images/honeycomb-settings-80b7a4a085d4815a178da6f8029be9c1.png b/assets/images/honeycomb-settings-80b7a4a085d4815a178da6f8029be9c1.png new file mode 100644 index 0000000000..0c020705df Binary files /dev/null and b/assets/images/honeycomb-settings-80b7a4a085d4815a178da6f8029be9c1.png differ diff --git a/assets/images/import-pokemon-api-test-spec-9d675cd08e1e5adb7ee0f4db28fd604d.png b/assets/images/import-pokemon-api-test-spec-9d675cd08e1e5adb7ee0f4db28fd604d.png new file mode 100644 index 0000000000..42d0ca2637 Binary files /dev/null and b/assets/images/import-pokemon-api-test-spec-9d675cd08e1e5adb7ee0f4db28fd604d.png differ diff --git a/assets/images/import-pokemon-db-latency-test-spec-e52791c95be226fa0e1402c4486be532.png b/assets/images/import-pokemon-db-latency-test-spec-e52791c95be226fa0e1402c4486be532.png new file mode 100644 index 0000000000..15241c59ce Binary files /dev/null and b/assets/images/import-pokemon-db-latency-test-spec-e52791c95be226fa0e1402c4486be532.png differ diff --git a/assets/images/import-pokemon-from-stream-database-latency-8a00c62656d409312d85684fa7d821d3.png b/assets/images/import-pokemon-from-stream-database-latency-8a00c62656d409312d85684fa7d821d3.png new file mode 100644 index 0000000000..338e96f96f Binary files /dev/null and b/assets/images/import-pokemon-from-stream-database-latency-8a00c62656d409312d85684fa7d821d3.png differ diff --git a/assets/images/import-pokemon-from-stream-get-pokeapi-d48734c191018465f5d3ab189f2fd5a5.png b/assets/images/import-pokemon-from-stream-get-pokeapi-d48734c191018465f5d3ab189f2fd5a5.png new file mode 100644 index 0000000000..04492946aa Binary files /dev/null and b/assets/images/import-pokemon-from-stream-get-pokeapi-d48734c191018465f5d3ab189f2fd5a5.png differ diff --git a/assets/images/import-pokemon-from-stream-message-received-27a7b9659f614ea1400950ad42e20307.png b/assets/images/import-pokemon-from-stream-message-received-27a7b9659f614ea1400950ad42e20307.png new file mode 100644 index 0000000000..08e42b510d Binary files /dev/null and b/assets/images/import-pokemon-from-stream-message-received-27a7b9659f614ea1400950ad42e20307.png differ diff --git a/assets/images/import-pokemon-from-stream-trace-c330fabb1d731b377afb2411671cf854.png b/assets/images/import-pokemon-from-stream-trace-c330fabb1d731b377afb2411671cf854.png new file mode 100644 index 0000000000..597918a867 Binary files /dev/null and b/assets/images/import-pokemon-from-stream-trace-c330fabb1d731b377afb2411671cf854.png differ diff --git a/assets/images/import-pokemon-from-stream-use-case-executed-e1cdc3287dfc2f3d27b870b5cc0dfe0b.png b/assets/images/import-pokemon-from-stream-use-case-executed-e1cdc3287dfc2f3d27b870b5cc0dfe0b.png new file mode 100644 index 0000000000..64124a5d6f Binary files /dev/null and b/assets/images/import-pokemon-from-stream-use-case-executed-e1cdc3287dfc2f3d27b870b5cc0dfe0b.png differ diff --git a/assets/images/import-pokemon-message-dequeue-test-spec-f8a3e985984c2d532dbf86023eef120d.png b/assets/images/import-pokemon-message-dequeue-test-spec-f8a3e985984c2d532dbf86023eef120d.png new file mode 100644 index 0000000000..fb03990cc4 Binary files /dev/null and b/assets/images/import-pokemon-message-dequeue-test-spec-f8a3e985984c2d532dbf86023eef120d.png differ diff --git a/assets/images/import-pokemon-message-enqueue-test-spec-32297657baf2bd7c228969234177407f.png b/assets/images/import-pokemon-message-enqueue-test-spec-32297657baf2bd7c228969234177407f.png new file mode 100644 index 0000000000..4859543f0e Binary files /dev/null and b/assets/images/import-pokemon-message-enqueue-test-spec-32297657baf2bd7c228969234177407f.png differ diff --git a/assets/images/import-pokemon-pokeapi-call-test-spec-383afa38e11a20f031a47330f9a8ce38.png b/assets/images/import-pokemon-pokeapi-call-test-spec-383afa38e11a20f031a47330f9a8ce38.png new file mode 100644 index 0000000000..ae16d092c0 Binary files /dev/null and b/assets/images/import-pokemon-pokeapi-call-test-spec-383afa38e11a20f031a47330f9a8ce38.png differ diff --git a/assets/images/import-pokemon-trace-f9d7ab3a3bbcba45ff785aab36fab085.png b/assets/images/import-pokemon-trace-f9d7ab3a3bbcba45ff785aab36fab085.png new file mode 100644 index 0000000000..126426150e Binary files /dev/null and b/assets/images/import-pokemon-trace-f9d7ab3a3bbcba45ff785aab36fab085.png differ diff --git a/assets/images/input-values-ed1d74e1c31d1194dd212297e3b3e6b6.png b/assets/images/input-values-ed1d74e1c31d1194dd212297e3b3e6b6.png new file mode 100644 index 0000000000..69fd6b1a75 Binary files /dev/null and b/assets/images/input-values-ed1d74e1c31d1194dd212297e3b3e6b6.png differ diff --git a/assets/images/list-of-tests-run-50528eb8188ee2fc0968c3e8bdc560fa.png b/assets/images/list-of-tests-run-50528eb8188ee2fc0968c3e8bdc560fa.png new file mode 100644 index 0000000000..8ac524768d Binary files /dev/null and b/assets/images/list-of-tests-run-50528eb8188ee2fc0968c3e8bdc560fa.png differ diff --git a/assets/images/list-pokemons-api-test-spec-81016722f4f6eccc9a63347316058a87.png b/assets/images/list-pokemons-api-test-spec-81016722f4f6eccc9a63347316058a87.png new file mode 100644 index 0000000000..b8805e7b60 Binary files /dev/null and b/assets/images/list-pokemons-api-test-spec-81016722f4f6eccc9a63347316058a87.png differ diff --git a/assets/images/list-pokemons-db-latency-test-spec-8dbd5ba04b1ad5586fe8f073842f2ed0.png b/assets/images/list-pokemons-db-latency-test-spec-8dbd5ba04b1ad5586fe8f073842f2ed0.png new file mode 100644 index 0000000000..005637f52a Binary files /dev/null and b/assets/images/list-pokemons-db-latency-test-spec-8dbd5ba04b1ad5586fe8f073842f2ed0.png differ diff --git a/assets/images/list-pokemons-db-query-test-spec-936dd9ad2a13833c00601e8e9a32556e.png b/assets/images/list-pokemons-db-query-test-spec-936dd9ad2a13833c00601e8e9a32556e.png new file mode 100644 index 0000000000..d0e49fa1fb Binary files /dev/null and b/assets/images/list-pokemons-db-query-test-spec-936dd9ad2a13833c00601e8e9a32556e.png differ diff --git a/assets/images/list-pokemons-trace-b6efacda88f41fd0836f755acabc0637.png b/assets/images/list-pokemons-trace-b6efacda88f41fd0836f755acabc0637.png new file mode 100644 index 0000000000..f5ecec5fcd Binary files /dev/null and b/assets/images/list-pokemons-trace-b6efacda88f41fd0836f755acabc0637.png differ diff --git a/assets/images/main-screen-0.11-cfb6b328cd6a37a3da4fff264473b8b4.png b/assets/images/main-screen-0.11-cfb6b328cd6a37a3da4fff264473b8b4.png new file mode 100644 index 0000000000..20c5c7068c Binary files /dev/null and b/assets/images/main-screen-0.11-cfb6b328cd6a37a3da4fff264473b8b4.png differ diff --git a/assets/images/open-telemetry-settings-482dae64a2d1b13c34d5df6fdca9a439.png b/assets/images/open-telemetry-settings-482dae64a2d1b13c34d5df6fdca9a439.png new file mode 100644 index 0000000000..3e51bf3246 Binary files /dev/null and b/assets/images/open-telemetry-settings-482dae64a2d1b13c34d5df6fdca9a439.png differ diff --git a/assets/images/opensearch-settings-88a927b0ef0f1d195461e7881b78f6d2.png b/assets/images/opensearch-settings-88a927b0ef0f1d195461e7881b78f6d2.png new file mode 100644 index 0000000000..2fa7eed6cf Binary files /dev/null and b/assets/images/opensearch-settings-88a927b0ef0f1d195461e7881b78f6d2.png differ diff --git a/assets/images/pokeshop-list-77a8013a017df9404efca27a024a53fe.png b/assets/images/pokeshop-list-77a8013a017df9404efca27a024a53fe.png new file mode 100644 index 0000000000..e8b088a261 Binary files /dev/null and b/assets/images/pokeshop-list-77a8013a017df9404efca27a024a53fe.png differ diff --git a/assets/images/provide-addl-information-0.11-9dc5b45b4e7550061a8f785089d89ed0.png b/assets/images/provide-addl-information-0.11-9dc5b45b4e7550061a8f785089d89ed0.png new file mode 100644 index 0000000000..f1fe097d5b Binary files /dev/null and b/assets/images/provide-addl-information-0.11-9dc5b45b4e7550061a8f785089d89ed0.png differ diff --git a/assets/images/run-test-and-option-0.11-282b7fc9ff92732e7d508ffcd1344846.png b/assets/images/run-test-and-option-0.11-282b7fc9ff92732e7d508ffcd1344846.png new file mode 100644 index 0000000000..a95d888cc3 Binary files /dev/null and b/assets/images/run-test-and-option-0.11-282b7fc9ff92732e7d508ffcd1344846.png differ diff --git a/assets/images/running-testsuite-a9ff1bc49f2327f15d27df3b5b59e71e.png b/assets/images/running-testsuite-a9ff1bc49f2327f15d27df3b5b59e71e.png new file mode 100644 index 0000000000..58d20d159c Binary files /dev/null and b/assets/images/running-testsuite-a9ff1bc49f2327f15d27df3b5b59e71e.png differ diff --git a/assets/images/sam-step-functions-35d8757498b8638a12a39fe298739212.png b/assets/images/sam-step-functions-35d8757498b8638a12a39fe298739212.png new file mode 100644 index 0000000000..61243d4eee Binary files /dev/null and b/assets/images/sam-step-functions-35d8757498b8638a12a39fe298739212.png differ diff --git a/assets/images/save-test-spec-0.11-448a7184c399de501d67a727833603a0.png b/assets/images/save-test-spec-0.11-448a7184c399de501d67a727833603a0.png new file mode 100644 index 0000000000..22ebdfdd3a Binary files /dev/null and b/assets/images/save-test-spec-0.11-448a7184c399de501d67a727833603a0.png differ diff --git a/assets/images/select-environment-drop-down-f4376ade8720811cc9ead8e90379a3b1.png b/assets/images/select-environment-drop-down-f4376ade8720811cc9ead8e90379a3b1.png new file mode 100644 index 0000000000..dc6a9c1a11 Binary files /dev/null and b/assets/images/select-environment-drop-down-f4376ade8720811cc9ead8e90379a3b1.png differ diff --git a/assets/images/select-test-0.11-c720e0d79fbd0bc99f2793396ff58d48.png b/assets/images/select-test-0.11-c720e0d79fbd0bc99f2793396ff58d48.png new file mode 100644 index 0000000000..8eb112d859 Binary files /dev/null and b/assets/images/select-test-0.11-c720e0d79fbd0bc99f2793396ff58d48.png differ diff --git a/assets/images/select-test-54db6567dac85a7cfd66779d5749636d.png b/assets/images/select-test-54db6567dac85a7cfd66779d5749636d.png new file mode 100644 index 0000000000..54485ff83b Binary files /dev/null and b/assets/images/select-test-54db6567dac85a7cfd66779d5749636d.png differ diff --git a/assets/images/selected-span-0.11-8bb791745c1c12de41e5d8b65fc6a8f2.png b/assets/images/selected-span-0.11-8bb791745c1c12de41e5d8b65fc6a8f2.png new file mode 100644 index 0000000000..80281caf51 Binary files /dev/null and b/assets/images/selected-span-0.11-8bb791745c1c12de41e5d8b65fc6a8f2.png differ diff --git a/assets/images/show-environment-definition-69ba7aef6b87d684e9e8c311e5197aa0.png b/assets/images/show-environment-definition-69ba7aef6b87d684e9e8c311e5197aa0.png new file mode 100644 index 0000000000..23783b7d54 Binary files /dev/null and b/assets/images/show-environment-definition-69ba7aef6b87d684e9e8c311e5197aa0.png differ diff --git a/assets/images/span-example-e71e6c690b7c85e91ccceb47d53891ea.png b/assets/images/span-example-e71e6c690b7c85e91ccceb47d53891ea.png new file mode 100644 index 0000000000..23e5a1c7d8 Binary files /dev/null and b/assets/images/span-example-e71e6c690b7c85e91ccceb47d53891ea.png differ diff --git a/assets/images/terraform-output-028a487ecef4f57cbe2a47b172dc87d4.png b/assets/images/terraform-output-028a487ecef4f57cbe2a47b172dc87d4.png new file mode 100644 index 0000000000..b1a06625ea Binary files /dev/null and b/assets/images/terraform-output-028a487ecef4f57cbe2a47b172dc87d4.png differ diff --git a/assets/images/terraform-serverless-diagram-b26eedc20b44f4e41fc9d6df6aabbb1d.png b/assets/images/terraform-serverless-diagram-b26eedc20b44f4e41fc9d6df6aabbb1d.png new file mode 100644 index 0000000000..04d31b1b3e Binary files /dev/null and b/assets/images/terraform-serverless-diagram-b26eedc20b44f4e41fc9d6df6aabbb1d.png differ diff --git a/assets/images/terraform-step-functions-2c02a787a9c756fae747316eb18fb4c5.png b/assets/images/terraform-step-functions-2c02a787a9c756fae747316eb18fb4c5.png new file mode 100644 index 0000000000..66c78cbb12 Binary files /dev/null and b/assets/images/terraform-step-functions-2c02a787a9c756fae747316eb18fb4c5.png differ diff --git a/assets/images/test-output-4728ba75afad2c8ed8cffc8c925c3ce2.png b/assets/images/test-output-4728ba75afad2c8ed8cffc8c925c3ce2.png new file mode 100644 index 0000000000..1de818bcab Binary files /dev/null and b/assets/images/test-output-4728ba75afad2c8ed8cffc8c925c3ce2.png differ diff --git a/assets/images/test-outputs-01-fc81c713e8dd243715e4c77bb3873e69.png b/assets/images/test-outputs-01-fc81c713e8dd243715e4c77bb3873e69.png new file mode 100644 index 0000000000..2b7bcd3fe7 Binary files /dev/null and b/assets/images/test-outputs-01-fc81c713e8dd243715e4c77bb3873e69.png differ diff --git a/assets/images/test-outputs-02-1e91954ebc59bad3a36d1c171faadc5f.png b/assets/images/test-outputs-02-1e91954ebc59bad3a36d1c171faadc5f.png new file mode 100644 index 0000000000..91bdc8b876 Binary files /dev/null and b/assets/images/test-outputs-02-1e91954ebc59bad3a36d1c171faadc5f.png differ diff --git a/assets/images/test-outputs-03-418bdf2abef9c6d9c61221269d672399.png b/assets/images/test-outputs-03-418bdf2abef9c6d9c61221269d672399.png new file mode 100644 index 0000000000..190d8ad20d Binary files /dev/null and b/assets/images/test-outputs-03-418bdf2abef9c6d9c61221269d672399.png differ diff --git a/assets/images/test-outputs-04-9a5bc58a7c81507ef4b0d0d40b778f77.png b/assets/images/test-outputs-04-9a5bc58a7c81507ef4b0d0d40b778f77.png new file mode 100644 index 0000000000..1cbf68428f Binary files /dev/null and b/assets/images/test-outputs-04-9a5bc58a7c81507ef4b0d0d40b778f77.png differ diff --git a/assets/images/test-outputs-05-c11e9f0bc4a3c9608e89d0e1f29864ce.png b/assets/images/test-outputs-05-c11e9f0bc4a3c9608e89d0e1f29864ce.png new file mode 100644 index 0000000000..25de22f847 Binary files /dev/null and b/assets/images/test-outputs-05-c11e9f0bc4a3c9608e89d0e1f29864ce.png differ diff --git a/assets/images/test-outputs-06-336d4c2c63d2b2c5caaa152a114c4513.png b/assets/images/test-outputs-06-336d4c2c63d2b2c5caaa152a114c4513.png new file mode 100644 index 0000000000..ef6d3f8e70 Binary files /dev/null and b/assets/images/test-outputs-06-336d4c2c63d2b2c5caaa152a114c4513.png differ diff --git a/assets/images/test-outputs-07-d6c4d1613dd5a3a61a52eca9ba72aca9.png b/assets/images/test-outputs-07-d6c4d1613dd5a3a61a52eca9ba72aca9.png new file mode 100644 index 0000000000..3e017c9f4a Binary files /dev/null and b/assets/images/test-outputs-07-d6c4d1613dd5a3a61a52eca9ba72aca9.png differ diff --git a/assets/images/test-run-list-795e94d76d799a4e63c98ebe8a5ffa03.png b/assets/images/test-run-list-795e94d76d799a4e63c98ebe8a5ffa03.png new file mode 100644 index 0000000000..489bc01156 Binary files /dev/null and b/assets/images/test-run-list-795e94d76d799a4e63c98ebe8a5ffa03.png differ diff --git a/assets/images/test-runner-in-app-384827a7f1e28ff5511e01cc3b5ebaec.png b/assets/images/test-runner-in-app-384827a7f1e28ff5511e01cc3b5ebaec.png new file mode 100644 index 0000000000..c9a82d55ce Binary files /dev/null and b/assets/images/test-runner-in-app-384827a7f1e28ff5511e01cc3b5ebaec.png differ diff --git a/assets/images/test-runner-settings-04ce718e45c157c496ddcaa744317c7d.png b/assets/images/test-runner-settings-04ce718e45c157c496ddcaa744317c7d.png new file mode 100644 index 0000000000..e45a4dcb77 Binary files /dev/null and b/assets/images/test-runner-settings-04ce718e45c157c496ddcaa744317c7d.png differ diff --git a/assets/images/test-spec-list-0.11-0d46775e2cded07d3349b6afe247ba2f.png b/assets/images/test-spec-list-0.11-0d46775e2cded07d3349b6afe247ba2f.png new file mode 100644 index 0000000000..edeae313b6 Binary files /dev/null and b/assets/images/test-spec-list-0.11-0d46775e2cded07d3349b6afe247ba2f.png differ diff --git a/assets/images/test-tab-0.11-8e609bdade721107f2a92ac8dfe95246.png b/assets/images/test-tab-0.11-8e609bdade721107f2a92ac8dfe95246.png new file mode 100644 index 0000000000..a521e79af8 Binary files /dev/null and b/assets/images/test-tab-0.11-8e609bdade721107f2a92ac8dfe95246.png differ diff --git a/assets/images/tests-actions-0.11-880a879a4790fad3cffd3d903e7da62e.png b/assets/images/tests-actions-0.11-880a879a4790fad3cffd3d903e7da62e.png new file mode 100644 index 0000000000..41c75507de Binary files /dev/null and b/assets/images/tests-actions-0.11-880a879a4790fad3cffd3d903e7da62e.png differ diff --git a/assets/images/text-search-database-994f2ad033036d9a97ab54da4044ba7f.png b/assets/images/text-search-database-994f2ad033036d9a97ab54da4044ba7f.png new file mode 100644 index 0000000000..0deb40fd9b Binary files /dev/null and b/assets/images/text-search-database-994f2ad033036d9a97ab54da4044ba7f.png differ diff --git a/assets/images/text-search-http-658421bfe56a0002d26f61da9c2ad6e2.png b/assets/images/text-search-http-658421bfe56a0002d26f61da9c2ad6e2.png new file mode 100644 index 0000000000..de4303147a Binary files /dev/null and b/assets/images/text-search-http-658421bfe56a0002d26f61da9c2ad6e2.png differ diff --git a/assets/images/timeline-view-0.11-97113f448ab8e13df55c08c6b9b839ee.png b/assets/images/timeline-view-0.11-97113f448ab8e13df55c08c6b9b839ee.png new file mode 100644 index 0000000000..1425ee11c9 Binary files /dev/null and b/assets/images/timeline-view-0.11-97113f448ab8e13df55c08c6b9b839ee.png differ diff --git a/assets/images/trace-example-4b8e9df276d5909dac8809ba620b5d1c.png b/assets/images/trace-example-4b8e9df276d5909dac8809ba620b5d1c.png new file mode 100644 index 0000000000..4be7c84035 Binary files /dev/null and b/assets/images/trace-example-4b8e9df276d5909dac8809ba620b5d1c.png differ diff --git a/assets/images/trace-polling-settings-0.11.3-3a1c291ba54b81a434f7d77c1f90a1ea.png b/assets/images/trace-polling-settings-0.11.3-3a1c291ba54b81a434f7d77c1f90a1ea.png new file mode 100644 index 0000000000..23ef422494 Binary files /dev/null and b/assets/images/trace-polling-settings-0.11.3-3a1c291ba54b81a434f7d77c1f90a1ea.png differ diff --git a/assets/images/trace-tab-0.11-8e44b48a80772acb2f47388e354d52e8.png b/assets/images/trace-tab-0.11-8e44b48a80772acb2f47388e354d52e8.png new file mode 100644 index 0000000000..873c5029c1 Binary files /dev/null and b/assets/images/trace-tab-0.11-8e44b48a80772acb2f47388e354d52e8.png differ diff --git a/assets/images/trace-tab-icons-0.11-98f2d60ee0e1195adb9cdbb22f27eebb.png b/assets/images/trace-tab-icons-0.11-98f2d60ee0e1195adb9cdbb22f27eebb.png new file mode 100644 index 0000000000..5ee2480b51 Binary files /dev/null and b/assets/images/trace-tab-icons-0.11-98f2d60ee0e1195adb9cdbb22f27eebb.png differ diff --git a/assets/images/tracetest-dashboard-597116b88189d77d836cc27a0b932444.png b/assets/images/tracetest-dashboard-597116b88189d77d836cc27a0b932444.png new file mode 100644 index 0000000000..52efa0bcfd Binary files /dev/null and b/assets/images/tracetest-dashboard-597116b88189d77d836cc27a0b932444.png differ diff --git a/assets/images/undefined-variables-modal-b589b034b7a4cdf6132ab49f8ee3ccab.png b/assets/images/undefined-variables-modal-b589b034b7a4cdf6132ab49f8ee3ccab.png new file mode 100644 index 0000000000..d23ddd5c58 Binary files /dev/null and b/assets/images/undefined-variables-modal-b589b034b7a4cdf6132ab49f8ee3ccab.png differ diff --git a/assets/js/002139d1.4f862204.js b/assets/js/002139d1.4f862204.js new file mode 100644 index 0000000000..271e65c4c0 --- /dev/null +++ b/assets/js/002139d1.4f862204.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7647],{3905:(e,n,t)=>{t.d(n,{Zo:()=>u,kt:()=>f});var a=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var o=a.createContext({}),p=function(e){var n=a.useContext(o),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},u=function(e){var n=p(e.components);return a.createElement(o.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=p(t),d=r,f=c["".concat(o,".").concat(d)]||c[d]||m[d]||i;return t?a.createElement(f,l(l({ref:n},u),{},{components:t})):a.createElement(f,l({ref:n},u))}));function f(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,l=new Array(i);l[0]=d;var s={};for(var o in n)hasOwnProperty.call(n,o)&&(s[o]=n[o]);s.originalType=e,s[c]="string"==typeof e?e:r,l[1]=s;for(var p=2;p{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var a=t(87462),r=(t(67294),t(3905));const i={},l="span-naming",s={unversionedId:"analyzer/rules/span-naming",id:"analyzer/rules/span-naming",title:"span-naming",description:"Enforce span names that identify a\xa0class of Spans, rather than individual Span instances.",source:"@site/docs/analyzer/rules/span-naming.md",sourceDirName:"analyzer/rules",slug:"/analyzer/rules/span-naming",permalink:"/analyzer/rules/span-naming",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/analyzer/rules/span-naming.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"OTel Semantic Conventions",permalink:"/analyzer/plugins/otel-semantic-conventions"},next:{title:"attribute-naming",permalink:"/analyzer/rules/attribute-naming"}},o={},p=[{value:"Rule Details",id:"rule-details",level:2},{value:"HTTP spans:",id:"http-spans",level:3},{value:"Database spans:",id:"database-spans",level:3},{value:"RPC spans:",id:"rpc-spans",level:3},{value:"Messaging spans:",id:"messaging-spans",level:3},{value:"Options",id:"options",level:2},{value:"When Not To Use It",id:"when-not-to-use-it",level:2}],u={toc:p},c="wrapper";function m(e){let{components:n,...t}=e;return(0,r.kt)(c,(0,a.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"span-naming"},"span-naming"),(0,r.kt)("p",null,"Enforce span names that identify a\xa0class of Spans, rather than individual Span instances."),(0,r.kt)("h2",{id:"rule-details"},"Rule Details"),(0,r.kt)("p",null,"The\xa0span name\xa0concisely identifies the work represented by the Span, for example, an RPC method name, a function name, or the name of a subtask or stage within a larger computation. The span name SHOULD be the most general string that identifies a\xa0class of Spans, rather than individual Span instances while still being human-readable."),(0,r.kt)("p",null,"The following OTel semantic conventions for span names are defined:"),(0,r.kt)("h3",{id:"http-spans"},"HTTP spans:"),(0,r.kt)("p",null,"If span kind is ",(0,r.kt)("inlineCode",{parentName:"p"},'"server"'),", the name should follow this format:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"{http.method} {http.route}\n")),(0,r.kt)("p",null,"If span kind is ",(0,r.kt)("inlineCode",{parentName:"p"},'"client"'),", the name should follow this format:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"{http.method}\n")),(0,r.kt)("h3",{id:"database-spans"},"Database spans:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"{db.operation} {db.name}.{db.sql.table}\n")),(0,r.kt)("p",null,"If ",(0,r.kt)("inlineCode",{parentName:"p"},"db.sql.table")," is not available, the name should follow this format:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"{db.operation} {db.name}\n")),(0,r.kt)("h3",{id:"rpc-spans"},"RPC spans:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"{package}.{service}/{method}\n")),(0,r.kt)("h3",{id:"messaging-spans"},"Messaging spans:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"{destination name} {operation name}\n")),(0,r.kt)("h2",{id:"options"},"Options"),(0,r.kt)("p",null,"This rule has the following options:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"error"')," requires span names to follow the OTel semantic convention"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"disabled"')," disables the span name verification"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"warning"')," verifies span names to follow the OTel semantic convention but does not impact the analyzer score")),(0,r.kt)("h2",{id:"when-not-to-use-it"},"When Not To Use It"),(0,r.kt)("p",null,"If you don\u2019t want to enforce OTel span names, don\u2019t enable this rule."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/00c70e2f.66b2cf7a.js b/assets/js/00c70e2f.66b2cf7a.js new file mode 100644 index 0000000000..5c7e01cd1b --- /dev/null +++ b/assets/js/00c70e2f.66b2cf7a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9260],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},l=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=s(n),d=a,f=u["".concat(p,".").concat(d)]||u[d]||h[d]||o;return n?r.createElement(f,c(c({ref:t},l),{},{components:n})):r.createElement(f,c({ref:t},l))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=d;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[u]="string"==typeof e?e:a,c[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>s});var r=n(87462),a=(n(67294),n(3905));const o={},c="OpenSearch",i={unversionedId:"configuration/connecting-to-data-stores/opensearch",id:"configuration/connecting-to-data-stores/opensearch",title:"OpenSearch",description:"Tracetest fetches traces from OpenSearch's default port 9200.",source:"@site/docs/configuration/connecting-to-data-stores/opensearch.md",sourceDirName:"configuration/connecting-to-data-stores",slug:"/configuration/connecting-to-data-stores/opensearch",permalink:"/configuration/connecting-to-data-stores/opensearch",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/connecting-to-data-stores/opensearch.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"New Relic",permalink:"/configuration/connecting-to-data-stores/new-relic"},next:{title:"OpenTelemetry Collector",permalink:"/configuration/connecting-to-data-stores/opentelemetry-collector"}},p={},s=[{value:"Configure Tracetest to Use OpenSearch as a Trace Data Store",id:"configure-tracetest-to-use-opensearch-as-a-trace-data-store",level:2},{value:"Connect Tracetest to OpenSearch with the Web UI",id:"connect-tracetest-to-opensearch-with-the-web-ui",level:2},{value:"Connect Tracetest to OpenSearch with the CLI",id:"connect-tracetest-to-opensearch-with-the-cli",level:2}],l={toc:s},u="wrapper";function h(e){let{components:t,...o}=e;return(0,a.kt)(u,(0,r.Z)({},l,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"opensearch"},"OpenSearch"),(0,a.kt)("p",null,"Tracetest fetches traces from ",(0,a.kt)("a",{parentName:"p",href:"https://logz.io/blog/opensearch-tutorial-installation-configuration/#:~:text=This%20is%20because%20OpenSearch%20runs,use%20port%205601%20by%20default."},"OpenSearch's default port")," ",(0,a.kt)("inlineCode",{parentName:"p"},"9200"),"."),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest can be found in the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,a.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,a.kt)("h2",{id:"configure-tracetest-to-use-opensearch-as-a-trace-data-store"},"Configure Tracetest to Use OpenSearch as a Trace Data Store"),(0,a.kt)("p",null,"Configure Tracetest to fetch trace data from OpenSearch."),(0,a.kt)("p",null,"Tracetest uses OpenSearch's ",(0,a.kt)("strong",{parentName:"p"},"default port")," ",(0,a.kt)("inlineCode",{parentName:"p"},"9200")," to fetch trace data."),(0,a.kt)("p",null,"You need to know which ",(0,a.kt)("strong",{parentName:"p"},"Index name")," and ",(0,a.kt)("strong",{parentName:"p"},"Address")," you are using."),(0,a.kt)("p",null,"The defaults can be:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Index name"),": ",(0,a.kt)("inlineCode",{parentName:"li"},"traces")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Address"),": ",(0,a.kt)("inlineCode",{parentName:"li"},"http://opensearch:9200"))),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"Need help configuring the OpenTelemetry Collector so send trace data from your application to OpenSearch? Read more in ",(0,a.kt)("a",{parentName:"p",href:"../opentelemetry-collector-configuration-file-reference"},"the reference page here"),").")),(0,a.kt)("h2",{id:"connect-tracetest-to-opensearch-with-the-web-ui"},"Connect Tracetest to OpenSearch with the Web UI"),(0,a.kt)("p",null,"In the Web UI, (1) open settings, and, on the (2) Configure Data Store tab, select (3) OpenSearch. If you are using Docker like in the screenshot below, use the service name as the hostname with port ",(0,a.kt)("inlineCode",{parentName:"p"},"9200"),". Use ",(0,a.kt)("inlineCode",{parentName:"p"},"http"),", or ",(0,a.kt)("inlineCode",{parentName:"p"},"https")," if TLS is enabled."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"http://opensearch:9200\n")),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"OpenSearch",src:n(25048).Z,width:"2834",height:"1570"})),(0,a.kt)("h2",{id:"connect-tracetest-to-opensearch-with-the-cli"},"Connect Tracetest to OpenSearch with the CLI"),(0,a.kt)("p",null,"Or, if you prefer using the CLI, you can use this file config."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: OpenSearch Data Store\n type: opensearch\n default: true\n opensearch:\n addresses:\n - http://opensearch:9200\n index: traces\n")),(0,a.kt)("p",null,"Proceed to run this command in the terminal, and specify the file above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},"To learn more, ",(0,a.kt)("a",{parentName:"p",href:"/examples-tutorials/recipes/running-tracetest-with-opensearch"},"read the recipe on running a sample app with OpenSearch and Tracetest"),".")))}h.isMDXComponent=!0},25048:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/opensearch-settings-88a927b0ef0f1d195461e7881b78f6d2.png"}}]); \ No newline at end of file diff --git a/assets/js/04afa4fb.4ed6a9df.js b/assets/js/04afa4fb.4ed6a9df.js new file mode 100644 index 0000000000..0a510c2cf4 --- /dev/null +++ b/assets/js/04afa4fb.4ed6a9df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2588],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=l(n),f=a,m=p["".concat(s,".").concat(f)]||p[f]||y[f]||i;return n?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:a,o[1]=c;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));const i={},o="Analytics Settings",c={unversionedId:"configuration/analytics",id:"configuration/analytics",title:"Analytics Settings",description:"To improve the end user experience and to help determine where to focus team resources to improve the tool, Tracetest collects analytics and telemetry information from the system.",source:"@site/docs/configuration/analytics.md",sourceDirName:"configuration",slug:"/configuration/analytics",permalink:"/configuration/analytics",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/analytics.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Demo Settings",permalink:"/configuration/demo"},next:{title:"Telemetry",permalink:"/configuration/telemetry"}},s={},l=[{value:"Changing Analytics Settings from the UI",id:"changing-analytics-settings-from-the-ui",level:2},{value:"Changing Analytics Settings with the CLI",id:"changing-analytics-settings-with-the-cli",level:2}],u={toc:l},p="wrapper";function y(e){let{components:t,...i}=e;return(0,a.kt)(p,(0,r.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"analytics-settings"},"Analytics Settings"),(0,a.kt)("p",null,"To improve the end user experience and to help determine where to focus team resources to improve the tool, Tracetest collects analytics and telemetry information from the system."),(0,a.kt)("p",null,"Participation in this program is optional, and you may opt-out by following the directions below if you'd prefer not to share any information."),(0,a.kt)("p",null,"The data collected is anonymous and is not traceable to the source. You can learn more about how we treat your data by ",(0,a.kt)("a",{parentName:"p",href:"https://kubeshop.io/privacy"},"reading our privacy statement"),"."),(0,a.kt)("h2",{id:"changing-analytics-settings-from-the-ui"},"Changing Analytics Settings from the UI"),(0,a.kt)("p",null,"In the Tracetest Web UI, open (1) Settings and select the (2) Analytics tab:"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Analytics Settings",src:n(82660).Z,width:"2844",height:"1588"})),(0,a.kt)("p",null,"From this analytics settings page, you can enable or disable the analytics."),(0,a.kt)("h2",{id:"changing-analytics-settings-with-the-cli"},"Changing Analytics Settings with the CLI"),(0,a.kt)("p",null,"Or, if you prefer to use the CLI, you can use this file config to disable analytics:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"type: Config\nspec:\n analyticsEnabled: false\n")),(0,a.kt)("p",null,"Proceed to run this command in the terminal and specify the file above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply config -f my/resource/analytics-resource.yaml\n")))}y.isMDXComponent=!0},82660:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/analytics-settings-0.11.3-cfff50e2b821343237f5658457432f0c.png"}}]); \ No newline at end of file diff --git a/assets/js/05c0afb7.6008ddb0.js b/assets/js/05c0afb7.6008ddb0.js new file mode 100644 index 0000000000..3478edd086 --- /dev/null +++ b/assets/js/05c0afb7.6008ddb0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3957],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),d=r,h=u["".concat(l,".").concat(d)]||u[d]||m[d]||s;return n?a.createElement(h,o(o({ref:t},c),{},{components:n})):a.createElement(h,o({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:r,o[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const s={},o="GitHub Actions Pipeline",i={unversionedId:"ci-cd-automation/github-actions-pipeline",id:"ci-cd-automation/github-actions-pipeline",title:"GitHub Actions Pipeline",description:"Check out the source code on GitHub here.",source:"@site/docs/ci-cd-automation/github-actions-pipeline.md",sourceDirName:"ci-cd-automation",slug:"/ci-cd-automation/github-actions-pipeline",permalink:"/ci-cd-automation/github-actions-pipeline",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/ci-cd-automation/github-actions-pipeline.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CI/CD Automation",permalink:"/ci-cd-automation/overview"},next:{title:"Testkube Kubernetes-native Test Runner Pipeline",permalink:"/ci-cd-automation/testkube-pipeline"}},l={},p=[{value:"GitHub Actions Workflow for Running Tracetest tests against a sample Node.js app with OpenTelemetry",id:"github-actions-workflow-for-running-tracetest-tests-against-a-sample-nodejs-app-with-opentelemetry",level:2},{value:"GitHub Actions Workflow",id:"github-actions-workflow",level:2},{value:"Project structure",id:"project-structure",level:2},{value:"1. Node.js app",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js app",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run both the Node.js app and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Run Tracetest tests with the Tracetest CLI",id:"run-tracetest-tests-with-the-tracetest-cli",level:2}],c={toc:p},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"github-actions-pipeline"},"GitHub Actions Pipeline"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/quick-start-github-actions"},"Check out the source code on GitHub here."))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,r.kt)("h2",{id:"github-actions-workflow-for-running-tracetest-tests-against-a-sample-nodejs-app-with-opentelemetry"},"GitHub Actions Workflow for Running Tracetest tests against a sample Node.js app with OpenTelemetry"),(0,r.kt)("p",null,"This is a simple quick start on how to configure GitHub Actions to run Tracetest tests against a Node.js app thats uses OpenTelemetry instrumentation with traces. This example includes manual instrumentation and a sample bookstore array that simulates fetching data from a database."),(0,r.kt)("h2",{id:"github-actions-workflow"},"GitHub Actions Workflow"),(0,r.kt)("p",null,"This sample has two workflows. The workflows have one job and a total of 6 steps. The steps are:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Checking out the repo code"),(0,r.kt)("li",{parentName:"ol"},"Starting the sample app with Docker Compose"),(0,r.kt)("li",{parentName:"ol"},"Installing the Tracetest CLI"),(0,r.kt)("li",{parentName:"ol"},"Configuring the Tracetest CLI"),(0,r.kt)("li",{parentName:"ol"},"Running tests with the Tracetest CLI"),(0,r.kt)("li",{parentName:"ol"},"Stop Docker Compose")),(0,r.kt)("p",null,"The first workflow triggers a pre-merge and merge test run."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# start-and-test-on-main.yaml\n\nname: Docker Compose Start and Test on push and PR to main\n\non:\n push:\n branches: [ "main" ]\n pull_request:\n branches: [ "main" ]\n\njobs:\n start-and-test:\n timeout-minutes: 10\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v1\n\n - name: Start containers\n run: docker compose -f "docker-compose.yaml" -f "tracetest/docker-compose.yaml" up -d --build\n\n - name: Install Tracetest CLI\n shell: bash\n run: curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash\n\n - name: Configure Tracetest CLI\n run: tracetest configure -g --endpoint http://localhost:11633\n\n - name: Run tests via the Tracetest CLI\n run: |\n tracetest run test -f ./tracetest/tests/test-api.yaml\n tracetest run test -f ./tracetest/tests/test-api-and-av.yaml\n tracetest run testsuite -f ./tracetest/tests/testsuite-api.yaml\n\n - name: Stop containers\n if: always()\n run: docker compose -f "docker-compose.yaml" -f "tracetest/docker-compose.yaml" down -v\n')),(0,r.kt)("p",null,"And, the other is a scheduled test run."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# start-and-test-on-schedule.yaml\n\nname: Docker Compose Start and Test Every Hour\n\non:\n schedule:\n - cron: \'0 * * * *\'\n\njobs:\n start-and-test:\n timeout-minutes: 10\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v1\n\n - name: Start containers\n run: docker compose -f "docker-compose.yaml" -f "tracetest/docker-compose.yaml" up -d --build\n\n - name: Install Tracetest CLI\n shell: bash\n run: curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash\n\n - name: Configure Tracetest CLI\n run: tracetest configure -g --endpoint http://localhost:11633\n\n - name: Run tests via the Tracetest CLI\n run: |\n tracetest run test -f ./tracetest/tests/test-api.yaml\n tracetest run test -f ./tracetest/tests/test-api-and-av.yaml\n tracetest run testsuite -f ./tracetest/tests/testsuite-api.yaml\n\n - name: Stop containers\n if: always()\n run: docker compose -f "docker-compose.yaml" -f "tracetest/docker-compose.yaml" down -v\n')),(0,r.kt)("h2",{id:"project-structure"},"Project structure"),(0,r.kt)("p",null,"Let's first explain how the example app is built. It uses Docker Compose, and contains two distinct ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," files. As you see in the GitHub Actions Workflow, all services in the example app are started with Docker Compose."),(0,r.kt)("h3",{id:"1-nodejs-app"},"1. Node.js app"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file and ",(0,r.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory are for the Node.js app."),(0,r.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,r.kt)("inlineCode",{parentName:"p"},"collector.config.yaml"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory are for the setting up Tracetest and the OpenTelemetry Collector."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest."),(0,r.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,r.kt)("p",null,"All ",(0,r.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services. E.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," will map to the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," service, where the port ",(0,r.kt)("inlineCode",{parentName:"p"},"4317")," is the port where Tracetest accepts traces."),(0,r.kt)("h2",{id:"nodejs-app"},"Node.js app"),(0,r.kt)("p",null,"The Node.js app is a simple Express app with two microservices, contained in the ",(0,r.kt)("inlineCode",{parentName:"p"},"app.js")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"availability.js")," files."),(0,r.kt)("p",null,"The OpenTelemetry tracing is contained in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"tracing.otel.http.js")," files, respectively.\nTraces will be sent to the OpenTelemetry Collector."),(0,r.kt)("p",null,"Here's the content of the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," file:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},'const opentelemetry = require("@opentelemetry/sdk-node");\nconst {\n getNodeAutoInstrumentations,\n} = require("@opentelemetry/auto-instrumentations-node");\nconst {\n OTLPTraceExporter,\n} = require("@opentelemetry/exporter-trace-otlp-grpc");\nconst { Resource } = require("@opentelemetry/resources");\nconst {\n SemanticResourceAttributes,\n} = require("@opentelemetry/semantic-conventions");\nconst { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");\nconst { BatchSpanProcessor } = require("@opentelemetry/sdk-trace-base");\n\nconst resource = Resource.default().merge(\n new Resource({\n [SemanticResourceAttributes.SERVICE_NAME]:\n "quick-start-nodejs-manual-instrumentation",\n [SemanticResourceAttributes.SERVICE_VERSION]: "0.0.1",\n })\n);\n\nconst provider = new NodeTracerProvider({ resource: resource });\nconst exporter = new OTLPTraceExporter({ url: "http://otel-collector:4317" });\nconst processor = new BatchSpanProcessor(exporter);\nprovider.addSpanProcessor(processor);\nprovider.register();\n\nconst sdk = new opentelemetry.NodeSDK({\n traceExporter: exporter,\n instrumentations: [getNodeAutoInstrumentations()],\n serviceName: "quick-start-nodejs-manual-instrumentation",\n});\nsdk.start();\n')),(0,r.kt)("p",null,"Depending on which of these you choose, traces will be sent to either the ",(0,r.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"http")," endpoint."),(0,r.kt)("p",null,"The hostnames and ports for these are:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"GRPC: ",(0,r.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4317")),(0,r.kt)("li",{parentName:"ul"},"HTTP: ",(0,r.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4318/v1/traces"))),(0,r.kt)("p",null,"Enabling the tracer is done by preloading the trace file."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"node -r ./tracing.otel.grpc.js app.js\n")),(0,r.kt)("p",null,"In the ",(0,r.kt)("inlineCode",{parentName:"p"},"package.json")," you will see two npm script for running the respective tracers alongside the ",(0,r.kt)("inlineCode",{parentName:"p"},"app.js"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'"scripts": {\n "app-with-grpc-tracer": "node -r ./tracing.otel.grpc.js app.js",\n "app-with-http-tracer": "node -r ./tracing.otel.http.js app.js",\n "availability-with-grpc-tracer": "node -r ./tracing.otel.grpc.js availability.js",\n "availability-with-http-tracer": "node -r ./tracing.otel.http.js availability.js"\n},\n')),(0,r.kt)("p",null,"To start the ",(0,r.kt)("inlineCode",{parentName:"p"},"app.js")," Express server you run this command."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm run app-with-grpc-tracer\n# or\nnpm run app-with-http-tracer\n")),(0,r.kt)("p",null,"To start the ",(0,r.kt)("inlineCode",{parentName:"p"},"availability.js")," Express server you run this command."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm run availability-with-grpc-tracer\n# or\nnpm run availability-with-http-tracer\n")),(0,r.kt)("p",null,"As you can see the ",(0,r.kt)("inlineCode",{parentName:"p"},"Dockerfile")," does not have a ",(0,r.kt)("inlineCode",{parentName:"p"},"CMD")," section."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-Dockerfile"},"FROM node:slim\nWORKDIR /usr/src/app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nEXPOSE 8080\n")),(0,r.kt)("p",null,"Instead, the ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," contains the ",(0,r.kt)("inlineCode",{parentName:"p"},"CMD")," section for both services."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\nservices:\n app:\n image: quick-start-nodejs\n build: .\n command: npm run app-with-grpc-tracer\n ports:\n - "8080:8080"\n availability:\n image: quick-start-nodejs-availability\n build: .\n command: npm run availability-with-grpc-tracer\n ports:\n - "8080"\n')),(0,r.kt)("p",null,"To start it, run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose build # optional if you haven't already built the image\ndocker compose up\n")),(0,r.kt)("p",null,"This will start the Node.js app. But, you're not sending the traces anywhere."),(0,r.kt)("p",null,"Let's fix this by configuring Tracetest and OpenTelemetry Collector."),(0,r.kt)("h2",{id:"tracetest"},"Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is configured with three services."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://opentelemetry.io/docs/collector/"},(0,r.kt)("strong",{parentName:"a"},"OpenTelemetry Collector"))," - A vendor-agnostic implementation of how to receive, process and export telemetry data."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,r.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\nservices:\n tracetest:\n image: kubeshop/tracetest:latest\n platform: linux/amd64\n volumes:\n - type: bind\n source: ./tracetest/tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest/tracetest-provision.yaml\n target: /app/provisioning.yaml\n ports:\n - 11633:11633\n command: --provisioning-file /app/provisioning.yaml\n depends_on:\n postgres:\n condition: service_healthy\n otel-collector:\n condition: service_started\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n\n postgres:\n image: postgres:14\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n\n otel-collector:\n image: otel/opentelemetry-collector-contrib:0.59.0\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./tracetest/collector.config.yaml:/otel-local-config.yaml\n')),(0,r.kt)("p",null,"Tracetest depends on both Postgres and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory and the respective config files."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml")," file provisions the trace data store and polling to store in the Postgres database. The data store is set to OTLP meaning the traces will be stored in Tracetest itself."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"---\ntype: PollingProfile\nspec:\n name: Default\n strategy: periodic\n default: true\n periodic:\n retryDelay: 5s\n timeout: 10m\n\n---\ntype: DataStore\nspec:\n name: OpenTelemetry Collector\n type: otlp\n default: true\n")),(0,r.kt)("p",null,"But how are traces sent to Tracetest?"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," explains that. It receives traces via either ",(0,r.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"http"),". Then, exports them to Tracetest's otlp endpoint ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest:4317"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n loglevel: debug\n otlp/1:\n endpoint: tracetest:4317\n # Send traces to Tracetest.\n # Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n\nservice:\n pipelines:\n traces/1:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/1]\n")),(0,r.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run both the Node.js app and Tracetest"),(0,r.kt)("p",null,"To start both the Node.js services and Tracetest we will run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up # add --build if the images are not built already\n")),(0,r.kt)("p",null,"This will start your Tracetest instance on ",(0,r.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),"."),(0,r.kt)("h2",{id:"run-tracetest-tests-with-the-tracetest-cli"},"Run Tracetest tests with the Tracetest CLI"),(0,r.kt)("p",null,"First, ",(0,r.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/getting-started/installation#install-the-tracetest-cli"},"install the CLI"),".\nThen, configure the CLI:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest configure --endpoint http://localhost:11633\n")),(0,r.kt)("p",null,"Once configured, you can run a test against the Tracetest instance via the terminal."),(0,r.kt)("p",null,"Check out the ",(0,r.kt)("inlineCode",{parentName:"p"},"test-api.yaml")," file in the ",(0,r.kt)("inlineCode",{parentName:"p"},"./tracetest/tests")," directory."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n id: W656Q0c4g\n name: Books List\n description: List of books\n trigger:\n type: http\n httpRequest:\n url: http://app:8080/books\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="http" name="GET /books" http.target="/books" http.method="GET"]\n assertions:\n - attr:http.status_code = 200\n - selector: span[tracetest.span.type="general" name="Books List"]\n assertions:\n - attr:books.list.count = 4\n')),(0,r.kt)("p",null,"To run the test, run this command in the terminal:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest run test -f ./tracetest/tests/test-api.yaml\n")),(0,r.kt)("p",null,"This test will fail just like the sample above due to the ",(0,r.kt)("inlineCode",{parentName:"p"},"attr:books.list.count = 4")," assertion."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},'\u2718 http://app:8080 (http://localhost:11633/test/W656Q0c4g/run/5/test)\n \u2714 span[tracetest.span.type="http" name="GET /books" http.target="/books" http.method="GET"]\n \u2714 #994c63e0ea35e632\n \u2714 attr:http.status_code = 200 (200)\n \u2718 span[tracetest.span.type="general" name="Books List"]\n \u2718 #5ab1856c32b0d5c8\n \u2718 attr:books.list.count = 4 (3) (http://localhost:11633/test/W656Q0c4g/run/5/test?selectedAssertion=1&selectedSpan=5ab1856c32b0d5c8)\n')),(0,r.kt)("p",null,"The tests will pass if you change the assertion to:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-css"},"attr: books.list.count = 3;\n")),(0,r.kt)("p",null,"There are two more files in the ",(0,r.kt)("inlineCode",{parentName:"p"},"./tracetest/tests")," directory that we use in the GitHub Actions Workflow."),(0,r.kt)("p",null,"The test ",(0,r.kt)("inlineCode",{parentName:"p"},"test-api-and-av.yaml")," also includes assertions for the ",(0,r.kt)("inlineCode",{parentName:"p"},"availability")," service."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# ./tracetest/tests/test-api-and-av.yaml\n\ntype: Test\nspec:\n id: phAZcrT4B\n name: Books list with availability\n description: Testing the books list and availability check\n trigger:\n type: http\n httpRequest:\n url: http://app:8080/books\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="http" name="GET /books" http.target="/books"\n http.method="GET"]\n assertions:\n - attr:tracetest.span.duration < 500ms\n - selector: span[tracetest.span.type="general" name="Books List"]\n assertions:\n - attr:books.list.count = 3\n - selector: span[tracetest.span.type="http" name="GET /availability/:bookId" http.method="GET"]\n assertions:\n - attr:http.host = "availability:8080"\n - selector: span[tracetest.span.type="general" name="Availablity check"]\n assertions:\n - attr:isAvailable = "true"\n')),(0,r.kt)("p",null,"The testsuite ",(0,r.kt)("inlineCode",{parentName:"p"},"testsuite-api.yaml")," will run both the tests above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# ./tracetest/tests/testsuite-api.yaml\n\ntype: TestSuite\nspec:\n id: 3YIB7rPVg\n name: All Tests for the Books List API\n steps:\n - phAZcrT4W\n - phAZcrT4B\n")),(0,r.kt)("p",null,"Feel free to check out our ",(0,r.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/"},"docs"),", and join our ",(0,r.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/074287a3.2331285c.js b/assets/js/074287a3.2331285c.js new file mode 100644 index 0000000000..dd60bcb1d2 --- /dev/null +++ b/assets/js/074287a3.2331285c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2421],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),c=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,s=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(r),d=a,m=u["".concat(i,".").concat(d)]||u[d]||f[d]||s;return r?n.createElement(m,o(o({ref:t},p),{},{components:r})):n.createElement(m,o({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var s=r.length,o=new Array(s);o[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>f,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var n=r(87462),a=(r(67294),r(3905));const s={},o="CLI Reference",l={unversionedId:"cli/reference/tracetest_server_install",id:"cli/reference/tracetest_server_install",title:"CLI Reference",description:"tracetest server install",source:"@site/docs/cli/reference/tracetest_server_install.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_server_install",permalink:"/cli/reference/tracetest_server_install",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_server_install.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_server"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_version"}},i={},c=[{value:"tracetest server install",id:"tracetest-server-install",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:c},u="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,a.kt)("h2",{id:"tracetest-server-install"},"tracetest server install"),(0,a.kt)("p",null,"Install a new Tracetest server"),(0,a.kt)("h3",{id:"synopsis"},"Synopsis"),(0,a.kt)("p",null,"Install a new Tracetest server"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"tracetest server install [flags]\n")),(0,a.kt)("h3",{id:"options"},"Options"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," -f, --force Overwrite existing files\n -h, --help help for install\n --kubernetes-context string Kubernetes context used to install Tracetest. It will be only used if 'run-environment' is set as 'kubernetes'.\n --mode (with-demo|just-tracetest) Indicate the type of demo environment to be installed with Tracetest. It can be 'with-demo' or 'just-tracetest'. (default none)\n --run-environment (docker|kubernetes) Type of environment were Tracetest will be installed. It can be 'docker' or 'kubernetes'. (default none)\n")),(0,a.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,a.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_server"},"tracetest server"),"\t - Manage your tracetest server")),(0,a.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0c448a21.477daceb.js b/assets/js/0c448a21.477daceb.js new file mode 100644 index 0000000000..d7a1383840 --- /dev/null +++ b/assets/js/0c448a21.477daceb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3805],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),u=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(i.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(r),f=a,m=c["".concat(i,".").concat(f)]||c[f]||d[f]||o;return r?n.createElement(m,l(l({ref:t},p),{},{components:r})):n.createElement(m,l({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[c]="string"==typeof e?e:a,l[1]=s;for(var u=2;u{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(87462),a=(r(67294),r(3905));const o={},l="prefer-dns",s={unversionedId:"analyzer/rules/prefer-dns",id:"analyzer/rules/prefer-dns",title:"prefer-dns",description:"Enforce usage of DNS instead of IP addresses.",source:"@site/docs/analyzer/rules/prefer-dns.md",sourceDirName:"analyzer/rules",slug:"/analyzer/rules/prefer-dns",permalink:"/analyzer/rules/prefer-dns",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/analyzer/rules/prefer-dns.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Common Problems",permalink:"/analyzer/plugins/common-problems"},next:{title:"Configuring Data Stores",permalink:"/web-ui/creating-data-stores"}},i={},u=[{value:"Rule Details",id:"rule-details",level:2},{value:"Options",id:"options",level:2},{value:"When Not To Use It",id:"when-not-to-use-it",level:2}],p={toc:u},c="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"prefer-dns"},"prefer-dns"),(0,a.kt)("p",null,"Enforce usage of DNS instead of IP addresses."),(0,a.kt)("h2",{id:"rule-details"},"Rule Details"),(0,a.kt)("p",null,"When connecting to remote servers, ensure the usage of DNS instead of IP addresses to avoid issues."),(0,a.kt)("p",null,"The following attributes are evaluated:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"- http.url\n- db.connection_string\n")),(0,a.kt)("p",null,"If span kind is ",(0,a.kt)("inlineCode",{parentName:"p"},'"client"'),", the following attributes are evaluated:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"- net.peer.name\n")),(0,a.kt)("h2",{id:"options"},"Options"),(0,a.kt)("p",null,"This rule has the following options:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'"error"')," requires DNS over IP addresses"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'"disabled"')," disables the DNS over IP addresses verification"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'"warning"')," verifies DNS over IP addresses but does not impact the analyzer score")),(0,a.kt)("h2",{id:"when-not-to-use-it"},"When Not To Use It"),(0,a.kt)("p",null,"If you intentionally use and record IP addresses then you can disable this rule."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0d24b855.4d7d579a.js b/assets/js/0d24b855.4d7d579a.js new file mode 100644 index 0000000000..05e5a63076 --- /dev/null +++ b/assets/js/0d24b855.4d7d579a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[134],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=s(n),d=i,f=p["".concat(l,".").concat(d)]||p[d]||m[d]||a;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[p]="string"==typeof e?e:i,o[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var r=n(87462),i=(n(67294),n(3905));const a={},o="CI/CD Automation",c={unversionedId:"ci-cd-automation/overview",id:"ci-cd-automation/overview",title:"CI/CD Automation",description:"This section contains a general overview of running Tracetest in CI/CD pipelines.",source:"@site/docs/ci-cd-automation/overview.md",sourceDirName:"ci-cd-automation",slug:"/ci-cd-automation/overview",permalink:"/ci-cd-automation/overview",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/ci-cd-automation/overview.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_version"},next:{title:"GitHub Actions Pipeline",permalink:"/ci-cd-automation/github-actions-pipeline"}},l={},s=[{value:"Running Tracetest CLI from Docker",id:"running-tracetest-cli-from-docker",level:2}],u={toc:s},p="wrapper";function m(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"cicd-automation"},"CI/CD Automation"),(0,i.kt)("p",null,"This section contains a general overview of running Tracetest in CI/CD pipelines."),(0,i.kt)("p",null,"You can find guides for:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"/ci-cd-automation/github-actions-pipeline"},"GitHub Actions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"/ci-cd-automation/testkube-pipeline"},"Testkube")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"/ci-cd-automation/tekton-pipeline"},"Tekton"))),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"If you want to see more examples with other CI/CD tools, let us know by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/issues/new/choose"},"opening an issue in GitHub"),"!")),(0,i.kt)("p",null,"Tracetest is designed to work with all CI/CD platforms and automation tools. To enable Tracetest to run in CI/CD environments, make sure to ",(0,i.kt)("a",{parentName:"p",href:"/getting-started/installation"},"install the Tracetest CLI")," and configure it to access your ",(0,i.kt)("a",{parentName:"p",href:"/configuration/server"},"Tracetest server"),"."),(0,i.kt)("p",null,"To read more about integrating Tracetest with CI/CD tools, check out tutorials in our blog:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://kubeshop.io/blog/integrating-tracetest-with-github-actions-in-a-ci-pipeline"},"Integrating Tracetest with GitHub Actions in a CI pipeline")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/50-faster-ci-pipelines-with-github-actions"},"50% Faster CI Pipelines with GitHub Actions"))),(0,i.kt)("h2",{id:"running-tracetest-cli-from-docker"},"Running Tracetest CLI from Docker"),(0,i.kt)("p",null,"Many integrations with CI/CD tools can be accomplished by running the ",(0,i.kt)("a",{parentName:"p",href:"/cli/configuring-your-cli"},"Tracetest CLI")," to execute a test against a remote Tracetest server. If you do not want to install the Tracetest CLI in your environment, you can choose to directly execute it from a Docker image."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"How to Use"),":"),(0,i.kt)("p",null,"Use the command below, substituting the following placeholders:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"your-tracetest-server-url")," - the URL to the running Tracetest server you wish to execute the test on. Example: ",(0,i.kt)("inlineCode",{parentName:"li"},"http://localhost:11633/")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file-path")," - The path to the saved Tracetest test. Example: ",(0,i.kt)("inlineCode",{parentName:"li"},"./mytest.yaml"))),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash",metastring:"wordWrap=true",wordWrap:"true"},"docker run --rm -it -v$(pwd):$(pwd) -w $(pwd) --network host --entrypoint tracetest kubeshop/tracetest:latest -s run test --file \n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0ddebb11.5bbdd2f5.js b/assets/js/0ddebb11.5bbdd2f5.js new file mode 100644 index 0000000000..323a532fbc --- /dev/null +++ b/assets/js/0ddebb11.5bbdd2f5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4196],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(r),f=a,m=p["".concat(s,".").concat(f)]||p[f]||y[f]||i;return r?n.createElement(m,o(o({ref:t},u),{},{components:r})):n.createElement(m,o({ref:t},u))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:a,o[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>y,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var n=r(87462),a=(r(67294),r(3905));const i={},o="Security",l={unversionedId:"analyzer/plugins/security",id:"analyzer/plugins/security",title:"Security",description:"The Security plugin is responsible for analyzing the spans that are part of a trace in order to identify security problems in the distributed system.",source:"@site/docs/analyzer/plugins/security.md",sourceDirName:"analyzer/plugins",slug:"/analyzer/plugins/security",permalink:"/analyzer/plugins/security",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/analyzer/plugins/security.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"no-empty-attributes",permalink:"/analyzer/rules/no-empty-attributes"},next:{title:"secure-https-protocol",permalink:"/analyzer/rules/secure-https-protocol"}},s={},c=[{value:"Rules",id:"rules",level:2}],u={toc:c},p="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(p,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"security"},"Security"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"Security")," plugin is responsible for analyzing the spans that are part of a trace in order to identify security problems in the distributed system."),(0,a.kt)("h2",{id:"rules"},"Rules"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/analyzer/rules/secure-https-protocol"},"secure-https-protocol")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/analyzer/rules/no-api-key-leak"},"no-api-key-leak"))))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0e3e24b6.f2e16342.js b/assets/js/0e3e24b6.f2e16342.js new file mode 100644 index 0000000000..9cd803bbe6 --- /dev/null +++ b/assets/js/0e3e24b6.f2e16342.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3927],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(n),u=a,h=d["".concat(c,".").concat(u)]||d[u]||m[u]||o;return n?r.createElement(h,s(s({ref:t},p),{},{components:n})):r.createElement(h,s({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=u;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));const o={},s="Running Tracetest With Dynatrace",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-dynatrace",id:"examples-tutorials/recipes/running-tracetest-with-dynatrace",title:"Running Tracetest With Dynatrace",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-dynatrace.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-dynatrace",permalink:"/examples-tutorials/recipes/running-tracetest-with-dynatrace",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-dynatrace.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest With Datadog",permalink:"/examples-tutorials/recipes/running-tracetest-with-datadog"},next:{title:"Running Tracetest With Honeycomb",permalink:"/examples-tutorials/recipes/running-tracetest-with-honeycomb"}},c={},l=[{value:"OpenTelemetry Demo v1.3.0 with Dynatrace, OpenTelemetry and Tracetest",id:"opentelemetry-demo-v130-with-dynatrace-opentelemetry-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. OpenTelemetry Demo",id:"1-opentelemetry-demo",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"OpenTelemetry Demo",id:"opentelemetry-demo",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Sending Traces to Tracetest and Dynatrace",id:"sending-traces-to-tracetest-and-dynatrace",level:3},{value:"Run Both the OpenTelemetry Demo App and Tracetest",id:"run-both-the-opentelemetry-demo-app-and-tracetest",level:2},{value:"Run Tracetest Tests with the Tracetest CLI",id:"run-tracetest-tests-with-the-tracetest-cli",level:2},{value:"View Trace Spans Over Time in Dynatrace",id:"view-trace-spans-over-time-in-dynatrace",level:2},{value:"Learn more",id:"learn-more",level:2}],p={toc:l},d="wrapper";function m(e){let{components:t,...o}=e;return(0,a.kt)(d,(0,r.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-tracetest-with-dynatrace"},"Running Tracetest With Dynatrace"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-dynatrace"},"Check out the source code on GitHub here."))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://www.dynatrace.com/"},"Dynatrace")," is a unified Observability and security platform that allows you to monitor and secure your full stack on one AI-powered data platform. From infrastructure and application observability to realtime security analytics and protection, digital experience monitoring and business analytics. All underpinned by a composable app-based platform with a custom Observability-driven workflow engine."),(0,a.kt)("h2",{id:"opentelemetry-demo-v130-with-dynatrace-opentelemetry-and-tracetest"},"OpenTelemetry Demo ",(0,a.kt)("inlineCode",{parentName:"h2"},"v1.3.0")," with Dynatrace, OpenTelemetry and Tracetest"),(0,a.kt)("p",null,"This is a simple sample app on how to configure the ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/open-telemetry/opentelemetry-demo"},"OpenTelemetry Demo ",(0,a.kt)("inlineCode",{parentName:"a"},"v1.3.0"))," to use ",(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," for enhancing your E2E and integration tests with trace-based testing and ",(0,a.kt)("a",{parentName:"p",href:"https://www.dynatrace.com/"},"Dynatrace")," as a trace data store."),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"You will need ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this sample app! Additionally, you will need a Dynatrace account and an API token. Sign up for a ",(0,a.kt)("a",{parentName:"p",href:"https://www.dynatrace.com/trial"},"free Dynatrace trial"),"."),(0,a.kt)("h2",{id:"project-structure"},"Project Structure"),(0,a.kt)("p",null,"The project is built with Docker Compose. It contains two distinct ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," files."),(0,a.kt)("h3",{id:"1-opentelemetry-demo"},"1. OpenTelemetry Demo"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file and ",(0,a.kt)("inlineCode",{parentName:"p"},".env")," file in the root directory are for the OpenTelemetry Demo."),(0,a.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml"),", and ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory are for setting up Tracetest and the OpenTelemetry Collector."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest, as well as routing all traces the OpenTelemetry Demo generates to Dynatrace."),(0,a.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,a.kt)("p",null,"All ",(0,a.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network, defined by the ",(0,a.kt)("inlineCode",{parentName:"p"},"networks")," section on each file, and will be reachable by hostname from within other services. E.g. ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," will map to the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," service, where port ",(0,a.kt)("inlineCode",{parentName:"p"},"4317")," is the port where Tracetest accepts traces."),(0,a.kt)("h2",{id:"opentelemetry-demo"},"OpenTelemetry Demo"),(0,a.kt)("p",null,"The ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/open-telemetry/opentelemetry-demo"},"OpenTelemetry Demo")," is a sample microservice-based app with the purpose to demo how to correctly set up OpenTelemetry distributed tracing."),(0,a.kt)("p",null,"Read more about the OpenTelemetry Demo ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/blog/2022/announcing-opentelemetry-demo-release/"},"here"),"."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," contains 14 services for the demo and 3 supporting dependent services."),(0,a.kt)("p",null,"To start the OpenTelemetry Demo ",(0,a.kt)("strong",{parentName:"p"},"by itself"),", run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose up\n")),(0,a.kt)("p",null,"This will start the OpenTelemetry Demo. Open up ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:8084")," to make sure it's working. But, you're not sending the traces anywhere."),(0,a.kt)("p",null,"Let's fix this by configuring Tracetest and the OpenTelemetry Collector to forward trace data to both Dynatrace and Tracetest."),(0,a.kt)("h2",{id:"tracetest"},"Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is configured with three services."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running trace-based tests."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://opentelemetry.io/docs/collector/"},(0,a.kt)("strong",{parentName:"a"},"OpenTelemetry Collector"))," - A vendor-agnostic implementation of how to receive, process and export telemetry data. To support sending traces to Dynatrace, we are using the ",(0,a.kt)("a",{parentName:"li",href:"https://github.com/open-telemetry/opentelemetry-collector-contrib"},(0,a.kt)("inlineCode",{parentName:"a"},"contrib")," version"),", which contains vendor-related code."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,a.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3.9"\n\nnetworks:\n default:\n name: opentelemetry-demo\n driver: bridge\n\nservices:\n tracetest:\n restart: unless-stopped\n image: kubeshop/tracetest:${TAG:-latest}\n container_name: tracetest\n platform: linux/amd64\n ports:\n - 11633:11633\n extra_hosts:\n - "host.docker.internal:host-gateway"\n volumes:\n - type: bind\n source: ./tracetest/tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest/tracetest-provision.yaml\n target: /app/provisioning.yaml\n command: --provisioning-file /app/provisioning.yaml\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n depends_on:\n tt-postgres:\n condition: service_healthy\n otel-collector:\n condition: service_started\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n\n tt-postgres:\n image: postgres:14\n container_name: tt-postgres\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n\n otel-collector:\n image: otel/opentelemetry-collector-contrib:0.82.0\n container_name: otel-collector\n restart: unless-stopped\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./tracetest/collector.config.yaml:/otel-local-config.yaml\n')),(0,a.kt)("p",null,"Tracetest depends on both Postgres and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory and the respective config files."),(0,a.kt)("p",null,"To start both the OpenTelemetry Demo and Tracetest we will run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance and telemetry exporter. The exporter is set to the OpenTelemetry Collector."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# tracetest-config.yaml\n\n---\npostgres:\n host: tt-postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n\ntelemetry:\n exporters:\n collector:\n serviceName: tracetest\n sampling: 100\n exporter:\n type: collector\n collector:\n endpoint: otel-collector:4317\n\nserver:\n telemetry:\n exporter: collector\n applicationExporter: collector\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml")," file contains the setup of the demo APIs that Tracetest can use as an example for tests, the polling profiles that say how Tracetest should fetch traces from the data store and the configuration for the data store, in our case, Dynatrace."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'---\ntype: Demo\nspec:\n name: "OpenTelemetry Shop"\n enabled: true\n type: otelstore\n opentelemetryStore:\n frontendEndpoint: http://frontend:8084\n productCatalogEndpoint: productcatalogservice:3550\n cartEndpoint: cartservice:7070\n checkoutEndpoint: checkoutservice:5050\n\n---\ntype: PollingProfile\nspec:\n name: Default\n strategy: periodic\n default: true\n periodic:\n retryDelay: 5s\n timeout: 10m\n\n---\ntype: DataStore\nspec:\n name: Dynatrace\n type: dynatrace\n\n---\ntype: TestRunner\nspec:\n id: current\n name: default\n requiredGates:\n - analyzer-score\n - test-specs\n\n')),(0,a.kt)("h3",{id:"sending-traces-to-tracetest-and-dynatrace"},"Sending Traces to Tracetest and Dynatrace"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," explains that. It receives traces via either ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http"),". Then, exports them to Tracetest's OTLP endpoint ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in one pipeline, and to Dynatrace in another."),(0,a.kt)("p",null,"Make sure to add your Dynatrace API Key to the ",(0,a.kt)("inlineCode",{parentName:"p"},"otlp")," exporter (needs the ",(0,a.kt)("inlineCode",{parentName:"p"},"openTelemetryTrace.ingest")," permission)."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n otlp:\n protocols:\n http:\n grpc:\n hostmetrics:\n collection_interval: 10s\n scrapers:\n paging:\n metrics:\n system.paging.utilization:\n enabled: true\n cpu:\n metrics:\n system.cpu.utilization:\n enabled: true\n disk:\n filesystem:\n metrics:\n system.filesystem.utilization:\n enabled: true\n load:\n memory:\n network:\n processes:\n # The prometheus receiver scrapes metrics needed for the OpenTelemetry Collector Dashboard.\n prometheus:\n config:\n scrape_configs:\n - job_name: 'otelcol'\n scrape_interval: 10s\n static_configs:\n - targets: ['0.0.0.0:8888']\n\nprocessors:\n batch: # this configuration is needed to guarantee that the data is sent correctly to Datadog\n send_batch_max_size: 100\n send_batch_size: 10\n timeout: 10s\n\nexporters:\n # OTLP for Tracetest\n otlp/tracetest:\n endpoint: tracetest:4317 # Send traces to Tracetest.\n # Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n # OTLP for Dynatrace\n otlphttp/dynatrace:\n endpoint: https://abc12345.live.dynatrace.com/api/v2/otlp\n headers:\n Authorization: \"Api-Token dt0c01.sample.secret\" # Requires \"openTelemetryTrace.ingest\" permission\n\nservice:\n pipelines:\n traces/tracetest:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/tracetest]\n traces/dynatrace:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlphttp/dynatrace]\n metrics:\n receivers: [hostmetrics, otlp]\n processors: [batch]\n exporters: [otlphttp/dynatrace]\n")),(0,a.kt)("h2",{id:"run-both-the-opentelemetry-demo-app-and-tracetest"},"Run Both the OpenTelemetry Demo App and Tracetest"),(0,a.kt)("p",null,"To start both OpenTelemetry and Tracetest, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up\n")),(0,a.kt)("admonition",{title:"Heads up!",type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Please note starting the demo for the first time will take a few minutes.")),(0,a.kt)("p",null,"This will start your Tracetest instance on ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),"."),(0,a.kt)("p",null,"Open the URL and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/web-ui/creating-tests"},"start creating tests in the Web UI"),"! Make sure to use the endpoints within your Docker network like ",(0,a.kt)("inlineCode",{parentName:"p"},"http://frontend:8084/")," when creating tests."),(0,a.kt)("p",null,"This is because your OpenTelemetry Demo and Tracetest are in the same network."),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Note: View the ",(0,a.kt)("inlineCode",{parentName:"p"},"demo")," section in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," to see which endpoints from the OpenTelemetry Demo are available for running tests.")),(0,a.kt)("p",null,"Here's a sample of a failed test run, which happens if you add this assertion:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-css"},"attr:tracetest.span.duration < 10ms\n")),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(72397).Z,width:"2820",height:"1784"})),(0,a.kt)("p",null,"Increasing the duration to a more reasonable ",(0,a.kt)("inlineCode",{parentName:"p"},"500ms")," will make the test pass."),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(60524).Z,width:"2816",height:"1782"})),(0,a.kt)("h2",{id:"run-tracetest-tests-with-the-tracetest-cli"},"Run Tracetest Tests with the Tracetest CLI"),(0,a.kt)("p",null,"First, ",(0,a.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/getting-started/installation#install-the-tracetest-cli"},"install the CLI"),".\nThen, configure the CLI:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest configure --endpoint http://localhost:11633\n")),(0,a.kt)("p",null,"Once configured, you can run a test against the Tracetest instance via the terminal."),(0,a.kt)("p",null,"Check out the ",(0,a.kt)("inlineCode",{parentName:"p"},"http-test.yaml")," file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'# http-test.yaml\n\ntype: Test\nspec:\n id: JBYAfKJ4R\n name: OpenTelemetry Shop - List Products\n description: List Products available on OTel shop\n trigger:\n type: http\n httpRequest:\n url: http://frontend:8084/api/products\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="general" name="Tracetest trigger"]\n assertions:\n - attr:tracetest.response.status = 200\n - attr:tracetest.span.duration < 10ms\n - selector: span[tracetest.span.type="rpc" name="grpc.hipstershop.ProductCatalogService/ListProducts"]\n assertions:\n - attr:rpc.grpc.status_code = 0\n - selector: span[tracetest.span.type="rpc" name="hipstershop.ProductCatalogService/ListProducts"\n rpc.system="grpc" rpc.method="ListProducts" rpc.service="hipstershop.ProductCatalogService"]\n assertions:\n - attr:rpc.grpc.status_code = 0\n')),(0,a.kt)("p",null,"This file defines a test the same way you would through the Web UI."),(0,a.kt)("p",null,"To run the test, run this command in the terminal:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest run test -f ./http-test.yaml\n")),(0,a.kt)("p",null,"This test will fail just like the sample above due to the ",(0,a.kt)("inlineCode",{parentName:"p"},"attr:tracetest.span.duration < 10ms")," assertion."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'\u2718 OpenTelemetry Shop - List Products (http://localhost:11633/test/JBYAfKJ4R/run/1/test) - trace id: b9db3e805490f6e1d9aff7c48100d367\n \u2718 span[tracetest.span.type="general" name="Tracetest trigger"]\n \u2718 #bf9abd7861371975\n \u2714 attr:tracetest.response.status = 200 (200)\n \u2718 attr:tracetest.span.duration < 10ms (1.3s) (http://localhost:11633/test/JBYAfKJ4R/run/1/test?selectedAssertion=0&selectedSpan=bf9abd7861371975)\n \u2714 span[tracetest.span.type="rpc" name="grpc.hipstershop.ProductCatalogService/ListProducts"]\n \u2714 #52a4bd4cbace9c4b\n \u2714 attr:rpc.grpc.status_code = 0 (0)\n \u2714 span[tracetest.span.type="rpc" name="hipstershop.ProductCatalogService/ListProducts" rpc.system="grpc" rpc.method="ListProducts" rpc.service="hipstershop.ProductCatalogService"]\n \u2714 #533d2199d7e26437\n \u2714 attr:rpc.grpc.status_code = 0 (0)\n\n \u2718 Required gates\n \u2714 analyzer-score\n \u2718 test-specs\n')),(0,a.kt)("p",null,"If you edit the duration as in the Web UI example above, the test will pass!"),(0,a.kt)("h2",{id:"view-trace-spans-over-time-in-dynatrace"},"View Trace Spans Over Time in Dynatrace"),(0,a.kt)("p",null,"All distributed traces (whether generated by OpenTelemetry or the OneAgent) are available in Dynatrace in the distributed traces app."),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(45202).Z,width:"1426",height:"1776"})),(0,a.kt)("p",null,"You can also drill down into a particular trace."),(0,a.kt)("p",null,(0,a.kt)("img",{src:n(64828).Z,width:"1464",height:"1089"})),(0,a.kt)("p",null,"The combination of Dynatrace and Tracetest is extremely powerful. Ingest your traces to Dynatrace for long term storage at planetary scale and encourage your developers to incorporate trace-based testing into their workflows with Tracetest."),(0,a.kt)("h2",{id:"learn-more"},"Learn more"),(0,a.kt)("p",null,"Feel free to check out our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}m.isMDXComponent=!0},45202:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/dynatrace-distributed-traces-app-1f9cf77ab3854ff7d011d9bbba4ac31e.png"},72397:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/dynatrace-failed-test-23031370c2172cb217548d9c238449bf.png"},60524:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/dynatrace-successful-test-3e0574377a09678fea7e8b80ba175b84.png"},64828:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/dynatrace-trace-drilldown-c5229314a7a61f4ae9f6e9d6d8de368b.png"}}]); \ No newline at end of file diff --git a/assets/js/0f26e523.e275afe2.js b/assets/js/0f26e523.e275afe2.js new file mode 100644 index 0000000000..03cf2cf234 --- /dev/null +++ b/assets/js/0f26e523.e275afe2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2633],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>m});var a=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var c=a.createContext({}),o=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},l=function(e){var t=o(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,s=e.mdxType,i=e.originalType,c=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),d=o(n),h=s,m=d["".concat(c,".").concat(h)]||d[h]||u[h]||i;return n?a.createElement(m,r(r({ref:t},l),{},{components:n})):a.createElement(m,r({ref:t},l))}));function m(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var i=n.length,r=new Array(i);r[0]=h;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[d]="string"==typeof e?e:s,r[1]=p;for(var o=2;o{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>p,toc:()=>o});var a=n(87462),s=(n(67294),n(3905));const i={},r="Selectors",p={unversionedId:"concepts/selectors",id:"concepts/selectors",title:"Selectors",description:"If you find yourself in a position where you cannot select complex spans, you can use our advanced selectors to help with that task. Advanced selectors enable selecting spans that are impossible to select using just basic selectors.",source:"@site/docs/concepts/selectors.md",sourceDirName:"concepts",slug:"/concepts/selectors",permalink:"/concepts/selectors",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/concepts/selectors.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Variable Sets",permalink:"/concepts/variable-sets"},next:{title:"Expressions",permalink:"/concepts/expressions"}},c={},o=[{value:"Features",id:"features",level:2},{value:"Empty Selector",id:"empty-selector",level:3},{value:"Filter by Attributes",id:"filter-by-attributes",level:3},{value:"AND Condition",id:"and-condition",level:4},{value:"OR Condition",id:"or-condition",level:4},{value:"Contains Operator",id:"contains-operator",level:4},{value:"Pseudo-classes Support",id:"pseudo-classes-support",level:3},{value:":first",id:"first",level:4},{value:":last",id:"last",level:4},{value:":nth_child",id:"nth_child",level:4},{value:"Parent-child Relation Filtering",id:"parent-child-relation-filtering",level:3}],l={toc:o},d="wrapper";function u(e){let{components:t,...n}=e;return(0,s.kt)(d,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"selectors"},"Selectors"),(0,s.kt)("p",null,"If you find yourself in a position where you cannot select complex spans, you can use our advanced selectors to help with that task. Advanced selectors enable selecting spans that are impossible to select using just basic selectors."),(0,s.kt)("p",null,"In order to present each selector feature as easily as possible, we will use a theoretical scenario of an e-commerce application."),(0,s.kt)("p",null,"The system that we will inspect has this flow:"),(0,s.kt)("mermaid",{value:"flowchart LR\n start((start))\n subgraph purchase\n cart-api\n purchase-api\n end\n subgraph auth\n auth-api\n auth-storage[(db)]\n end\n subgraph product\n product-api\n product-storage[(db)]\n end\n subgraph notification\n notification-api\n kafka{{kafka}}\n external-notification-service{{external service}}\n end\n\n start --\x3e|1. Close order| cart-api\n cart-api--\x3e|5. send buy action| purchase-api\n purchase-api --\x3e |7. Send notification to user|notification-api\n purchase-api --\x3e|6. can product be bought by user?| auth-api\n auth-api --\x3e auth-storage\n cart-api --\x3e|2. is product available?| product-api\n product-api --\x3e|4. can user view product?| auth-api\n product-api --\x3e|3. retrieve product| product-storage\n\n notification-api --\x3e|8| kafka\n kafka --\x3e|9| external-notification-service"}),(0,s.kt)("p",null,"And it generates the following trace:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K'}),(0,s.kt)("h2",{id:"features"},(0,s.kt)("strong",{parentName:"h2"},"Features")),(0,s.kt)("h3",{id:"empty-selector"},(0,s.kt)("strong",{parentName:"h3"},"Empty Selector")),(0,s.kt)("p",null,"By providing an empty selector, all spans from the trace are selected. Note that an empty selector is an empty string. Providing ",(0,s.kt)("inlineCode",{parentName:"p"},"span")," or ",(0,s.kt)("inlineCode",{parentName:"p"},"span[]")," as a selector will result as a syntax error."),(0,s.kt)("h3",{id:"filter-by-attributes"},(0,s.kt)("strong",{parentName:"h3"},"Filter by Attributes")),(0,s.kt)("p",null,"The most basic way of filtering the spans to apply an assertion to is to use the span's attributes. A good starting example would be filtering all spans of type ",(0,s.kt)("inlineCode",{parentName:"p"},"http"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="http"]\n')),(0,s.kt)("p",null,"This would select the following spans:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A selectedSpan\n class B selectedSpan\n class D selectedSpan\n class F selectedSpan\n class G selectedSpan\n class I selectedSpan'}),(0,s.kt)("h4",{id:"and-condition"},(0,s.kt)("strong",{parentName:"h4"},"AND Condition")),(0,s.kt)("p",null,"If you need to narrow down your results, you can provide multiple properties in the selector by separating them using a space. The following will select all ",(0,s.kt)("inlineCode",{parentName:"p"},"http")," spans ",(0,s.kt)("strong",{parentName:"p"},"AND")," spans that were created by the service ",(0,s.kt)("inlineCode",{parentName:"p"},"cart-api"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="http" service.name="cart-api"]\n')),(0,s.kt)("p",null,"This would select the following spans:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A selectedSpan\n class F selectedSpan'}),(0,s.kt)("h4",{id:"or-condition"},(0,s.kt)("strong",{parentName:"h4"},"OR Condition")),(0,s.kt)("p",null,"Sometimes we want to have a broader result by selecting spans that match different selectors. Let's say we have to get all spans from our services, but not from any other external service."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[service.name="api-product"], span[service.name="api-auth"], span[service.name="api-notification"], span[service.name="api-cart"]\n')),(0,s.kt)("p",null,"This would select the following spans:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A selectedSpan\n class B selectedSpan\n class C selectedSpan\n class D selectedSpan\n class E selectedSpan\n class F selectedSpan\n class G selectedSpan\n class H selectedSpan\n class I selectedSpan\n class J selectedSpan'}),(0,s.kt)("p",null,"Each span selector will be executed individually and the results will be merged together, creating a list of all spans that match any of the provided span selectors."),(0,s.kt)("h4",{id:"contains-operator"},(0,s.kt)("strong",{parentName:"h4"},"Contains Operator")),(0,s.kt)("p",null,"Although it is possible to filter several span selectors at once to get a broader result, it might become verbose very quickly. The previous example can be written in another way to reduce its complexity:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[service.name contains "api"]\n')),(0,s.kt)("p",null,"This would select the same spans as the previous example:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A selectedSpan\n class B selectedSpan\n class C selectedSpan\n class D selectedSpan\n class E selectedSpan\n class F selectedSpan\n class G selectedSpan\n class H selectedSpan\n class I selectedSpan\n class J selectedSpan'}),(0,s.kt)("h3",{id:"pseudo-classes-support"},(0,s.kt)("strong",{parentName:"h3"},"Pseudo-classes Support")),(0,s.kt)("p",null,"Sometimes filtering by attributes is not enough because we might have two or three identical spans in the tree but we only want to assert one of them. For example, imagine a system that has a ",(0,s.kt)("inlineCode",{parentName:"p"},"retry")," policy for all the HTTP requests it sends. How would we allow a user to validate if the ",(0,s.kt)("inlineCode",{parentName:"p"},"third")," execution was successful without asserting the other two spans?"),(0,s.kt)("p",null,"This is where pseudo-classes enter the scene. Pseudo-classes are ways of filtering spans by data that is not present in the span itself. For example, the order which the span appears."),(0,s.kt)("blockquote",null,(0,s.kt)("p",{parentName:"blockquote"},(0,s.kt)("strong",{parentName:"p"},"Note"),": Today we support only ",(0,s.kt)("inlineCode",{parentName:"p"},"first"),", ",(0,s.kt)("inlineCode",{parentName:"p"},"last"),", and ",(0,s.kt)("inlineCode",{parentName:"p"},"nth_child"),". If you think we should implement others, please open an issue and explain why it is important and how it should behave.")),(0,s.kt)("p",null,"For the examples of the three pseudo-classes, let's consider that we want to select a specific ",(0,s.kt)("inlineCode",{parentName:"p"},"http")," span based on when it happens."),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="http"]\n')),(0,s.kt)("p",null,"This will select the following spans:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A selectedSpan\n class B selectedSpan\n class D selectedSpan\n class F selectedSpan\n class G selectedSpan\n class I selectedSpan'}),(0,s.kt)("h4",{id:"first"},(0,s.kt)("strong",{parentName:"h4"},":first")),(0,s.kt)("p",null,"This would return the first appearing span from the list:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="http"]:first\n')),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A selectedSpan\n class B candidateSpan\n class D candidateSpan\n class F candidateSpan\n class G candidateSpan\n class I candidateSpan'}),(0,s.kt)("h4",{id:"last"},(0,s.kt)("strong",{parentName:"h4"},":last")),(0,s.kt)("p",null,"This would return the last appearing span from the list:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="http"]:last\n')),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A candidateSpan\n class B candidateSpan\n class D candidateSpan\n class F candidateSpan\n class G candidateSpan\n class I selectedSpan'}),(0,s.kt)("h4",{id:"nth_child"},(0,s.kt)("strong",{parentName:"h4"},":nth_child")),(0,s.kt)("p",null,"This enables you to fetch any item from the list based on its index. ",(0,s.kt)("inlineCode",{parentName:"p"},"n")," starts at 1 (first element) and ends at ",(0,s.kt)("inlineCode",{parentName:"p"},"length")," (last element). Any invalid ",(0,s.kt)("inlineCode",{parentName:"p"},"n")," value will return in an empty list of spans being returned:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="http"]:nth_child(3)\n')),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class A candidateSpan\n class B candidateSpan\n class D selectedSpan\n class F candidateSpan\n class G candidateSpan\n class I candidateSpan'}),(0,s.kt)("h3",{id:"parent-child-relation-filtering"},(0,s.kt)("strong",{parentName:"h3"},"Parent-child Relation Filtering")),(0,s.kt)("p",null,"Even with all those capabilities, we might have problems with ambiguous selectors returning several spans when just a few were intended."),(0,s.kt)("p",null,"In our example, ",(0,s.kt)("inlineCode",{parentName:"p"},"auth-api")," is called twice from different parts of the trace. At first by ",(0,s.kt)("inlineCode",{parentName:"p"},"product-api")," and later by ",(0,s.kt)("inlineCode",{parentName:"p"},"cart-api"),"."),(0,s.kt)("p",null,"What if I want to test if a product only available in US can be bought in UK? The product can be seen by the user, but it cannot be bought if the user is outside the US. Certainly, I cannot apply the same assertions on all ",(0,s.kt)("inlineCode",{parentName:"p"},"auth-api")," spans, otherwise the test will not pass."),(0,s.kt)("blockquote",null,(0,s.kt)("p",{parentName:"blockquote"},"\u2139\ufe0f When you filter by the parent-child relationship, spans are matched recursively in all levels below the parent. This doesn't match only direct children of the parent, but all other spans in the sub-tree.")),(0,s.kt)("p",null,"For example:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[service.name="auth-api" tracetest.span.type="http"]\n')),(0,s.kt)("p",null,"Will return:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef candidateSpan fill:#FF6905, color:#ffffff\n\n class D selectedSpan\n class G selectedSpan'}),(0,s.kt)("p",null,"This is a problem, because if we apply the same assertion to both spans, one of them will fail. We could try to use ",(0,s.kt)("inlineCode",{parentName:"p"},"nth_child")," but that could break if a http request failed and the retry policy kicked in. Thus, the only way of filtering in this scenario is based on the context when it was generated. For example: using its parent span to do so."),(0,s.kt)("p",null,"We could use the ",(0,s.kt)("inlineCode",{parentName:"p"},"purchase products")," parent to ensure just ",(0,s.kt)("inlineCode",{parentName:"p"},"http")," class to the ",(0,s.kt)("inlineCode",{parentName:"p"},"auth-api")," triggered by the ",(0,s.kt)("inlineCode",{parentName:"p"},"purchase-api")," would be selected:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-css"},'span[service.name="cart-api", name="purchase products"] span[service.name="auth-api" tracetest.span.type="http"]\n')),(0,s.kt)("p",null,"This would find the parent span and only select the spans that are descedents of that parent and match the provided filter:"),(0,s.kt)("mermaid",{value:'flowchart TD\n A[" id: 1\n close order\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n B[" id: 2\n is product available\n\n attributes:\n service.name: product-api\n tracetest.span.type: http\n http.method: GET\n "]\n C[" id: 3\n get product information\n\n attributes:\n service.name: product-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n D[" id: 4\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n E[" id: 5\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n F[" id: 6\n purchase products\n\n attributes:\n service.name: cart-api\n tracetest.span.type: http\n http.method: POST\n "]\n G[" id: 7\n get user can access\n\n attributes:\n service.name: auth-api\n tracetest.span.type: http\n http.method: GET\n "]\n H[" id: 8\n get user auth information\n\n attributes:\n service.name: auth-api\n tracetest.span.type: db\n db.statement: SELECT * FROM ...\n "]\n I[" id: 9\n notify user\n\n attributes:\n service.name: notification-api\n tracetest.span.type: http\n http.method: POST\n "]\n J[" id: 10\n send message to kafka\n\n attributes:\n service.name: notification-api\n tracetest.span.type: messaging\n "]\n K[" id: 10\n send message to users\n\n attributes:\n service.name: external-service\n tracetest.span.type: messaging\n "]\n\n\n A --\x3e|1| B\n B --\x3e|2| C\n B --\x3e|3| D\n D --\x3e|4| E\n A --\x3e|5| F\n F --\x3e|6| G\n G --\x3e|7| H\n F --\x3e|8| I\n I --\x3e|9| J\n J --\x3e|10| K\n\n classDef selectedSpan fill:#439846, color:#ffffff\n classDef parentSpan fill:#3792cb, color:#ffffff\n\n class F parentSpan\n class G selectedSpan'}))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0f425520.9032fe58.js b/assets/js/0f425520.9032fe58.js new file mode 100644 index 0000000000..0e976fc1e7 --- /dev/null +++ b/assets/js/0f425520.9032fe58.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7240],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),c=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(r),m=n,d=u["".concat(l,".").concat(m)]||u[m]||f[m]||o;return r?a.createElement(d,i(i({ref:t},p),{},{components:r})):a.createElement(d,i({ref:t},p))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:n,i[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));const o={},i="Configuration",s={unversionedId:"configuration/overview",id:"configuration/overview",title:"Configuration",description:"There are several configuration options with Tracetest:",source:"@site/docs/configuration/overview.md",sourceDirName:"configuration",slug:"/configuration/overview",permalink:"/configuration/overview",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/overview.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"What if I don't have OpenTelemetry installed?",permalink:"/getting-started/no-otel"},next:{title:"AWS X-Ray",permalink:"/configuration/connecting-to-data-stores/awsxray"}},l={},c=[{value:"Supported Trace Data Stores",id:"supported-trace-data-stores",level:2},{value:"Using Tracetest without a Trace Data Store",id:"using-tracetest-without-a-trace-data-store",level:2},{value:"Trace Data Store Configuration Examples",id:"trace-data-store-configuration-examples",level:2},{value:"Configuring the Server",id:"configuring-the-server",level:2}],p={toc:c},u="wrapper";function f(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"configuration"},"Configuration"),(0,n.kt)("p",null,"There are several configuration options with Tracetest:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./server"},"Server configuration")," to set database connection information needed to connect to required PostgreSQL instance."),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./provisioning"},"Provisioning configuration")," to 'preload' the Tracetest server with resources when first running the Tracetest server.")),(0,n.kt)("h2",{id:"supported-trace-data-stores"},"Supported Trace Data Stores"),(0,n.kt)("p",null,"Tracetest is designed to work with different trace data stores. To enable Tracetest to run end-to-end tests against trace data, you need to configure Tracetest to access trace data."),(0,n.kt)("p",null,"Currently, Tracetest supports the following data stores. Click on the respective data store to view configuration examples:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/awsxray"},"AWS X-Ray")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"/configuration/connecting-to-data-stores/azure-app-insights"},"Azure App Insights")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/datadog"},"Datadog")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/dynatrace"},"Dynatrace")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/elasticapm"},"Elastic APM")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/tempo"},"Grafana Tempo")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/honeycomb"},"Honeycomb")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/jaeger"},"Jaeger")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/lightstep"},"Lightstep")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/new-relic"},"New Relic")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/opensearch"},"OpenSearch")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/opentelemetry-collector"},"OpenTelemetry Collector")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/signalfx"},"SignalFX")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/signoz"},"Signoz"))),(0,n.kt)("h2",{id:"using-tracetest-without-a-trace-data-store"},"Using Tracetest without a Trace Data Store"),(0,n.kt)("p",null,"Another option is to send traces directly to Tracetest using the OpenTelemetry Collector. And, you don't have to change your existing pipelines to do so."),(0,n.kt)("p",null,"View ",(0,n.kt)("a",{parentName:"p",href:"/configuration/connecting-to-data-stores/opentelemetry-collector"},"configuration for OpenTelemetry Collector")," for more details."),(0,n.kt)("h2",{id:"trace-data-store-configuration-examples"},"Trace Data Store Configuration Examples"),(0,n.kt)("p",null,"Examples of configuring Tracetest to access different data stores can be found in the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,n.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),". Check out the ",(0,n.kt)("a",{parentName:"p",href:"/examples-tutorials/recipes"},(0,n.kt)("strong",{parentName:"a"},"Recipes"))," for guided walkthroughs of sample use cases."),(0,n.kt)("p",null,"We will be adding new data stores over the next couple of months - ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/issues/new/choose"},"let us know")," any additional data stores you would like to see us support."),(0,n.kt)("h2",{id:"configuring-the-server"},"Configuring the Server"),(0,n.kt)("p",null,"Tracetest has a configuration file to contain the minimal information needed to start the Tracetest server. See more at ",(0,n.kt)("a",{parentName:"p",href:"./server"},"Tracetest Server Configuration"),"."),(0,n.kt)("p",null,"You can also provision the server when it first starts, configuring most aspects of your Tracetest server environment. This is useful in a CI/CD environment to preload and configure the server. See more at ",(0,n.kt)("a",{parentName:"p",href:"./provisioning"},"Provisioning a Tracetest Server"),"."),(0,n.kt)("p",null,"Many of the server configuration settings can be set individually in the UI or via the CLI. See:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./trace-polling"},"Trace Polling")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./demo"},"Demo Applications")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"./analytics"},"Analytics"))))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0f98c184.a4dd27c5.js b/assets/js/0f98c184.a4dd27c5.js new file mode 100644 index 0000000000..666f09d77c --- /dev/null +++ b/assets/js/0f98c184.a4dd27c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2101],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},m="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),m=p(n),u=a,h=m["".concat(l,".").concat(u)]||m[u]||d[u]||o;return n?r.createElement(h,s(s({ref:t},c),{},{components:n})):r.createElement(h,s({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[m]="string"==typeof e?e:a,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const o={},s="Running Tracetest With Honeycomb",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-honeycomb",id:"examples-tutorials/recipes/running-tracetest-with-honeycomb",title:"Running Tracetest With Honeycomb",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-honeycomb.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-honeycomb",permalink:"/examples-tutorials/recipes/running-tracetest-with-honeycomb",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-honeycomb.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest With Dynatrace",permalink:"/examples-tutorials/recipes/running-tracetest-with-dynatrace"},next:{title:"Running Tracetest with SigNoz (OpenTelemetry Collector & Pokeshop API)",permalink:"/examples-tutorials/recipes/running-tracetest-with-signoz-pokeshop"}},l={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Run Tracetest Tests with the Tracetest CLI",id:"run-tracetest-tests-with-the-tracetest-cli",level:2},{value:"View Trace Spans Over Time in Honeycomb",id:"view-trace-spans-over-time-in-honeycomb",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:p},m="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-tracetest-with-honeycomb"},"Running Tracetest With Honeycomb"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-honeycomb"},"Check out the source code on GitHub here."))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://honeycomb.io/"},"Honeycomb")," is an observability solution that shows you the patterns and outliers of how users experience your code in complex and unpredictable environments."),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"You will need ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this sample app! Additionally, you will need a Honeycomb account and api key. Sign up to use Honeycomb ",(0,a.kt)("a",{parentName:"p",href:"https://ui.honeycomb.io/signup"},"here"),"."),(0,a.kt)("h2",{id:"project-structure"},"Project Structure"),(0,a.kt)("p",null,"The project is built with Docker Compose. It contains two distinct ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," files."),(0,a.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file and ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory are for the Node.js app."),(0,a.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml"),", and ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the root directory are for the setting up Tracetest and the OpenTelemetry Collector."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"root")," directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest, as well as routing all traces the Node.js App generates to Honeycomb."),(0,a.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,a.kt)("p",null,"All ",(0,a.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services. E.g. ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," will map to the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," service, where the port ",(0,a.kt)("inlineCode",{parentName:"p"},"4317")," is the port where Tracetest accepts traces."),(0,a.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,a.kt)("p",null,"The Node.js app is a simple Express app contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"app.js")," file."),(0,a.kt)("p",null,"The OpenTelemetry tracing is contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.http.js")," files.\nTraces will be sent to the OpenTelemetry Collector."),(0,a.kt)("p",null,"Here's the content of the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," file:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'const opentelemetry = require("@opentelemetry/sdk-node");\nconst {\n getNodeAutoInstrumentations,\n} = require("@opentelemetry/auto-instrumentations-node");\nconst {\n OTLPTraceExporter,\n} = require("@opentelemetry/exporter-trace-otlp-grpc");\n\nconst sdk = new opentelemetry.NodeSDK({\n traceExporter: new OTLPTraceExporter({ url: "http://otel-collector:4317" }),\n instrumentations: [getNodeAutoInstrumentations()],\n});\nsdk.start();\n')),(0,a.kt)("p",null,"Depending on which of these you choose, traces will be sent to either the ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http")," endpoint."),(0,a.kt)("p",null,"The hostnames and ports for these are:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"GRPC: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4317")),(0,a.kt)("li",{parentName:"ul"},"HTTP: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4318/v1/traces"))),(0,a.kt)("p",null,"Enabling the tracer is done by preloading the trace file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"node -r ./tracing.otel.grpc.js app.js\n")),(0,a.kt)("p",null,"In the ",(0,a.kt)("inlineCode",{parentName:"p"},"package.json")," you will see two npm scripts for running the respective tracers alongside the ",(0,a.kt)("inlineCode",{parentName:"p"},"app.js"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'"scripts": {\n "with-grpc-tracer":"node -r ./tracing.otel.grpc.js app.js",\n "with-http-tracer":"node -r ./tracing.otel.http.js app.js"\n},\n')),(0,a.kt)("p",null,"To start the server, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"npm run with-grpc-tracer\n# or\nnpm run with-http-tracer\n")),(0,a.kt)("p",null,"As you can see the ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nEXPOSE 8080\nCMD [ "npm", "run", "with-grpc-tracer" ]\n')),(0,a.kt)("p",null,"And, the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," contains just one service for the Node.js app."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\nservices:\n app:\n image: quick-start-nodejs\n build: .\n ports:\n - "8080:8080"\n')),(0,a.kt)("p",null,"To start it, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose build # optional if you haven't already built the image\ndocker compose up\n")),(0,a.kt)("p",null,"This will start the Node.js app. But, you're not sending the traces anywhere."),(0,a.kt)("p",null,"Let's fix this by configuring Tracetest and OpenTelemetry Collector."),(0,a.kt)("h2",{id:"tracetest"},"Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is configured with three services."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://opentelemetry.io/docs/collector/"},(0,a.kt)("strong",{parentName:"a"},"OpenTelemetry Collector"))," - A vendor-agnostic implementation of how to receive, process and export telemetry data."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,a.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3.2"\nservices:\n tracetest:\n restart: unless-stopped\n image: kubeshop/tracetest:${TAG:-latest}\n platform: linux/amd64\n ports:\n - 11633:11633\n extra_hosts:\n - "host.docker.internal:host-gateway"\n volumes:\n - type: bind\n source: ./tracetest/tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest/tracetest-provision.yaml\n target: /app/provision.yaml\n command: --provisioning-file /app/provision.yaml\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n depends_on:\n postgres:\n condition: service_healthy\n otel-collector:\n condition: service_started\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n\n postgres:\n image: postgres:14\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n\n otel-collector:\n image: otel/opentelemetry-collector-contrib:0.68.0\n restart: unless-stopped\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./tracetest/collector.config.yaml:/otel-local-config.yaml\n\n')),(0,a.kt)("p",null,"Tracetest depends on both Postgres and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory and the respective config files."),(0,a.kt)("p",null,"To start both the Node.js App and Tracetest, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose up # add --build if the images are not built already\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# tracetest-config.yaml\n\n---\npostgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml")," file contains the data store setup. The data store is set to ",(0,a.kt)("inlineCode",{parentName:"p"},"Honeycomb")," meaning the traces will be received by Tracetest OTLP API and stored in Tracetest itself."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"# tracetest-provision.yaml\n---\ntype: DataStore\nspec:\n name: Honeycomb\n type: honeycomb\n")),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"How to Send Traces to Tracetest and Honeycomb")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," explains that. It receives traces via either ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http"),". Then, exports them to Tracetest's OTLP endpoint ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in one pipeline, and to Honeycomb in another."),(0,a.kt)("p",null,"Make sure to add your Honeycomb access token in the headers of the ",(0,a.kt)("inlineCode",{parentName:"p"},"otlp/ls")," exporter."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'receivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n logLevel: debug\n # OTLP for Tracetest\n otlp/tracetest:\n endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n # OTLP for Honeycomb\n otlp/honeycomb:\n endpoint: "api.honeycomb.io:443"\n headers:\n "x-honeycomb-team": \n # Read more in docs here: https://docs.honeycomb.io/getting-data-in/otel-collector/\n\nservice:\n pipelines:\n traces/tracetest:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/tracetest]\n traces/honeycomb:\n receivers: [otlp]\n processors: [batch]\n exporters: [logging, otlp/honeycomb]\n')),(0,a.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,a.kt)("p",null,"To start both the Node.js App and Tracetest, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose up # add --build if the images are not built already\n")),(0,a.kt)("p",null,"This will start your Tracetest instance on ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),"."),(0,a.kt)("p",null,"Open the URL and start creating tests! Make sure to use the ",(0,a.kt)("inlineCode",{parentName:"p"},"http://app:8080/")," URL in your test creation, because your Node.js app and Tracetest are in the same network."),(0,a.kt)("h2",{id:"run-tracetest-tests-with-the-tracetest-cli"},"Run Tracetest Tests with the Tracetest CLI"),(0,a.kt)("p",null,"First, ",(0,a.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/getting-started/installation#install-the-tracetest-cli"},"install the CLI"),".\nThen, configure the CLI:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest configure --endpoint http://localhost:11633\n")),(0,a.kt)("p",null,"Once configured, you can run a test against the Tracetest instance via the terminal."),(0,a.kt)("p",null,"Check out the ",(0,a.kt)("inlineCode",{parentName:"p"},"test-api.yaml")," file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'# test-api.yaml\n\ntype: Test\nspec:\n id: W656Q0c4g\n name: http://app:8080\n description: akadlkasjdf\n trigger:\n type: http\n httpRequest:\n url: http://app:8080\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="http" name="GET /" http.target="/" http.method="GET"]\n assertions:\n - attr:http.status_code = 200\n - attr:tracetest.span.duration < 500ms\n\n')),(0,a.kt)("p",null,"This file defines a test the same way you would through the Web UI."),(0,a.kt)("p",null,"To run the test, run this command in the terminal:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest run test -f ./test-api.yaml\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},'\u2714 http://app:8080 (http://localhost:11633/test/W656Q0c4g/run/2/test)\n \u2714 span[tracetest.span.type="http" name="GET /" http.target="/" http.method="GET"]\n')),(0,a.kt)("h2",{id:"view-trace-spans-over-time-in-honeycomb"},"View Trace Spans Over Time in Honeycomb"),(0,a.kt)("p",null,"To access a historical overview of all the trace spans the Node.js App generates, jump over to your Honeycomb account."),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1683042900/Blogposts/Docs/honeycomb_trace_kbjdl4.png",alt:"Honeycomb trace overview"})),(0,a.kt)("p",null,"You can also drill down into a particular trace."),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1683042900/Blogposts/Docs/honeycome_dashboard_gyisdg.png",alt:"Honeycomb trace drilldown"})),(0,a.kt)("p",null,"With Honeycomb and Tracetest, you get the best of both worlds. You can run trace-based tests and automate running E2E and integration tests against real trace data. And, use Honeycomb to get a historical overview of all traces your distributed application generates."),(0,a.kt)("h2",{id:"learn-more"},"Learn More"),(0,a.kt)("p",null,"Feel free to check out our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/136d3eff.68b6f36d.js b/assets/js/136d3eff.68b6f36d.js new file mode 100644 index 0000000000..b4e8b40593 --- /dev/null +++ b/assets/js/136d3eff.68b6f36d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5106],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),l=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=l(e.components);return o.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),m=l(n),d=r,h=m["".concat(s,".").concat(d)]||m[d]||u[d]||a;return n?o.createElement(h,c(c({ref:t},p),{},{components:n})):o.createElement(h,c({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[m]="string"==typeof e?e:r,c[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var o=n(87462),r=(n(67294),n(3905));const a={},c="Honeycomb",i={unversionedId:"configuration/connecting-to-data-stores/honeycomb",id:"configuration/connecting-to-data-stores/honeycomb",title:"Honeycomb",description:"If you want to use Honeycomb as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Honeycomb. And, you don't have to change your existing pipelines to do so.",source:"@site/docs/configuration/connecting-to-data-stores/honeycomb.md",sourceDirName:"configuration/connecting-to-data-stores",slug:"/configuration/connecting-to-data-stores/honeycomb",permalink:"/configuration/connecting-to-data-stores/honeycomb",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/connecting-to-data-stores/honeycomb.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Tempo",permalink:"/configuration/connecting-to-data-stores/tempo"},next:{title:"Jaeger",permalink:"/configuration/connecting-to-data-stores/jaeger"}},s={},l=[{value:"Configuring OpenTelemetry Collector to Send Traces to both Honeycomb and Tracetest",id:"configuring-opentelemetry-collector-to-send-traces-to-both-honeycomb-and-tracetest",level:2},{value:"Configure Tracetest to Use Honeycomb as a Trace Data Store",id:"configure-tracetest-to-use-honeycomb-as-a-trace-data-store",level:2},{value:"Connect Tracetest to Honeycomb with the Web UI",id:"connect-tracetest-to-honeycomb-with-the-web-ui",level:2},{value:"Connect Tracetest to Honeycomb with the CLI",id:"connect-tracetest-to-honeycomb-with-the-cli",level:2}],p={toc:l},m="wrapper";function u(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"honeycomb"},"Honeycomb"),(0,r.kt)("p",null,"If you want to use ",(0,r.kt)("a",{parentName:"p",href:"https://honeycomb.io/"},"Honeycomb")," as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Honeycomb. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest with Honeycomb can be found in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,r.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,r.kt)("h2",{id:"configuring-opentelemetry-collector-to-send-traces-to-both-honeycomb-and-tracetest"},"Configuring OpenTelemetry Collector to Send Traces to both Honeycomb and Tracetest"),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"otlp/tracetest")),(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," to your Tracetest instance on port ",(0,r.kt)("inlineCode",{parentName:"li"},"4317"))),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"If you are running Tracetest with Docker, and Tracetest's service name is ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest"),", then the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"http://tracetest:4317"))),(0,r.kt)("p",null,"Additionally, add another config:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"otlp/honeycomb")),(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," pointing to the Honeycomb API and using Honeycomb API KEY")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and still use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n logLevel: debug\n # OTLP for Tracetest\n otlp/tracetest:\n endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n # OTLP for Honeycomb\n otlp/honeycomb:\n endpoint: "api.honeycomb.io:443"\n headers:\n "x-honeycomb-team": "YOUR_API_KEY"\n # Read more in docs here: https://docs.honeycomb.io/getting-data-in/otel-collector/\n\nservice:\n pipelines:\n traces/tracetest:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/tracetest]\n traces/honeycomb:\n receivers: [otlp]\n processors: [batch]\n exporters: [logging, otlp/honeycomb]\n')),(0,r.kt)("h2",{id:"configure-tracetest-to-use-honeycomb-as-a-trace-data-store"},"Configure Tracetest to Use Honeycomb as a Trace Data Store"),(0,r.kt)("p",null,"Configure your Tracetest instance to expose an ",(0,r.kt)("inlineCode",{parentName:"p"},"otlp")," endpoint to make it aware it will receive traces from the OpenTelemetry Collector. This will expose Tracetest's trace receiver on port ",(0,r.kt)("inlineCode",{parentName:"p"},"4317"),"."),(0,r.kt)("h2",{id:"connect-tracetest-to-honeycomb-with-the-web-ui"},"Connect Tracetest to Honeycomb with the Web UI"),(0,r.kt)("p",null,"In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Honeycomb."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Honeycomb",src:n(59312).Z,width:"2400",height:"1792"})),(0,r.kt)("h2",{id:"connect-tracetest-to-honeycomb-with-the-cli"},"Connect Tracetest to Honeycomb with the CLI"),(0,r.kt)("p",null,"Or, if you prefer using the CLI, you can use this file config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Honeycomb pipeline\n type: honeycomb\n default: true\n")),(0,r.kt)("p",null,"Proceed to run this command in the terminal and specify the file above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"To learn more, ",(0,r.kt)("a",{parentName:"p",href:"/examples-tutorials/recipes/running-tracetest-with-honeycomb"},"read the recipe on running a sample app with Honeycomb and Tracetest"),".")))}u.isMDXComponent=!0},59312:(e,t,n)=>{n.d(t,{Z:()=>o});const o=n.p+"assets/images/honeycomb-settings-80b7a4a085d4815a178da6f8029be9c1.png"}}]); \ No newline at end of file diff --git a/assets/js/13cd236f.40a11bb7.js b/assets/js/13cd236f.40a11bb7.js new file mode 100644 index 0000000000..c8c4a54196 --- /dev/null +++ b/assets/js/13cd236f.40a11bb7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7539],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=p(n),u=a,h=d["".concat(l,".").concat(u)]||d[u]||m[u]||o;return n?r.createElement(h,s(s({ref:t},c),{},{components:n})):r.createElement(h,s({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const o={},s="Running Tracetest without a Trace Data Store",i={unversionedId:"examples-tutorials/recipes/running-tracetest-without-a-trace-data-store",id:"examples-tutorials/recipes/running-tracetest-without-a-trace-data-store",title:"Running Tracetest without a Trace Data Store",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-without-a-trace-data-store.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-without-a-trace-data-store",permalink:"/examples-tutorials/recipes/running-tracetest-without-a-trace-data-store",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-without-a-trace-data-store.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Recipes",permalink:"/examples-tutorials/recipes"},next:{title:"Running Tracetest without a Trace Data Store with Manual Instrumentation",permalink:"/examples-tutorials/recipes/running-tracetest-without-a-trace-data-store-with-manual-instrumentation"}},l={},p=[{value:"Sample Node.js app with OpenTelemetry Collector and Tracetest",id:"sample-nodejs-app-with-opentelemetry-collector-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-tracetest-without-a-trace-data-store"},"Running Tracetest without a Trace Data Store"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/quick-start-nodejs"},"Check out the source code on GitHub here.")," ")),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,a.kt)("h2",{id:"sample-nodejs-app-with-opentelemetry-collector-and-tracetest"},"Sample Node.js app with OpenTelemetry Collector and Tracetest"),(0,a.kt)("p",null,"This is a simple quick start on how to configure a Node.js app to use OpenTelemetry instrumentation with traces, and Tracetest for enhancing your E2E and integration tests with trace-based testing."),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"You will need ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this quick start app!"),(0,a.kt)("h2",{id:"project-structure"},"Project Structure"),(0,a.kt)("p",null,"The project is built with Docker Compose. It contains two distinct ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," files."),(0,a.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file and ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory are for the Node.js app."),(0,a.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml"),", and ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory are for the setting up Tracetest and the OpenTelemetry Collector."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest."),(0,a.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,a.kt)("p",null,"All ",(0,a.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services. E.g. ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," will map to the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," service, where the port ",(0,a.kt)("inlineCode",{parentName:"p"},"4317")," is the port where Tracetest accepts traces."),(0,a.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,a.kt)("p",null,"The Node.js app is a simple Express app, contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"app.js")," file."),(0,a.kt)("p",null,"The OpenTelemetry tracing is contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.http.js")," files.\nTraces will be sent to the OpenTelemetry Collector."),(0,a.kt)("p",null,"Here's the content of the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," file:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"const opentelemetry = require('@opentelemetry/sdk-node')\nconst { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node')\nconst { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc');\n\nconst sdk = new opentelemetry.NodeSDK({\n traceExporter: new OTLPTraceExporter({ url: 'http://otel-collector:4317' }),\n instrumentations: [getNodeAutoInstrumentations()],\n})\nsdk.start()\n")),(0,a.kt)("p",null,"Depending on which of these you choose, traces will be sent to either the ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http")," endpoint."),(0,a.kt)("p",null,"The hostnames and ports for these are:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"GRPC: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4317")),(0,a.kt)("li",{parentName:"ul"},"HTTP: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4318/v1/traces"))),(0,a.kt)("p",null,"Enabling the tracer is done by preloading the trace file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"node -r ./tracing.otel.grpc.js app.js\n")),(0,a.kt)("p",null,"In the ",(0,a.kt)("inlineCode",{parentName:"p"},"package.json")," you will see two npm scripts for running the respective tracers alongside the ",(0,a.kt)("inlineCode",{parentName:"p"},"app.js"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'"scripts": {\n "with-grpc-tracer":"node -r ./tracing.otel.grpc.js app.js",\n "with-http-tracer":"node -r ./tracing.otel.http.js app.js"\n},\n')),(0,a.kt)("p",null,"To start the server, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"npm run with-grpc-tracer\n# or\nnpm run with-http-tracer\n")),(0,a.kt)("p",null,"As you can see, the ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nEXPOSE 8080\nCMD [ "npm", "run", "with-grpc-tracer" ]\n')),(0,a.kt)("p",null,"And, the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," contains just one service for the Node.js app."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"version: '3'\nservices:\n app:\n image: quick-start-nodejs\n build: .\n ports:\n - \"8080:8080\"\n")),(0,a.kt)("p",null,"To start it, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose build # optional if you haven't already built the image\ndocker compose up\n")),(0,a.kt)("p",null,"This will start the Node.js app. But, you're not sending the traces anywhere."),(0,a.kt)("p",null,"Let's fix this by configuring Tracetest and OpenTelemetry Collector."),(0,a.kt)("h2",{id:"tracetest"},"Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is configured with three services."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://opentelemetry.io/docs/collector/"},(0,a.kt)("strong",{parentName:"a"},"OpenTelemetry Collector"))," - A vendor-agnostic implementation of how to receive, process and export telemetry data."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,a.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\nservices:\n tracetest:\n image: kubeshop/tracetest:latest\n platform: linux/amd64\n volumes:\n - type: bind\n source: ./tracetest/tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest/tracetest-provision.yaml\n target: /app/provisioning.yaml\n ports:\n - 11633:11633\n command: --provisioning-file /app/provisioning.yaml\n depends_on:\n postgres:\n condition: service_healthy\n otel-collector:\n condition: service_started\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n\n postgres:\n image: postgres:14\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n\n otel-collector:\n image: otel/opentelemetry-collector-contrib:0.59.0\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./tracetest/collector.config.yaml:/otel-local-config.yaml\n\n')),(0,a.kt)("p",null,"Tracetest depends on both Postgres and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory and the respective config files."),(0,a.kt)("p",null,"To start both the Node.js app and Tracetest we will run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up # add --build if the images are not built already\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml")," file provisions the trace data store and polling to store in the Postgres database. The data store is set to OTLP, meaning the traces will be stored in Tracetest itself."),(0,a.kt)("p",null,"But how are traces sent to Tracetest?"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," explains that. It receives traces via either ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http"),". Then, exports them to Tracetest's OLTP endpoint ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest:4317"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n loglevel: debug\n otlp/1:\n endpoint: tracetest:4317\n # Send traces to Tracetest.\n # Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n\nservice:\n pipelines:\n traces/1:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/1]\n\n")),(0,a.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,a.kt)("p",null,"To start both the Node.js app and Tracetest, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up # add --build if the images are not built already\n")),(0,a.kt)("p",null,"This will start your Tracetest instance on ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),"."),(0,a.kt)("p",null,"Open the URL and start creating tests! Make sure to use the ",(0,a.kt)("inlineCode",{parentName:"p"},"http://app:8080/")," URL in your test creation, because your Node.js app and Tracetest are in the same network."),(0,a.kt)("h2",{id:"learn-more"},"Learn More"),(0,a.kt)("p",null,"Feel free to check out our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1426.33722355.js b/assets/js/1426.33722355.js new file mode 100644 index 0000000000..18293c06c6 --- /dev/null +++ b/assets/js/1426.33722355.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1426],{61426:(e,t,r)=>{function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ipn});var a=function(){};function c(e){var t=e.item,r=e.items;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex((function(e){return e.objectID===t.objectID}))],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(s){u=!0,o=s}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var l=e||{},u=(l.inputElement,l.maxLength),s=void 0===u?512:u,f=Ze(l,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,Ne);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var l=ge(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,m=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:u,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,l=e.sourceIndex,u=Ze(e,Je);return We({id:"".concat(i(t.id,l),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:r,source:u,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},u)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t=r?null===n?null:0:o}function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,l=r.reportMissingResultsText,u=void 0===l?"Believe this query should return results?":l,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(Nt,null);default:return yt.createElement(_t,null)}}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){c=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n,o,i,a=e;if(!a.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var c=((a.__docsearch_parent?null===(t=a.__docsearch_parent)||void 0===t||null===(r=t._highlightResult)||void 0===r||null===(n=r.hierarchy)||void 0===n?void 0:n.lvl0:null===(o=e._highlightResult)||void 0===o||null===(i=o.hierarchy)||void 0===i?void 0:i.lvl0)||{}).value;return c&&Wt.test(c)?c.replace(zt,""):c}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,l=r.saveRecentSearchButtonTitle,u=void 0===l?"Save this search":l,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var lr=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function ur(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(20830),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,l=r.cancelButtonText,u=void 0===l?"Cancel":l,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:m},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(ur,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},u))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get:(t,r,n={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Or({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Or({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Or({caches:t}).clear()))}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.19.0",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function _r(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const Nr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>_r(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===Nr.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,l=r.method!==Nr.Get?{}:{...r.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let s=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,u),connectTimeout:l(s,e.timeouts.connect),responseTimeout:l(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,l)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ir.WithinHeaders?n:{},queryParameters:()=>e===Ir.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:l,queryParameters:u,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:u,hosts:l.map((e=>_r(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===Nr.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:Nr.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};function Gr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=Zr.Error,{debug:(e,t)=>(Zr.Debug>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(Zr.Info>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}})}})}Gr.version=Pr;const Xr=Gr;var Yr="3.5.1";function en(){}function tn(e){return e}function rn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function nn(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var on=["footer","searchBox"];function an(){return an=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,l=e.onClose,u=void 0===l?en:l,s=e.transformItems,f=void 0===s?tn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?tn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,_=mn(I,on),N=sn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=N[0],q=N[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Xr(e,t);return n.addAlgoliaAgent("docsearch",Yr),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",Yr),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,l=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||u()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:ln({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results,a=o[0],s=a.hits,p=a.nbHits,v=nn(s,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",an({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&u()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,an({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:u}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(lr,an({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:_,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),rn(t)||u()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file diff --git a/assets/js/15021e09.38aea691.js b/assets/js/15021e09.38aea691.js new file mode 100644 index 0000000000..b047d50fbf --- /dev/null +++ b/assets/js/15021e09.38aea691.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2637],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=l(n),m=a,h=d["".concat(p,".").concat(m)]||d[m]||u[m]||o;return n?r.createElement(h,s(s({ref:t},c),{},{components:n})):r.createElement(h,s({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));const o={},s="Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK & AWS Distro for OpenTelemetry)",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot",id:"examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot",title:"Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK & AWS Distro for OpenTelemetry)",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot",permalink:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK)",permalink:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray"},next:{title:"Running Tracetest with AWS X-Ray (AWS Distro for OpenTelemetry & Pokeshop API)",permalink:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray-pokeshop"}},p={},l=[{value:"Simple Node.js API with AWS X-Ray and Tracetest",id:"simple-nodejs-api-with-aws-x-ray-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:l},d="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-tracetest-with-aws-x-ray-aws-x-ray-nodejs-sdk--aws-distro-for-opentelemetry"},"Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK & AWS Distro for OpenTelemetry)"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-amazon-x-ray-adot"},"Check out the source code on GitHub here."))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://aws.amazon.com/xray/"},"AWS X-Ray")," provides a complete view of requests as they travel through your application and filters visual data across payloads, functions, traces, services, APIs and more with no-code and low-code motions."),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://aws-otel.github.io/docs/getting-started/collector"},"AWS Distro for OpenTelemetry (ADOT)")," is a secure, production-ready, AWS-supported distribution of the OpenTelemetry project. Part of the Cloud Native Computing Foundation, OpenTelemetry provides open source APIs, libraries and agents to collect distributed traces and metrics for application monitoring."),(0,a.kt)("h2",{id:"simple-nodejs-api-with-aws-x-ray-and-tracetest"},"Simple Node.js API with AWS X-Ray and Tracetest"),(0,a.kt)("p",null,"This is a simple quick start guide on how to configure a Node.js app to use instrumentation with traces and Tracetest for enhancing your E2E and integration tests with trace-based testing. The infrastructure will use AWS X-Ray as the trace data store, the ADOT as a middleware and a Node.js app to generate the telemetry data."),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"You will need ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this quick start app!"),(0,a.kt)("h2",{id:"project-structure"},"Project Structure"),(0,a.kt)("p",null,"The project is built with Docker Compose."),(0,a.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory is for the Node.js app."),(0,a.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml"),", and ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"root")," directory are for the setting up the Node.js App, Tracetest and ADOT Collector."),(0,a.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,a.kt)("p",null,"All ",(0,a.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services. For example, ",(0,a.kt)("inlineCode",{parentName:"p"},"adot-collector:2000")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/index.js")," will map to the ",(0,a.kt)("inlineCode",{parentName:"p"},"adot-collector")," service, where port ",(0,a.kt)("inlineCode",{parentName:"p"},"2000")," is the port where the X-Ray Daemon accepts telemetry data."),(0,a.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,a.kt)("p",null,"The Node.js app is a simple Express app, contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/index.js")," file."),(0,a.kt)("p",null,"It is instrumented using ",(0,a.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-nodejs.html"},"AWS X-Ray SDK"),", sending the data to the ADOT collector that will push the telemetry information to both the AWS service and the Tracetest OLTP endpoint."),(0,a.kt)("p",null,"The key instrumentation section from the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/index.js")," file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'const AWSXRay = require("aws-xray-sdk");\nconst XRayExpress = AWSXRay.express;\nconst express = require("express");\n\nAWSXRay.setDaemonAddress("adot-collector:2000");\n\n// Capture all AWS clients we create\nconst AWS = AWSXRay.captureAWS(require("aws-sdk"));\nAWS.config.update({\n region: process.env.AWS_REGION || "us-west-2",\n});\n\n// Capture all outgoing https requests\nAWSXRay.captureHTTPsGlobal(require("https"));\nconst https = require("https");\n\nconst app = express();\nconst port = 3000;\n\napp.use(XRayExpress.openSegment("Tracetest"));\n')),(0,a.kt)("p",null,"To start the server run this command."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"npm start\n")),(0,a.kt)("p",null,"As you can see the ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\n\nCOPY ./src/package*.json ./\n\nRUN npm install\nCOPY ./src .\n\nEXPOSE 3000\nCMD [ "npm", "start" ]\n')),(0,a.kt)("h2",{id:"tracetest"},"Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," includes three other services."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://aws-otel.github.io/docs/getting-started/collector"},(0,a.kt)("strong",{parentName:"a"},"AWS Distro for OpenTelemetry (ADOT)"))," - Software application that listens for traffic on UDP port 2000, gathers raw segment data and relays it to the AWS X-Ray API. The daemon works in conjunction with the AWS X-Ray SDKs and must be running so that data sent by the SDKs can reach the X-Ray service."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,a.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\n\nservices:\n tracetest:\n image: kubeshop/tracetest:${TAG:-latest}\n platform: linux/amd64\n volumes:\n - type: bind\n source: ./tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest.provision.yaml\n target: /app/provisioning.yaml\n ports:\n - 11633:11633\n command: --provisioning-file /app/provisioning.yaml\n extra_hosts:\n - "host.docker.internal:host-gateway"\n depends_on:\n postgres:\n condition: service_healthy\n adot-collector:\n condition: service_started\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n\n postgres:\n image: postgres:14\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n ports:\n - 5432:5432\n\n adot-collector:\n image: amazon/aws-otel-collector:latest\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./collector.config.yaml:/otel-local-config.yaml\n environment:\n AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}\n AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}\n AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}\n AWS_REGION: ${AWS_REGION}\n ports:\n - 4317:4317\n - 2000:2000\n')),(0,a.kt)("p",null,"Tracetest depends on Postgres and the ADOT collector. Tracetest requires config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,a.kt)("inlineCode",{parentName:"p"},"root")," directory and the respective config files."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml")," file defines the trace data store, set to the OTel Collector, meaning the traces will be sent to the ADOT instance where later on will be pushed to the AWX X-Ray service and the OTLP Tracetest endpoint."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"---\ntype: DataStore\nspec:\n name: otlp\n type: otlp\n\n")),(0,a.kt)("p",null,"But how does Tracetest fetch traces?"),(0,a.kt)("p",null,"The ADOT collector is configured with the ",(0,a.kt)("inlineCode",{parentName:"p"},"awsxray")," receiver and exporting the OpenTelemetry format directly intro Tracetest."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n awsxray:\n transport: udp\n\nprocessors:\n batch:\n\nexporters:\n awsxray:\n region: ${AWS_REGION}\n otlp/tracetest:\n endpoint: tracetest:4317\n tls:\n insecure: true\n\nservice:\n pipelines:\n traces/tracetest:\n receivers: [awsxray]\n processors: [batch]\n exporters: [otlp/tracetest]\n traces/awsxray:\n receivers: [awsxray]\n exporters: [awsxray]\n")),(0,a.kt)("p",null,"How do traces reach AWS X-Ray?"),(0,a.kt)("p",null,"The application code in the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/index.js")," file uses the native AWS SDK X-Ray library which sends telemetry data to the ADOT Collector to be processed and then sent to the configured AWS X-Ray SaaS and Tracetest."),(0,a.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,a.kt)("p",null,"To start both the Node.js app and Tracetest, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose up\n")),(0,a.kt)("p",null,"This will start your Tracetest instance on ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),". Open the instance and start creating tests!\nMake sure to use the ",(0,a.kt)("inlineCode",{parentName:"p"},"http://app:3000/")," url in your test creation, because your Node.js app and Tracetest are in the same network."),(0,a.kt)("h2",{id:"learn-more"},"Learn More"),(0,a.kt)("p",null,"Please visit our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/17896441.38f6818d.js b/assets/js/17896441.38f6818d.js new file mode 100644 index 0000000000..f9afdaa629 --- /dev/null +++ b/assets/js/17896441.38f6818d.js @@ -0,0 +1,2 @@ +/*! For license information please see 17896441.38f6818d.js.LICENSE.txt */ +(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7918],{17967:(t,e)=>{"use strict";e.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,r=/&(newline|tab);/gi,s=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^.+(:|:)/gim,o=[".","/"];e.N=function(t){var e,c=(e=t||"",e.replace(i,(function(t,e){return String.fromCharCode(e)}))).replace(r,"").replace(s,"").trim();if(!c)return"about:blank";if(function(t){return o.indexOf(t[0])>-1}(c))return c;var l=c.match(a);if(!l)return c;var h=l[0];return n.test(h)?"about:blank":c}},73468:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Kt});var i=n(67294),r=n(35463),s=n(43768);const a=i.createContext(null);function o(t){let{children:e,content:n}=t;const r=function(t){return(0,i.useMemo)((()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,contentTitle:t.contentTitle,toc:t.toc})),[t])}(n);return i.createElement(a.Provider,{value:r},e)}function c(){const t=(0,i.useContext)(a);if(null===t)throw new s.i6("DocProvider");return t}function l(){const{metadata:t,frontMatter:e,assets:n}=c();return i.createElement(r.d,{title:t.title,description:t.description,keywords:e.keywords,image:n.image??e.image})}var h=n(86010),u=n(13488),d=n(87462),p=n(97325),f=n(83699);function g(t){const{permalink:e,title:n,subLabel:r,isNext:s}=t;return i.createElement(f.Z,{className:(0,h.Z)("pagination-nav__link",s?"pagination-nav__link--next":"pagination-nav__link--prev"),to:e},r&&i.createElement("div",{className:"pagination-nav__sublabel"},r),i.createElement("div",{className:"pagination-nav__label"},n))}function y(t){const{previous:e,next:n}=t;return i.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,p.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},e&&i.createElement(g,(0,d.Z)({},e,{subLabel:i.createElement(p.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&i.createElement(g,(0,d.Z)({},n,{subLabel:i.createElement(p.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}function m(){const{metadata:t}=c();return i.createElement(y,{previous:t.previous,next:t.next})}var b=n(39962),_=n(30868),x=n(23702),v=n(86409),k=n(58801);const w={unreleased:function(t){let{siteTitle:e,versionMetadata:n}=t;return i.createElement(p.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:i.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(t){let{siteTitle:e,versionMetadata:n}=t;return i.createElement(p.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:i.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function C(t){const e=w[t.versionMetadata.banner];return i.createElement(e,t)}function T(t){let{versionLabel:e,to:n,onClick:r}=t;return i.createElement(p.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:i.createElement("b",null,i.createElement(f.Z,{to:n,onClick:r},i.createElement(p.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function E(t){let{className:e,versionMetadata:n}=t;const{siteConfig:{title:r}}=(0,b.Z)(),{pluginId:s}=(0,_.gA)({failfast:!0}),{savePreferredVersionName:a}=(0,v.J)(s),{latestDocSuggestion:o,latestVersionSuggestion:c}=(0,_.Jo)(s),l=o??(u=c).docs.find((t=>t.id===u.mainDocId));var u;return i.createElement("div",{className:(0,h.Z)(e,x.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},i.createElement("div",null,i.createElement(C,{siteTitle:r,versionMetadata:n})),i.createElement("div",{className:"margin-top--md"},i.createElement(T,{versionLabel:c.label,to:l.path,onClick:()=>a(c.name)})))}function S(t){let{className:e}=t;const n=(0,k.E)();return n.banner?i.createElement(E,{className:e,versionMetadata:n}):null}function A(t){let{className:e}=t;const n=(0,k.E)();return n.badge?i.createElement("span",{className:(0,h.Z)(e,x.k.docs.docVersionBadge,"badge badge--secondary")},i.createElement(p.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}function L(t){let{lastUpdatedAt:e,formattedLastUpdatedAt:n}=t;return i.createElement(p.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:i.createElement("b",null,i.createElement("time",{dateTime:new Date(1e3*e).toISOString()},n))}}," on {date}")}function B(t){let{lastUpdatedBy:e}=t;return i.createElement(p.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:i.createElement("b",null,e)}}," by {user}")}function N(t){let{lastUpdatedAt:e,formattedLastUpdatedAt:n,lastUpdatedBy:r}=t;return i.createElement("span",{className:x.k.common.lastUpdated},i.createElement(p.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e&&n?i.createElement(L,{lastUpdatedAt:e,formattedLastUpdatedAt:n}):"",byUser:r?i.createElement(B,{lastUpdatedBy:r}):""}},"Last updated{atDate}{byUser}"),!1)}const D={iconEdit:"iconEdit_Z9Sw"};function M(t){let{className:e,...n}=t;return i.createElement("svg",(0,d.Z)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,h.Z)(D.iconEdit,e),"aria-hidden":"true"},n),i.createElement("g",null,i.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function I(t){let{editUrl:e}=t;return i.createElement("a",{href:e,target:"_blank",rel:"noreferrer noopener",className:x.k.common.editThisPage},i.createElement(M,null),i.createElement(p.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}const O={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function $(t){let{permalink:e,label:n,count:r}=t;return i.createElement(f.Z,{href:e,className:(0,h.Z)(O.tag,r?O.tagWithCount:O.tagRegular)},n,r&&i.createElement("span",null,r))}const F={tags:"tags_jXut",tag:"tag_QGVx"};function R(t){let{tags:e}=t;return i.createElement(i.Fragment,null,i.createElement("b",null,i.createElement(p.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),i.createElement("ul",{className:(0,h.Z)(F.tags,"padding--none","margin-left--sm")},e.map((t=>{let{label:e,permalink:n}=t;return i.createElement("li",{key:n,className:F.tag},i.createElement($,{label:e,permalink:n}))}))))}const Z={lastUpdated:"lastUpdated_vwxv"};function P(t){return i.createElement("div",{className:(0,h.Z)(x.k.docs.docFooterTagsRow,"row margin-bottom--sm")},i.createElement("div",{className:"col"},i.createElement(R,t)))}function Y(t){let{editUrl:e,lastUpdatedAt:n,lastUpdatedBy:r,formattedLastUpdatedAt:s}=t;return i.createElement("div",{className:(0,h.Z)(x.k.docs.docFooterEditMetaRow,"row")},i.createElement("div",{className:"col"},e&&i.createElement(I,{editUrl:e})),i.createElement("div",{className:(0,h.Z)("col",Z.lastUpdated)},(n||r)&&i.createElement(N,{lastUpdatedAt:n,formattedLastUpdatedAt:s,lastUpdatedBy:r})))}function j(){const{metadata:t}=c(),{editUrl:e,lastUpdatedAt:n,formattedLastUpdatedAt:r,lastUpdatedBy:s,tags:a}=t,o=a.length>0,l=!!(e||n||s);return o||l?i.createElement("footer",{className:(0,h.Z)(x.k.docs.docFooter,"docusaurus-mt-lg")},o&&i.createElement(P,{tags:a}),l&&i.createElement(Y,{editUrl:e,lastUpdatedAt:n,lastUpdatedBy:s,formattedLastUpdatedAt:r})):null}var z=n(54639),U=n(20107);function W(t){const e=t.map((t=>({...t,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);e.forEach(((t,e)=>{const i=n.slice(2,t.level);t.parentIndex=Math.max(...i),n[t.level]=e}));const i=[];return e.forEach((t=>{const{parentIndex:n,...r}=t;n>=0?e[n].children.push(r):i.push(r)})),i}function q(t){let{toc:e,minHeadingLevel:n,maxHeadingLevel:i}=t;return e.flatMap((t=>{const e=q({toc:t.children,minHeadingLevel:n,maxHeadingLevel:i});return function(t){return t.level>=n&&t.level<=i}(t)?[{...t,children:e}]:e}))}function H(t){const e=t.getBoundingClientRect();return e.top===e.bottom?H(t.parentNode):e}function V(t,e){let{anchorTopOffset:n}=e;const i=t.find((t=>H(t).top>=n));if(i){return function(t){return t.top>0&&t.bottom{t.current=e?0:document.querySelector(".navbar").clientHeight}),[e]),t}function X(t){const e=(0,i.useRef)(void 0),n=G();(0,i.useEffect)((()=>{if(!t)return()=>{};const{linkClassName:i,linkActiveClassName:r,minHeadingLevel:s,maxHeadingLevel:a}=t;function o(){const t=function(t){return Array.from(document.getElementsByClassName(t))}(i),o=function(t){let{minHeadingLevel:e,maxHeadingLevel:n}=t;const i=[];for(let r=e;r<=n;r+=1)i.push(`h${r}.anchor`);return Array.from(document.querySelectorAll(i.join()))}({minHeadingLevel:s,maxHeadingLevel:a}),c=V(o,{anchorTopOffset:n.current}),l=t.find((t=>c&&c.id===function(t){return decodeURIComponent(t.href.substring(t.href.indexOf("#")+1))}(t)));t.forEach((t=>{!function(t,n){n?(e.current&&e.current!==t&&e.current.classList.remove(r),t.classList.add(r),e.current=t):t.classList.remove(r)}(t,t===l)}))}return document.addEventListener("scroll",o),document.addEventListener("resize",o),o(),()=>{document.removeEventListener("scroll",o),document.removeEventListener("resize",o)}}),[t,n])}function Q(t){let{toc:e,className:n,linkClassName:r,isChild:s}=t;return e.length?i.createElement("ul",{className:s?void 0:n},e.map((t=>i.createElement("li",{key:t.id},i.createElement("a",{href:`#${t.id}`,className:r??void 0,dangerouslySetInnerHTML:{__html:t.value}}),i.createElement(Q,{isChild:!0,toc:t.children,className:n,linkClassName:r}))))):null}const K=i.memo(Q);function J(t){let{toc:e,className:n="table-of-contents table-of-contents__left-border",linkClassName:r="table-of-contents__link",linkActiveClassName:s,minHeadingLevel:a,maxHeadingLevel:o,...c}=t;const l=(0,U.L)(),h=a??l.tableOfContents.minHeadingLevel,u=o??l.tableOfContents.maxHeadingLevel,p=function(t){let{toc:e,minHeadingLevel:n,maxHeadingLevel:r}=t;return(0,i.useMemo)((()=>q({toc:W(e),minHeadingLevel:n,maxHeadingLevel:r})),[e,n,r])}({toc:e,minHeadingLevel:h,maxHeadingLevel:u});return X((0,i.useMemo)((()=>{if(r&&s)return{linkClassName:r,linkActiveClassName:s,minHeadingLevel:h,maxHeadingLevel:u}}),[r,s,h,u])),i.createElement(K,(0,d.Z)({toc:p,className:n,linkClassName:r},c))}const tt={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function et(t){let{collapsed:e,...n}=t;return i.createElement("button",(0,d.Z)({type:"button"},n,{className:(0,h.Z)("clean-btn",tt.tocCollapsibleButton,!e&&tt.tocCollapsibleButtonExpanded,n.className)}),i.createElement(p.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const nt={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function it(t){let{toc:e,className:n,minHeadingLevel:r,maxHeadingLevel:s}=t;const{collapsed:a,toggleCollapsed:o}=(0,z.u)({initialState:!0});return i.createElement("div",{className:(0,h.Z)(nt.tocCollapsible,!a&&nt.tocCollapsibleExpanded,n)},i.createElement(et,{collapsed:a,onClick:o}),i.createElement(z.z,{lazy:!0,className:nt.tocCollapsibleContent,collapsed:a},i.createElement(J,{toc:e,minHeadingLevel:r,maxHeadingLevel:s})))}const rt={tocMobile:"tocMobile_ITEo"};function st(){const{toc:t,frontMatter:e}=c();return i.createElement(it,{toc:t,minHeadingLevel:e.toc_min_heading_level,maxHeadingLevel:e.toc_max_heading_level,className:(0,h.Z)(x.k.docs.docTocMobile,rt.tocMobile)})}const at={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},ot="table-of-contents__link toc-highlight",ct="table-of-contents__link--active";function lt(t){let{className:e,...n}=t;return i.createElement("div",{className:(0,h.Z)(at.tableOfContents,"thin-scrollbar",e)},i.createElement(J,(0,d.Z)({},n,{linkClassName:ot,linkActiveClassName:ct})))}function ht(){const{toc:t,frontMatter:e}=c();return i.createElement(lt,{toc:t,minHeadingLevel:e.toc_min_heading_level,maxHeadingLevel:e.toc_max_heading_level,className:x.k.docs.docTocDesktop})}var ut=n(13899),dt=n(3905),pt=n(31514);var ft=n(92053);var gt=n(51048);const yt={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function mt(t){return!!t&&("SUMMARY"===t.tagName||mt(t.parentElement))}function bt(t,e){return!!t&&(t===e||bt(t.parentElement,e))}function _t(t){let{summary:e,children:n,...r}=t;const s=(0,gt.Z)(),a=(0,i.useRef)(null),{collapsed:o,setCollapsed:c}=(0,z.u)({initialState:!r.open}),[l,u]=(0,i.useState)(r.open),p=i.isValidElement(e)?e:i.createElement("summary",null,e??"Details");return i.createElement("details",(0,d.Z)({},r,{ref:a,open:l,"data-collapsed":o,className:(0,h.Z)(yt.details,s&&yt.isBrowser,r.className),onMouseDown:t=>{mt(t.target)&&t.detail>1&&t.preventDefault()},onClick:t=>{t.stopPropagation();const e=t.target;mt(e)&&bt(e,a.current)&&(t.preventDefault(),o?(c(!1),u(!0)):c(!0))}}),p,i.createElement(z.z,{lazy:!1,collapsed:o,disableSSRStyle:!0,onCollapseTransitionEnd:t=>{c(t),u(!t)}},i.createElement("div",{className:yt.collapsibleContent},n)))}const xt={details:"details_b_Ee"},vt="alert alert--info";function kt(t){let{...e}=t;return i.createElement(_t,(0,d.Z)({},e,{className:(0,h.Z)(vt,xt.details,e.className)}))}function wt(t){return i.createElement(ut.Z,t)}const Ct={containsTaskList:"containsTaskList_mC6p"};const Tt={img:"img_ev3q"};const Et={admonition:"admonition_LlT9",admonitionHeading:"admonitionHeading_tbUL",admonitionIcon:"admonitionIcon_kALy",admonitionContent:"admonitionContent_S0QG"};const St={note:{infimaClassName:"secondary",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 14 16"},i.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:i.createElement(p.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 12 16"},i.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:i.createElement(p.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 12 16"},i.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:i.createElement(p.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 14 16"},i.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:i.createElement(p.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return i.createElement("svg",{viewBox:"0 0 16 16"},i.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:i.createElement(p.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},At={secondary:"note",important:"info",success:"tip",warning:"danger"};function Lt(t){const{mdxAdmonitionTitle:e,rest:n}=function(t){const e=i.Children.toArray(t),n=e.find((t=>i.isValidElement(t)&&"mdxAdmonitionTitle"===t.props?.mdxType)),r=i.createElement(i.Fragment,null,e.filter((t=>t!==n)));return{mdxAdmonitionTitle:n,rest:r}}(t.children);return{...t,title:t.title??e,children:n}}function Bt(t){let{children:e,fallback:n}=t;return(0,gt.Z)()?i.createElement(i.Fragment,null,e?.()):n??null}var Nt=n(9200),Dt=n(16432);const Mt="docusaurus-mermaid-container";function It(){const{colorMode:t}=(0,Nt.I)(),e=(0,U.L)().mermaid,n=e.theme[t],{options:r}=e;return(0,i.useMemo)((()=>({startOnLoad:!1,...r,theme:n})),[n,r])}const Ot={container:"container_lyt7"};function $t(t){let{value:e}=t;const n=function(t,e){const n=It(),r=e??n;return(0,i.useMemo)((()=>{Dt.o.mermaidAPI.initialize(r);const e=`mermaid-svg-${Math.round(1e7*Math.random())}`;return Dt.o.render(e,t)}),[t,r])}(e);return i.createElement("div",{className:`${Mt} ${Ot.container}`,dangerouslySetInnerHTML:{__html:n}})}const Ft={head:function(t){const e=i.Children.map(t.children,(t=>i.isValidElement(t)?function(t){if(t.props?.mdxType&&t.props.originalType){const{mdxType:e,originalType:n,...r}=t.props;return i.createElement(t.props.originalType,r)}return t}(t):t));return i.createElement(pt.Z,t,e)},code:function(t){const e=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return i.Children.toArray(t.children).every((t=>"string"==typeof t&&!t.includes("\n")||(0,i.isValidElement)(t)&&e.includes(t.props?.mdxType)))?i.createElement("code",t):i.createElement(ft.Z,t)},a:function(t){return i.createElement(f.Z,t)},pre:function(t){return i.createElement(ft.Z,(0,i.isValidElement)(t.children)&&"code"===t.children.props?.originalType?t.children.props:{...t})},details:function(t){const e=i.Children.toArray(t.children),n=e.find((t=>i.isValidElement(t)&&"summary"===t.props?.mdxType)),r=i.createElement(i.Fragment,null,e.filter((t=>t!==n)));return i.createElement(kt,(0,d.Z)({},t,{summary:n}),r)},ul:function(t){return i.createElement("ul",(0,d.Z)({},t,{className:(e=t.className,(0,h.Z)(e,e?.includes("contains-task-list")&&Ct.containsTaskList))}));var e},img:function(t){return i.createElement("img",(0,d.Z)({loading:"lazy"},t,{className:(e=t.className,(0,h.Z)(e,Tt.img))}));var e},h1:t=>i.createElement(wt,(0,d.Z)({as:"h1"},t)),h2:t=>i.createElement(wt,(0,d.Z)({as:"h2"},t)),h3:t=>i.createElement(wt,(0,d.Z)({as:"h3"},t)),h4:t=>i.createElement(wt,(0,d.Z)({as:"h4"},t)),h5:t=>i.createElement(wt,(0,d.Z)({as:"h5"},t)),h6:t=>i.createElement(wt,(0,d.Z)({as:"h6"},t)),admonition:function(t){const{children:e,type:n,title:r,icon:s}=Lt(t),a=function(t){const e=At[t]??t,n=St[e];return n||(console.warn(`No admonition config found for admonition type "${e}". Using Info as fallback.`),St.info)}(n),o=r??a.label,{iconComponent:c}=a,l=s??i.createElement(c,null);return i.createElement("div",{className:(0,h.Z)(x.k.common.admonition,x.k.common.admonitionType(t.type),"alert",`alert--${a.infimaClassName}`,Et.admonition)},i.createElement("div",{className:Et.admonitionHeading},i.createElement("span",{className:Et.admonitionIcon},l),o),i.createElement("div",{className:Et.admonitionContent},e))},mermaid:function(t){return i.createElement(Bt,null,(()=>i.createElement($t,t)))}};function Rt(t){let{children:e}=t;return i.createElement(dt.Zo,{components:Ft},e)}function Zt(t){let{children:e}=t;const n=function(){const{metadata:t,frontMatter:e,contentTitle:n}=c();return e.hide_title||void 0!==n?null:t.title}();return i.createElement("div",{className:(0,h.Z)(x.k.docs.docMarkdown,"markdown")},n&&i.createElement("header",null,i.createElement(ut.Z,{as:"h1"},n)),i.createElement(Rt,null,e))}var Pt=n(78259),Yt=n(69003),jt=n(79524);function zt(t){return i.createElement("svg",(0,d.Z)({viewBox:"0 0 24 24"},t),i.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const Ut={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function Wt(){const t=(0,jt.Z)("/");return i.createElement("li",{className:"breadcrumbs__item"},i.createElement(f.Z,{"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:t},i.createElement(zt,{className:Ut.breadcrumbHomeIcon})))}const qt={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Ht(t){let{children:e,href:n,isLast:r}=t;const s="breadcrumbs__link";return r?i.createElement("span",{className:s,itemProp:"name"},e):n?i.createElement(f.Z,{className:s,href:n,itemProp:"item"},i.createElement("span",{itemProp:"name"},e)):i.createElement("span",{className:s},e)}function Vt(t){let{children:e,active:n,index:r,addMicrodata:s}=t;return i.createElement("li",(0,d.Z)({},s&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,h.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),e,i.createElement("meta",{itemProp:"position",content:String(r+1)}))}function Gt(){const t=(0,Pt.s1)(),e=(0,Yt.Ns)();return t?i.createElement("nav",{className:(0,h.Z)(x.k.docs.docBreadcrumbs,qt.breadcrumbsContainer),"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},i.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},e&&i.createElement(Wt,null),t.map(((e,n)=>{const r=n===t.length-1;return i.createElement(Vt,{key:n,active:r,index:n,addMicrodata:!!e.href},i.createElement(Ht,{href:e.href,isLast:r},e.label))})))):null}const Xt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Qt(t){let{children:e}=t;const n=function(){const{frontMatter:t,toc:e}=c(),n=(0,u.i)(),r=t.hide_table_of_contents,s=!r&&e.length>0;return{hidden:r,mobile:s?i.createElement(st,null):void 0,desktop:!s||"desktop"!==n&&"ssr"!==n?void 0:i.createElement(ht,null)}}();return i.createElement("div",{className:"row"},i.createElement("div",{className:(0,h.Z)("col",!n.hidden&&Xt.docItemCol)},i.createElement(S,null),i.createElement("div",{className:Xt.docItemContainer},i.createElement("article",null,i.createElement(Gt,null),i.createElement(A,null),n.mobile,i.createElement(Zt,null,e),i.createElement(j,null)),i.createElement(m,null))),n.desktop&&i.createElement("div",{className:"col col--3"},n.desktop))}function Kt(t){const e=`docs-doc-id-${t.content.metadata.unversionedId}`,n=t.content;return i.createElement(o,{content:t.content},i.createElement(r.FG,{className:e},i.createElement(l,null),i.createElement(Qt,null,i.createElement(n,null))))}},13899:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(87462),r=n(67294),s=n(86010),a=n(97325),o=n(20107),c=n(83699);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function h(t){let{as:e,id:n,...h}=t;const{navbar:{hideOnScroll:u}}=(0,o.L)();if("h1"===e||!n)return r.createElement(e,(0,i.Z)({},h,{id:void 0}));const d=(0,a.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof h.children?h.children:n});return r.createElement(e,(0,i.Z)({},h,{className:(0,s.Z)("anchor",u?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,h.className),id:n}),h.children,r.createElement(c.Z,{className:"hash-link",to:`#${n}`,"aria-label":d,title:d},"\u200b"))}},58801:(t,e,n)=>{"use strict";n.d(e,{E:()=>o,q:()=>a});var i=n(67294),r=n(43768);const s=i.createContext(null);function a(t){let{children:e,version:n}=t;return i.createElement(s.Provider,{value:n},e)}function o(){const t=(0,i.useContext)(s);if(null===t)throw new r.i6("DocsVersionProvider");return t}},27484:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",r="second",s="minute",a="hour",o="day",c="week",l="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,y={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:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},b={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(r,2,"0")},m:function t(e,n){if(e.date()1)return t(a[0])}else{var o=e.name;x[o]=e,r=o}return!i&&r&&(_=r),r||!i&&_},w=function(t,e){if(v(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},C=b;C.l=k,C.i=v,C.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function y(t){this.$L=k(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.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()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=s[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,i=s.meridiem;if(i){for(var r=1;r<=24;r+=1)if(t.indexOf(i(r,0,e))>-1){n=r>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[r,function(t){this.afternoon=h(t,!1)}],a:[r,function(t){this.afternoon=h(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[r,function(t){var e=s.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[r,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function d(n){var i,r;i=n,r=s&&s.formats;for(var a=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var s=i&&i.toUpperCase();return n||r[i]||t[i]||r[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var i=d(e)(t),r=i.year,s=i.month,a=i.day,o=i.hours,c=i.minutes,l=i.seconds,h=i.milliseconds,u=i.zone,p=new Date,f=a||(r||s?1:p.getDate()),g=r||p.getFullYear(),y=0;r&&!s||(y=s>0?s-1:p.getMonth());var m=o||0,b=c||0,_=l||0,x=h||0;return u?new Date(Date.UTC(g,y,f,m,b,_,x+60*u.offset*1e3)):n?new Date(Date.UTC(g,y,f,m,b,_,x)):new Date(g,y,f,m,b,_,x)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),s={}}else if(o instanceof Array)for(var p=o.length,f=1;f<=p;f+=1){a[1]=o[f-1];var g=n.apply(this,a);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}f===p&&(this.$d=new Date(""))}else r.call(this,t)}}}()},59542:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var r=function(e){return e.add(4-e.isoWeekday(),t)},s=n.prototype;s.isoWeekYear=function(){return r(this).year()},s.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,s,a,o=r(this),c=(n=this.isoWeekYear(),a=4-(s=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),s.isoWeekday()>4&&(a+=7),s.add(a,t));return o.diff(c,"week")+1},s.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=s.startOf;s.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},16432:(t,e,n)=>{"use strict";n.d(e,{a:()=>Wn,b:()=>Ga,c:()=>qt,d:()=>zn,e:()=>Ut,f:()=>eo,g:()=>bi,h:()=>Bc,i:()=>wa,j:()=>Ji,k:()=>er,l:()=>Ot,m:()=>Wi,n:()=>Pt,o:()=>Dp,p:()=>No,s:()=>Ei});const i=function(t){for(var e=[],n=1;n{const n=u.Z.parse(t);for(const i in e)n[i]=d.Z.channel.clamp[i](e[i]);return u.Z.stringify(n)},f=(t,e)=>{const n=u.Z.parse(t),i={};for(const r in e)e[r]&&(i[r]=n[r]+e[r]);return p(t,i)};var g=n(21883);const y=(t,e,n=0,i=1)=>{if("number"!=typeof t)return p(t,{a:e});const r=g.Z.set({r:d.Z.channel.clamp.r(t),g:d.Z.channel.clamp.g(e),b:d.Z.channel.clamp.b(n),a:d.Z.channel.clamp.a(i)});return u.Z.stringify(r)},m=(t,e,n=50)=>{const{r:i,g:r,b:s,a:a}=u.Z.parse(t),{r:o,g:c,b:l,a:h}=u.Z.parse(e),d=n/100,p=2*d-1,f=a-h,g=((p*f==-1?p:(p+f)/(1+p*f))+1)/2,m=1-g;return y(i*g+o*m,r*g+c*m,s*g+l*m,a*d+h*(1-d))},b=(t,e=100)=>{const n=u.Z.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,m(n,t,e)};var _=n(7201),x=n(12281),v=n(42454),k="comm",w="rule",C="decl",T="@import",E="@keyframes",S=Math.abs,A=String.fromCharCode;Object.assign;function L(t){return t.trim()}function B(t,e,n){return t.replace(e,n)}function N(t,e){return t.indexOf(e)}function D(t,e){return 0|t.charCodeAt(e)}function M(t,e,n){return t.slice(e,n)}function I(t){return t.length}function O(t){return t.length}function $(t,e){return e.push(t),t}function F(t,e){for(var n="",i=O(t),r=0;r0?D(U,--j):0,P--,10===z&&(P=1,Z--),z}function H(){return z=j2||Q(z)>3?"":" "}function nt(t,e){for(;--e&&H()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return X(t,G()+(e<6&&32==V()&&32==H()))}function it(t){for(;H();)switch(z){case t:return j;case 34:case 39:34!==t&&39!==t&&it(z);break;case 40:41===t&&it(t);break;case 92:H()}return j}function rt(t,e){for(;H()&&t+z!==57&&(t+z!==84||47!==V()););return"/*"+X(e,j-1)+"*"+A(47===t?t:H())}function st(t){for(;!Q(V());)H();return X(t,j)}function at(t){return J(ot("",null,null,null,[""],t=K(t),0,[0],t))}function ot(t,e,n,i,r,s,a,o,c){for(var l=0,h=0,u=a,d=0,p=0,f=0,g=1,y=1,m=1,b=0,_="",x=r,v=s,k=i,w=_;y;)switch(f=b,b=H()){case 40:if(108!=f&&58==D(w,u-1)){-1!=N(w+=B(tt(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:w+=tt(b);break;case 9:case 10:case 13:case 32:w+=et(f);break;case 92:w+=nt(G()-1,7);continue;case 47:switch(V()){case 42:case 47:$(lt(rt(H(),G()),e,n),c);break;default:w+="/"}break;case 123*g:o[l++]=I(w)*m;case 125*g:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:p>0&&I(w)-u&&$(p>32?ht(w+";",i,n,u-1):ht(B(w," ","")+";",i,n,u-2),c);break;case 59:w+=";";default:if($(k=ct(w,e,n,l,h,r,o,_,x=[],v=[],u),s),123===b)if(0===h)ot(w,e,k,k,x,s,u,o,v);else switch(99===d&&110===D(w,3)?100:d){case 100:case 109:case 115:ot(t,k,k,i&&$(ct(t,k,k,0,0,r,o,_,r,x=[],u),v),r,v,u,o,i?x:v);break;default:ot(w,k,k,k,[""],v,0,o,v)}}l=h=p=0,g=m=1,_=w="",u=a;break;case 58:u=1+I(w),p=f;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==q())continue;switch(w+=A(b),b*g){case 38:m=h>0?1:(w+="\f",-1);break;case 44:o[l++]=(I(w)-1)*m,m=1;break;case 64:45===V()&&(w+=tt(H())),d=V(),h=u=I(_=w+=st(G())),b++;break;case 45:45===f&&2==I(w)&&(g=0)}}return s}function ct(t,e,n,i,r,s,a,o,c,l,h){for(var u=r-1,d=0===r?s:[""],p=O(d),f=0,g=0,y=0;f0?d[m]+" "+b:B(b,/&\f/g,d[m])))&&(c[y++]=_);return W(t,e,n,0===r?w:o,c,l,h)}function lt(t,e,n){return W(t,e,n,k,A(z),M(t,2,-2),0)}function ht(t,e,n,i){return W(t,e,n,C,M(t,0,i),M(t,i+1,-1),i)}var ut=n(70277),dt=n(45625),pt=n(39354);const ft=[];for(let c=0;c<256;++c)ft.push((c+256).toString(16).slice(1));function gt(t,e=0){return(ft[t[e+0]]+ft[t[e+1]]+ft[t[e+2]]+ft[t[e+3]]+"-"+ft[t[e+4]]+ft[t[e+5]]+"-"+ft[t[e+6]]+ft[t[e+7]]+"-"+ft[t[e+8]]+ft[t[e+9]]+"-"+ft[t[e+10]]+ft[t[e+11]]+ft[t[e+12]]+ft[t[e+13]]+ft[t[e+14]]+ft[t[e+15]]).toLowerCase()}const yt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const mt=function(t){return"string"==typeof t&&yt.test(t)};const bt=function(t){if(!mt(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};const _t="6ba7b810-9dad-11d1-80b4-00c04fd430c8",xt="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function vt(t,e,n,i){switch(t){case 0:return e&n^~e&i;case 1:case 3:return e^n^i;case 2:return e&n^e&i^n&i}}function kt(t,e){return t<>>32-e}const wt=function(t){const e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n>>0;l=c,c=o,o=kt(r,30)>>>0,r=i,i=a}n[0]=n[0]+i>>>0,n[1]=n[1]+r>>>0,n[2]=n[2]+o>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+l>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]},Ct=function(t,e,n){function i(t,i,r,s){var a;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},$t=function(t="fatal"){let e=It.fatal;"string"==typeof t?(t=t.toLowerCase())in It&&(e=It[t]):"number"==typeof t&&(e=t),Ot.trace=()=>{},Ot.debug=()=>{},Ot.info=()=>{},Ot.warn=()=>{},Ot.error=()=>{},Ot.fatal=()=>{},e<=It.fatal&&(Ot.fatal=console.error?console.error.bind(console,Ft("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",Ft("FATAL"))),e<=It.error&&(Ot.error=console.error?console.error.bind(console,Ft("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",Ft("ERROR"))),e<=It.warn&&(Ot.warn=console.warn?console.warn.bind(console,Ft("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",Ft("WARN"))),e<=It.info&&(Ot.info=console.info?console.info.bind(console,Ft("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",Ft("INFO"))),e<=It.debug&&(Ot.debug=console.debug?console.debug.bind(console,Ft("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",Ft("DEBUG"))),e<=It.trace&&(Ot.trace=console.debug?console.debug.bind(console,Ft("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",Ft("TRACE")))},Ft=t=>`%c${s()().format("ss.SSS")} : ${t} : `,Rt=t=>h().sanitize(t),Zt=(t,e)=>{var n;if(!1!==(null==(n=e.flowchart)?void 0:n.htmlLabels)){const n=e.securityLevel;"antiscript"===n||"strict"===n?t=Rt(t):"loose"!==n&&(t=(t=(t=zt(t)).replace(//g,">")).replace(/=/g,"="),t=jt(t))}return t},Pt=(t,e)=>t?t=e.dompurifyConfig?h().sanitize(Zt(t,e),e.dompurifyConfig).toString():h().sanitize(Zt(t,e),{FORBID_TAGS:["style"]}).toString():t,Yt=//gi,jt=t=>t.replace(/#br#/g,"
"),zt=t=>t.replace(Yt,"#br#"),Ut=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),Wt=function(t){let e=t;if(t.split("~").length-1>=2){let t=e;do{e=t,t=e.replace(/~([^\s,:;]+)~/,"<$1>")}while(t!=e);return Wt(t)}return e},qt={getRows:t=>{if(!t)return[""];return zt(t).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:Pt,sanitizeTextOrArray:(t,e)=>"string"==typeof t?Pt(t,e):t.flat().map((t=>Pt(t,e))),hasBreaks:t=>Yt.test(t),splitBreaks:t=>t.split(Yt),lineBreakRegex:Yt,removeScript:Rt,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:Ut},Ht=(t,e)=>f(t,e?{s:-40,l:10}:{s:-40,l:-10}),Vt="#ffffff",Gt="#f2f2f2";class Xt{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,x.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=f(this.primaryColor,{h:-160}),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(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="calculated",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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,x.Z)(this.contrast,55),this.border2=this.contrast,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[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const Qt={base:{getThemeVariables:t=>{const e=new class{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||f(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||f(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ht(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||b(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||b(this.tertiaryColor),this.lineColor=this.lineColor||b(this.background),this.textColor=this.textColor||this.primaryTextColor,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?(0,_.Z)(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||"grey",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||(0,_.Z)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||b(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||(0,x.Z)(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.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.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||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,x.Z)(this.primaryColor,16),this.tertiaryColor=f(this.primaryColor,{h:-160}),this.primaryBorderColor=b(this.background),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,x.Z)(b("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=y(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=(0,_.Z)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=y(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=y(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.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,x.Z)(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=(0,x.Z)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,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=(0,x.Z)(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.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=f(this.primaryColor,{h:64}),this.fillType3=f(this.secondaryColor,{h:64}),this.fillType4=f(this.primaryColor,{h:-64}),this.fillType5=f(this.secondaryColor,{h:-64}),this.fillType6=f(this.primaryColor,{h:128}),this.fillType7=f(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||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},default:{getThemeVariables:t=>{const e=new class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=f(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=f(this.primaryColor,{h:-160}),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.tertiaryColor),this.lineColor=b(this.background),this.textColor=b(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="#e8e8e8",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="grey",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.sectionBkgColor=y(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.personBorder="calculated",this.personBkg="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||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,_.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,_.Z)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},forest:{getThemeVariables:t=>{const e=new class{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=(0,x.Z)("#cde498",10),this.primaryBorderColor=Ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ht(this.tertiaryColor,this.darkMode),this.primaryTextColor=b(this.primaryColor),this.secondaryTextColor=b(this.secondaryColor),this.tertiaryTextColor=b(this.primaryColor),this.lineColor=b(this.background),this.textColor=b(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="grey",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.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||f(this.primaryColor,{h:30}),this.cScale4=this.cScale4||f(this.primaryColor,{h:60}),this.cScale5=this.cScale5||f(this.primaryColor,{h:90}),this.cScale6=this.cScale6||f(this.primaryColor,{h:120}),this.cScale7=this.cScale7||f(this.primaryColor,{h:150}),this.cScale8=this.cScale8||f(this.primaryColor,{h:210}),this.cScale9=this.cScale9||f(this.primaryColor,{h:270}),this.cScale10=this.cScale10||f(this.primaryColor,{h:300}),this.cScale11=this.cScale11||f(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,_.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,_.Z)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new Xt;return e.calculate(t),e}}},Kt={theme:"default",themeVariables:Qt.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{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,useMaxWidth:!0,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,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,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"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,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},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{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,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,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},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,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,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},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"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Kt.class&&(Kt.class.arrowMarkerAbsolute=Kt.arrowMarkerAbsolute),Kt.gitGraph&&(Kt.gitGraph.arrowMarkerAbsolute=Kt.arrowMarkerAbsolute);const Jt=(t,e="")=>Object.keys(t).reduce(((n,i)=>Array.isArray(t[i])?n:"object"==typeof t[i]&&null!==t[i]?[...n,e+i,...Jt(t[i],"")]:[...n,e+i]),[]),te=Jt(Kt,""),ee=Kt;function ne(t){return null==t}var ie={isNothing:ne,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:ne(t)?[]:[t]},repeat:function(t,e){var n,i="";for(n=0;no&&(e=i-o+(s=" ... ").length),n-i>o&&(n=i+o-(a=" ...").length),{str:s+t.slice(e,n).replace(/\t/g,"\u2192")+a,pos:i-e+s.length}}function ce(t,e){return ie.repeat(" ",e-t.length)+t}var le=function(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 n,i=/\r?\n|\r|\0/g,r=[0],s=[],a=-1;n=i.exec(t.buffer);)s.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var o,c,l="",h=Math.min(t.line+e.linesAfter,s.length).toString().length,u=e.maxLength-(e.indent+h+3);for(o=1;o<=e.linesBefore&&!(a-o<0);o++)c=oe(t.buffer,r[a-o],s[a-o],t.position-(r[a]-r[a-o]),u),l=ie.repeat(" ",e.indent)+ce((t.line-o+1).toString(),h)+" | "+c.str+"\n"+l;for(c=oe(t.buffer,r[a],s[a],t.position,u),l+=ie.repeat(" ",e.indent)+ce((t.line+1).toString(),h)+" | "+c.str+"\n",l+=ie.repeat("-",e.indent+h+3+c.pos)+"^\n",o=1;o<=e.linesAfter&&!(a+o>=s.length);o++)c=oe(t.buffer,r[a+o],s[a+o],t.position-(r[a]-r[a+o]),u),l+=ie.repeat(" ",e.indent)+ce((t.line+o+1).toString(),h)+" | "+c.str+"\n";return l.replace(/\n$/,"")},he=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ue=["scalar","sequence","mapping"];var de=function(t,e){var n,i;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===he.indexOf(e))throw new ae('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=(n=e.styleAliases||null,i={},null!==n&&Object.keys(n).forEach((function(t){n[t].forEach((function(e){i[String(e)]=t}))})),i),-1===ue.indexOf(this.kind))throw new ae('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function pe(t,e){var n=[];return t[e].forEach((function(t){var e=n.length;n.forEach((function(n,i){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=i)})),n[e]=t})),n}function fe(t){return this.extend(t)}fe.prototype.extend=function(t){var e=[],n=[];if(t instanceof de)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new ae("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof de))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new ae("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 ae("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(t){if(!(t instanceof de))throw new ae("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(fe.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=pe(i,"implicit"),i.compiledExplicit=pe(i,"explicit"),i.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ve=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var ke=/^[-+]?[0-9]+e/;var we=new de("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!ve.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ie.isNegativeZero(t))},represent:function(t,e){var n;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(ie.isNegativeZero(t))return"-0.0";return n=t.toString(10),ke.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),Ce=ge.extend({implicit:[ye,me,xe,we]}),Te=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ee=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]))?))?$");var Se=new de("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Te.exec(t)||null!==Ee.exec(t))},construct:function(t){var e,n,i,r,s,a,o,c,l=0,h=null;if(null===(e=Te.exec(t))&&(e=Ee.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),c=new Date(Date.UTC(n,i,r,s,a,o,l)),h&&c.setTime(c.getTime()-h),c},instanceOf:Date,represent:function(t){return t.toISOString()}});var Ae=new de("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Be=new de("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,s=Le;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,s=Le,a=0,o=[];for(e=0;e>16&255),o.push(a>>8&255),o.push(255&a)),a=a<<6|s.indexOf(i.charAt(e));return 0===(n=r%4*6)?(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)):18===n?(o.push(a>>10&255),o.push(a>>2&255)):12===n&&o.push(a>>4&255),new Uint8Array(o)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,n,i="",r=0,s=t.length,a=Le;for(e=0;e>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return 0===(n=s%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),Ne=Object.prototype.hasOwnProperty,De=Object.prototype.toString;var Me=new de("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,i,r,s,a=[],o=t;for(e=0,n=o.length;e>10),56320+(t-65536&1023))}for(var on=new Array(256),cn=new Array(256),ln=0;ln<256;ln++)on[ln]=sn(ln)?1:0,cn[ln]=sn(ln);function hn(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Re,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 un(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=le(n),new ae(e,n)}function dn(t,e){throw un(t,e)}function pn(t,e){t.onWarning&&t.onWarning.call(null,un(t,e))}var fn={YAML:function(t,e,n){var i,r,s;null!==t.version&&dn(t,"duplication of %YAML directive"),1!==n.length&&dn(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&dn(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),s=parseInt(i[2],10),1!==r&&dn(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,1!==s&&2!==s&&pn(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&dn(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],Xe.test(i)||dn(t,"ill-formed tag handle (first argument) of the TAG directive"),Ze.call(t.tagMap,i)&&dn(t,'there is a previously declared suffix for "'+i+'" tag handle'),Qe.test(r)||dn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(s){dn(t,"tag prefix is malformed: "+r)}t.tagMap[i]=r}};function gn(t,e,n,i){var r,s,a,o;if(e1&&(t.result+=ie.repeat("\n",e-1))}function kn(t,e){var n,i,r=t.tag,s=t.anchor,a=[],o=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,dn(t,"tab characters must not be used in indentation")),45===i)&&en(t.input.charCodeAt(t.position+1));)if(o=!0,t.position++,_n(t,!0,-1)&&t.lineIndent<=e)a.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,Tn(t,e,je,!1,!0),a.push(t.result),_n(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)dn(t,"bad indentation of a sequence entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente)&&(m&&(a=t.line,o=t.lineStart,c=t.position),Tn(t,e,ze,!0,r)&&(m?g=t.result:y=t.result),m||(mn(t,d,p,f,g,y,a,o,c),f=g=y=null),_n(t,!0,-1),l=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&0!==l)dn(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===r?dn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?dn(t,"repeat of an indentation width identifier"):(h=e+r-1,l=!0)}if(tn(s)){do{s=t.input.charCodeAt(++t.position)}while(tn(s));if(35===s)do{s=t.input.charCodeAt(++t.position)}while(!Je(s)&&0!==s)}for(;0!==s;){for(bn(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndenth&&(h=t.lineIndent),Je(s))u++;else{if(t.lineIndent0){for(r=a,s=0;r>0;r--)(a=rn(o=t.input.charCodeAt(++t.position)))>=0?s=(s<<4)+a:dn(t,"expected hexadecimal character");t.result+=an(s),t.position++}else dn(t,"unknown escape sequence");n=i=t.position}else Je(o)?(gn(t,n,i,!0),vn(t,_n(t,!1,e)),n=i=t.position):t.position===t.lineStart&&xn(t)?dn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}dn(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?y=!0:!function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!en(i)&&!nn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&dn(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),Ze.call(t.anchorMap,n)||dn(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],_n(t,!0,-1),!0}(t)?function(t,e,n){var i,r,s,a,o,c,l,h,u=t.kind,d=t.result;if(en(h=t.input.charCodeAt(t.position))||nn(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(en(i=t.input.charCodeAt(t.position+1))||n&&nn(i)))return!1;for(t.kind="scalar",t.result="",r=s=t.position,a=!1;0!==h;){if(58===h){if(en(i=t.input.charCodeAt(t.position+1))||n&&nn(i))break}else if(35===h){if(en(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&xn(t)||n&&nn(h))break;if(Je(h)){if(o=t.line,c=t.lineStart,l=t.lineIndent,_n(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}t.position=s,t.line=o,t.lineStart=c,t.lineIndent=l;break}}a&&(gn(t,r,s,!1),vn(t,t.line-o),r=s=t.position,a=!1),tn(h)||(s=t.position+1),h=t.input.charCodeAt(++t.position)}return gn(t,r,s,!1),!!t.result||(t.kind=u,t.result=d,!1)}(t,d,Pe===n)&&(y=!0,null===t.tag&&(t.tag="?")):(y=!0,null===t.tag&&null===t.anchor||dn(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===f&&(y=o&&kn(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&dn(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),c=0,l=t.implicitTypes.length;c"),null!==t.result&&u.kind!==t.kind&&dn(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)):dn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function En(t){var e,n,i,r,s=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(_n(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){for(a=!0,r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!en(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&dn(t,"directive name must not be less than one character in length");0!==r;){for(;tn(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!Je(r));break}if(Je(r))break;for(e=t.position;0!==r&&!en(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&bn(t),Ze.call(fn,n)?fn[n](t,n,i):pn(t,'unknown document directive "'+n+'"')}_n(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,_n(t,!0,-1)):a&&dn(t,"directives end mark is expected"),Tn(t,t.lineIndent-1,ze,!1,!0),_n(t,!0,-1),t.checkLineBreaks&&Ve.test(t.input.slice(s,t.position))&&pn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,_n(t,!0,-1)):t.position{for(const{id:e,detector:n,loader:i}of t)$n(e,n,i)},$n=(t,e,n)=>{Mn[t]?Ot.error(`Detector with key ${t} already exists`):Mn[t]={detector:e,loader:n},Ot.debug(`Detector with key ${t} added${n?" with loader":""}`)},Fn=function(t,e,n){const{depth:i,clobber:r}=Object.assign({depth:2,clobber:!1},n);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Fn(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(r||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Fn(t[n],e[n],{depth:i-1,clobber:r}))})),t)},Rn=Fn,Zn={curveBasis:o.$0Z,curveBasisClosed:o.Dts,curveBasisOpen:o.WQY,curveBumpX:o.qpX,curveBumpY:o.u93,curveBundle:o.tFB,curveCardinalClosed:o.OvA,curveCardinalOpen:o.dCK,curveCardinal:o.YY7,curveCatmullRomClosed:o.fGX,curveCatmullRomOpen:o.$m7,curveCatmullRom:o.zgE,curveLinear:o.c_6,curveLinearClosed:o.fxm,curveMonotoneX:o.FdL,curveMonotoneY:o.ak_,curveNatural:o.SxZ,curveStep:o.eA_,curveStepAfter:o.jsv,curveStepBefore:o.iJ},Pn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Yn=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,jn=function(t,e=null){try{const n=new RegExp(`[%]{2}(?![{]${Yn.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(n,"").replace(/'/gm,'"'),Ot.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const r=[];for(;null!==(i=Pn.exec(t));)if(i.index===Pn.lastIndex&&Pn.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;r.push({type:t,args:e})}return 0===r.length&&r.push({type:t,args:null}),1===r.length?r[0]:r}catch(n){return Ot.error(`ERROR: ${n.message} - Unable to parse directive\n ${null!==e?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}};function zn(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Zn[n]||e}function Un(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function Wn(t){let e="",n="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?n=n+i+";":e=e+i+";");return{style:e,labelStyle:n}}let qn=0;const Hn=()=>(qn++,"id-"+Math.random().toString(36).substr(2,12)+"-"+qn);const Vn=t=>function(t){let e="";const n="0123456789abcdef",i=n.length;for(let r=0;r{if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},n),qt.lineBreakRegex.test(t))return t;const i=t.split(" "),r=[];let s="";return i.forEach(((t,a)=>{const o=Jn(`${t} `,n),c=Jn(s,n);if(o>e){const{hyphenatedStrings:i,remainingWord:a}=Qn(t,e,"-",n);r.push(s,...i),s=a}else c+o>=e?(r.push(s),s=t):s=[s,t].filter(Boolean).join(" ");a+1===i.length&&r.push(s)})),r.filter((t=>""!==t)).join(n.joinWith)}),((t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`)),Qn=(0,v.Z)(((t,e,n="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const r=[...t],s=[];let a="";return r.forEach(((t,o)=>{const c=`${a}${t}`;if(Jn(c,i)>=e){const t=o+1,e=r.length===t,i=`${c}${n}`;s.push(e?c:i),a=""}else a=c})),{hyphenatedStrings:s,remainingWord:a}}),((t,e,n="-",i)=>`${t}${e}${n}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function Kn(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),ti(t,e).height}function Jn(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),ti(t,e).width}const ti=(0,v.Z)(((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:n,fontFamily:i,fontWeight:r}=e;if(!t)return{width:0,height:0};const[,s]=si(n),a=["sans-serif",i],c=t.split(qt.lineBreakRegex),l=[],h=(0,o.Ys)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const o of a){let t=0;const e={width:0,height:0,lineHeight:0};for(const n of c){const i={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};i.text=n;const a=Gn(u,i).style("font-size",s).style("font-weight",r).style("font-family",o),c=(a._groups||a)[0][0].getBBox();e.width=Math.round(Math.max(e.width,c.width)),t=Math.round(c.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}l.push(e)}u.remove();return l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let ei;const ni=t=>{if(Ot.debug("directiveSanitizer called with",t),"object"==typeof t&&(t.length?t.forEach((t=>ni(t))):Object.keys(t).forEach((e=>{Ot.debug("Checking key",e),e.startsWith("__")&&(Ot.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(Ot.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(Ot.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(Ot.debug("sanitizing themeCss option"),t[e]=ii(t[e])),e.includes("fontFamily")&&(Ot.debug("sanitizing fontFamily option"),t[e]=ii(t[e])),e.includes("altFontFamily")&&(Ot.debug("sanitizing altFontFamily option"),t[e]=ii(t[e])),te.includes(e)?"object"==typeof t[e]&&(Ot.debug("sanitize deleting object",e),ni(t[e])):(Ot.debug("sanitize deleting option",e),delete t[e])}))),t.themeVariables){const e=Object.keys(t.themeVariables);for(const n of e){const e=t.themeVariables[n];e&&e.match&&!e.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}}Ot.debug("After sanitization",t)},ii=t=>{let e=0,n=0;for(const i of t){if(e{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},ai={assignWithDepth:Rn,wrapLabel:Xn,calculateTextHeight:Kn,calculateTextWidth:Jn,calculateTextDimensions:ti,detectInit:function(t,e){const n=jn(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(n)){const t=n.map((t=>t.args));ni(t),i=Rn(i,[...t])}else i=n.args;if(i){let n=In(t,e);["config"].forEach((t=>{void 0!==i[t]&&("flowchart-v2"===n&&(n="flowchart"),i[n]=i[t],delete i[t])}))}return i},detectDirective:jn,isSubstringInArray:function(t,e){for(const[n,i]of e.entries())if(i.match(t))return n;return-1},interpolateToCurve:zn,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){let e,n=0;t.forEach((t=>{n+=Un(t,e),e=t}));let i,r=n/2;return e=void 0,t.forEach((t=>{if(e&&!i){const n=Un(t,e);if(n=1&&(i={x:t.x,y:t.y}),s>0&&s<1&&(i={x:(1-s)*e.x+s*t.x,y:(1-s)*e.y+s*t.y})}}e=t})),i}(t)},calcCardinalityPosition:(t,e,n)=>{let i;Ot.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());let r,s=25;i=void 0,e.forEach((t=>{if(i&&!r){const e=Un(t,i);if(e=1&&(r={x:t.x,y:t.y}),n>0&&n<1&&(r={x:(1-n)*i.x+n*t.x,y:(1-n)*i.y+n*t.y})}}i=t}));const a=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),c={x:0,y:0};return c.x=Math.sin(o)*a+(e[0].x+r.x)/2,c.y=-Math.cos(o)*a+(e[0].y+r.y)/2,c},calcTerminalLabelPosition:function(t,e,n){let i,r=JSON.parse(JSON.stringify(n));Ot.info("our points",r),"start_left"!==e&&"start_right"!==e&&(r=r.reverse()),r.forEach((t=>{i=t}));let s,a=25+t;i=void 0,r.forEach((t=>{if(i&&!s){const e=Un(t,i);if(e=1&&(s={x:t.x,y:t.y}),n>0&&n<1&&(s={x:(1-n)*i.x+n*t.x,y:(1-n)*i.y+n*t.y})}}i=t}));const o=10+.5*t,c=Math.atan2(r[0].y-s.y,r[0].x-s.x),l={x:0,y:0};return l.x=Math.sin(c)*o+(r[0].x+s.x)/2,l.y=-Math.cos(c)*o+(r[0].y+s.y)/2,"start_left"===e&&(l.x=Math.sin(c+Math.PI)*o+(r[0].x+s.x)/2,l.y=-Math.cos(c+Math.PI)*o+(r[0].y+s.y)/2),"end_right"===e&&(l.x=Math.sin(c-Math.PI)*o+(r[0].x+s.x)/2-5,l.y=-Math.cos(c-Math.PI)*o+(r[0].y+s.y)/2-5),"end_left"===e&&(l.x=Math.sin(c)*o+(r[0].x+s.x)/2-5,l.y=-Math.cos(c)*o+(r[0].y+s.y)/2-5),l},formatUrl:function(t,e){const n=t.trim();if(n)return"loose"!==e.securityLevel?(0,a.N)(n):n},getStylesFromArray:Wn,generateId:Hn,random:Vn,runFunc:(t,...e)=>{const n=t.split("."),i=n.length-1,r=n[i];let s=window;for(let a=0;a{if(!i)return;const r=t.node().getBBox();t.append("text").text(i).attr("x",r.x+r.width/2).attr("y",-n).attr("class",e)},parseFontSize:si},oi="9.4.3",ci=Object.freeze(ee);let li,hi=Rn({},ci),ui=[],di=Rn({},ci);const pi=(t,e)=>{let n=Rn({},t),i={};for(const r of e)_i(r),i=Rn(i,r);if(n=Rn(n,i),i.theme&&i.theme in Qt){const t=Rn({},li),e=Rn(t.themeVariables||{},i.themeVariables);n.theme&&n.theme in Qt&&(n.themeVariables=Qt[n.theme].getThemeVariables(e))}return di=n,Ci(di),di},fi=t=>(hi=Rn({},ci),hi=Rn(hi,t),t.theme&&Qt[t.theme]&&(hi.themeVariables=Qt[t.theme].getThemeVariables(t.themeVariables)),pi(hi,ui),hi),gi=t=>{li=Rn({},t)},yi=()=>Rn({},hi),mi=t=>(Ci(t),Rn(di,t),bi()),bi=()=>Rn({},di),_i=t=>{["secure",...hi.secure??[]].forEach((e=>{void 0!==t[e]&&(Ot.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{0===e.indexOf("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&_i(t[e])}))},xi=t=>{t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),ui.push(t),pi(hi,ui)},vi=(t=hi)=>{ui=[],pi(t,ui)};var ki=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(ki||{});const wi={},Ci=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(wi[e="LAZY_LOAD_DEPRECATED"]||(Ot.warn(ki[e]),wi[e]=!0)))},Ti=function(t,e,n,i){const r=function(t,e,n){let i=new Map;return n?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}(e,n,i);!function(t,e){for(let n of e)t.attr(n[0],n[1])}(t,r)},Ei=function(t,e,n,i){const r=e.node().getBBox(),s=r.width,a=r.height;Ot.info(`SVG bounds: ${s}x${a}`,r);let o=0,c=0;Ot.info(`Graph bounds: ${o}x${c}`,t),o=s+2*n,c=a+2*n,Ot.info(`Calculated bounds: ${o}x${c}`),Ti(e,c,o,i);const l=`${r.x-n} ${r.y-n} ${r.width+2*n} ${r.height+2*n}`;e.attr("viewBox",l)},Si=t=>`g.classGroup text {\n fill: ${t.nodeBorder};\n fill: ${t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,Ai=t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n`,Li=()=>"",Bi=t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,Ni=t=>`\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ${t.ganttFontSize};\n // }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n // font-size: ${t.ganttFontSize};\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n // font-size: ${t.ganttFontSize};\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor} ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n`,Di=()=>"",Mi=t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,Ii=t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 100%;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n\n`,Oi=t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`,$i=t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,Fi=t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,Ri=t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,Zi={flowchart:Bi,"flowchart-v2":Bi,sequence:Oi,gantt:Ni,classDiagram:Si,"classDiagram-v2":Si,class:Si,stateDiagram:$i,state:$i,info:Di,pie:Mi,er:Ai,error:Li,journey:Fi,requirement:Ii,c4:Ri},Pi=(t,e,n)=>{let i="";return t in Zi&&Zi[t]?i=Zi[t](n):Ot.warn(`No theme found for ${t}`),` & {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n fill: ${n.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${n.errorBkgColor};\n }\n & .error-text {\n fill: ${n.errorTextColor};\n stroke: ${n.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${n.lineColor};\n stroke: ${n.lineColor};\n }\n & .marker.cross {\n stroke: ${n.lineColor};\n }\n\n & svg {\n font-family: ${n.fontFamily};\n font-size: ${n.fontSize};\n }\n\n ${i}\n\n ${e}\n`};let Yi="",ji="",zi="";const Ui=t=>Pt(t,bi()),Wi=function(){Yi="",zi="",ji=""},qi=function(t){Yi=Ui(t).replace(/^\s+/g,"")},Hi=function(){return Yi||ji},Vi=function(t){zi=Ui(t).replace(/\n\s+/g,"\n")},Gi=function(){return zi},Xi=function(t){ji=Ui(t)},Qi=function(){return ji},Ki={setAccTitle:qi,getAccTitle:Hi,setDiagramTitle:Xi,getDiagramTitle:Qi,getAccDescription:Gi,setAccDescription:Vi,clear:Wi},Ji=Object.freeze(Object.defineProperty({__proto__:null,clear:Wi,default:Ki,getAccDescription:Gi,getAccTitle:Hi,getDiagramTitle:Qi,setAccDescription:Vi,setAccTitle:qi,setDiagramTitle:Xi},Symbol.toStringTag,{value:"Module"}));let tr={};const er=function(t,e,n,i){Ot.debug("parseDirective is being called",e,n,i);try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":tr={};break;case"type_directive":if(!tr)throw new Error("currentDirective is undefined");tr.type=e.toLowerCase();break;case"arg_directive":if(!tr)throw new Error("currentDirective is undefined");tr.args=JSON.parse(e);break;case"close_directive":nr(t,tr,i),tr=void 0}}catch(r){Ot.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${n}`),Ot.error(r.message)}},nr=function(t,e,n){switch(Ot.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":["config"].forEach((t=>{void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),Ot.info("sanitize in handleDirective",e.args),ni(e.args),Ot.info("sanitize in handleDirective (done)",e.args),xi(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":Ot.warn("themeCss encountered");break;default:Ot.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e)}},ir=Ot,rr=$t,sr=bi,ar=t=>Pt(t,sr()),or=Ei,cr=(t,e,n,i)=>er(t,e,n,i),lr={},hr=(t,e,n)=>{if(lr[t])throw new Error(`Diagram ${t} already registered.`);var i,r;lr[t]=e,n&&$n(t,n),i=t,r=e.styles,Zi[i]=r,e.injectUtils&&e.injectUtils(ir,rr,sr,ar,or,Ji,cr)},ur=t=>{if(t in lr)return lr[t];throw new Error(`Diagram ${t} not found.`)};var dr=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,4],i=[1,7],r=[1,5],s=[1,9],a=[1,6],o=[2,6],c=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],h=[8,14,20,22,24,25,27,29,32,37,40],u=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],p=[6,8,14,50,55],f=[8,14,55],g=[1,53],y=[1,52],m=[8,14,30,33,35,38,55],b=[1,67],_=[1,68],x=[1,69],v=[8,14,33,35,42,55],k={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 3:return s[o];case 4:return s[o-1];case 5:return i.setDirection(s[o-3]),s[o-1];case 7:i.setOptions(s[o-1]),this.$=s[o];break;case 8:s[o-1]+=s[o],this.$=s[o-1];break;case 10:this.$=[];break;case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 12:this.$=s[o-1];break;case 17:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 20:i.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 22:i.checkout(s[o]);break;case 23:i.branch(s[o]);break;case 24:i.branch(s[o-2],s[o]);break;case 25:i.cherryPick(s[o],"",void 0);break;case 26:i.cherryPick(s[o-2],"",s[o]);break;case 27:case 29:i.cherryPick(s[o-2],"","");break;case 28:i.cherryPick(s[o],"",s[o-2]);break;case 30:i.merge(s[o],"","","");break;case 31:i.merge(s[o-2],s[o],"","");break;case 32:i.merge(s[o-2],"",s[o],"");break;case 33:i.merge(s[o-2],"","",s[o]);break;case 34:i.merge(s[o-4],s[o],"",s[o-2]);break;case 35:i.merge(s[o-4],"",s[o],s[o-2]);break;case 36:i.merge(s[o-4],"",s[o-2],s[o]);break;case 37:i.merge(s[o-4],s[o-2],s[o],"");break;case 38:i.merge(s[o-4],s[o-2],"",s[o]);break;case 39:i.merge(s[o-4],s[o],s[o-2],"");break;case 40:i.merge(s[o-6],s[o-4],s[o-2],s[o]);break;case 41:i.merge(s[o-6],s[o],s[o-4],s[o-2]);break;case 42:i.merge(s[o-6],s[o-4],s[o],s[o-2]);break;case 43:i.merge(s[o-6],s[o-2],s[o-4],s[o]);break;case 44:i.merge(s[o-6],s[o],s[o-2],s[o-4]);break;case 45:i.merge(s[o-6],s[o-2],s[o],s[o-4]);break;case 46:i.commit(s[o]);break;case 47:i.commit("","",i.commitType.NORMAL,s[o]);break;case 48:i.commit("","",s[o],"");break;case 49:i.commit("","",s[o],s[o-2]);break;case 50:i.commit("","",s[o-2],s[o]);break;case 51:i.commit("",s[o],i.commitType.NORMAL,"");break;case 52:i.commit("",s[o-2],i.commitType.NORMAL,s[o]);break;case 53:i.commit("",s[o],i.commitType.NORMAL,s[o-2]);break;case 54:i.commit("",s[o-2],s[o],"");break;case 55:i.commit("",s[o],s[o-2],"");break;case 56:i.commit("",s[o-4],s[o-2],s[o]);break;case 57:i.commit("",s[o-4],s[o],s[o-2]);break;case 58:i.commit("",s[o-2],s[o-4],s[o]);break;case 59:i.commit("",s[o],s[o-4],s[o-2]);break;case 60:i.commit("",s[o],s[o-2],s[o-4]);break;case 61:i.commit("",s[o-2],s[o],s[o-4]);break;case 62:i.commit(s[o],"",i.commitType.NORMAL,"");break;case 63:i.commit(s[o],"",i.commitType.NORMAL,s[o-2]);break;case 64:i.commit(s[o-2],"",i.commitType.NORMAL,s[o]);break;case 65:i.commit(s[o-2],"",s[o],"");break;case 66:i.commit(s[o],"",s[o-2],"");break;case 67:i.commit(s[o],s[o-2],i.commitType.NORMAL,"");break;case 68:i.commit(s[o-2],s[o],i.commitType.NORMAL,"");break;case 69:i.commit(s[o-4],"",s[o-2],s[o]);break;case 70:i.commit(s[o-4],"",s[o],s[o-2]);break;case 71:i.commit(s[o-2],"",s[o-4],s[o]);break;case 72:i.commit(s[o],"",s[o-4],s[o-2]);break;case 73:i.commit(s[o],"",s[o-2],s[o-4]);break;case 74:i.commit(s[o-2],"",s[o],s[o-4]);break;case 75:i.commit(s[o-4],s[o],s[o-2],"");break;case 76:i.commit(s[o-4],s[o-2],s[o],"");break;case 77:i.commit(s[o-2],s[o],s[o-4],"");break;case 78:i.commit(s[o],s[o-2],s[o-4],"");break;case 79:i.commit(s[o],s[o-4],s[o-2],"");break;case 80:i.commit(s[o-2],s[o-4],s[o],"");break;case 81:i.commit(s[o-4],s[o],i.commitType.NORMAL,s[o-2]);break;case 82:i.commit(s[o-4],s[o-2],i.commitType.NORMAL,s[o]);break;case 83:i.commit(s[o-2],s[o],i.commitType.NORMAL,s[o-4]);break;case 84:i.commit(s[o],s[o-2],i.commitType.NORMAL,s[o-4]);break;case 85:i.commit(s[o],s[o-4],i.commitType.NORMAL,s[o-2]);break;case 86:i.commit(s[o-2],s[o-4],i.commitType.NORMAL,s[o]);break;case 87:i.commit(s[o-6],s[o-4],s[o-2],s[o]);break;case 88:i.commit(s[o-6],s[o-4],s[o],s[o-2]);break;case 89:i.commit(s[o-6],s[o-2],s[o-4],s[o]);break;case 90:i.commit(s[o-6],s[o],s[o-4],s[o-2]);break;case 91:i.commit(s[o-6],s[o-2],s[o],s[o-4]);break;case 92:i.commit(s[o-6],s[o],s[o-2],s[o-4]);break;case 93:i.commit(s[o-4],s[o-6],s[o-2],s[o]);break;case 94:i.commit(s[o-4],s[o-6],s[o],s[o-2]);break;case 95:i.commit(s[o-2],s[o-6],s[o-4],s[o]);break;case 96:i.commit(s[o],s[o-6],s[o-4],s[o-2]);break;case 97:i.commit(s[o-2],s[o-6],s[o],s[o-4]);break;case 98:i.commit(s[o],s[o-6],s[o-2],s[o-4]);break;case 99:i.commit(s[o],s[o-4],s[o-2],s[o-6]);break;case 100:i.commit(s[o-2],s[o-4],s[o],s[o-6]);break;case 101:i.commit(s[o],s[o-2],s[o-4],s[o-6]);break;case 102:i.commit(s[o-2],s[o],s[o-4],s[o-6]);break;case 103:i.commit(s[o-4],s[o-2],s[o],s[o-6]);break;case 104:i.commit(s[o-4],s[o],s[o-2],s[o-6]);break;case 105:i.commit(s[o-2],s[o-4],s[o-6],s[o]);break;case 106:i.commit(s[o],s[o-4],s[o-6],s[o-2]);break;case 107:i.commit(s[o-2],s[o],s[o-6],s[o-4]);break;case 108:i.commit(s[o],s[o-2],s[o-6],s[o-4]);break;case 109:i.commit(s[o-4],s[o-2],s[o-6],s[o]);break;case 110:i.commit(s[o-4],s[o],s[o-6],s[o-2]);break;case 111:this.$="";break;case 112:this.$=s[o];break;case 113:this.$=i.commitType.NORMAL;break;case 114:this.$=i.commitType.REVERSE;break;case 115:this.$=i.commitType.HIGHLIGHT;break;case 118:i.parseDirective("%%{","open_directive");break;case 119:i.parseDirective(s[o],"type_directive");break;case 120:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 121:i.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:n,8:i,14:r,46:8,50:s,55:a},{1:[3]},{3:10,4:2,5:3,6:n,8:i,14:r,46:8,50:s,55:a},{3:11,4:2,5:3,6:n,8:i,14:r,46:8,50:s,55:a},{7:12,8:o,9:[1,13],10:[1,14],11:15,14:c},e(l,[2,124]),e(l,[2,125]),e(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:o,11:15,14:c},{9:[1,21]},e(h,[2,10],{12:22,13:[1,23]}),e(u,[2,9]),{9:[1,25],48:24,53:d},e([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:o,11:15,14:c},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},e(u,[2,8]),e(p,[2,116]),{49:45,52:[1,46]},e(p,[2,121]),{1:[2,4]},{8:[1,47]},e(h,[2,11]),{4:48,8:i,14:r,55:a},e(h,[2,13]),e(f,[2,14]),e(f,[2,15]),e(f,[2,16]),{21:[1,49]},{23:[1,50]},e(f,[2,19]),e(f,[2,20]),e(f,[2,21]),{28:51,34:g,54:y},e(f,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:g,54:y},{33:[1,61],35:[1,62]},{28:63,34:g,54:y},{48:64,53:d},{53:[2,120]},{1:[2,5]},e(h,[2,12]),e(f,[2,17]),e(f,[2,18]),e(f,[2,22]),e(m,[2,122]),e(m,[2,123]),e(f,[2,46]),{34:[1,65]},{39:66,43:b,44:_,45:x},{34:[1,70]},{34:[1,71]},e(f,[2,112]),e(f,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},e(f,[2,23],{30:[1,78]}),e(p,[2,117]),e(f,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),e(f,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),e(v,[2,113]),e(v,[2,114]),e(v,[2,115]),e(f,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),e(f,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:b,44:_,45:x},{34:[1,93]},e(f,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:b,44:_,45:x},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:b,44:_,45:x},{34:[1,106]},{34:[1,107]},{39:108,43:b,44:_,45:x},{34:[1,109]},e(f,[2,31],{35:[1,111],38:[1,110]}),e(f,[2,32],{33:[1,113],35:[1,112]}),e(f,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},e(f,[2,24]),e(f,[2,49],{33:[1,120],42:[1,121]}),e(f,[2,53],{38:[1,122],42:[1,123]}),e(f,[2,63],{33:[1,125],38:[1,124]}),e(f,[2,50],{33:[1,126],42:[1,127]}),e(f,[2,55],{35:[1,128],42:[1,129]}),e(f,[2,66],{33:[1,131],35:[1,130]}),e(f,[2,52],{38:[1,132],42:[1,133]}),e(f,[2,54],{35:[1,134],42:[1,135]}),e(f,[2,67],{35:[1,137],38:[1,136]}),e(f,[2,64],{33:[1,139],38:[1,138]}),e(f,[2,65],{33:[1,141],35:[1,140]}),e(f,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:b,44:_,45:x},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:b,44:_,45:x},e(f,[2,26]),e(f,[2,27]),e(f,[2,28]),e(f,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:b,44:_,45:x},{34:[1,153]},{39:154,43:b,44:_,45:x},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:b,44:_,45:x},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:b,44:_,45:x},{34:[1,167]},{39:168,43:b,44:_,45:x},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:b,44:_,45:x},{34:[1,173]},e(f,[2,37],{35:[1,174]}),e(f,[2,38],{38:[1,175]}),e(f,[2,36],{33:[1,176]}),e(f,[2,39],{35:[1,177]}),e(f,[2,34],{38:[1,178]}),e(f,[2,35],{33:[1,179]}),e(f,[2,60],{42:[1,180]}),e(f,[2,73],{33:[1,181]}),e(f,[2,61],{42:[1,182]}),e(f,[2,84],{38:[1,183]}),e(f,[2,74],{33:[1,184]}),e(f,[2,83],{38:[1,185]}),e(f,[2,59],{42:[1,186]}),e(f,[2,72],{33:[1,187]}),e(f,[2,58],{42:[1,188]}),e(f,[2,78],{35:[1,189]}),e(f,[2,71],{33:[1,190]}),e(f,[2,77],{35:[1,191]}),e(f,[2,57],{42:[1,192]}),e(f,[2,85],{38:[1,193]}),e(f,[2,56],{42:[1,194]}),e(f,[2,79],{35:[1,195]}),e(f,[2,80],{35:[1,196]}),e(f,[2,86],{38:[1,197]}),e(f,[2,70],{33:[1,198]}),e(f,[2,81],{38:[1,199]}),e(f,[2,69],{33:[1,200]}),e(f,[2,75],{35:[1,201]}),e(f,[2,76],{35:[1,202]}),e(f,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:b,44:_,45:x},{34:[1,206]},{34:[1,207]},{39:208,43:b,44:_,45:x},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:b,44:_,45:x},{34:[1,214]},{39:215,43:b,44:_,45:x},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:b,44:_,45:x},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:b,44:_,45:x},{34:[1,228]},{39:229,43:b,44:_,45:x},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:b,44:_,45:x},e(f,[2,40]),e(f,[2,42]),e(f,[2,41]),e(f,[2,43]),e(f,[2,45]),e(f,[2,44]),e(f,[2,101]),e(f,[2,102]),e(f,[2,99]),e(f,[2,100]),e(f,[2,104]),e(f,[2,103]),e(f,[2,108]),e(f,[2,107]),e(f,[2,106]),e(f,[2,105]),e(f,[2,110]),e(f,[2,109]),e(f,[2,98]),e(f,[2,97]),e(f,[2,96]),e(f,[2,95]),e(f,[2,93]),e(f,[2,94]),e(f,[2,92]),e(f,[2,91]),e(f,[2,90]),e(f,[2,89]),e(f,[2,87]),e(f,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},w=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 38:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}},t);function C(){this.yy={}}return k.lexer=w,C.prototype=k,k.Parser=C,new C}();dr.parser=dr;const pr=dr,fr=t=>null!==t.match(/^\s*gitGraph/);let gr=bi().gitGraph.mainBranchName,yr=bi().gitGraph.mainBranchOrder,mr={},br=null,_r={};_r[gr]={name:gr,order:yr};let xr={};xr[gr]=br;let vr=gr,kr="LR",wr=0;function Cr(){return Vn({length:7})}let Tr={};const Er=function(t){if(t=qt.sanitizeText(t,bi()),void 0===xr[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{vr=t;const e=xr[vr];br=mr[e]}};function Sr(t,e,n){const i=t.indexOf(e);-1===i?t.push(n):t.splice(i,1,n)}function Ar(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));const i=[n,e.id,e.seq];for(let r in xr)xr[r]===e.id&&i.push(r);if(Ot.debug(i.join(" ")),e.parents&&2==e.parents.length){const n=mr[e.parents[0]];Sr(t,e,n),t.push(mr[e.parents[1]])}else{if(0==e.parents.length)return;{const n=mr[e.parents];Sr(t,e,n)}}Ar(t=function(t,e){const n=Object.create(null);return t.reduce(((t,i)=>{const r=e(i);return n[r]||(n[r]=!0,t.push(i)),t}),[])}(t,(t=>t.id)))}const Lr=function(){const t=Object.keys(mr).map((function(t){return mr[t]}));return t.forEach((function(t){Ot.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},Br={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Nr={parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().gitGraph,setDirection:function(t){kr=t},setOptions:function(t){Ot.debug("options str",t),t=(t=t&&t.trim())||"{}";try{Tr=JSON.parse(t)}catch(e){Ot.error("error while parsing gitGraph options",e.message)}},getOptions:function(){return Tr},commit:function(t,e,n,i){Ot.debug("Entering commit:",t,e,n,i),e=qt.sanitizeText(e,bi()),t=qt.sanitizeText(t,bi()),i=qt.sanitizeText(i,bi());const r={id:e||wr+"-"+Cr(),message:t,seq:wr++,type:n||Br.NORMAL,tag:i||"",parents:null==br?[]:[br.id],branch:vr};br=r,mr[r.id]=r,xr[vr]=r.id,Ot.debug("in pushCommit "+r.id)},branch:function(t,e){if(t=qt.sanitizeText(t,bi()),void 0!==xr[t]){let e=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 '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}xr[t]=null!=br?br.id:null,_r[t]={name:t,order:e?parseInt(e,10):null},Er(t),Ot.debug("in createBranch")},merge:function(t,e,n,i){t=qt.sanitizeText(t,bi()),e=qt.sanitizeText(e,bi());const r=mr[xr[vr]],s=mr[xr[t]];if(vr===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===r||!r){let e=new Error('Incorrect usage of "merge". Current branch ('+vr+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===xr[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===s||!s){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(r===s){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==mr[e]){let r=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw r.hash={text:"merge "+t+e+n+i,token:"merge "+t+e+n+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+n+" "+i]},r}const a={id:e||wr+"-"+Cr(),message:"merged branch "+t+" into "+vr,seq:wr++,parents:[null==br?null:br.id,xr[t]],branch:vr,type:Br.MERGE,customType:n,customId:!!e,tag:i||""};br=a,mr[a.id]=a,xr[vr]=a.id,Ot.debug(xr),Ot.debug("in mergeBranch")},cherryPick:function(t,e,n){if(Ot.debug("Entering cherryPick:",t,e,n),t=qt.sanitizeText(t,bi()),e=qt.sanitizeText(e,bi()),n=qt.sanitizeText(n,bi()),!t||void 0===mr[t]){let n=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}let i=mr[t],r=i.branch;if(i.type===Br.MERGE){let n=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}if(!e||void 0===mr[e]){if(r===vr){let n=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}const s=mr[xr[vr]];if(void 0===s||!s){let n=new Error('Incorrect usage of "cherry-pick". Current branch ('+vr+")has no commits");throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}const a={id:wr+"-"+Cr(),message:"cherry-picked "+i+" into "+vr,seq:wr++,parents:[null==br?null:br.id,i.id],branch:vr,type:Br.CHERRY_PICK,tag:n??"cherry-pick:"+i.id};br=a,mr[a.id]=a,xr[vr]=a.id,Ot.debug(xr),Ot.debug("in cherryPick")}},checkout:Er,prettyPrint:function(){Ot.debug(mr);Ar([Lr()[0]])},clear:function(){mr={},br=null;let t=bi().gitGraph.mainBranchName,e=bi().gitGraph.mainBranchOrder;xr={},xr[t]=null,_r={},_r[t]={name:t,order:e},vr=t,wr=0,Wi()},getBranchesAsObjArray:function(){const t=Object.values(_r).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})));return t},getBranches:function(){return xr},getCommits:function(){return mr},getCommitsArray:Lr,getCurrentBranch:function(){return vr},getDirection:function(){return kr},getHead:function(){return br},setAccTitle:qi,getAccTitle:Hi,getAccDescription:Gi,setAccDescription:Vi,setDiagramTitle:Xi,getDiagramTitle:Qi,commitType:Br};let Dr={};const Mr=0,Ir=1,Or=2,$r=3,Fr=4;let Rr={},Zr={},Pr=[],Yr=0;const jr=(t,e,n)=>{const i=sr().gitGraph,r=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort(((t,n)=>e[t].seq-e[n].seq)).forEach((t=>{const o=e[t],c=Rr[o.branch].pos,l=a+10;if(n){let t,e=void 0!==o.customType&&""!==o.customType?o.customType:o.type;switch(e){case Mr:t="commit-normal";break;case Ir:t="commit-reverse";break;case Or:t="commit-highlight";break;case $r:t="commit-merge";break;case Fr:t="commit-cherry-pick";break;default:t="commit-normal"}if(e===Or){const e=r.append("rect");e.attr("x",l-10),e.attr("y",c-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${o.id} commit-highlight${Rr[o.branch].index%8} ${t}-outer`),r.append("rect").attr("x",l-6).attr("y",c-6).attr("height",12).attr("width",12).attr("class",`commit ${o.id} commit${Rr[o.branch].index%8} ${t}-inner`)}else if(e===Fr)r.append("circle").attr("cx",l).attr("cy",c).attr("r",10).attr("class",`commit ${o.id} ${t}`),r.append("circle").attr("cx",l-3).attr("cy",c+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${o.id} ${t}`),r.append("circle").attr("cx",l+3).attr("cy",c+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${o.id} ${t}`),r.append("line").attr("x1",l+3).attr("y1",c+1).attr("x2",l).attr("y2",c-5).attr("stroke","#fff").attr("class",`commit ${o.id} ${t}`),r.append("line").attr("x1",l-3).attr("y1",c+1).attr("x2",l).attr("y2",c-5).attr("stroke","#fff").attr("class",`commit ${o.id} ${t}`);else{const n=r.append("circle");if(n.attr("cx",l),n.attr("cy",c),n.attr("r",o.type===$r?9:10),n.attr("class",`commit ${o.id} commit${Rr[o.branch].index%8}`),e===$r){const e=r.append("circle");e.attr("cx",l),e.attr("cy",c),e.attr("r",6),e.attr("class",`commit ${t} ${o.id} commit${Rr[o.branch].index%8}`)}if(e===Ir){r.append("path").attr("d",`M ${l-5},${c-5}L${l+5},${c+5}M${l-5},${c+5}L${l+5},${c-5}`).attr("class",`commit ${t} ${o.id} commit${Rr[o.branch].index%8}`)}}}if(Zr[o.id]={x:a+10,y:c},n){const t=4,e=2;if(o.type!==Fr&&(o.customId&&o.type===$r||o.type!==$r)&&i.showCommitLabel){const t=s.append("g"),n=t.insert("rect").attr("class","commit-label-bkg"),r=t.append("text").attr("x",a).attr("y",c+25).attr("class","commit-label").text(o.id);let l=r.node().getBBox();if(n.attr("x",a+10-l.width/2-e).attr("y",c+13.5).attr("width",l.width+2*e).attr("height",l.height+2*e),r.attr("x",a+10-l.width/2),i.rotateCommitLabel){let e=-7.5-(l.width+10)/25*9.5,n=10+l.width/25*8.5;t.attr("transform","translate("+e+", "+n+") rotate("+"-45, "+a+", "+c+")")}}if(o.tag){const n=s.insert("polygon"),i=s.append("circle"),r=s.append("text").attr("y",c-16).attr("class","tag-label").text(o.tag);let l=r.node().getBBox();r.attr("x",a+10-l.width/2);const h=l.height/2,u=c-19.2;n.attr("class","tag-label-bkg").attr("points",`\n ${a-l.width/2-t/2},${u+e}\n ${a-l.width/2-t/2},${u-e}\n ${a+10-l.width/2-t},${u-h-e}\n ${a+10+l.width/2+t},${u-h-e}\n ${a+10+l.width/2+t},${u+h+e}\n ${a+10-l.width/2-t},${u+h+e}`),i.attr("cx",a-l.width/2+t/2).attr("cy",u).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Yr&&(Yr=a)}))},zr=(t,e,n=0)=>{const i=t+Math.abs(t-e)/2;if(n>5)return i;if(Pr.every((t=>Math.abs(t-i)>=10)))return Pr.push(i),i;const r=Math.abs(t-e);return zr(t,e-r/5,n+1)},Ur=(t,e,n,i)=>{const r=Zr[e.id],s=Zr[n.id],a=((t,e,n)=>Object.keys(n).filter((i=>n[i].branch===e.branch&&n[i].seq>t.seq&&n[i].seq0)(e,n,i);let o,c="",l="",h=0,u=0,d=Rr[n.branch].index;if(a){c="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,d=Rr[n.branch].index;const t=r.ys.y&&(c="A 20 20, 0, 0, 0,",h=20,u=20,d=Rr[e.branch].index,o=`M ${r.x} ${r.y} L ${s.x-h} ${r.y} ${c} ${s.x} ${r.y-u} L ${s.x} ${s.y}`),r.y===s.y&&(d=Rr[e.branch].index,o=`M ${r.x} ${r.y} L ${r.x} ${s.y-h} ${c} ${r.x+u} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",o).attr("class","arrow arrow"+d%8)},Wr=(t,e)=>{const n=sr().gitGraph,i=t.append("g");e.forEach(((t,e)=>{const r=e%8,s=Rr[t.name].pos,a=i.append("line");a.attr("x1",0),a.attr("y1",s),a.attr("x2",Yr),a.attr("y2",s),a.attr("class","branch branch"+r),Pr.push(s);const o=(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let n=[];n="string"==typeof t?t.split(/\\n|\n|/gi):Array.isArray(t)?t:[];for(const i of n){const t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=i.trim(),e.appendChild(t)}return e})(t.name),c=i.insert("rect"),l=i.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+r);l.node().appendChild(o);let h=o.getBBox();c.attr("class","branchLabelBkg label"+r).attr("rx",4).attr("ry",4).attr("x",-h.width-4-(!0===n.rotateCommitLabel?30:0)).attr("y",-h.height/2+8).attr("width",h.width+18).attr("height",h.height+4),l.attr("transform","translate("+(-h.width-14-(!0===n.rotateCommitLabel?30:0))+", "+(s-h.height/2-1)+")"),c.attr("transform","translate(-19, "+(s-h.height/2)+")")}))},qr={draw:function(t,e,n,i){Rr={},Zr={},Dr={},Yr=0,Pr=[];const r=sr(),s=r.gitGraph;Ot.debug("in gitgraph renderer",t+"\n","id:",e,n),Dr=i.db.getCommits();const a=i.db.getBranchesAsObjArray();let c=0;a.forEach(((t,e)=>{Rr[t.name]={pos:c,index:e},c+=50+(s.rotateCommitLabel?40:0)}));const l=(0,o.Ys)(`[id="${e}"]`);jr(l,Dr,!1),s.showBranches&&Wr(l,a),((t,e)=>{const n=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((t=>{Ur(n,e[t],i,e)}))}))})(l,Dr),jr(l,Dr,!0),ai.insertTitle(l,"gitTitleText",s.titleTopMargin,i.db.getDiagramTitle()),or(void 0,l,s.diagramPadding,s.useMaxWidth??r.useMaxWidth)}},Hr=t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n }\n`;var Vr=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,6],i=[1,7],r=[1,8],s=[1,9],a=[1,16],o=[1,11],l=[1,12],h=[1,13],u=[1,14],d=[1,15],p=[1,27],f=[1,33],g=[1,34],y=[1,35],m=[1,36],b=[1,37],_=[1,72],x=[1,73],v=[1,74],k=[1,75],w=[1,76],C=[1,77],T=[1,78],E=[1,38],S=[1,39],A=[1,40],L=[1,41],B=[1,42],N=[1,43],D=[1,44],M=[1,45],I=[1,46],O=[1,47],$=[1,48],F=[1,49],R=[1,50],Z=[1,51],P=[1,52],Y=[1,53],j=[1,54],z=[1,55],U=[1,56],W=[1,57],q=[1,59],H=[1,60],V=[1,61],G=[1,62],X=[1,63],Q=[1,64],K=[1,65],J=[1,66],tt=[1,67],et=[1,68],nt=[1,69],it=[24,52],rt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],st=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],at=[1,94],ot=[1,95],ct=[1,96],lt=[1,97],ht=[15,24,52],ut=[7,8,9,10,18,22,25,26,27,28],dt=[15,24,43,52],pt=[15,24,43,52,86,87,89,90],ft=[15,43],gt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],yt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 4:i.setDirection("TB");break;case 5:i.setDirection("BT");break;case 6:i.setDirection("RL");break;case 7:i.setDirection("LR");break;case 11:i.parseDirective("%%{","open_directive");break;case 12:break;case 13:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 14:i.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:i.setC4Type(s[o-3]);break;case 26:i.setTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 27:i.setAccDescription(s[o].substring(15)),this.$=s[o].substring(15);break;case 28:this.$=s[o].trim(),i.setTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 35:case 36:s[o].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...s[o]),this.$=s[o];break;case 37:i.addPersonOrSystemBoundary(...s[o]),this.$=s[o];break;case 38:s[o].splice(2,0,"CONTAINER"),i.addContainerBoundary(...s[o]),this.$=s[o];break;case 39:i.addDeploymentNode("node",...s[o]),this.$=s[o];break;case 40:i.addDeploymentNode("nodeL",...s[o]),this.$=s[o];break;case 41:i.addDeploymentNode("nodeR",...s[o]),this.$=s[o];break;case 42:i.popBoundaryParseStack();break;case 46:i.addPersonOrSystem("person",...s[o]),this.$=s[o];break;case 47:i.addPersonOrSystem("external_person",...s[o]),this.$=s[o];break;case 48:i.addPersonOrSystem("system",...s[o]),this.$=s[o];break;case 49:i.addPersonOrSystem("system_db",...s[o]),this.$=s[o];break;case 50:i.addPersonOrSystem("system_queue",...s[o]),this.$=s[o];break;case 51:i.addPersonOrSystem("external_system",...s[o]),this.$=s[o];break;case 52:i.addPersonOrSystem("external_system_db",...s[o]),this.$=s[o];break;case 53:i.addPersonOrSystem("external_system_queue",...s[o]),this.$=s[o];break;case 54:i.addContainer("container",...s[o]),this.$=s[o];break;case 55:i.addContainer("container_db",...s[o]),this.$=s[o];break;case 56:i.addContainer("container_queue",...s[o]),this.$=s[o];break;case 57:i.addContainer("external_container",...s[o]),this.$=s[o];break;case 58:i.addContainer("external_container_db",...s[o]),this.$=s[o];break;case 59:i.addContainer("external_container_queue",...s[o]),this.$=s[o];break;case 60:i.addComponent("component",...s[o]),this.$=s[o];break;case 61:i.addComponent("component_db",...s[o]),this.$=s[o];break;case 62:i.addComponent("component_queue",...s[o]),this.$=s[o];break;case 63:i.addComponent("external_component",...s[o]),this.$=s[o];break;case 64:i.addComponent("external_component_db",...s[o]),this.$=s[o];break;case 65:i.addComponent("external_component_queue",...s[o]),this.$=s[o];break;case 67:i.addRel("rel",...s[o]),this.$=s[o];break;case 68:i.addRel("birel",...s[o]),this.$=s[o];break;case 69:i.addRel("rel_u",...s[o]),this.$=s[o];break;case 70:i.addRel("rel_d",...s[o]),this.$=s[o];break;case 71:i.addRel("rel_l",...s[o]),this.$=s[o];break;case 72:i.addRel("rel_r",...s[o]),this.$=s[o];break;case 73:i.addRel("rel_b",...s[o]),this.$=s[o];break;case 74:s[o].splice(0,1),i.addRel("rel",...s[o]),this.$=s[o];break;case 75:i.updateElStyle("update_el_style",...s[o]),this.$=s[o];break;case 76:i.updateRelStyle("update_rel_style",...s[o]),this.$=s[o];break;case 77:i.updateLayoutConfig("update_layout_config",...s[o]),this.$=s[o];break;case 78:this.$=[s[o]];break;case 79:s[o].unshift(s[o-1]),this.$=s[o];break;case 80:case 82:this.$=s[o].trim();break;case 81:let t={};t[s[o-1].trim()]=s[o].trim(),this.$=t;break;case 83:this.$=""}},table:[{3:1,4:2,5:3,6:4,7:n,8:i,9:r,10:s,11:5,12:10,18:a,22:o,25:l,26:h,27:u,28:d},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:n,8:i,9:r,10:s,11:5,12:10,18:a,22:o,25:l,26:h,27:u,28:d},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:p},e([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:79,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:80,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:81,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt},{23:82,29:29,30:30,31:31,32:f,33:g,34:y,36:m,38:b,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},e(it,[2,20],{53:32,39:58,40:70,42:71,30:87,44:_,46:x,47:v,48:k,49:w,50:C,51:T,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt}),e(it,[2,21]),e(rt,[2,23],{15:[1,88]}),e(it,[2,43],{15:[1,89]}),e(st,[2,26]),e(st,[2,27]),{35:[1,90]},{37:[1,91]},e(st,[2,30]),{45:92,85:93,86:at,87:ot,89:ct,90:lt},{45:98,85:93,86:at,87:ot,89:ct,90:lt},{45:99,85:93,86:at,87:ot,89:ct,90:lt},{45:100,85:93,86:at,87:ot,89:ct,90:lt},{45:101,85:93,86:at,87:ot,89:ct,90:lt},{45:102,85:93,86:at,87:ot,89:ct,90:lt},{45:103,85:93,86:at,87:ot,89:ct,90:lt},{45:104,85:93,86:at,87:ot,89:ct,90:lt},{45:105,85:93,86:at,87:ot,89:ct,90:lt},{45:106,85:93,86:at,87:ot,89:ct,90:lt},{45:107,85:93,86:at,87:ot,89:ct,90:lt},{45:108,85:93,86:at,87:ot,89:ct,90:lt},{45:109,85:93,86:at,87:ot,89:ct,90:lt},{45:110,85:93,86:at,87:ot,89:ct,90:lt},{45:111,85:93,86:at,87:ot,89:ct,90:lt},{45:112,85:93,86:at,87:ot,89:ct,90:lt},{45:113,85:93,86:at,87:ot,89:ct,90:lt},{45:114,85:93,86:at,87:ot,89:ct,90:lt},{45:115,85:93,86:at,87:ot,89:ct,90:lt},{45:116,85:93,86:at,87:ot,89:ct,90:lt},e(ht,[2,66]),{45:117,85:93,86:at,87:ot,89:ct,90:lt},{45:118,85:93,86:at,87:ot,89:ct,90:lt},{45:119,85:93,86:at,87:ot,89:ct,90:lt},{45:120,85:93,86:at,87:ot,89:ct,90:lt},{45:121,85:93,86:at,87:ot,89:ct,90:lt},{45:122,85:93,86:at,87:ot,89:ct,90:lt},{45:123,85:93,86:at,87:ot,89:ct,90:lt},{45:124,85:93,86:at,87:ot,89:ct,90:lt},{45:125,85:93,86:at,87:ot,89:ct,90:lt},{45:126,85:93,86:at,87:ot,89:ct,90:lt},{45:127,85:93,86:at,87:ot,89:ct,90:lt},{30:128,39:58,40:70,42:71,44:_,46:x,47:v,48:k,49:w,50:C,51:T,53:32,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt},{15:[1,130],43:[1,129]},{45:131,85:93,86:at,87:ot,89:ct,90:lt},{45:132,85:93,86:at,87:ot,89:ct,90:lt},{45:133,85:93,86:at,87:ot,89:ct,90:lt},{45:134,85:93,86:at,87:ot,89:ct,90:lt},{45:135,85:93,86:at,87:ot,89:ct,90:lt},{45:136,85:93,86:at,87:ot,89:ct,90:lt},{45:137,85:93,86:at,87:ot,89:ct,90:lt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},e(ut,[2,9]),{14:142,21:p},{21:[2,13]},{1:[2,15]},e(it,[2,22]),e(rt,[2,24],{31:31,29:143,32:f,33:g,34:y,36:m,38:b}),e(it,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:f,33:g,34:y,36:m,38:b,44:_,46:x,47:v,48:k,49:w,50:C,51:T,54:E,55:S,56:A,57:L,58:B,59:N,60:D,61:M,62:I,63:O,64:$,65:F,66:R,67:Z,68:P,69:Y,70:j,71:z,72:U,73:W,74:q,75:H,76:V,77:G,78:X,79:Q,80:K,81:J,82:tt,83:et,84:nt}),e(st,[2,28]),e(st,[2,29]),e(ht,[2,46]),e(dt,[2,78],{85:93,45:145,86:at,87:ot,89:ct,90:lt}),e(pt,[2,80]),{88:[1,146]},e(pt,[2,82]),e(pt,[2,83]),e(ht,[2,47]),e(ht,[2,48]),e(ht,[2,49]),e(ht,[2,50]),e(ht,[2,51]),e(ht,[2,52]),e(ht,[2,53]),e(ht,[2,54]),e(ht,[2,55]),e(ht,[2,56]),e(ht,[2,57]),e(ht,[2,58]),e(ht,[2,59]),e(ht,[2,60]),e(ht,[2,61]),e(ht,[2,62]),e(ht,[2,63]),e(ht,[2,64]),e(ht,[2,65]),e(ht,[2,67]),e(ht,[2,68]),e(ht,[2,69]),e(ht,[2,70]),e(ht,[2,71]),e(ht,[2,72]),e(ht,[2,73]),e(ht,[2,74]),e(ht,[2,75]),e(ht,[2,76]),e(ht,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},e(ft,[2,35]),e(ft,[2,36]),e(ft,[2,37]),e(ft,[2,38]),e(ft,[2,39]),e(ft,[2,40]),e(ft,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},e(rt,[2,25]),e(it,[2,45]),e(dt,[2,79]),e(pt,[2,81]),e(ht,[2,31]),e(ht,[2,42]),e(gt,[2,32]),e(gt,[2,33],{15:[1,152]}),e(ut,[2,10]),e(gt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},mt=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 78:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:case 21:case 75:break;case 19:c;break;case 20:return 15;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:case 58:return this.begin("rel_u"),76;case 59:case 60:return this.begin("rel_d"),77;case 61:case 62:return this.begin("rel_l"),78;case 63:case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:case 84:this.popState(),this.popState();break;case 74:case 76:return 90;case 77:this.begin("string");break;case 79:case 85:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\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:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,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,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}},t);function bt(){this.yy={}}return yt.lexer=mt,bt.prototype=yt,yt.Parser=bt,new bt}();Vr.parser=Vr;const Gr=Vr,Xr=t=>null!==t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/);let Qr=[],Kr=[""],Jr="global",ts="",es=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ns=[],is="",rs=!1,ss=4,as=2;var os;const cs=function(t){return null==t?Qr:Qr.filter((e=>e.parentBoundary===t))},ls=function(){return rs},hs={addPersonOrSystem:function(t,e,n,i,r,s,a){if(null===e||null===n)return;let o={};const c=Qr.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,Qr.push(o)),o.label=null==n?{text:""}:{text:n},null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=e}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Jr,o.wrap=ls()},addPersonOrSystemBoundary:function(t,e,n,i,r){if(null===t||null===e)return;let s={};const a=es.find((e=>e.alias===t));if(a&&t===a.alias?s=a:(s.alias=t,es.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.tags=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];s[t]=e}else s.link=r;s.parentBoundary=Jr,s.wrap=ls(),ts=Jr,Jr=t,Kr.push(ts)},addContainer:function(t,e,n,i,r,s,a,o){if(null===e||null===n)return;let c={};const l=Qr.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Qr.push(c)),c.label=null==n?{text:""}:{text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.tags=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=ls(),c.typeC4Shape={text:t},c.parentBoundary=Jr},addContainerBoundary:function(t,e,n,i,r){if(null===t||null===e)return;let s={};const a=es.find((e=>e.alias===t));if(a&&t===a.alias?s=a:(s.alias=t,es.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.tags=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];s[t]=e}else s.link=r;s.parentBoundary=Jr,s.wrap=ls(),ts=Jr,Jr=t,Kr.push(ts)},addComponent:function(t,e,n,i,r,s,a,o){if(null===e||null===n)return;let c={};const l=Qr.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,Qr.push(c)),c.label=null==n?{text:""}:{text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.tags=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=ls(),c.typeC4Shape={text:t},c.parentBoundary=Jr},addDeploymentNode:function(t,e,n,i,r,s,a,o){if(null===e||null===n)return;let c={};const l=es.find((t=>t.alias===e));if(l&&e===l.alias?c=l:(c.alias=e,es.push(c)),c.label=null==n?{text:""}:{text:n},null==i)c.type={text:"node"};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.type={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof a){let[t,e]=Object.entries(a)[0];c[t]=e}else c.tags=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.nodeType=t,c.parentBoundary=Jr,c.wrap=ls(),ts=Jr,Jr=e,Kr.push(ts)},popBoundaryParseStack:function(){Jr=ts,Kr.pop(),ts=Kr.pop(),Kr.push(ts)},addRel:function(t,e,n,i,r,s,a,o,c){if(null==t||null==e||null==n||null==i)return;let l={};const h=ns.find((t=>t.from===e&&t.to===n));if(h?l=h:ns.push(l),l.type=t,l.from=e,l.to=n,l.label={text:i},null==r)l.techn={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]={text:e}}else l.techn={text:r};if(null==s)l.descr={text:""};else if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]={text:e}}else l.descr={text:s};if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.sprite=a;if("object"==typeof o){let[t,e]=Object.entries(o)[0];l[t]=e}else l.tags=o;if("object"==typeof c){let[t,e]=Object.entries(c)[0];l[t]=e}else l.link=c;l.wrap=ls()},updateElStyle:function(t,e,n,i,r,s,a,o,c,l,h){let u=Qr.find((t=>t.alias===e));if(void 0!==u||(u=es.find((t=>t.alias===e)),void 0!==u)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];u[t]=e}else u.bgColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];u[t]=e}else u.fontColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];u[t]=e}else u.borderColor=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];u[t]=e}else u.shadowing=s;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];u[t]=e}else u.shape=a;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];u[t]=e}else u.sprite=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];u[t]=e}else u.techn=c;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];u[t]=e}else u.legendText=l;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];u[t]=e}else u.legendSprite=h}},updateRelStyle:function(t,e,n,i,r,s,a){const o=ns.find((t=>t.from===e&&t.to===n));if(void 0!==o){if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]=e}else o.textColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.lineColor=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=parseInt(e)}else o.offsetX=parseInt(s);if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]=parseInt(e)}else o.offsetY=parseInt(a)}},updateLayoutConfig:function(t,e,n){let i=ss,r=as;if("object"==typeof e){const t=Object.values(e)[0];i=parseInt(t)}else i=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];r=parseInt(t)}else r=parseInt(n);i>=1&&(ss=i),r>=1&&(as=r)},autoWrap:ls,setWrap:function(t){rs=t},getC4ShapeArray:cs,getC4Shape:function(t){return Qr.find((e=>e.alias===t))},getC4ShapeKeys:function(t){return Object.keys(cs(t))},getBoundarys:function(t){return null==t?es:es.filter((e=>e.parentBoundary===t))},getCurrentBoundaryParse:function(){return Jr},getParentBoundaryParse:function(){return ts},getRels:function(){return ns},getTitle:function(){return is},getC4Type:function(){return os},getC4ShapeInRow:function(){return ss},getC4BoundaryInRow:function(){return as},setAccTitle:qi,getAccTitle:Hi,getAccDescription:Gi,setAccDescription:Vi,parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().c4,clear:function(){Qr=[],es=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],ts="",Jr="global",Kr=[""],ns=[],Kr=[""],is="",rs=!1,ss=4,as=2},LINETYPE:{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},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){let e=Pt(t,bi());is=e},setC4Type:function(t){let e=Pt(t,bi());os=e}},us=function(t,e){const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),"undefined"!==e.attrs&&null!==e.attrs)for(let i in e.attrs)n.attr(i,e.attrs[i]);return"undefined"!==e.class&&n.attr("class",e.class),n},ds=function(t,e,n,i,r,s){const o=t.append("image");o.attr("width",e),o.attr("height",n),o.attr("x",i),o.attr("y",r);let c=s.startsWith("data:image/png;base64")?s:(0,a.N)(s);o.attr("xlink:href",c)},ps=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},fs=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),gs=function(){function t(t,e,n,r,s,a,o){i(e.append("text").attr("x",n+s/2).attr("y",r+a/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,s,a,o,c){const{fontSize:l,fontFamily:h,fontWeight:u}=c,d=t.split(qt.lineBreakRegex);for(let p=0;p>"),e.typeC4Shape.text){case"person":case"external_person":ds(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=n[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,gs(n)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},u),u=n[e.typeC4Shape.text+"Font"](),u.fontColor=a,e.techn&&""!==(null==(i=e.techn)?void 0:i.text)?gs(n)(e.techn.text,c,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},u):e.type&&""!==e.type.text&&gs(n)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=n.personFont(),u.fontColor=a,gs(n)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},u)),e.height},bs=(t,e,n)=>{const i=t.append("g");let r=0;for(let s of e){let t=s.textColor?s.textColor:"#444444",e=s.lineColor?s.lineColor:"#444444",a=s.offsetX?parseInt(s.offsetX):0,o=s.offsetY?parseInt(s.offsetY):0,c="";if(0===r){let t=i.append("line");t.attr("x1",s.startPoint.x),t.attr("y1",s.startPoint.y),t.attr("x2",s.endPoint.x),t.attr("y2",s.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==s.type&&t.attr("marker-end","url("+c+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+c+"#arrowend)"),r=-1}else{let t=i.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),"rel_b"!==s.type&&t.attr("marker-end","url("+c+"#arrowhead)"),"birel"!==s.type&&"rel_b"!==s.type||t.attr("marker-start","url("+c+"#arrowend)")}let l=n.messageFont();gs(n)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+a,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+o,s.label.width,s.label.height,{fill:t},l),s.techn&&""!==s.techn.text&&(l=n.messageFont(),gs(n)("["+s.techn.text+"]",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+a,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+n.messageFontSize+5+o,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:t,"font-style":"italic"},l))}},_s=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")},xs=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")},vs=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")},ks=function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.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"),e.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")},ws=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")},Cs=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")},Ts=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")};a.N;let Es=0,Ss=0,As=4,Ls=2;Vr.yy=hs;let Bs={};class Ns{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,Ds(t.db.getConfig())}setData(t,e,n,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,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,n=e+t.width,i=this.nextData.starty+2*t.margin,r=i+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>As)&&(e=this.nextData.startx+t.margin+Bs.nextLinePaddingX,i=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=r=i+t.height,this.nextData.cnt=1),t.x=e,t.y=i,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",r,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",r,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},Ds(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}}const Ds=function(t){Rn(Bs,t),t.fontFamily&&(Bs.personFontFamily=Bs.systemFontFamily=Bs.messageFontFamily=t.fontFamily),t.fontSize&&(Bs.personFontSize=Bs.systemFontSize=Bs.messageFontSize=t.fontSize),t.fontWeight&&(Bs.personFontWeight=Bs.systemFontWeight=Bs.messageFontWeight=t.fontWeight)},Ms=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Is=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight});function Os(t,e,n,i,r){if(!e[t].width)if(n)e[t].text=Xn(e[t].text,r,i),e[t].textLines=e[t].text.split(qt.lineBreakRegex).length,e[t].width=r,e[t].height=Kn(e[t].text,i);else{let n=e[t].text.split(qt.lineBreakRegex);e[t].textLines=n.length;let r=0;e[t].height=0,e[t].width=0;for(const s of n)e[t].width=Math.max(Jn(s,i),e[t].width),r=Kn(s,i),e[t].height=e[t].height+r}}const $s=function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=Bs.c4ShapeMargin-35;let i=e.wrap&&Bs.wrap,r=Is(Bs);r.fontSize=r.fontSize+2,r.fontWeight="bold",Os("label",e,i,r,Jn(e.label.text,r)),ys(t,e,Bs)},Fs=function(t,e,n,i){let r=0;for(const s of i){r=0;const i=n[s];let a=Ms(Bs,i.typeC4Shape.text);switch(a.fontSize=a.fontSize-2,i.typeC4Shape.width=Jn("<<"+i.typeC4Shape.text+">>",a),i.typeC4Shape.height=a.fontSize+2,i.typeC4Shape.Y=Bs.c4ShapePadding,r=i.typeC4Shape.Y+i.typeC4Shape.height-4,i.image={width:0,height:0,Y:0},i.typeC4Shape.text){case"person":case"external_person":i.image.width=48,i.image.height=48,i.image.Y=r,r=i.image.Y+i.image.height}i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=r,r=i.image.Y+i.image.height);let o=i.wrap&&Bs.wrap,c=Bs.width-2*Bs.c4ShapePadding,l=Ms(Bs,i.typeC4Shape.text);if(l.fontSize=l.fontSize+2,l.fontWeight="bold",Os("label",i,o,l,c),i.label.Y=r+8,r=i.label.Y+i.label.height,i.type&&""!==i.type.text){i.type.text="["+i.type.text+"]",Os("type",i,o,Ms(Bs,i.typeC4Shape.text),c),i.type.Y=r+5,r=i.type.Y+i.type.height}else if(i.techn&&""!==i.techn.text){i.techn.text="["+i.techn.text+"]",Os("techn",i,o,Ms(Bs,i.techn.text),c),i.techn.Y=r+5,r=i.techn.Y+i.techn.height}let h=r,u=i.label.width;if(i.descr&&""!==i.descr.text){Os("descr",i,o,Ms(Bs,i.typeC4Shape.text),c),i.descr.Y=r+20,r=i.descr.Y+i.descr.height,u=Math.max(i.label.width,i.descr.width),h=r-5*i.descr.textLines}u+=Bs.c4ShapePadding,i.width=Math.max(i.width||Bs.width,u,Bs.width),i.height=Math.max(i.height||Bs.height,h,Bs.height),i.margin=i.margin||Bs.c4ShapeMargin,t.insert(i),ms(e,i,Bs)}t.bumpLastMargin(Bs.c4ShapeMargin)};class Rs{constructor(t,e){this.x=t,this.y=e}}let Zs=function(t,e){let n=t.x,i=t.y,r=e.x,s=e.y,a=n+t.width/2,o=i+t.height/2,c=Math.abs(n-r),l=Math.abs(i-s),h=l/c,u=t.height/t.width,d=null;return i==s&&nr?d=new Rs(n,o):n==r&&is&&(d=new Rs(a,i)),n>r&&i=h?new Rs(n,o+h*t.width/2):new Rs(a-c/l*t.height/2,i+t.height):n=h?new Rs(n+t.width,o+h*t.width/2):new Rs(a+c/l*t.height/2,i+t.height):ns?d=u>=h?new Rs(n+t.width,o-h*t.width/2):new Rs(a+t.height/2*c/l,i):n>r&&i>s&&(d=u>=h?new Rs(n,o-t.width/2*h):new Rs(a-t.height/2*c/l,i)),d},Ps=function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let i=Zs(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:i,endPoint:Zs(e,n)}};function Ys(t,e,n,i,r){let s=new Ns(r);s.data.widthLimit=n.data.widthLimit/Math.min(Ls,i.length);for(let[a,o]of i.entries()){let i=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let c=o.wrap&&Bs.wrap,l=Is(Bs);if(l.fontSize=l.fontSize+2,l.fontWeight="bold",Os("label",o,c,l,s.data.widthLimit),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&""!==o.type.text){o.type.text="["+o.type.text+"]",Os("type",o,c,Is(Bs),s.data.widthLimit),o.type.Y=i+5,i=o.type.Y+o.type.height}if(o.descr&&""!==o.descr.text){let t=Is(Bs);t.fontSize=t.fontSize-2,Os("descr",o,c,t,s.data.widthLimit),o.descr.Y=i+20,i=o.descr.Y+o.descr.height}if(0==a||a%Ls==0){let t=n.data.startx+Bs.diagramMarginX,e=n.data.stopy+Bs.diagramMarginY+i;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+Bs.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=o.alias;let h=r.db.getC4ShapeArray(o.alias),u=r.db.getC4ShapeKeys(o.alias);u.length>0&&Fs(s,t,h,u),e=o.alias;let d=r.db.getBoundarys(e);d.length>0&&Ys(t,e,s,d,r),"global"!==o.alias&&$s(t,o,s),n.data.stopy=Math.max(s.data.stopy+Bs.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+Bs.c4ShapeMargin,n.data.stopx),Es=Math.max(Es,n.data.stopx),Ss=Math.max(Ss,n.data.stopy)}}const js={drawPersonOrSystemArray:Fs,drawBoundary:$s,setConf:Ds,draw:function(t,e,n,i){Bs=bi().c4;const r=bi().securityLevel;let s;"sandbox"===r&&(s=(0,o.Ys)("#i"+e));const a="sandbox"===r?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body");let c=i.db;i.db.setWrap(Bs.wrap),As=c.getC4ShapeInRow(),Ls=c.getC4BoundaryInRow(),Ot.debug(`C:${JSON.stringify(Bs,null,2)}`);const l="sandbox"===r?a.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`);Cs(l),ws(l),Ts(l);let h=new Ns(i);h.setData(Bs.diagramMarginX,Bs.diagramMarginX,Bs.diagramMarginY,Bs.diagramMarginY),h.data.widthLimit=screen.availWidth,Es=Bs.diagramMarginX,Ss=Bs.diagramMarginY;const u=i.db.getTitle();Ys(l,"",h,i.db.getBoundarys(""),i),_s(l),xs(l),ks(l),vs(l),function(t,e,n,i){let r=0;for(let a of e){r+=1;let t=a.wrap&&Bs.wrap,e={fontFamily:(s=Bs).messageFontFamily,fontSize:s.messageFontSize,fontWeight:s.messageFontWeight};"C4Dynamic"===i.db.getC4Type()&&(a.label.text=r+": "+a.label.text);let o=Jn(a.label.text,e);Os("label",a,t,e,o),a.techn&&""!==a.techn.text&&(o=Jn(a.techn.text,e),Os("techn",a,t,e,o)),a.descr&&""!==a.descr.text&&(o=Jn(a.descr.text,e),Os("descr",a,t,e,o));let c=n(a.from),l=n(a.to),h=Ps(c,l);a.startPoint=h.startPoint,a.endPoint=h.endPoint}var s;bs(t,e,Bs)}(l,i.db.getRels(),i.db.getC4Shape,i),h.data.stopx=Es,h.data.stopy=Ss;const d=h.data;let p=d.stopy-d.starty+2*Bs.diagramMarginY;const f=d.stopx-d.startx+2*Bs.diagramMarginX;u&&l.append("text").text(u).attr("x",(d.stopx-d.startx)/2-4*Bs.diagramMarginX).attr("y",d.starty+Bs.diagramMarginY),Ti(l,p,f,Bs.useMaxWidth);const g=u?60:0;l.attr("viewBox",d.startx-Bs.diagramMarginX+" -"+(Bs.diagramMarginY+g)+" "+f+" "+(p+g)),Ot.debug("models:",d)}};var zs=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,3],i=[1,7],r=[1,8],s=[1,9],a=[1,10],o=[1,13],c=[1,12],l=[1,16,25],h=[1,20],u=[1,32],d=[1,33],p=[1,34],f=[1,36],g=[1,39],y=[1,37],m=[1,38],b=[1,44],_=[1,45],x=[1,40],v=[1,41],k=[1,42],w=[1,43],C=[1,48],T=[1,49],E=[1,50],S=[1,51],A=[16,25],L=[1,65],B=[1,66],N=[1,67],D=[1,68],M=[1,69],I=[1,70],O=[1,71],$=[1,80],F=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],R=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],Z=[5,8,9,10,11,16,19,23,25],P=[54,88,89,90,91],Y=[54,65,66,88,89,90,91],j=[54,60,61,62,63,64,88,89,90,91],z=[16,25,32],U=[1,107],W={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 5:i.setDirection("TB");break;case 6:i.setDirection("BT");break;case 7:i.setDirection("RL");break;case 8:i.setDirection("LR");break;case 12:i.parseDirective("%%{","open_directive");break;case 13:i.parseDirective(s[o],"type_directive");break;case 14:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 15:i.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=s[o];break;case 22:this.$=s[o-1]+s[o];break;case 23:case 24:this.$=s[o-1]+"~"+s[o];break;case 25:i.addRelation(s[o]);break;case 26:s[o-1].title=i.cleanupLabel(s[o]),i.addRelation(s[o-1]);break;case 35:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 36:case 37:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 38:i.addClass(s[o]);break;case 39:i.addClass(s[o-2]),i.setCssClass(s[o-2],s[o]);break;case 40:i.addClass(s[o-3]),i.addMembers(s[o-3],s[o-1]);break;case 41:i.addClass(s[o-5]),i.setCssClass(s[o-5],s[o-3]),i.addMembers(s[o-5],s[o-1]);break;case 42:i.addAnnotation(s[o],s[o-2]);break;case 43:this.$=[s[o]];break;case 44:s[o].push(s[o-1]),this.$=s[o];break;case 45:case 47:case 48:break;case 46:i.addMember(s[o-1],i.cleanupLabel(s[o]));break;case 49:this.$={id1:s[o-2],id2:s[o],relation:s[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:s[o-3],id2:s[o],relation:s[o-1],relationTitle1:s[o-2],relationTitle2:"none"};break;case 51:this.$={id1:s[o-3],id2:s[o],relation:s[o-2],relationTitle1:"none",relationTitle2:s[o-1]};break;case 52:this.$={id1:s[o-4],id2:s[o],relation:s[o-2],relationTitle1:s[o-3],relationTitle2:s[o-1]};break;case 53:i.addNote(s[o],s[o-1]);break;case 54:i.addNote(s[o]);break;case 55:this.$={type1:s[o-2],type2:s[o],lineType:s[o-1]};break;case 56:this.$={type1:"none",type2:s[o],lineType:s[o-1]};break;case 57:this.$={type1:s[o-1],type2:"none",lineType:s[o]};break;case 58:this.$={type1:"none",type2:"none",lineType:s[o]};break;case 59:this.$=i.relationType.AGGREGATION;break;case 60:this.$=i.relationType.EXTENSION;break;case 61:this.$=i.relationType.COMPOSITION;break;case 62:this.$=i.relationType.DEPENDENCY;break;case 63:this.$=i.relationType.LOLLIPOP;break;case 64:this.$=i.lineType.LINE;break;case 65:this.$=i.lineType.DOTTED_LINE;break;case 66:case 72:this.$=s[o-2],i.setClickEvent(s[o-1],s[o]);break;case 67:case 73:this.$=s[o-3],i.setClickEvent(s[o-2],s[o-1]),i.setTooltip(s[o-2],s[o]);break;case 68:case 76:this.$=s[o-2],i.setLink(s[o-1],s[o]);break;case 69:case 77:this.$=s[o-3],i.setLink(s[o-2],s[o-1],s[o]);break;case 70:case 78:this.$=s[o-3],i.setLink(s[o-2],s[o-1]),i.setTooltip(s[o-2],s[o]);break;case 71:case 79:this.$=s[o-4],i.setLink(s[o-3],s[o-2],s[o]),i.setTooltip(s[o-3],s[o-1]);break;case 74:this.$=s[o-3],i.setClickEvent(s[o-2],s[o-1],s[o]);break;case 75:this.$=s[o-4],i.setClickEvent(s[o-3],s[o-2],s[o-1]),i.setTooltip(s[o-3],s[o]);break;case 80:i.setCssClass(s[o-1],s[o])}},table:[{3:1,4:2,5:n,6:4,7:5,8:i,9:r,10:s,11:a,12:6,13:11,19:o,23:c},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:n,6:4,7:5,8:i,9:r,10:s,11:a,12:6,13:11,19:o,23:c},{1:[2,9]},e(l,[2,5]),e(l,[2,6]),e(l,[2,7]),e(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:h},e([17,22],[2,13]),{6:31,7:30,8:i,9:r,10:s,11:a,13:11,19:o,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:p,44:f,49:g,51:y,52:m,55:b,57:_,67:x,68:v,70:k,74:w,88:C,89:T,90:E,91:S},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},e(A,[2,25],{32:[1,57]}),e(A,[2,27]),e(A,[2,28]),e(A,[2,29]),e(A,[2,30]),e(A,[2,31]),e(A,[2,32]),e(A,[2,33]),e(A,[2,34]),{40:[1,58]},{42:[1,59]},e(A,[2,37]),e(A,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:L,61:B,62:N,63:D,64:M,65:I,66:O}),{27:72,28:46,29:47,88:C,89:T,90:E,91:S},e(A,[2,47]),e(A,[2,48]),{28:73,88:C,89:T,90:E},{27:74,28:46,29:47,88:C,89:T,90:E,91:S},{27:75,28:46,29:47,88:C,89:T,90:E,91:S},{27:76,28:46,29:47,88:C,89:T,90:E,91:S},{54:[1,77]},{27:78,28:46,29:47,88:C,89:T,90:E,91:S},{54:$,56:79},e(F,[2,20],{28:46,29:47,27:81,30:[1,82],88:C,89:T,90:E,91:S}),e(F,[2,21],{30:[1,83]}),e(R,[2,94]),e(R,[2,95]),e(R,[2,96]),e([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),e(Z,[2,10]),{15:84,22:h},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:i,9:r,10:s,11:a,13:11,19:o,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:p,44:f,49:g,51:y,52:m,55:b,57:_,67:x,68:v,70:k,74:w,88:C,89:T,90:E,91:S},e(A,[2,26]),e(A,[2,35]),e(A,[2,36]),{27:86,28:46,29:47,54:[1,87],88:C,89:T,90:E,91:S},{53:88,58:63,59:64,60:L,61:B,62:N,63:D,64:M,65:I,66:O},e(A,[2,46]),{59:89,65:I,66:O},e(P,[2,58],{58:90,60:L,61:B,62:N,63:D,64:M}),e(Y,[2,59]),e(Y,[2,60]),e(Y,[2,61]),e(Y,[2,62]),e(Y,[2,63]),e(j,[2,64]),e(j,[2,65]),e(A,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:C,89:T,90:E},{54:$,56:99},e(A,[2,54]),e(A,[2,98]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),{16:[1,100]},{25:[2,19]},e(z,[2,49]),{27:101,28:46,29:47,88:C,89:T,90:E,91:S},{27:102,28:46,29:47,54:[1,103],88:C,89:T,90:E,91:S},e(P,[2,57],{58:104,60:L,61:B,62:N,63:D,64:M}),e(P,[2,56]),{28:105,88:C,89:T,90:E},{47:106,51:U},{27:108,28:46,29:47,88:C,89:T,90:E,91:S},e(A,[2,66],{54:[1,109]}),e(A,[2,68],{54:[1,111],69:[1,110]}),e(A,[2,72],{54:[1,112],72:[1,113]}),e(A,[2,76],{54:[1,115],69:[1,114]}),e(A,[2,80]),e(A,[2,53]),e(Z,[2,11]),e(z,[2,51]),e(z,[2,50]),{27:116,28:46,29:47,88:C,89:T,90:E,91:S},e(P,[2,55]),e(A,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:U},e(A,[2,42]),e(A,[2,67]),e(A,[2,69]),e(A,[2,70],{69:[1,120]}),e(A,[2,73]),e(A,[2,74],{54:[1,121]}),e(A,[2,77]),e(A,[2,78],{69:[1,122]}),e(z,[2,52]),{47:123,51:U},e(A,[2,40]),{48:[2,44]},e(A,[2,71]),e(A,[2,75]),e(A,[2,79]),{48:[1,124]},e(A,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},q=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 27:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 39:case 42:case 45:case 48:case 51:case 54:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 43:return"STR";case 44:this.begin("bqstring");break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 49:return 73;case 50:this.begin("callback_name");break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 55:return 72;case 56:case 57:case 58:case 59:return 69;case 60:case 61:return 61;case 62:case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\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)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_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)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}},t);function H(){this.yy={}}return W.lexer=q,H.prototype=W,W.Parser=H,new H}();zs.parser=zs;const Us=zs,Ws=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.class)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*classDiagram/)},qs=(t,e)=>{var n;return null!==t.match(/^\s*classDiagram/)&&"dagre-wrapper"===(null==(n=null==e?void 0:e.class)?void 0:n.defaultRenderer)||null!==t.match(/^\s*classDiagram-v2/)},Hs="classid-";let Vs=[],Gs={},Xs=[],Qs=0,Ks=[];const Js=t=>qt.sanitizeText(t,bi()),ta=function(t){let e="",n=t;if(t.indexOf("~")>0){let i=t.split("~");n=i[0],e=qt.sanitizeText(i[1],bi())}return{className:n,type:e}},ea=function(t){let e=ta(t);void 0===Gs[e.className]&&(Gs[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Hs+e.className+"-"+Qs},Qs++)},na=function(t){const e=Object.keys(Gs);for(const n of e)if(Gs[n].id===t)return Gs[n].domId},ia=function(t,e){const n=ta(t).className,i=Gs[n];if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(Js(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(Js(t)):t&&i.members.push(Js(t))}},ra=function(t,e){t.split(",").forEach((function(t){let n=t;t[0].match(/\d/)&&(n=Hs+n),void 0!==Gs[n]&&Gs[n].cssClasses.push(e)}))},sa=function(t,e,n){const i=bi();let r=t,s=na(r);if("loose"===i.securityLevel&&void 0!==e&&void 0!==Gs[r]){let t=[];if("string"==typeof n){t=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,o.Ys)(this).classed("hover",!1)}))};Ks.push(aa);let oa="TB";const ca={parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},setAccTitle:qi,getAccTitle:Hi,getAccDescription:Gi,setAccDescription:Vi,getConfig:()=>bi().class,addClass:ea,bindFunctions:function(t){Ks.forEach((function(e){e(t)}))},clear:function(){Vs=[],Gs={},Xs=[],Ks=[],Ks.push(aa),Wi()},getClass:function(t){return Gs[t]},getClasses:function(){return Gs},getNotes:function(){return Xs},addAnnotation:function(t,e){const n=ta(t).className;Gs[n].annotations.push(e)},addNote:function(t,e){const n={id:`note${Xs.length}`,class:e,text:t};Xs.push(n)},getRelations:function(){return Vs},addRelation:function(t){Ot.debug("Adding relation: "+JSON.stringify(t)),ea(t.id1),ea(t.id2),t.id1=ta(t.id1).className,t.id2=ta(t.id2).className,t.relationTitle1=qt.sanitizeText(t.relationTitle1.trim(),bi()),t.relationTitle2=qt.sanitizeText(t.relationTitle2.trim(),bi()),Vs.push(t)},getDirection:()=>oa,setDirection:t=>{oa=t},addMember:ia,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>ia(t,e))))},cleanupLabel:function(t){return":"===t.substring(0,1)?qt.sanitizeText(t.substr(1).trim(),bi()):Js(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){sa(t,e,n),Gs[t].haveCallback=!0})),ra(t,"clickable")},setCssClass:ra,setLink:function(t,e,n){const i=bi();t.split(",").forEach((function(t){let r=t;t[0].match(/\d/)&&(r=Hs+r),void 0!==Gs[r]&&(Gs[r].link=ai.formatUrl(e,i),"sandbox"===i.securityLevel?Gs[r].linkTarget="_top":Gs[r].linkTarget="string"==typeof n?Js(n):"_blank")})),ra(t,"clickable")},getTooltip:function(t){return Gs[t].tooltip},setTooltip:function(t,e){const n=bi();t.split(",").forEach((function(t){void 0!==e&&(Gs[t].tooltip=qt.sanitizeText(e,n))}))},lookUpDomId:na,setDiagramTitle:Xi,getDiagramTitle:Qi};let la=0;const ha=function(t){let e=t.match(/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/),n=t.match(/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/);return e&&!n?ua(e):n?da(n):pa(t)},ua=function(t){let e="",n="";try{let i=t[1]?t[1].trim():"",r=t[2]?t[2].trim():"",s=t[3]?Wt(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";n=i+r+s+" "+a,e=ga(o)}catch(i){n=t}return{displayText:n,cssStyle:e}},da=function(t){let e="",n="";try{let i=t[1]?t[1].trim():"",r=t[2]?t[2].trim():"",s=t[3]?Wt(t[3].trim()):"",a=t[4]?t[4].trim():"";n=i+r+"("+s+")"+(t[5]?" : "+Wt(t[5]).trim():""),e=ga(a)}catch(i){n=t}return{displayText:n,cssStyle:e}},pa=function(t){let e="",n="",i="",r=t.indexOf("("),s=t.indexOf(")");if(r>1&&s>r&&s<=t.length){let a="",o="",c=t.substring(0,1);c.match(/\w/)?o=t.substring(0,r).trim():(c.match(/[#+~-]/)&&(a=c),o=t.substring(1,r).trim());const l=t.substring(r+1,s);t.substring(s+1,1),n=ga(t.substring(s+1,s+2)),e=a+o+"("+Wt(l.trim())+")",s");const h=o.append("tspan").text(l).attr("class","title");c||h.attr("dy",n.textHeight);const u=o.node().getBBox().height,d=a.append("line").attr("x1",0).attr("y1",n.padding+u+n.dividerMargin/2).attr("y2",n.padding+u+n.dividerMargin/2),p=a.append("text").attr("x",n.padding).attr("y",u+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(t){fa(p,t,c,n),c=!1}));const f=p.node().getBBox(),g=a.append("line").attr("x1",0).attr("y1",n.padding+u+n.dividerMargin+f.height).attr("y2",n.padding+u+n.dividerMargin+f.height),y=a.append("text").attr("x",n.padding).attr("y",u+2*n.dividerMargin+f.height+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(t){fa(y,t,c,n),c=!1}));const m=a.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const _=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).attr("class",b).node().getBBox().width;return o.node().childNodes.forEach((function(t){t.setAttribute("x",(_-t.getBBox().width)/2)})),e.tooltip&&o.insert("title").text(e.tooltip),d.attr("x2",_),g.attr("x2",_),s.width=_,s.height=m.height+n.padding+.5*n.dividerMargin,s},ma=function(t,e,n,i,r){const s=function(t){switch(t){case r.db.relationType.AGGREGATION:return"aggregation";case r.db.relationType.EXTENSION:return"extension";case r.db.relationType.COMPOSITION:return"composition";case r.db.relationType.DEPENDENCY:return"dependency";case r.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const a=e.points,c=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(o.$0Z),l=t.append("path").attr("d",c(a)).attr("id","edge"+la).attr("class","relation");let h,u,d="";i.arrowMarkerAbsolute&&(d=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,d=d.replace(/\(/g,"\\("),d=d.replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),10==n.relation.lineType&&l.attr("class","relation dotted-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+d+"#"+s(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+d+"#"+s(n.relation.type2)+"End)");const p=e.points.length;let f,g,y,m,b=ai.calcLabelPosition(e.points);if(h=b.x,u=b.y,p%2!=0&&p>1){let t=ai.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),i=ai.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[p-1]);Ot.debug("cardinality_1_point "+JSON.stringify(t)),Ot.debug("cardinality_2_point "+JSON.stringify(i)),f=t.x,g=t.y,y=i.x,m=i.y}if(void 0!==n.title){const e=t.append("g").attr("class","classLabel"),r=e.append("text").attr("class","label").attr("x",h).attr("y",u).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=r;const s=r.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",s.x-i.padding/2).attr("y",s.y-i.padding/2).attr("width",s.width+i.padding).attr("height",s.height+i.padding)}if(Ot.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1){t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",f).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle1)}if(void 0!==n.relationTitle2&&"none"!==n.relationTitle2){t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",y).attr("y",m).attr("fill","black").attr("font-size","6").text(n.relationTitle2)}la++},ba=function(t,e,n,i){Ot.debug("Rendering note ",e,n);const r=e.id,s={id:r,text:e.text,width:0,height:0},a=t.append("g").attr("id",r).attr("class","classGroup");let o=a.append("text").attr("y",n.textHeight+n.padding).attr("x",0);const c=JSON.parse(`"${e.text}"`).split("\n");c.forEach((function(t){Ot.debug(`Adding line: ${t}`),o.append("tspan").text(t).attr("class","title").attr("dy",n.textHeight)}));const l=a.node().getBBox(),h=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",l.width+2*n.padding).attr("height",l.height+c.length*n.textHeight+n.padding+.5*n.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach((function(t){t.setAttribute("x",(h-t.getBBox().width)/2)})),s.width=h,s.height=l.height+c.length*n.textHeight+n.padding+.5*n.dividerMargin,s};let _a={};const xa=function(t){const e=Object.entries(_a).find((e=>e[1].label===t));if(e)return e[0]},va={draw:function(t,e,n,i){const r=bi().class;_a={},Ot.info("Rendering diagram "+t);const s=bi().securityLevel;let a;"sandbox"===s&&(a=(0,o.Ys)("#i"+e));const c="sandbox"===s?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body"),l=c.select(`[id='${e}']`);var h;(h=l).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),h.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),h.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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"),h.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).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"),h.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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"),h.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).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"),h.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),h.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 18,7 L9,13 L14,7 L9,1 Z");const u=new dt.k({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}}));const d=i.db.getClasses(),p=Object.keys(d);for(const o of p){const t=d[o],e=ya(l,t,r,i);_a[e.id]=e,u.setNode(e.id,e),Ot.info("Org height: "+e.height)}i.db.getRelations().forEach((function(t){Ot.info("tjoho"+xa(t.id1)+xa(t.id2)+JSON.stringify(t)),u.setEdge(xa(t.id1),xa(t.id2),{relation:t},t.title||"DEFAULT")}));i.db.getNotes().forEach((function(t){Ot.debug(`Adding note: ${JSON.stringify(t)}`);const e=ba(l,t,r,i);_a[e.id]=e,u.setNode(e.id,e),t.class&&t.class in d&&u.setEdge(t.id,xa(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,ut.bK)(u),u.nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)&&(Ot.debug("Node "+t+": "+JSON.stringify(u.node(t))),c.select("#"+(i.db.lookUpDomId(t)||t)).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y-u.node(t).height/2)+" )"))})),u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(Ot.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),ma(l,u.edge(t),u.edge(t).relation,r,i))}));const f=l.node().getBBox(),g=f.width+40,y=f.height+40;Ti(l,y,g,r.useMaxWidth);const m=`${f.x-20} ${f.y-20} ${g} ${y}`;Ot.debug(`viewBox ${m}`),l.attr("viewBox",m)}},ka={extension:(t,e,n)=>{Ot.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).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",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).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",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).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:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).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",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).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")},dependency:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).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",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).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")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 12 20").attr("refX",10).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",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).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")},circle:(t,e)=>{t.append("marker").attr("id",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",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")},cross:(t,e)=>{t.append("marker").attr("id",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",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")},barb:(t,e)=>{t.append("defs").append("marker").attr("id",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")}},wa=(t,e,n,i)=>{e.forEach((e=>{ka[e](t,n,i)}))};const Ca=(t,e,n,i)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),Ut(bi().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"
"),Ot.info("vertexText"+r);let t=function(t){const e=(0,o.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div"),i=t.label,r=t.isNode?"nodeLabel":"edgeLabel";var s,a;return n.html('"+i+""),s=n,(a=t.labelStyle)&&s.attr("style",a),n.style("display","inline-block"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}({isNode:i,label:yp(r).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e.replace("fill:","color:")});return t}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof r?r.split(/\\n|\n|/gi):Array.isArray(r)?r:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),n?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}},Ta=(t,e,n,i)=>{let r;r=n||"node default";const s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let c;c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const l=a.node().appendChild(Ca(Pt(yp(c),bi()),e.labelStyle,!1,i));let h=l.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=l.children[0],e=(0,o.Ys)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}const u=e.padding/2;return a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:s,bbox:h,halfPadding:u,label:a}},Ea=(t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height};function Sa(t,e,n,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}let Aa={},La={},Ba={};const Na=(t,e)=>(Ot.trace("In isDecendant",e," ",t," = ",La[e].includes(t)),!!La[e].includes(t)),Da=(t,e,n,i)=>{Ot.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const r=e.children(t)||[];t!==i&&r.push(t),Ot.warn("Copying (nodes) clusterId",t,"nodes",r),r.forEach((r=>{if(e.children(r).length>0)Da(r,e,n,i);else{const s=e.node(r);Ot.info("cp ",r," to ",i," with parent ",t),n.setNode(r,s),i!==e.parent(r)&&(Ot.warn("Setting parent",r,e.parent(r)),n.setParent(r,e.parent(r))),t!==i&&r!==t?(Ot.debug("Setting parent",r,t),n.setParent(r,t)):(Ot.info("In copy ",t,"root",i,"data",e.node(t),i),Ot.debug("Not Setting parent for node=",r,"cluster!==rootId",t!==i,"node!==clusterId",r!==t));const a=e.edges(r);Ot.debug("Copying Edges",a),a.forEach((r=>{Ot.info("Edge",r);const s=e.edge(r.v,r.w,r.name);Ot.info("Edge data",s,i);try{((t,e)=>(Ot.info("Decendants of ",e," is ",La[e]),Ot.info("Edge is ",t),t.v!==e&&t.w!==e&&(La[e]?La[e].includes(t.v)||Na(t.v,e)||Na(t.w,e)||La[e].includes(t.w):(Ot.debug("Tilt, ",e,",not in decendants"),!1))))(r,i)?(Ot.info("Copying as ",r.v,r.w,s,r.name),n.setEdge(r.v,r.w,s,r.name),Ot.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):Ot.info("Skipping copy of edge ",r.v,"--\x3e",r.w," rootId: ",i," clusterId:",t)}catch(a){Ot.error(a)}}))}Ot.debug("Removing node",r),e.removeNode(r)}))},Ma=(t,e)=>{const n=e.children(t);let i=[...n];for(const r of n)Ba[r]=t,i=[...i,...Ma(r,e)];return i},Ia=(t,e)=>{Ot.trace("Searching",t);const n=e.children(t);if(Ot.trace("Searching children of id ",t,n),n.length<1)return Ot.trace("This is a valid node",t),t;for(const i of n){const n=Ia(i,e);if(n)return Ot.trace("Found replacement for",t," => ",n),n}},Oa=t=>Aa[t]&&Aa[t].externalConnections&&Aa[t]?Aa[t].id:t,$a=(t,e)=>{if(Ot.warn("extractor - ",e,pt.c(t),t.children("D")),e>10)return void Ot.error("Bailing out");let n=t.nodes(),i=!1;for(const r of n){const e=t.children(r);i=i||e.length>0}if(i){Ot.debug("Nodes = ",n,e);for(const i of n)if(Ot.debug("Extracting node",i,Aa,Aa[i]&&!Aa[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),Aa[i])if(!Aa[i].externalConnections&&t.children(i)&&t.children(i).length>0){Ot.warn("Cluster without external connections, without a parent and with children",i,e);let n="TB"===t.graph().rankdir?"LR":"TB";Aa[i]&&Aa[i].clusterData&&Aa[i].clusterData.dir&&(n=Aa[i].clusterData.dir,Ot.warn("Fixing dir",Aa[i].clusterData.dir,n));const r=new dt.k({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));Ot.warn("Old graph before copy",pt.c(t)),Da(i,t,r,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Aa[i].clusterData,labelText:Aa[i].labelText,graph:r}),Ot.warn("New graph after copy node: (",i,")",pt.c(r)),Ot.debug("Old graph after copy",pt.c(t))}else Ot.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Aa[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),Ot.debug(Aa);else Ot.debug("Not a cluster",i,e);n=t.nodes(),Ot.warn("New list of nodes",n);for(const i of n){const n=t.node(i);Ot.warn(" Now next level",i,n),n.clusterNode&&$a(n.graph,e+1)}}else Ot.debug("Done, no node has children",t.nodes())},Fa=(t,e)=>{if(0===e.length)return[];let n=Object.assign(e);return e.forEach((e=>{const i=t.children(e),r=Fa(t,i);n=[...n,...r]})),n};function Ra(t,e,n,i){var r=t.x,s=t.y,a=r-i.x,o=s-i.y,c=Math.sqrt(e*e*o*o+n*n*a*a),l=Math.abs(e*n*a/c);i.x0}const Ya=(t,e)=>{var n,i,r=t.x,s=t.y,a=e.x-r,o=e.y-s,c=t.width/2,l=t.height/2;return Math.abs(o)*c>Math.abs(a)*l?(o<0&&(l=-l),n=0===o?0:l*a/o,i=l):(a<0&&(c=-c),n=c,i=0===a?0:c*o/a),{x:r+n,y:s+i}},ja={node:function(t,e){return t.intersect(e)},circle:function(t,e,n){return Ra(t,e,e,n)},ellipse:Ra,polygon:function(t,e,n){var i=t.x,r=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){a=Math.min(a,t.x),o=Math.min(o,t.y)})):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var c=i-t.width/2-a,l=r-t.height/2-o,h=0;h1&&s.sort((function(t,e){var i=t.x-n.x,r=t.y-n.y,s=Math.sqrt(i*i+r*r),a=e.x-n.x,o=e.y-n.y,c=Math.sqrt(a*a+o*o);return s{const{shapeSvg:n,bbox:i,halfPadding:r}=Ta(t,e,"node "+e.classes,!0);Ot.info("Classes = ",e.classes);const s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-r).attr("y",-i.height/2-r).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ea(e,s),e.intersect=function(t){return ja.rect(e,t)},n},Ua=(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding+(i.height+e.padding),s=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];Ot.info("Question main (Circle)");const a=Sa(n,r,r,s);return a.attr("style",e.style),Ea(e,a),e.intersect=function(t){return Ot.warn("Intersect called"),ja.polygon(e,s,t)},n};function Wa(t,e,n,i){const r=[],s=t=>{r.push(t,0)},a=t=>{r.push(0,t)};e.includes("t")?(Ot.debug("add top border"),s(n)):a(n),e.includes("r")?(Ot.debug("add right border"),s(i)):a(i),e.includes("b")?(Ot.debug("add bottom border"),s(n)):a(n),e.includes("l")?(Ot.debug("add left border"),s(i)):a(i),t.attr("stroke-dasharray",r.join(" "))}const qa=(t,e,n)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let r=70,s=10;"LR"===n&&(r=10,s=70);const a=i.append("rect").attr("x",-1*r/2).attr("y",-1*s/2).attr("width",r).attr("height",s).attr("class","fork-join");return Ea(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return ja.rect(e,t)},i},Ha={rhombus:Ua,question:Ua,rect:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=Ta(t,e,"node "+e.classes,!0);Ot.trace("Classes = ",e.classes);const s=n.insert("rect",":first-child"),a=i.width+e.padding,o=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-r).attr("y",-i.height/2-r).attr("width",a).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Wa(s,e.props.borders,a,o),t.delete("borders")),t.forEach((t=>{Ot.warn(`Unknown node property ${t}`)}))}return Ea(e,s),e.intersect=function(t){return ja.rect(e,t)},n},labelRect:(t,e)=>{const{shapeSvg:n}=Ta(t,e,"label",!0);Ot.trace("Classes = ",e.classes);const i=n.insert("rect",":first-child");if(i.attr("width",0).attr("height",0),n.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Wa(i,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{Ot.warn(`Unknown node property ${t}`)}))}return Ea(e,i),e.intersect=function(t){return ja.rect(e,t)},n},rectWithTitle:(t,e)=>{let n;n=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),r=i.insert("rect",":first-child"),s=i.insert("line"),a=i.insert("g").attr("class","label"),c=e.labelText.flat?e.labelText.flat():e.labelText;let l="";l="object"==typeof c?c[0]:c,Ot.info("Label text abc79",l,c,"object"==typeof c);const h=a.node().appendChild(Ca(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Ut(bi().flowchart.htmlLabels)){const t=h.children[0],e=(0,o.Ys)(h);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}Ot.info("Text 2",c);const d=c.slice(1,c.length);let p=h.getBBox();const f=a.node().appendChild(Ca(d.join?d.join("
"):d,e.labelStyle,!0,!0));if(Ut(bi().flowchart.htmlLabels)){const t=f.children[0],e=(0,o.Ys)(f);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}const g=e.padding/2;return(0,o.Ys)(f).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+g+5)+")"),(0,o.Ys)(h).attr("transform","translate( "+(u.width{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return n.insert("polygon",":first-child").attr("points",i.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 ja.circle(e,14,t)},n},circle:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=Ta(t,e,void 0,!0),s=n.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+r).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ot.info("Circle main"),Ea(e,s),e.intersect=function(t){return Ot.info("Circle intersect",e,i.width/2+r,t),ja.circle(e,i.width/2+r,t)},n},doublecircle:(t,e)=>{const{shapeSvg:n,bbox:i,halfPadding:r}=Ta(t,e,void 0,!0),s=n.insert("g",":first-child"),a=s.insert("circle"),o=s.insert("circle");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+r+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+r).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Ot.info("DoubleCircle main"),Ea(e,a),e.intersect=function(t){return Ot.info("DoubleCircle intersect",e,i.width/2+r+5,t),ja.circle(e,i.width/2+r+5,t)},n},stadium:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.height+e.padding,s=i.width+r/4+e.padding,a=n.insert("rect",":first-child").attr("style",e.style).attr("rx",r/2).attr("ry",r/2).attr("x",-s/2).attr("y",-r/2).attr("width",s).attr("height",r);return Ea(e,a),e.intersect=function(t){return ja.rect(e,t)},n},hexagon:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.height+e.padding,s=r/4,a=i.width+2*s+e.padding,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-r/2},{x:a-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],c=Sa(n,a,r,o);return c.attr("style",e.style),Ea(e,c),e.intersect=function(t){return ja.polygon(e,o,t)},n},rect_left_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:-s/2,y:0},{x:r,y:0},{x:r,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Sa(n,r,s,a).attr("style",e.style),e.width=r+s,e.height=s,e.intersect=function(t){return ja.polygon(e,a,t)},n},lean_right:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:s/6,y:-s}],o=Sa(n,r,s,a);return o.attr("style",e.style),Ea(e,o),e.intersect=function(t){return ja.polygon(e,a,t)},n},lean_left:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:2*s/6,y:0},{x:r+s/6,y:0},{x:r-2*s/6,y:-s},{x:-s/6,y:-s}],o=Sa(n,r,s,a);return o.attr("style",e.style),Ea(e,o),e.intersect=function(t){return ja.polygon(e,a,t)},n},trapezoid:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:r+2*s/6,y:0},{x:r-s/6,y:-s},{x:s/6,y:-s}],o=Sa(n,r,s,a);return o.attr("style",e.style),Ea(e,o),e.intersect=function(t){return ja.polygon(e,a,t)},n},inv_trapezoid:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Sa(n,r,s,a);return o.attr("style",e.style),Ea(e,o),e.intersect=function(t){return ja.polygon(e,a,t)},n},rect_right_inv_arrow:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:r+s/2,y:0},{x:r,y:-s/2},{x:r+s/2,y:-s},{x:0,y:-s}],o=Sa(n,r,s,a);return o.attr("style",e.style),Ea(e,o),e.intersect=function(t){return ja.polygon(e,a,t)},n},cylinder:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=r/2,a=s/(2.5+r/50),o=i.height+a+e.padding,c="M 0,"+a+" a "+s+","+a+" 0,0,0 "+r+" 0 a "+s+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,l=n.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",c).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return Ea(e,l),e.intersect=function(t){const n=ja.rect(e,t),i=n.x-e.x;if(0!=s&&(Math.abs(i)e.height/2-a)){let r=a*a*(1-i*i/(s*s));0!=r&&(r=Math.sqrt(r)),r=a-r,t.y-e.y>0&&(r=-r),n.y+=r}return n},n},start:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Ea(e,i),e.intersect=function(t){return ja.circle(e,7,t)},n},end:(t,e)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=n.insert("circle",":first-child"),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Ea(e,r),e.intersect=function(t){return ja.circle(e,7,t)},n},note:za,subroutine:(t,e)=>{const{shapeSvg:n,bbox:i}=Ta(t,e,void 0,!0),r=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Sa(n,r,s,a);return o.attr("style",e.style),Ea(e,o),e.intersect=function(t){return ja.polygon(e,a,t)},n},fork:qa,join:qa,class_box:(t,e)=>{const n=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=r.insert("rect",":first-child"),a=r.insert("line"),c=r.insert("line");let l=0,h=4;const u=r.insert("g").attr("class","label");let d=0;const p=e.classData.annotations&&e.classData.annotations[0],f=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",g=u.node().appendChild(Ca(f,e.labelStyle,!0,!0));let y=g.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=g.children[0],e=(0,o.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}e.classData.annotations[0]&&(h+=y.height+4,l+=y.width);let m=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(bi().flowchart.htmlLabels?m+="<"+e.classData.type+">":m+="<"+e.classData.type+">");const b=u.node().appendChild(Ca(m,e.labelStyle,!0,!0));(0,o.Ys)(b).attr("class","classTitle");let _=b.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=b.children[0],e=(0,o.Ys)(b);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}h+=_.height+4,_.width>l&&(l=_.width);const x=[];e.classData.members.forEach((t=>{const n=ha(t);let i=n.displayText;bi().flowchart.htmlLabels&&(i=i.replace(//g,">"));const r=u.node().appendChild(Ca(i,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let s=r.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=r.children[0],e=(0,o.Ys)(r);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>l&&(l=s.width),h+=s.height+4,x.push(r)})),h+=8;const v=[];if(e.classData.methods.forEach((t=>{const n=ha(t);let i=n.displayText;bi().flowchart.htmlLabels&&(i=i.replace(//g,">"));const r=u.node().appendChild(Ca(i,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0));let s=r.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=r.children[0],e=(0,o.Ys)(r);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>l&&(l=s.width),h+=s.height+4,v.push(r)})),h+=8,p){let t=(l-y.width)/2;(0,o.Ys)(g).attr("transform","translate( "+(-1*l/2+t)+", "+-1*h/2+")"),d=y.height+4}let k=(l-_.width)/2;return(0,o.Ys)(b).attr("transform","translate( "+(-1*l/2+k)+", "+(-1*h/2+d)+")"),d+=_.height+4,a.attr("class","divider").attr("x1",-l/2-n).attr("x2",l/2+n).attr("y1",-h/2-n+8+d).attr("y2",-h/2-n+8+d),d+=8,x.forEach((t=>{(0,o.Ys)(t).attr("transform","translate( "+-l/2+", "+(-1*h/2+d+4)+")"),d+=_.height+4})),d+=8,c.attr("class","divider").attr("x1",-l/2-n).attr("x2",l/2+n).attr("y1",-h/2-n+8+d).attr("y2",-h/2-n+8+d),d+=8,v.forEach((t=>{(0,o.Ys)(t).attr("transform","translate( "+-l/2+", "+(-1*h/2+d)+")"),d+=_.height+4})),s.attr("class","outer title-state").attr("x",-l/2-n).attr("y",-h/2-n).attr("width",l+e.padding).attr("height",h+e.padding),Ea(e,s),e.intersect=function(t){return ja.rect(e,t)},r}};let Va={};const Ga=(t,e,n)=>{let i,r;if(e.link){let s;"sandbox"===bi().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),r=Ha[e.shape](i,e,n)}else r=Ha[e.shape](t,e,n),i=r;return e.tooltip&&r.attr("title",e.tooltip),e.class&&r.attr("class","node default "+e.class),Va[e.id]=i,e.haveCallback&&Va[e.id].attr("class",Va[e.id].attr("class")+" clickable"),i},Xa=t=>{const e=Va[t.id];Ot.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},Qa={rect:(t,e)=>{Ot.trace("Creating subgraph rect for ",e.id,e);const n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),r=n.insert("g").attr("class","cluster-label"),s=r.node().appendChild(Ca(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=s.children[0],e=(0,o.Ys)(s);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}const c=0*e.padding,l=c/2,h=e.width<=a.width+c?a.width+c:e.width;e.width<=a.width+c?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,Ot.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-l).attr("width",h).attr("height",e.height+c),r.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const u=i.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(t){return Ya(e,t)},n},roundedWithTitle:(t,e)=>{const n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),r=n.insert("g").attr("class","cluster-label"),s=n.append("rect"),a=r.node().appendChild(Ca(e.labelText,e.labelStyle,void 0,!0));let c=a.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=a.children[0],e=(0,o.Ys)(a);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}c=a.getBBox();const l=0*e.padding,h=l/2,u=e.width<=c.width+e.padding?c.width+e.padding:e.width;e.width<=c.width+e.padding?e.diff=(c.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h).attr("width",u+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h+c.height-1).attr("width",u+l).attr("height",e.height+l-c.height-3),r.attr("transform","translate("+(e.x-c.width/2)+", "+(e.y-e.height/2-e.padding/3+(Ut(bi().flowchart.htmlLabels)?5:3))+")");const d=i.node().getBBox();return e.height=d.height,e.intersect=function(t){return Ya(e,t)},n},noteGroup:(t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=n.insert("rect",":first-child"),r=0*e.padding,s=r/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return Ya(e,t)},n},divider:(t,e)=>{const n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),r=0*e.padding,s=r/2;i.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+r).attr("height",e.height+r);const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(t){return Ya(e,t)},n}};let Ka={};let Ja={},to={};const eo=(t,e)=>{const n=Ca(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),r=i.insert("g").attr("class","label");r.node().appendChild(n);let s,a=n.getBBox();if(Ut(bi().flowchart.htmlLabels)){const t=n.children[0],e=(0,o.Ys)(n);a=t.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)}if(r.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),Ja[e.id]=i,e.width=a.width,e.height=a.height,e.startLabelLeft){const n=Ca(e.startLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");s=r.node().appendChild(n);const a=n.getBBox();r.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),to[e.id]||(to[e.id]={}),to[e.id].startLeft=i,no(s,e.startLabelLeft)}if(e.startLabelRight){const n=Ca(e.startLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");s=i.node().appendChild(n),r.node().appendChild(n);const a=n.getBBox();r.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),to[e.id]||(to[e.id]={}),to[e.id].startRight=i,no(s,e.startLabelRight)}if(e.endLabelLeft){const n=Ca(e.endLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");s=r.node().appendChild(n);const a=n.getBBox();r.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),i.node().appendChild(n),to[e.id]||(to[e.id]={}),to[e.id].endLeft=i,no(s,e.endLabelLeft)}if(e.endLabelRight){const n=Ca(e.endLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),r=i.insert("g").attr("class","inner");s=r.node().appendChild(n);const a=n.getBBox();r.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),i.node().appendChild(n),to[e.id]||(to[e.id]={}),to[e.id].endRight=i,no(s,e.endLabelRight)}return n};function no(t,e){bi().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}const io=(t,e)=>{Ot.warn("abc88 cutPathAtIntersect",t,e);let n=[],i=t[0],r=!1;return t.forEach((t=>{if(Ot.info("abc88 checking point",t,e),((t,e)=>{const n=t.x,i=t.y,r=Math.abs(e.x-n),s=Math.abs(e.y-i),a=t.width/2,o=t.height/2;return r>=a||s>=o})(e,t)||r)Ot.warn("abc88 outside",t,i),i=t,r||n.push(t);else{const s=((t,e,n)=>{Ot.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(n)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,r=t.y,s=Math.abs(i-n.x),a=t.width/2;let o=n.xMath.abs(i-e.x)*c){let t=n.y{a=a||t.x===s.x&&t.y===s.y})),n.some((t=>t.x===s.x&&t.y===s.y))?Ot.warn("abc88 no intersect",s,n):n.push(s),r=!0}})),Ot.warn("abc88 returning points",n),n},ro=(t,e,n,i)=>{Ot.info("Graph in recursive render: XXX",pt.c(e),i);const r=e.graph().rankdir;Ot.trace("Dir in recursive render - dir:",r);const s=t.insert("g").attr("class","root");e.nodes()?Ot.info("Recursive render XXX",e.nodes()):Ot.info("No nodes found for",e),e.edges().length>0&&Ot.trace("Recursive edges",e.edge(e.edges()[0]));const a=s.insert("g").attr("class","clusters"),c=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");e.nodes().forEach((function(t){const s=e.node(t);if(void 0!==i){const n=JSON.parse(JSON.stringify(i.clusterData));Ot.info("Setting data for cluster XXX (",t,") ",n,i),e.setNode(i.id,n),e.parent(t)||(Ot.trace("Setting parent",t,i.id),e.setParent(t,i.id,n))}if(Ot.info("(Insert) Node XXX"+t+": "+JSON.stringify(e.node(t))),s&&s.clusterNode){Ot.info("Cluster identified",t,s.width,e.node(t));const i=ro(h,s.graph,n,e.node(t)),r=i.elem;Ea(s,r),s.diff=i.diff||0,Ot.info("Node bounds (abc123)",t,s,s.width,s.x,s.y),((t,e)=>{Va[e.id]=t})(r,s),Ot.warn("Recursive render complete ",r,s)}else e.children(t).length>0?(Ot.info("Cluster - the non recursive path XXX",t,s.id,s,e),Ot.info(Ia(s.id,e)),Aa[s.id]={id:Ia(s.id,e),node:s}):(Ot.info("Node - the non recursive path",t,s.id,s),Ga(h,e.node(t),r))})),e.edges().forEach((function(t){const n=e.edge(t.v,t.w,t.name);Ot.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),Ot.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(e.edge(t))),Ot.info("Fix",Aa,"ids:",t.v,t.w,"Translateing: ",Aa[t.v],Aa[t.w]),eo(l,n)})),e.edges().forEach((function(t){Ot.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),Ot.info("#############################################"),Ot.info("### Layout ###"),Ot.info("#############################################"),Ot.info(e),(0,ut.bK)(e),Ot.info("Graph after layout:",pt.c(e));let u=0;return(t=>Fa(t,t.children()))(e).forEach((function(t){const n=e.node(t);Ot.info("Position "+t+": "+JSON.stringify(e.node(t))),Ot.info("Position "+t+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?Xa(n):e.children(t).length>0?(((t,e)=>{Ot.trace("Inserting cluster");const n=e.shape||"rect";Ka[e.id]=Qa[n](t,e)})(a,n),Aa[n.id].node=n):Xa(n)})),e.edges().forEach((function(t){const i=e.edge(t);Ot.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i),i);const r=function(t,e,n,i,r,s){let a=n.points,c=!1;const l=s.node(e.v);var h=s.node(e.w);Ot.info("abc88 InsertEdge: ",n),h.intersect&&l.intersect&&(a=a.slice(1,n.points.length-1),a.unshift(l.intersect(a[0])),Ot.info("Last point",a[a.length-1],h,h.intersect(a[a.length-1])),a.push(h.intersect(a[a.length-1]))),n.toCluster&&(Ot.info("to cluster abc88",i[n.toCluster]),a=io(n.points,i[n.toCluster].node),c=!0),n.fromCluster&&(Ot.info("from cluster abc88",i[n.fromCluster]),a=io(a.reverse(),i[n.fromCluster].node).reverse(),c=!0);const u=a.filter((t=>!Number.isNaN(t.y)));let d;d=("graph"===r||"flowchart"===r)&&n.curve||o.$0Z;const p=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(d);let f;switch(n.thickness){case"normal":f="edge-thickness-normal";break;case"thick":f="edge-thickness-thick";break;default:f=""}switch(n.pattern){case"solid":f+=" edge-pattern-solid";break;case"dotted":f+=" edge-pattern-dotted";break;case"dashed":f+=" edge-pattern-dashed"}const g=t.append("path").attr("d",p(u)).attr("id",n.id).attr("class"," "+f+(n.classes?" "+n.classes:"")).attr("style",n.style);let y="";switch((bi().flowchart.arrowMarkerAbsolute||bi().state.arrowMarkerAbsolute)&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),Ot.info("arrowTypeStart",n.arrowTypeStart),Ot.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+y+"#"+r+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+y+"#"+r+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+y+"#"+r+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+y+"#"+r+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+y+"#"+r+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+y+"#"+r+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+y+"#"+r+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+y+"#"+r+"-dependencyStart)");break;case"lollipop":g.attr("marker-start","url("+y+"#"+r+"-lollipopStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+y+"#"+r+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+y+"#"+r+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+y+"#"+r+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+y+"#"+r+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+y+"#"+r+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+y+"#"+r+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+y+"#"+r+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+y+"#"+r+"-dependencyEnd)");break;case"lollipop":g.attr("marker-end","url("+y+"#"+r+"-lollipopEnd)")}let m={};return c&&(m.updatedPath=a),m.originalPath=n.points,m}(c,t,i,Aa,n,e);((t,e)=>{Ot.info("Moving label abc78 ",t.id,t.label,Ja[t.id]);let n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Ja[t.id];let r=t.x,s=t.y;if(n){const i=ai.calcLabelPosition(n);Ot.info("Moving label "+t.label+" from (",r,",",s,") to (",i.x,",",i.y,") abc78"),e.updatedPath&&(r=i.x,s=i.y)}i.attr("transform","translate("+r+", "+s+")")}if(t.startLabelLeft){const e=to[t.id].startLeft;let i=t.x,r=t.y;if(n){const e=ai.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}if(t.startLabelRight){const e=to[t.id].startRight;let i=t.x,r=t.y;if(n){const e=ai.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}if(t.endLabelLeft){const e=to[t.id].endLeft;let i=t.x,r=t.y;if(n){const e=ai.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}if(t.endLabelRight){const e=to[t.id].endRight;let i=t.x,r=t.y;if(n){const e=ai.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=e.x,r=e.y}e.attr("transform","translate("+i+", "+r+")")}})(i,r)})),e.nodes().forEach((function(t){const n=e.node(t);Ot.info(t,n.type,n.diff),"group"===n.type&&(u=n.diff)})),{elem:s,diff:u}},so=(t,e,n,i,r)=>{wa(t,n,i,r),Va={},Ja={},to={},Ka={},La={},Ba={},Aa={},Ot.warn("Graph at first:",pt.c(e)),((t,e)=>{!t||e>10?Ot.debug("Opting out, no graph "):(Ot.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(Ot.warn("Cluster identified",e," Replacement id in edges: ",Ia(e,t)),La[e]=Ma(e,t),Aa[e]={id:Ia(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){const n=t.children(e),i=t.edges();n.length>0?(Ot.debug("Cluster identified",e,La),i.forEach((t=>{t.v!==e&&t.w!==e&&Na(t.v,e)^Na(t.w,e)&&(Ot.warn("Edge: ",t," leaves cluster ",e),Ot.warn("Decendants of XXX ",e,": ",La[e]),Aa[e].externalConnections=!0)}))):Ot.debug("Not a cluster ",e,La)})),t.edges().forEach((function(e){const n=t.edge(e);Ot.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),Ot.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,r=e.w;if(Ot.warn("Fix XXX",Aa,"ids:",e.v,e.w,"Translating: ",Aa[e.v]," --- ",Aa[e.w]),Aa[e.v]&&Aa[e.w]&&Aa[e.v]===Aa[e.w]){Ot.warn("Fixing and trixing link to self - removing XXX",e.v,e.w,e.name),Ot.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=Oa(e.v),r=Oa(e.w),t.removeEdge(e.v,e.w,e.name);const s=e.w+"---"+e.v;t.setNode(s,{domId:s,id:s,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const a=JSON.parse(JSON.stringify(n)),o=JSON.parse(JSON.stringify(n));a.label="",a.arrowTypeEnd="none",o.label="",a.fromCluster=e.v,o.toCluster=e.v,t.setEdge(i,s,a,e.name+"-cyclic-special"),t.setEdge(s,r,o,e.name+"-cyclic-special")}else(Aa[e.v]||Aa[e.w])&&(Ot.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),i=Oa(e.v),r=Oa(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v&&(n.fromCluster=e.v),r!==e.w&&(n.toCluster=e.w),Ot.warn("Fix Replacing with XXX",i,r,e.name),t.setEdge(i,r,n,e.name))})),Ot.warn("Adjusted Graph",pt.c(t)),$a(t,0),Ot.trace(Aa))})(e),Ot.warn("Graph after:",pt.c(e)),ro(t,e,i)},ao=t=>qt.sanitizeText(t,bi());let oo={dividerMargin:10,padding:5,textHeight:10};function co(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}const lo={setConf:function(t){Object.keys(t).forEach((function(e){oo[e]=t[e]}))},draw:function(t,e,n,i){Ot.info("Drawing class - ",e);const r=bi().flowchart,s=bi().securityLevel;Ot.info("config:",r);const a=r.nodeSpacing||50,c=r.rankSpacing||50,l=new dt.k({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:a,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=i.db.getClasses(),u=i.db.getRelations(),d=i.db.getNotes();let p;Ot.info(u),function(t,e,n,i){const r=Object.keys(t);Ot.info("keys:",r),Ot.info(t),r.forEach((function(n){const r=t[n];let s="";r.cssClasses.length>0&&(s=s+" "+r.cssClasses.join(" "));const a={labelStyle:""};let o=void 0!==r.text?r.text:r.id,c="";r.type,c="class_box",e.setNode(r.id,{labelStyle:a.labelStyle,shape:c,labelText:ao(o),classData:r,rx:0,ry:0,class:s,style:a.style,id:r.id,domId:r.domId,tooltip:i.db.getTooltip(r.id)||"",haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:bi().flowchart.padding}),Ot.info("setNode",{labelStyle:a.labelStyle,shape:c,labelText:o,rx:0,ry:0,class:s,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:bi().flowchart.padding})}))}(h,l,0,i),function(t,e){const n=bi().flowchart;let i=0;t.forEach((function(r){i++;const s={classes:"relation"};s.pattern=1==r.relation.lineType?"dashed":"solid",s.id="id"+i,"arrow_open"===r.type?s.arrowhead="none":s.arrowhead="normal",Ot.info(s,r),s.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,s.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,s.arrowTypeStart=co(r.relation.type1),s.arrowTypeEnd=co(r.relation.type2);let a="",c="";if(void 0!==r.style){const t=Wn(r.style);a=t.style,c=t.labelStyle}else a="fill:none";s.style=a,s.labelStyle=c,void 0!==r.interpolate?s.curve=zn(r.interpolate,o.c_6):void 0!==t.defaultInterpolate?s.curve=zn(t.defaultInterpolate,o.c_6):s.curve=zn(n.curve,o.c_6),r.text=r.title,void 0===r.text?void 0!==r.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",bi().flowchart.htmlLabels?(s.labelType="html",s.label=''+r.text+""):(s.labelType="text",s.label=r.text.replace(qt.lineBreakRegex,"\n"),void 0===r.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(r.id1,r.id2,s,i)}))}(u,l),function(t,e,n,i){Ot.info(t),t.forEach((function(t,r){const s=t,a="",c="";let l=s.text,h="note";if(e.setNode(s.id,{labelStyle:a,shape:h,labelText:ao(l),noteData:s,rx:0,ry:0,class:"",style:c,id:s.id,domId:s.id,tooltip:"",type:"note",padding:bi().flowchart.padding}),Ot.info("setNode",{labelStyle:a,shape:h,labelText:l,rx:0,ry:0,style:c,id:s.id,type:"note",padding:bi().flowchart.padding}),!s.class||!(s.class in i))return;const u=n+r,d={classes:"relation",pattern:"dotted"};d.id=`edgeNote${u}`,d.arrowhead="none",Ot.info(`Note edge: ${JSON.stringify(d)}, ${JSON.stringify(s)}`),d.startLabelRight="",d.endLabelLeft="",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.style="fill:none",d.labelStyle="",d.curve=zn(oo.curve,o.c_6),e.setEdge(s.id,s.class,d,u)}))}(d,l,u.length+1,h),"sandbox"===s&&(p=(0,o.Ys)("#i"+e));const f="sandbox"===s?(0,o.Ys)(p.nodes()[0].contentDocument.body):(0,o.Ys)("body"),g=f.select(`[id="${e}"]`),y=f.select("#"+e+" g");if(so(y,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ai.insertTitle(g,"classTitleText",r.titleTopMargin,i.db.getDiagramTitle()),Ei(l,g,r.diagramPadding,r.useMaxWidth),!r.htmlLabels){const t="sandbox"===s?p.nodes()[0].contentDocument:document,n=t.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const e of n){const n=e.getBBox(),i=t.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("rx",0),i.setAttribute("ry",0),i.setAttribute("width",n.width),i.setAttribute("height",n.height),e.insertBefore(i,e.firstChild)}}}};var ho=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,2],i=[1,5],r=[6,9,11,23,25,27,29,30,31,51],s=[1,17],a=[1,18],o=[1,19],c=[1,20],l=[1,21],h=[1,22],u=[1,25],d=[1,30],p=[1,31],f=[1,32],g=[1,33],y=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],m=[1,45],b=[30,31,48,49],_=[4,6,9,11,23,25,27,29,30,31,51],x=[44,45,46,47],v=[22,37],k=[1,65],w=[1,64],C=[22,37,39,41],T={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:s[o-1].push(s[o]),this.$=s[o-1];break;case 5:case 6:case 20:case 43:case 28:case 29:case 32:this.$=s[o];break;case 12:i.addEntity(s[o-4]),i.addEntity(s[o-2]),i.addRelationship(s[o-4],s[o],s[o-2],s[o-3]);break;case 13:i.addEntity(s[o-3]),i.addAttributes(s[o-3],s[o-1]);break;case 14:i.addEntity(s[o-2]);break;case 15:i.addEntity(s[o]);break;case 16:case 17:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 21:case 41:case 42:case 33:this.$=s[o].replace(/"/g,"");break;case 22:case 30:this.$=[s[o]];break;case 23:s[o].push(s[o-1]),this.$=s[o];break;case 24:this.$={attributeType:s[o-1],attributeName:s[o]};break;case 25:this.$={attributeType:s[o-2],attributeName:s[o-1],attributeKeyTypeList:s[o]};break;case 26:this.$={attributeType:s[o-2],attributeName:s[o-1],attributeComment:s[o]};break;case 27:this.$={attributeType:s[o-3],attributeName:s[o-2],attributeKeyTypeList:s[o-1],attributeComment:s[o]};break;case 31:s[o-2].push(s[o]),this.$=s[o-2];break;case 34:this.$={cardA:s[o],relType:s[o-1],cardB:s[o-2]};break;case 35:this.$=i.Cardinality.ZERO_OR_ONE;break;case 36:this.$=i.Cardinality.ZERO_OR_MORE;break;case 37:this.$=i.Cardinality.ONE_OR_MORE;break;case 38:this.$=i.Cardinality.ONLY_ONE;break;case 39:this.$=i.Identification.NON_IDENTIFYING;break;case 40:this.$=i.Identification.IDENTIFYING;break;case 44:i.parseDirective("%%{","open_directive");break;case 45:i.parseDirective(s[o],"type_directive");break;case 46:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 47:i.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:n,7:3,12:4,51:i},{1:[3]},e(r,[2,3],{5:6}),{3:7,4:n,7:3,12:4,51:i},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:s,25:a,27:o,29:c,30:l,31:h,51:i},{1:[2,2]},{14:23,15:[1,24],54:u},e([15,54],[2,45]),e(r,[2,8],{1:[2,1]}),e(r,[2,4]),{7:15,10:26,12:4,17:16,23:s,25:a,27:o,29:c,30:l,31:h,51:i},e(r,[2,6]),e(r,[2,7]),e(r,[2,11]),e(r,[2,15],{18:27,42:29,20:[1,28],44:d,45:p,46:f,47:g}),{24:[1,34]},{26:[1,35]},{28:[1,36]},e(r,[2,19]),e(y,[2,20]),e(y,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},e(r,[2,5]),{17:40,30:l,31:h},{21:41,22:[1,42],32:43,33:44,37:m},{43:46,48:[1,47],49:[1,48]},e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(b,[2,38]),e(r,[2,16]),e(r,[2,17]),e(r,[2,18]),e(_,[2,9]),{14:49,54:u},{54:[2,46]},{15:[1,50]},{22:[1,51]},e(r,[2,14]),{21:52,22:[2,22],32:43,33:44,37:m},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:d,45:p,46:f,47:g},e(x,[2,39]),e(x,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},e(r,[2,13]),{22:[2,23]},e(v,[2,24],{35:61,36:62,38:63,40:k,41:w}),e([22,37,40,41],[2,29]),e([30,31],[2,34]),e(_,[2,10]),e(r,[2,12]),e(r,[2,41]),e(r,[2,42]),e(r,[2,43]),e(v,[2,25],{36:66,39:[1,67],41:w}),e(v,[2,26]),e(C,[2,30]),e(v,[2,33]),e(C,[2,32]),e(v,[2,27]),{38:68,40:k},e(C,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},E=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;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.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:case 13:case 15:case 22:case 27:break;case 14:return 11;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 23:return 40;case 24:case 25:return 37;case 26:return 41;case 28:return this.popState(),22;case 29:case 58:return e.yytext[0];case 30:case 34:case 35:case 48:return 44;case 31:case 32:case 33:case 41:case 43:case 50:return 46;case 36:case 37:case 38:case 39:case 40:case 42:case 49:return 45;case 44:case 45:case 46:case 47:return 47;case 51:case 54:case 55:case 56:return 48;case 52:case 53:return 49;case 57:return 30;case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/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,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,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],inclusive:!0}}},t);function S(){this.yy={}}return T.lexer=E,S.prototype=T,T.Parser=S,new S}();ho.parser=ho;const uo=ho,po=t=>null!==t.match(/^\s*erDiagram/);let fo={},go=[];const yo=function(t){return void 0===fo[t]&&(fo[t]={attributes:[]},Ot.info("Added new entity :",t)),fo[t]},mo={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().er,addEntity:yo,addAttributes:function(t,e){let n,i=yo(t);for(n=e.length-1;n>=0;n--)i.attributes.push(e[n]),Ot.debug("Added attribute ",e[n].attributeName)},getEntities:()=>fo,addRelationship:function(t,e,n,i){let r={entityA:t,roleA:e,entityB:n,relSpec:i};go.push(r),Ot.debug("Added new relationship :",r)},getRelationships:()=>go,clear:function(){fo={},go=[],Wi()},setAccTitle:qi,getAccTitle:Hi,setAccDescription:Vi,getAccDescription:Gi,setDiagramTitle:Xi,getDiagramTitle:Qi},bo={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},_o=bo,xo=function(t,e){let n;t.append("defs").append("marker").attr("id",bo.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",bo.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",bo.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),n=t.append("defs").append("marker").attr("id",bo.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",bo.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").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",bo.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),n=t.append("defs").append("marker").attr("id",bo.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),n=t.append("defs").append("marker").attr("id",bo.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),n.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},vo=/[^\dA-Za-z](\W)*/g;let ko={},wo=new Map;const Co=function(t,e,n){let i;return Object.keys(e).forEach((function(r){const s=function(t="",e=""){const n=t.replace(vo,"");return`${Ao(e)}${Ao(n)}${Tt(t,So)}`}(r,"entity");wo.set(r,s);const a=t.append("g").attr("id",s);i=void 0===i?s:i;const o="text-"+s,c=a.append("text").classed("er entityLabel",!0).attr("id",o).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",bi().fontFamily).style("font-size",ko.fontSize+"px").text(r),{width:l,height:h}=((t,e,n)=>{const i=ko.entityPadding/3,r=ko.entityPadding/3,s=.85*ko.fontSize,a=e.node().getBBox(),o=[];let c=!1,l=!1,h=0,u=0,d=0,p=0,f=a.height+2*i,g=1;n.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(c=!0),void 0!==t.attributeComment&&(l=!0)})),n.forEach((n=>{const r=`${e.node().id}-attr-${g}`;let a=0;const y=Wt(n.attributeType),m=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",bi().fontFamily).style("font-size",s+"px").text(y),b=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",bi().fontFamily).style("font-size",s+"px").text(n.attributeName),_={};_.tn=m,_.nn=b;const x=m.node().getBBox(),v=b.node().getBBox();if(h=Math.max(h,x.width),u=Math.max(u,v.width),a=Math.max(x.height,v.height),c){const e=void 0!==n.attributeKeyTypeList?n.attributeKeyTypeList.join(","):"",i=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",bi().fontFamily).style("font-size",s+"px").text(e);_.kn=i;const o=i.node().getBBox();d=Math.max(d,o.width),a=Math.max(a,o.height)}if(l){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${r}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",bi().fontFamily).style("font-size",s+"px").text(n.attributeComment||"");_.cn=e;const i=e.node().getBBox();p=Math.max(p,i.width),a=Math.max(a,i.height)}_.height=a,o.push(_),f+=a+2*i,g+=1}));let y=4;c&&(y+=2),l&&(y+=2);const m=h+u+d+p,b={width:Math.max(ko.minEntityWidth,Math.max(a.width+2*ko.entityPadding,m+r*y)),height:n.length>0?f:Math.max(ko.minEntityHeight,a.height+2*ko.entityPadding)};if(n.length>0){const n=Math.max(0,(b.width-m-r*y)/(y/2));e.attr("transform","translate("+b.width/2+","+(i+a.height/2)+")");let s=a.height+2*i,f="attributeBoxOdd";o.forEach((e=>{const a=s+i+e.height/2;e.tn.attr("transform","translate("+r+","+a+")");const o=t.insert("rect","#"+e.tn.node().id).classed(`er ${f}`,!0).attr("x",0).attr("y",s).attr("width",h+2*r+n).attr("height",e.height+2*i),g=parseFloat(o.attr("x"))+parseFloat(o.attr("width"));e.nn.attr("transform","translate("+(g+r)+","+a+")");const y=t.insert("rect","#"+e.nn.node().id).classed(`er ${f}`,!0).attr("x",g).attr("y",s).attr("width",u+2*r+n).attr("height",e.height+2*i);let m=parseFloat(y.attr("x"))+parseFloat(y.attr("width"));if(c){e.kn.attr("transform","translate("+(m+r)+","+a+")");const o=t.insert("rect","#"+e.kn.node().id).classed(`er ${f}`,!0).attr("x",m).attr("y",s).attr("width",d+2*r+n).attr("height",e.height+2*i);m=parseFloat(o.attr("x"))+parseFloat(o.attr("width"))}l&&(e.cn.attr("transform","translate("+(m+r)+","+a+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${f}`,"true").attr("x",m).attr("y",s).attr("width",p+2*r+n).attr("height",e.height+2*i)),s+=e.height+2*i,f="attributeBoxOdd"===f?"attributeBoxEven":"attributeBoxOdd"}))}else b.height=Math.max(ko.minEntityHeight,f),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b})(a,c,e[r].attributes),u=a.insert("rect","#"+o).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",l).attr("height",h).node().getBBox();n.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),i},To=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")};let Eo=0;const So="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function Ao(t=""){return t.length>0?`${t}-`:""}const Lo={setConf:function(t){const e=Object.keys(t);for(const n of e)ko[n]=t[n]},draw:function(t,e,n,i){ko=bi().er,Ot.info("Drawing ER diagram");const r=bi().securityLevel;let s;"sandbox"===r&&(s=(0,o.Ys)("#i"+e));const a=("sandbox"===r?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body")).select(`[id='${e}']`);let c;xo(a,ko),c=new dt.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:ko.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const l=Co(a,i.db.getEntities(),c),h=function(t,e){return t.forEach((function(t){e.setEdge(wo.get(t.entityA),wo.get(t.entityB),{relationship:t},To(t))})),t}(i.db.getRelationships(),c);var u,d;(0,ut.bK)(c),u=a,(d=c).nodes().forEach((function(t){void 0!==t&&void 0!==d.node(t)&&u.select("#"+t).attr("transform","translate("+(d.node(t).x-d.node(t).width/2)+","+(d.node(t).y-d.node(t).height/2)+" )")})),h.forEach((function(t){!function(t,e,n,i,r){Eo++;const s=n.edge(wo.get(e.entityA),wo.get(e.entityB),To(e)),a=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(o.$0Z),c=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",ko.stroke).style("fill","none");e.relSpec.relType===r.db.Identification.NON_IDENTIFYING&&c.attr("stroke-dasharray","8,8");let l="";switch(ko.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case r.db.Cardinality.ZERO_OR_ONE:c.attr("marker-end","url("+l+"#"+_o.ZERO_OR_ONE_END+")");break;case r.db.Cardinality.ZERO_OR_MORE:c.attr("marker-end","url("+l+"#"+_o.ZERO_OR_MORE_END+")");break;case r.db.Cardinality.ONE_OR_MORE:c.attr("marker-end","url("+l+"#"+_o.ONE_OR_MORE_END+")");break;case r.db.Cardinality.ONLY_ONE:c.attr("marker-end","url("+l+"#"+_o.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case r.db.Cardinality.ZERO_OR_ONE:c.attr("marker-start","url("+l+"#"+_o.ZERO_OR_ONE_START+")");break;case r.db.Cardinality.ZERO_OR_MORE:c.attr("marker-start","url("+l+"#"+_o.ZERO_OR_MORE_START+")");break;case r.db.Cardinality.ONE_OR_MORE:c.attr("marker-start","url("+l+"#"+_o.ONE_OR_MORE_START+")");break;case r.db.Cardinality.ONLY_ONE:c.attr("marker-start","url("+l+"#"+_o.ONLY_ONE_START+")")}const h=c.node().getTotalLength(),u=c.node().getPointAtLength(.5*h),d="rel"+Eo,p=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",bi().fontFamily).style("font-size",ko.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)}(a,t,c,l,i)}));const p=ko.diagramPadding;ai.insertTitle(a,"entityTitleText",ko.titleTopMargin,i.db.getDiagramTitle());const f=a.node().getBBox(),g=f.width+2*p,y=f.height+2*p;Ti(a,y,g,ko.useMaxWidth),a.attr("viewBox",`${f.x-p} ${f.y-p} ${g} ${y}`)}};var Bo=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,9],i=[1,7],r=[1,6],s=[1,8],a=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],o=[2,10],c=[1,20],l=[1,21],h=[1,22],u=[1,23],d=[1,30],p=[1,32],f=[1,33],g=[1,34],y=[1,62],m=[1,48],b=[1,52],_=[1,36],x=[1,37],v=[1,38],k=[1,39],w=[1,40],C=[1,56],T=[1,63],E=[1,51],S=[1,53],A=[1,55],L=[1,59],B=[1,60],N=[1,41],D=[1,42],M=[1,43],I=[1,44],O=[1,61],$=[1,50],F=[1,54],R=[1,57],Z=[1,58],P=[1,49],Y=[1,66],j=[1,71],z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],U=[1,75],W=[1,74],q=[1,76],H=[20,21,23,81,82],V=[1,99],G=[1,104],X=[1,107],Q=[1,108],K=[1,101],J=[1,106],tt=[1,109],et=[1,102],nt=[1,114],it=[1,113],rt=[1,103],st=[1,105],at=[1,110],ot=[1,111],ct=[1,112],lt=[1,115],ht=[20,21,22,23,81,82],ut=[20,21,22,23,53,81,82],dt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],pt=[20,21,23],ft=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],gt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],yt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],mt=[1,149],bt=[1,157],_t=[1,158],xt=[1,159],vt=[1,160],kt=[1,144],wt=[1,145],Ct=[1,141],Tt=[1,152],Et=[1,153],St=[1,154],At=[1,155],Lt=[1,156],Bt=[1,161],Nt=[1,162],Dt=[1,147],Mt=[1,150],It=[1,146],Ot=[1,143],$t=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ft=[1,165],Rt=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Zt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Pt=[12,21,22,24],Yt=[22,106],jt=[1,250],zt=[1,245],Ut=[1,246],Wt=[1,254],qt=[1,251],Ht=[1,248],Vt=[1,247],Gt=[1,249],Xt=[1,252],Qt=[1,253],Kt=[1,255],Jt=[1,273],te=[20,21,23,106],ee=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ne={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 5:i.parseDirective("%%{","open_directive");break;case 6:i.parseDirective(s[o],"type_directive");break;case 7:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 8:i.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:(!Array.isArray(s[o])||s[o].length>0)&&s[o-1].push(s[o]),this.$=s[o-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=s[o];break;case 19:i.setDirection("TB"),this.$="TB";break;case 20:i.setDirection(s[o-1]),this.$=s[o-1];break;case 35:this.$=s[o-1].nodes;break;case 41:this.$=i.addSubGraph(s[o-6],s[o-1],s[o-4]);break;case 42:this.$=i.addSubGraph(s[o-3],s[o-1],s[o-3]);break;case 43:this.$=i.addSubGraph(void 0,s[o-1],void 0);break;case 45:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 46:case 47:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 51:i.addLink(s[o-2].stmt,s[o],s[o-1]),this.$={stmt:s[o],nodes:s[o].concat(s[o-2].nodes)};break;case 52:i.addLink(s[o-3].stmt,s[o-1],s[o-2]),this.$={stmt:s[o-1],nodes:s[o-1].concat(s[o-3].nodes)};break;case 53:this.$={stmt:s[o-1],nodes:s[o-1]};break;case 54:this.$={stmt:s[o],nodes:s[o]};break;case 55:case 123:case 125:this.$=[s[o]];break;case 56:this.$=s[o-4].concat(s[o]);break;case 57:this.$=[s[o-2]],i.setClass(s[o-2],s[o]);break;case 58:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"square");break;case 59:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"doublecircle");break;case 60:this.$=s[o-5],i.addVertex(s[o-5],s[o-2],"circle");break;case 61:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"ellipse");break;case 62:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"stadium");break;case 63:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"subroutine");break;case 64:this.$=s[o-7],i.addVertex(s[o-7],s[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[o-5],s[o-3]]]));break;case 65:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"cylinder");break;case 66:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"round");break;case 67:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"diamond");break;case 68:this.$=s[o-5],i.addVertex(s[o-5],s[o-2],"hexagon");break;case 69:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"odd");break;case 70:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"trapezoid");break;case 71:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"inv_trapezoid");break;case 72:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"lean_right");break;case 73:this.$=s[o-3],i.addVertex(s[o-3],s[o-1],"lean_left");break;case 74:this.$=s[o],i.addVertex(s[o]);break;case 75:s[o-1].text=s[o],this.$=s[o-1];break;case 76:case 77:s[o-2].text=s[o-1],this.$=s[o-2];break;case 79:var c=i.destructLink(s[o],s[o-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:s[o-1]};break;case 80:c=i.destructLink(s[o]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=s[o-1];break;case 83:case 97:case 153:case 151:this.$=s[o-1]+""+s[o];break;case 98:case 99:this.$=s[o-4],i.addClass(s[o-2],s[o]);break;case 100:this.$=s[o-4],i.setClass(s[o-2],s[o]);break;case 101:case 109:this.$=s[o-1],i.setClickEvent(s[o-1],s[o]);break;case 102:case 110:this.$=s[o-3],i.setClickEvent(s[o-3],s[o-2]),i.setTooltip(s[o-3],s[o]);break;case 103:this.$=s[o-2],i.setClickEvent(s[o-2],s[o-1],s[o]);break;case 104:this.$=s[o-4],i.setClickEvent(s[o-4],s[o-3],s[o-2]),i.setTooltip(s[o-4],s[o]);break;case 105:case 111:this.$=s[o-1],i.setLink(s[o-1],s[o]);break;case 106:case 112:this.$=s[o-3],i.setLink(s[o-3],s[o-2]),i.setTooltip(s[o-3],s[o]);break;case 107:case 113:this.$=s[o-3],i.setLink(s[o-3],s[o-2],s[o]);break;case 108:case 114:this.$=s[o-5],i.setLink(s[o-5],s[o-4],s[o]),i.setTooltip(s[o-5],s[o-2]);break;case 115:this.$=s[o-4],i.addVertex(s[o-2],void 0,void 0,s[o]);break;case 116:case 118:this.$=s[o-4],i.updateLink(s[o-2],s[o]);break;case 117:this.$=s[o-4],i.updateLink([s[o-2]],s[o]);break;case 119:this.$=s[o-8],i.updateLinkInterpolate([s[o-6]],s[o-2]),i.updateLink([s[o-6]],s[o]);break;case 120:this.$=s[o-8],i.updateLinkInterpolate(s[o-6],s[o-2]),i.updateLink(s[o-6],s[o]);break;case 121:this.$=s[o-6],i.updateLinkInterpolate([s[o-4]],s[o]);break;case 122:this.$=s[o-6],i.updateLinkInterpolate(s[o-4],s[o]);break;case 124:case 126:s[o-2].push(s[o]),this.$=s[o-2];break;case 128:this.$=s[o-1]+s[o];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:n,16:4,21:i,22:r,24:s},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:n,16:4,21:i,22:r,24:s},e(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:r,24:s},{16:15,21:i,22:r,24:s},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:M,121:I,122:O,123:$,124:F,125:R,126:Z,127:P},{8:64,10:[1,65],15:Y},e([10,15],[2,6]),e(a,[2,17]),e(a,[2,18]),e(a,[2,19]),{20:[1,68],21:[1,69],22:j,27:67,30:70},e(z,[2,11]),e(z,[2,12]),e(z,[2,13]),e(z,[2,14]),e(z,[2,15]),e(z,[2,16]),{9:72,20:U,21:W,23:q,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:U,21:W,23:q},{9:81,20:U,21:W,23:q},{9:82,20:U,21:W,23:q},{9:83,20:U,21:W,23:q},{9:84,20:U,21:W,23:q},{9:86,20:U,21:W,22:[1,85],23:q},e(z,[2,44]),{45:[1,87]},{47:[1,88]},e(z,[2,47]),e(H,[2,54],{30:89,22:j}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:G,66:X,67:Q,84:[1,97],91:K,97:96,98:[1,94],100:[1,95],105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(z,[2,158]),e(z,[2,159]),e(z,[2,160]),e(z,[2,161]),e(ht,[2,55],{53:[1,116]}),e(ut,[2,74],{116:129,40:[1,117],52:y,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:m,67:b,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:C,95:T,105:E,106:S,109:A,111:L,112:B,122:O,123:$,124:F,125:R,126:Z,127:P}),e(dt,[2,150]),e(dt,[2,175]),e(dt,[2,176]),e(dt,[2,177]),e(dt,[2,178]),e(dt,[2,179]),e(dt,[2,180]),e(dt,[2,181]),e(dt,[2,182]),e(dt,[2,183]),e(dt,[2,184]),e(dt,[2,185]),e(dt,[2,186]),e(dt,[2,187]),e(dt,[2,188]),e(dt,[2,189]),e(dt,[2,190]),{9:130,20:U,21:W,23:q},{11:131,14:[1,132]},e(pt,[2,8]),e(a,[2,20]),e(a,[2,26]),e(a,[2,27]),{21:[1,133]},e(ft,[2,34],{30:134,22:j}),e(z,[2,35]),{50:135,51:45,52:y,54:46,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,122:O,123:$,124:F,125:R,126:Z,127:P},e(gt,[2,48]),e(gt,[2,49]),e(gt,[2,50]),e(yt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:mt,24:bt,26:_t,38:xt,39:139,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),e(z,[2,36]),e(z,[2,37]),e(z,[2,38]),e(z,[2,39]),e(z,[2,40]),{22:mt,24:bt,26:_t,38:xt,39:163,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e($t,o,{17:164}),e(z,[2,45]),e(z,[2,46]),e(H,[2,53],{52:Ft}),{26:V,52:G,66:X,67:Q,91:K,97:166,102:[1,167],105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{95:[1,168],103:169,105:[1,170]},{26:V,52:G,66:X,67:Q,91:K,95:[1,171],97:172,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{26:V,52:G,66:X,67:Q,91:K,97:173,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(pt,[2,101],{22:[1,174],99:[1,175]}),e(pt,[2,105],{22:[1,176]}),e(pt,[2,109],{115:100,117:178,22:[1,177],26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:st,124:at,125:ot,126:ct,127:lt}),e(pt,[2,111],{22:[1,179]}),e(Rt,[2,152]),e(Rt,[2,154]),e(Rt,[2,155]),e(Rt,[2,156]),e(Rt,[2,157]),e(Zt,[2,162]),e(Zt,[2,163]),e(Zt,[2,164]),e(Zt,[2,165]),e(Zt,[2,166]),e(Zt,[2,167]),e(Zt,[2,168]),e(Zt,[2,169]),e(Zt,[2,170]),e(Zt,[2,171]),e(Zt,[2,172]),e(Zt,[2,173]),e(Zt,[2,174]),{52:y,54:180,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,122:O,123:$,124:F,125:R,126:Z,127:P},{22:mt,24:bt,26:_t,38:xt,39:181,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:182,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:184,42:vt,52:G,57:[1,183],66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:185,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:186,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:187,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{66:[1,188]},{22:mt,24:bt,26:_t,38:xt,39:189,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:190,42:vt,52:G,66:X,67:Q,71:[1,191],73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:192,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:193,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:194,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(dt,[2,151]),e(Pt,[2,3]),{8:195,15:Y},{15:[2,7]},e(a,[2,28]),e(ft,[2,33]),e(H,[2,51],{30:196,22:j}),e(yt,[2,75],{22:[1,197]}),{22:[1,198]},{22:mt,24:bt,26:_t,38:xt,39:199,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,73:kt,81:wt,82:[1,200],83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(Zt,[2,82]),e(Zt,[2,84]),e(Zt,[2,140]),e(Zt,[2,141]),e(Zt,[2,142]),e(Zt,[2,143]),e(Zt,[2,144]),e(Zt,[2,145]),e(Zt,[2,146]),e(Zt,[2,147]),e(Zt,[2,148]),e(Zt,[2,149]),e(Zt,[2,85]),e(Zt,[2,86]),e(Zt,[2,87]),e(Zt,[2,88]),e(Zt,[2,89]),e(Zt,[2,90]),e(Zt,[2,91]),e(Zt,[2,92]),e(Zt,[2,93]),e(Zt,[2,94]),e(Zt,[2,95]),{9:203,20:U,21:W,22:mt,23:q,24:bt,26:_t,38:xt,40:[1,202],42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,204],43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:M,121:I,122:O,123:$,124:F,125:R,126:Z,127:P},{22:j,30:205},{22:[1,206],26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,115:100,117:178,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},e(Yt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,115:100,117:178,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:[1,213],26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,115:100,117:178,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{84:[1,214]},e(pt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},e(Rt,[2,153]),{84:[1,219],101:[1,220]},e(ht,[2,57],{116:129,52:y,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,122:O,123:$,124:F,125:R,126:Z,127:P}),{22:mt,24:bt,26:_t,38:xt,41:[1,221],42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,56:[1,222],66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:223,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,58:[1,224],66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,60:[1,225],66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,62:[1,226],66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,64:[1,227],66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{67:[1,228]},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,70:[1,229],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,72:[1,230],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,39:231,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,41:[1,232],42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,73:kt,75:[1,233],77:[1,234],81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,73:kt,75:[1,236],77:[1,235],81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{9:237,20:U,21:W,23:q},e(H,[2,52],{52:Ft}),e(yt,[2,77]),e(yt,[2,76]),{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,68:[1,238],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(yt,[2,79]),e(Zt,[2,83]),{22:mt,24:bt,26:_t,38:xt,39:239,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e($t,o,{17:240}),e(z,[2,43]),{51:241,52:y,54:46,66:m,67:b,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,122:O,123:$,124:F,125:R,126:Z,127:P},{22:jt,66:zt,67:Ut,86:Wt,96:242,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{22:jt,66:zt,67:Ut,86:Wt,96:256,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{22:jt,66:zt,67:Ut,86:Wt,96:257,102:qt,104:[1,258],105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{22:jt,66:zt,67:Ut,86:Wt,96:259,102:qt,104:[1,260],105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{105:[1,261]},{22:jt,66:zt,67:Ut,86:Wt,96:262,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{22:jt,66:zt,67:Ut,86:Wt,96:263,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{26:V,52:G,66:X,67:Q,91:K,97:264,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(pt,[2,102]),{84:[1,265]},e(pt,[2,106],{22:[1,266]}),e(pt,[2,107]),e(pt,[2,110]),e(pt,[2,112],{22:[1,267]}),e(pt,[2,113]),e(ut,[2,58]),e(ut,[2,59]),{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,58:[1,268],66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(ut,[2,66]),e(ut,[2,61]),e(ut,[2,62]),e(ut,[2,63]),{66:[1,269]},e(ut,[2,65]),e(ut,[2,67]),{22:mt,24:bt,26:_t,38:xt,42:vt,52:G,66:X,67:Q,72:[1,270],73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(ut,[2,69]),e(ut,[2,70]),e(ut,[2,72]),e(ut,[2,71]),e(ut,[2,73]),e(Pt,[2,4]),e([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:mt,24:bt,26:_t,38:xt,41:[1,271],42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,272],43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:M,121:I,122:O,123:$,124:F,125:R,126:Z,127:P},e(ht,[2,56]),e(pt,[2,115],{106:Jt}),e(te,[2,125],{108:274,22:jt,66:zt,67:Ut,86:Wt,102:qt,105:Ht,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt}),e(ee,[2,127]),e(ee,[2,129]),e(ee,[2,130]),e(ee,[2,131]),e(ee,[2,132]),e(ee,[2,133]),e(ee,[2,134]),e(ee,[2,135]),e(ee,[2,136]),e(ee,[2,137]),e(ee,[2,138]),e(ee,[2,139]),e(pt,[2,116],{106:Jt}),e(pt,[2,117],{106:Jt}),{22:[1,275]},e(pt,[2,118],{106:Jt}),{22:[1,276]},e(Yt,[2,124]),e(pt,[2,98],{106:Jt}),e(pt,[2,99],{106:Jt}),e(pt,[2,100],{115:100,117:178,26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:st,124:at,125:ot,126:ct,127:lt}),e(pt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:U,21:W,23:q},e(z,[2,42]),{22:jt,66:zt,67:Ut,86:Wt,102:qt,105:Ht,107:283,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},e(ee,[2,128]),{26:V,52:G,66:X,67:Q,91:K,97:284,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{26:V,52:G,66:X,67:Q,91:K,97:285,105:J,106:tt,109:et,111:nt,112:it,115:100,117:98,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(pt,[2,108]),e(pt,[2,114]),e(ut,[2,60]),{22:mt,24:bt,26:_t,38:xt,39:286,42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:140,84:Ct,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},e(ut,[2,68]),e($t,o,{17:287}),e(te,[2,126],{108:274,22:jt,66:zt,67:Ut,86:Wt,102:qt,105:Ht,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt}),e(pt,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:st,124:at,125:ot,126:ct,127:lt}),e(pt,[2,122],{115:100,117:178,22:[1,289],26:V,52:G,66:X,67:Q,91:K,105:J,106:tt,109:et,111:nt,112:it,122:rt,123:st,124:at,125:ot,126:ct,127:lt}),{22:mt,24:bt,26:_t,38:xt,41:[1,290],42:vt,52:G,66:X,67:Q,73:kt,81:wt,83:201,85:151,86:Tt,87:Et,88:St,89:At,90:Lt,91:Bt,92:Nt,94:142,95:Dt,105:J,106:tt,109:Mt,111:nt,112:it,113:It,114:Ot,115:148,122:rt,123:st,124:at,125:ot,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,291],43:31,44:p,46:f,48:g,50:35,51:45,52:y,54:46,66:m,67:b,86:_,87:x,88:v,89:k,90:w,91:C,95:T,105:E,106:S,109:A,111:L,112:B,116:47,118:N,119:D,120:M,121:I,122:O,123:$,124:F,125:R,126:Z,127:P},{22:jt,66:zt,67:Ut,86:Wt,96:292,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},{22:jt,66:zt,67:Ut,86:Wt,96:293,102:qt,105:Ht,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Qt,113:Kt},e(ut,[2,64]),e(z,[2,41]),e(pt,[2,119],{106:Jt}),e(pt,[2,120],{106:Jt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},ie=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:case 41:case 42:case 43:return 101;case 44:return this.popState(),25;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:case 68:case 69:return 82;case 70:case 71:case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\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]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\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:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,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,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,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}},t);function re(){this.yy={}}return ne.lexer=ie,re.prototype=ne,ne.Parser=re,new re}();Bo.parser=Bo;const No=Bo,Do=(t,e)=>{var n,i;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer)&&("elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&null!==t.match(/^\s*graph/))},Mo=(t,e)=>{var n,i;return"dagre-d3"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer)&&("elk"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&(null!==t.match(/^\s*graph/)||null!==t.match(/^\s*flowchart/)))};let Io,Oo,$o=0,Fo=bi(),Ro={},Zo=[],Po={},Yo=[],jo={},zo={},Uo=0,Wo=!0,qo=[];const Ho=t=>qt.sanitizeText(t,Fo),Vo=function(t,e,n){Tp.parseDirective(this,t,e,n)},Go=function(t){const e=Object.keys(Ro);for(const n of e)if(Ro[n].id===t)return Ro[n].domId;return t},Xo=function(t,e,n,i,r,s,a={}){let o,c=t;void 0!==c&&0!==c.trim().length&&(void 0===Ro[c]&&(Ro[c]={id:c,domId:"flowchart-"+c+"-"+$o,styles:[],classes:[]}),$o++,void 0!==e?(Fo=bi(),o=Ho(e.trim()),'"'===o[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),Ro[c].text=o):void 0===Ro[c].text&&(Ro[c].text=t),void 0!==n&&(Ro[c].type=n),null!=i&&i.forEach((function(t){Ro[c].styles.push(t)})),null!=r&&r.forEach((function(t){Ro[c].classes.push(t)})),void 0!==s&&(Ro[c].dir=s),void 0===Ro[c].props?Ro[c].props=a:void 0!==a&&Object.assign(Ro[c].props,a))},Qo=function(t,e,n,i){const r={start:t,end:e,type:void 0,text:""};void 0!==(i=n.text)&&(r.text=Ho(i.trim()),'"'===r.text[0]&&'"'===r.text[r.text.length-1]&&(r.text=r.text.substring(1,r.text.length-1))),void 0!==n&&(r.type=n.type,r.stroke=n.stroke,r.length=n.length),Zo.push(r)},Ko=function(t,e,n,i){let r,s;for(r=0;r/)&&(Io="LR"),Io.match(/.*v/)&&(Io="TB"),"TD"===Io&&(Io="TB")},ic=function(t,e){t.split(",").forEach((function(t){let n=t;void 0!==Ro[n]&&Ro[n].classes.push(e),void 0!==jo[n]&&jo[n].classes.push(e)}))},rc=function(t,e,n){t.split(",").forEach((function(t){void 0!==Ro[t]&&(Ro[t].link=ai.formatUrl(e,Fo),Ro[t].linkTarget=n)})),ic(t,"clickable")},sc=function(t){return zo[t]},ac=function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){let i=Go(t);if("loose"!==bi().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0);(0,o.Ys)(this).classed("hover",!1)}))};qo.push(dc);const pc=function(t="gen-1"){Ro={},Po={},Zo=[],qo=[dc],Yo=[],jo={},Uo=0,zo=[],Wo=!0,Oo=t,Wi()},fc=t=>{Oo=t||"gen-2"},gc=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},yc=function(t,e,n){let i=t.trim(),r=n;t===n&&n.match(/\s/)&&(i=void 0);let s=[];const{nodeList:a,dir:o}=function(t){const e={boolean:{},number:{},string:{}},n=[];let i;return{nodeList:t.filter((function(t){const r=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!n.includes(t)&&n.push(t))})),dir:i}}(s.concat.apply(s,e));if(s=a,"gen-1"===Oo)for(let l=0;l2e3)return;if(_c[bc]=e,Yo[e].id===t)return{result:!0,count:0};let i=0,r=1;for(;i=0){const n=xc(t,e);if(n.result)return{result:!0,count:r+n.count};r+=n.count}i+=1}return{result:!1,count:r}},vc=function(t){return _c[t]},kc=function(){bc=-1,Yo.length>0&&xc("none",Yo.length-1)},wc=function(){return Yo},Cc=()=>!!Wo&&(Wo=!1,!0),Tc=(t,e)=>{const n=(t=>{const e=t.trim();let n=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross","x"===e[0]&&(i="double_"+i,n=n.slice(1));break;case">":i="arrow_point","<"===e[0]&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle","o"===e[0]&&(i="double_"+i,n=n.slice(1))}let r="normal",s=n.length-1;"="===n[0]&&(r="thick");let a=((t,e)=>{const n=e.length;let i=0;for(let r=0;r{let e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:n,stroke:i}})(e),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=n.length,i}return n},Ec=(t,e)=>{let n=!1;return t.forEach((t=>{t.nodes.indexOf(e)>=0&&(n=!0)})),n},Sc=(t,e)=>{const n=[];return t.nodes.forEach(((i,r)=>{Ec(e,i)||n.push(t.nodes[r])})),{nodes:n}},Ac={firstGraph:Cc},Lc={parseDirective:Vo,defaultConfig:()=>ci.flowchart,setAccTitle:qi,getAccTitle:Hi,getAccDescription:Gi,setAccDescription:Vi,addVertex:Xo,lookUpDomId:Go,addLink:Ko,updateLinkInterpolate:Jo,updateLink:tc,addClass:ec,setDirection:nc,setClass:ic,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(zo["gen-1"===Oo?Go(t):t]=Ho(e))}))},getTooltip:sc,setClickEvent:ac,setLink:rc,bindFunctions:oc,getDirection:cc,getVertices:lc,getEdges:hc,getClasses:uc,clear:pc,setGen:fc,defaultStyle:gc,addSubGraph:yc,getDepthFirstPos:vc,indexNodes:kc,getSubGraphs:wc,destructLink:Tc,lex:Ac,exists:Ec,makeUniq:Sc,setDiagramTitle:Xi,getDiagramTitle:Qi},Bc=Object.freeze(Object.defineProperty({__proto__:null,addClass:ec,addLink:Ko,addSingleLink:Qo,addSubGraph:yc,addVertex:Xo,bindFunctions:oc,clear:pc,default:Lc,defaultStyle:gc,destructLink:Tc,firstGraph:Cc,getClasses:uc,getDepthFirstPos:vc,getDirection:cc,getEdges:hc,getSubGraphs:wc,getTooltip:sc,getVertices:lc,indexNodes:kc,lex:Ac,lookUpDomId:Go,parseDirective:Vo,setClass:ic,setClickEvent:ac,setDirection:nc,setGen:fc,setLink:rc,updateLink:tc,updateLinkInterpolate:Jo},Symbol.toStringTag,{value:"Module"}));const Nc={},Dc=function(t){const e=Object.keys(t);for(const n of e)Nc[n]=t[n]},Mc={},Ic=function(t,e,n,i,r,s){const a=i.select(`[id="${n}"]`);Object.keys(t).forEach((function(n){const i=t[n];let o="default";i.classes.length>0&&(o=i.classes.join(" "));const c=Wn(i.styles);let l,h=void 0!==i.text?i.text:i.id;if(Ut(bi().flowchart.htmlLabels)){const t={label:h.replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``))};l=(0,Et.a)(a,t).node(),l.parentNode.removeChild(l)}else{const t=r.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",c.labelStyle.replace("color:","fill:"));const e=h.split(qt.lineBreakRegex);for(const n of e){const e=r.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","1"),e.textContent=n,t.appendChild(e)}l=t}let u=0,d="";switch(i.type){case"round":u=5,d="rect";break;case"square":case"group":default:d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"odd":case"odd_right":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"doublecircle":d="doublecircle"}e.setNode(i.id,{labelStyle:c.labelStyle,shape:d,labelText:h,rx:u,ry:u,class:o,style:c.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:s.db.getTooltip(i.id)||"",domId:s.db.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,dir:i.dir,type:i.type,props:i.props,padding:bi().flowchart.padding}),Ot.info("setNode",{labelStyle:c.labelStyle,shape:d,labelText:h,rx:u,ry:u,class:o,style:c.style,id:i.id,domId:s.db.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,dir:i.dir,props:i.props,padding:bi().flowchart.padding})}))},Oc=function(t,e,n){Ot.info("abc78 edges = ",t);let i,r,s=0,a={};if(void 0!==t.defaultStyle){const e=Wn(t.defaultStyle);i=e.style,r=e.labelStyle}t.forEach((function(n){s++;var c="L-"+n.start+"-"+n.end;void 0===a[c]?(a[c]=0,Ot.info("abc78 new entry",c,a[c])):(a[c]++,Ot.info("abc78 new entry",c,a[c]));let l=c+"-"+a[c];Ot.info("abc78 new link id to be used is",c,l,a[c]);var h="LS-"+n.start,u="LE-"+n.end;const d={style:"",labelStyle:""};switch(d.minlen=n.length||1,"arrow_open"===n.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}let p="",f="";switch(n.stroke){case"normal":p="fill:none;",void 0!==i&&(p=i),void 0!==r&&(f=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==n.style){const t=Wn(n.style);p=t.style,f=t.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=f,void 0!==n.interpolate?d.curve=zn(n.interpolate,o.c_6):void 0!==t.defaultInterpolate?d.curve=zn(t.defaultInterpolate,o.c_6):d.curve=zn(Mc.curve,o.c_6),void 0===n.text?void 0!==n.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=n.text.replace(qt.lineBreakRegex,"\n"),void 0===n.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=l,d.classes="flowchart-link "+h+" "+u,e.setEdge(n.start,n.end,d,s)}))},$c={setConf:function(t){const e=Object.keys(t);for(const n of e)Mc[n]=t[n]},addVertices:Ic,addEdges:Oc,getClasses:function(t,e){Ot.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(n){return}},draw:function(t,e,n,i){Ot.info("Drawing flowchart"),i.db.clear(),Lc.setGen("gen-2"),i.parser.parse(t);let r=i.db.getDirection();void 0===r&&(r="TD");const{securityLevel:s,flowchart:a}=bi(),c=a.nodeSpacing||50,l=a.rankSpacing||50;let h;"sandbox"===s&&(h=(0,o.Ys)("#i"+e));const u="sandbox"===s?(0,o.Ys)(h.nodes()[0].contentDocument.body):(0,o.Ys)("body"),d="sandbox"===s?h.nodes()[0].contentDocument:document,p=new dt.k({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:c,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let f;const g=i.db.getSubGraphs();Ot.info("Subgraphs - ",g);for(let o=g.length-1;o>=0;o--)f=g[o],Ot.info("Subgraph - ",f),i.db.addVertex(f.id,f.title,"group",void 0,f.classes,f.dir);const y=i.db.getVertices(),m=i.db.getEdges();Ot.info("Edges",m);let b=0;for(b=g.length-1;b>=0;b--){f=g[b],(0,o.td_)("cluster").append("text");for(let t=0;t2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},w=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 38;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 27:return 37;case 28:this.begin("click");break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?:%[^\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,/^(?:\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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}},t);function C(){this.yy={}}return k.lexer=w,C.prototype=k,k.Parser=C,new C}();Fc.parser=Fc;const Rc=Fc,Zc=t=>null!==t.match(/^\s*gantt/);s().extend(At()),s().extend(Bt()),s().extend(Dt());let Pc,Yc="",jc="",zc="",Uc=[],Wc=[],qc={},Hc=[],Vc=[],Gc="";const Xc=["active","done","crit","milestone"];let Qc=[],Kc=!1,Jc=!1,tl=0;const el=function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&n.includes("weekends"))||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))},nl=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let r,a;r=t.startTime instanceof Date?s()(t.startTime):s()(t.startTime,e,!0),r=r.add(1,"d"),a=t.endTime instanceof Date?s()(t.endTime):s()(t.endTime,e,!0);const[o,c]=il(r,a,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},il=function(t,e,n,i,r){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=el(t,n,i,r),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},rl=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==i){let t=null;if(i[1].split(" ").forEach((function(e){let n=pl(e);void 0!==n&&(t?n.endTime>t.endTime&&(t=n):t=n)})),t)return t.endTime;{const t=new Date;return t.setHours(0,0,0,0),t}}let r=s()(n,e.trim(),!0);if(r.isValid())return r.toDate();{Ot.debug("Invalid date:"+n),Ot.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime()))throw new Error("Invalid date:"+n);return t}},sl=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},al=function(t,e,n,i=!1){n=n.trim();let r=s()(n,e.trim(),!0);if(r.isValid())return i&&(r=r.add(1,"d")),r.toDate();let a=s()(t);const[o,c]=sl(n);if(!Number.isNaN(o)){const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()};let ol=0;const cl=function(t){return void 0===t?(ol+=1,"task"+ol):t};let ll,hl,ul=[];const dl={},pl=function(t){const e=dl[t];return ul[e]},fl=function(){const t=function(t){const e=ul[t];let n="";switch(ul[t].raw.startTime.type){case"prevTaskEnd":{const t=pl(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=rl(0,Yc,ul[t].raw.startTime.startData),n&&(ul[t].startTime=n)}return ul[t].startTime&&(ul[t].endTime=al(ul[t].startTime,Yc,ul[t].raw.endTime.data,Kc),ul[t].endTime&&(ul[t].processed=!0,ul[t].manualEndTime=s()(ul[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),nl(ul[t],Yc,Wc,Uc))),ul[t].processed};let e=!0;for(const[n,i]of ul.entries())t(n),e=e&&i.processed;return e},gl=function(t,e){t.split(",").forEach((function(t){let n=pl(t);void 0!==n&&n.classes.push(e)}))},yl=function(t,e){Qc.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))},ml={parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().gantt,clear:function(){Hc=[],Vc=[],Gc="",Qc=[],ol=0,ll=void 0,hl=void 0,ul=[],Yc="",jc="",Pc=void 0,zc="",Uc=[],Wc=[],Kc=!1,Jc=!1,tl=0,qc={},Wi()},setDateFormat:function(t){Yc=t},getDateFormat:function(){return Yc},enableInclusiveEndDates:function(){Kc=!0},endDatesAreInclusive:function(){return Kc},enableTopAxis:function(){Jc=!0},topAxisEnabled:function(){return Jc},setAxisFormat:function(t){jc=t},getAxisFormat:function(){return jc},setTickInterval:function(t){Pc=t},getTickInterval:function(){return Pc},setTodayMarker:function(t){zc=t},getTodayMarker:function(){return zc},setAccTitle:qi,getAccTitle:Hi,setDiagramTitle:Xi,getDiagramTitle:Qi,setAccDescription:Vi,getAccDescription:Gi,addSection:function(t){Gc=t,Hc.push(t)},getSections:function(){return Hc},getTasks:function(){let t=fl();let e=0;for(;!t&&e<10;)t=fl(),e++;return Vc=ul,Vc},addTask:function(t,e){const n={section:Gc,type:Gc,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),r={};bl(i,r,Xc);for(let s=0;s{ai.runFunc(e,...i)}))}(t,e,n)})),gl(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==bi().securityLevel&&(n=(0,a.N)(e)),t.split(",").forEach((function(t){void 0!==pl(t)&&(yl(t,(()=>{window.open(n,"_self")})),qc[t]=n)})),gl(t,"clickable")},getLinks:function(){return qc},bindFunctions:function(t){Qc.forEach((function(e){e(t)}))},parseDuration:sl,isInvalidDate:el};function bl(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const r=new RegExp("^\\s*"+n+"\\s*$");t[0].match(r)&&(e[n]=!0,t.shift(1),i=!0)}))}let _l;const xl={setConf:function(){Ot.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const r=bi().gantt,a=bi().securityLevel;let c;"sandbox"===a&&(c=(0,o.Ys)("#i"+e));const l="sandbox"===a?(0,o.Ys)(c.nodes()[0].contentDocument.body):(0,o.Ys)("body"),h="sandbox"===a?c.nodes()[0].contentDocument:document,u=h.getElementById(e);_l=u.parentElement.offsetWidth,void 0===_l&&(_l=1200),void 0!==r.useWidth&&(_l=r.useWidth);const d=i.db.getTasks(),p=d.length*(r.barHeight+r.barGap)+2*r.topPadding;u.setAttribute("viewBox","0 0 "+_l+" "+p);const f=l.select(`[id="${e}"]`),g=(0,o.Xf)().domain([(0,o.VV$)(d,(function(t){return t.startTime})),(0,o.Fp7)(d,(function(t){return t.endTime}))]).rangeRound([0,_l-r.leftPadding-r.rightPadding]);let y=[];for(const s of d)y.push(s.type);const m=y;function b(t,e){return function(t){let e=t.length;const n={};for(;e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(e)[t]||0}y=function(t){const e={},n=[];for(let i=0,r=t.length;ii?r=1:nt?Math.min(t,e):e),0),d=c.reduce(((t,{endTime:e})=>t?Math.max(t,e):e),0),p=i.db.getDateFormat();if(!u||!d)return;const y=[];let m=null,b=s()(u);for(;b.valueOf()<=d;)i.db.isInvalidDate(b,p,l,h)?m?m.end=b:m={start:b,end:b}:m&&(y.push(m),m=null),b=b.add(1,"d");f.append("g").selectAll("rect").data(y).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",o-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*o).toString()+"px"})).attr("class","exclude-range")})(l,u,d,0,a,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,s){let a=(0,o.LLu)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,o.i$Z)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const c=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==c){const t=c[1];switch(c[2]){case"minute":a.ticks(o.Z_i.every(t));break;case"hour":a.ticks(o.WQD.every(t));break;case"day":a.ticks(o.rr1.every(t));break;case"week":a.ticks(o.NGh.every(t));break;case"month":a.ticks(o.F0B.every(t))}}if(f.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,o.F5q)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,o.i$Z)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==c){const t=c[1];switch(c[2]){case"minute":n.ticks(o.Z_i.every(t));break;case"hour":n.ticks(o.WQD.every(t));break;case"day":n.ticks(o.rr1.every(t));break;case"week":n.ticks(o.NGh.every(t));break;case"month":n.ticks(o.F0B.every(t))}}f.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(d,u,0,a),function(t,n,s,a,c,l,h){f.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+s-2})).attr("width",(function(){return h-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const u=f.append("g").selectAll("rect").data(t).enter(),d=i.db.getLinks();u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))-.5*c:g(t.startTime)+a})).attr("y",(function(t,e){return t.order*n+s})).attr("width",(function(t){return t.milestone?c:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+s+.5*c).toString()+"px"})).attr("class",(function(t){const e="task";let n="";t.classes.length>0&&(n=t.classes.join(" "));let i=0;for(const[a,o]of y.entries())t.type===o&&(i=a%r.numberSectionStyles);let s="";return t.active?t.crit?s+=" activeCrit":s=" active":t.done?s=t.crit?" doneCrit":" done":t.crit&&(s+=" crit"),0===s.length&&(s=" task"),t.milestone&&(s=" milestone "+s),s+=i,s+=" "+n,e+s})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>h?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+s})).attr("text-height",c).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[c,l]of y.entries())t.type===l&&(a=c%r.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>h?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i}));if("sandbox"===bi().securityLevel){let t;t=(0,o.Ys)("#i"+e);const n=t.nodes()[0].contentDocument;u.filter((function(t){return void 0!==d[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const r=e.parentNode;var s=n.createElement("a");s.setAttribute("xlink:href",d[t.id]),s.setAttribute("target","_top"),r.appendChild(s),s.appendChild(e),s.appendChild(i)}))}}(t,l,u,d,c,0,n),function(t,e){const n=[];let i=0;for(const[r,s]of y.entries())n[r]=[s,b(s,m)];f.append("g").selectAll("text").data(n).enter().append((function(t){const e=t[0].split(qt.lineBreakRegex),n=-(e.length-1)/2,i=h.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[r,s]of e.entries()){const t=h.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),r>0&&t.setAttribute("dy","1em"),t.textContent=s,i.appendChild(t)}return i})).attr("x",10).attr("y",(function(r,s){if(!(s>0))return r[1]*t/2+e;for(let a=0;a2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},r=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}},t);function s(){this.yy={}}return i.lexer=r,s.prototype=i,i.Parser=s,new s}();vl.parser=vl;const kl=vl;var wl="",Cl=!1;const Tl={setMessage:t=>{Ot.debug("Setting message to: "+t),wl=t},getMessage:()=>wl,setInfo:t=>{Cl=t},getInfo:()=>Cl,clear:Wi},El={draw:(t,e,n)=>{try{Ot.debug("Rendering info diagram\n"+t);const i=bi().securityLevel;let r;"sandbox"===i&&(r=(0,o.Ys)("#i"+e));const s=("sandbox"===i?(0,o.Ys)(r.nodes()[0].contentDocument.body):(0,o.Ys)("body")).select("#"+e);s.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),s.attr("height",100),s.attr("width",400)}catch(i){Ot.error("Error while rendering info diagram"),Ot.error(i.message)}}},Sl=t=>null!==t.match(/^\s*info/);var Al=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,4],i=[1,5],r=[1,6],s=[1,7],a=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],c=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],u=[2,8],d=[1,18],p=[1,19],f=[1,20],g=[1,21],y=[1,22],m=[1,23],b=[1,28],_=[6,26,27,28,29],x={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 4:i.setShowData(!0);break;case 7:this.$=s[o-1];break;case 9:i.addSection(s[o-1],i.cleanupValue(s[o]));break;case 10:this.$=s[o].trim(),i.setDiagramTitle(this.$);break;case 11:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 12:case 13:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 14:i.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 21:i.parseDirective("%%{","open_directive");break;case 22:i.parseDirective(s[o],"type_directive");break;case 23:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 24:i.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:n,21:8,26:i,27:r,28:s,29:a},{1:[3]},{3:10,4:2,5:3,6:n,21:8,26:i,27:r,28:s,29:a},{3:11,4:2,5:3,6:n,21:8,26:i,27:r,28:s,29:a},e(o,c,{7:12,8:[1,13]}),e(l,[2,18]),e(l,[2,19]),e(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},e(h,u,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:p,15:f,17:g,19:y,20:m,29:a}),e(o,c,{7:25}),{23:26,24:[1,27],32:b},e([24,32],[2,22]),e(o,[2,6]),{4:29,26:i,27:r,28:s},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},e(h,[2,13]),e(h,[2,14]),e(h,[2,15]),e(h,u,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:p,15:f,17:g,19:y,20:m,29:a}),e(_,[2,16]),{25:34,31:[1,35]},e(_,[2,24]),e(o,[2,7]),e(h,[2,9]),e(h,[2,10]),e(h,[2,11]),e(h,[2,12]),{23:36,32:b},{32:[2,23]},e(_,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},v=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/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,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}},t);function k(){this.yy={}}return x.lexer=v,k.prototype=x,x.Parser=k,new k}();Al.parser=Al;const Ll=Al,Bl=t=>null!==t.match(/^\s*pie/)||null!==t.match(/^\s*bar/);let Nl={},Dl=!1;const Ml={parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().pie,addSection:function(t,e){t=qt.sanitizeText(t,bi()),void 0===Nl[t]&&(Nl[t]=e,Ot.debug("Added new section :",t))},getSections:()=>Nl,cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Nl={},Dl=!1,Wi()},setAccTitle:qi,getAccTitle:Hi,setDiagramTitle:Xi,getDiagramTitle:Qi,setShowData:function(t){Dl=t},getShowData:function(){return Dl},getAccDescription:Gi,setAccDescription:Vi};let Il,Ol=bi();const $l=450,Fl={draw:(t,e,n,i)=>{try{Ol=bi(),Ot.debug("Rendering info diagram\n"+t);const n=bi().securityLevel;let y;"sandbox"===n&&(y=(0,o.Ys)("#i"+e));const m="sandbox"===n?(0,o.Ys)(y.nodes()[0].contentDocument.body):(0,o.Ys)("body"),b="sandbox"===n?y.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),Ot.debug("Parsed info diagram");const _=b.getElementById(e);Il=_.parentElement.offsetWidth,void 0===Il&&(Il=1200),void 0!==Ol.useWidth&&(Il=Ol.useWidth),void 0!==Ol.pie.useWidth&&(Il=Ol.pie.useWidth);const x=m.select("#"+e);Ti(x,$l,Il,Ol.pie.useMaxWidth),_.setAttribute("viewBox","0 0 "+Il+" "+$l);var r=18,s=Math.min(Il,$l)/2-40,a=x.append("g").attr("transform","translate("+Il/2+",225)"),c=i.db.getSections(),l=0;Object.keys(c).forEach((function(t){l+=c[t]}));const v=Ol.themeVariables;var h=[v.pie1,v.pie2,v.pie3,v.pie4,v.pie5,v.pie6,v.pie7,v.pie8,v.pie9,v.pie10,v.pie11,v.pie12],u=(0,o.PKp)().range(h),d=Object.entries(c).map((function(t,e){return{order:e,name:t[0],value:t[1]}})),p=(0,o.ve8)().value((function(t){return t.value})).sort((function(t,e){return t.order-e.order}))(d),f=(0,o.Nb1)().innerRadius(0).outerRadius(s);a.selectAll("mySlices").data(p).enter().append("path").attr("d",f).attr("fill",(function(t){return u(t.data.name)})).attr("class","pieCircle"),a.selectAll("mySlices").data(p).enter().append("text").text((function(t){return(t.data.value/l*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+f.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),a.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var g=a.selectAll(".legend").data(u.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*u.domain().length/2)+")"}));g.append("rect").attr("width",r).attr("height",r).style("fill",u).style("stroke",u),g.data(p).append("text").attr("x",22).attr("y",14).text((function(t){return i.db.getShowData()||Ol.showData||Ol.pie.showData?t.data.name+" ["+t.data.value+"]":t.data.name}))}catch(y){Ot.error("Error while rendering info diagram"),Ot.error(y)}}};var Rl=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,3],i=[1,5],r=[1,6],s=[1,7],a=[1,8],o=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],c=[1,22],l=[2,13],h=[1,26],u=[1,27],d=[1,28],p=[1,29],f=[1,30],g=[1,31],y=[1,24],m=[1,32],b=[1,33],_=[1,36],x=[71,72],v=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],k=[1,56],w=[1,57],C=[1,58],T=[1,59],E=[1,60],S=[1,61],A=[1,62],L=[62,63],B=[1,74],N=[1,70],D=[1,71],M=[1,72],I=[1,73],O=[1,75],$=[1,79],F=[1,80],R=[1,77],Z=[1,78],P=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",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",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 6:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 7:case 8:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 9:i.parseDirective("%%{","open_directive");break;case 10:i.parseDirective(s[o],"type_directive");break;case 11:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 12:i.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:i.addRequirement(s[o-3],s[o-4]);break;case 20:i.setNewReqId(s[o-2]);break;case 21:i.setNewReqText(s[o-2]);break;case 22:i.setNewReqRisk(s[o-2]);break;case 23:i.setNewReqVerifyMethod(s[o-2]);break;case 26:this.$=i.RequirementType.REQUIREMENT;break;case 27:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=i.RiskLevel.LOW_RISK;break;case 33:this.$=i.RiskLevel.MED_RISK;break;case 34:this.$=i.RiskLevel.HIGH_RISK;break;case 35:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=i.VerifyType.VERIFY_TEST;break;case 39:i.addElement(s[o-3]);break;case 40:i.setNewElementType(s[o-2]);break;case 41:i.setNewElementDocRef(s[o-2]);break;case 44:i.addRelationship(s[o-2],s[o],s[o-4]);break;case 45:i.addRelationship(s[o-2],s[o-4],s[o]);break;case 46:this.$=i.Relationships.CONTAINS;break;case 47:this.$=i.Relationships.COPIES;break;case 48:this.$=i.Relationships.DERIVES;break;case 49:this.$=i.Relationships.SATISFIES;break;case 50:this.$=i.Relationships.VERIFIES;break;case 51:this.$=i.Relationships.REFINES;break;case 52:this.$=i.Relationships.TRACES}},table:[{3:1,4:2,6:n,9:4,14:i,16:r,18:s,19:a},{1:[3]},{3:10,4:2,5:[1,9],6:n,9:4,14:i,16:r,18:s,19:a},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(o,[2,8]),{20:[2,9]},{3:16,4:2,6:n,9:4,14:i,16:r,18:s,19:a},{1:[2,2]},{4:21,5:c,7:17,8:l,9:4,14:i,16:r,18:s,19:a,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{11:34,12:[1,35],22:_},e([12,22],[2,10]),e(o,[2,6]),e(o,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:c,7:38,8:l,9:4,14:i,16:r,18:s,19:a,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:39,8:l,9:4,14:i,16:r,18:s,19:a,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:40,8:l,9:4,14:i,16:r,18:s,19:a,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:41,8:l,9:4,14:i,16:r,18:s,19:a,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{4:21,5:c,7:42,8:l,9:4,14:i,16:r,18:s,19:a,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:p,44:f,45:g,53:y,71:m,72:b},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(x,[2,26]),e(x,[2,27]),e(x,[2,28]),e(x,[2,29]),e(x,[2,30]),e(x,[2,31]),e(v,[2,55]),e(v,[2,56]),e(o,[2,4]),{13:51,21:[1,52]},e(o,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:k,65:w,66:C,67:T,68:E,69:S,70:A},{61:63,64:k,65:w,66:C,67:T,68:E,69:S,70:A},{11:64,22:_},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(L,[2,46]),e(L,[2,47]),e(L,[2,48]),e(L,[2,49]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),{63:[1,68]},e(o,[2,5]),{5:B,29:69,30:N,33:D,35:M,37:I,39:O},{5:$,39:F,55:76,56:R,58:Z},{32:81,71:m,72:b},{32:82,71:m,72:b},e(P,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:B,29:87,30:N,33:D,35:M,37:I,39:O},e(P,[2,25]),e(P,[2,39]),{31:[1,88]},{31:[1,89]},{5:$,39:F,55:90,56:R,58:Z},e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),{32:91,71:m,72:b},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(P,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(P,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:B,29:116,30:N,33:D,35:M,37:I,39:O},{5:B,29:117,30:N,33:D,35:M,37:I,39:O},{5:B,29:118,30:N,33:D,35:M,37:I,39:O},{5:B,29:119,30:N,33:D,35:M,37:I,39:O},{5:$,39:F,55:120,56:R,58:Z},{5:$,39:F,55:121,56:R,58:Z},e(P,[2,20]),e(P,[2,21]),e(P,[2,22]),e(P,[2,23]),e(P,[2,40]),e(P,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},j=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/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,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,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,55],inclusive:!0}}},t);function z(){this.yy={}}return Y.lexer=j,z.prototype=Y,Y.Parser=z,new z}();Rl.parser=Rl;const Zl=Rl,Pl=t=>null!==t.match(/^\s*requirement(Diagram)?/);let Yl=[],jl={},zl={},Ul={},Wl={};const ql={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().req,addRequirement:(t,e)=>(void 0===zl[t]&&(zl[t]={name:t,type:e,id:jl.id,text:jl.text,risk:jl.risk,verifyMethod:jl.verifyMethod}),jl={},zl[t]),getRequirements:()=>zl,setNewReqId:t=>{void 0!==jl&&(jl.id=t)},setNewReqText:t=>{void 0!==jl&&(jl.text=t)},setNewReqRisk:t=>{void 0!==jl&&(jl.risk=t)},setNewReqVerifyMethod:t=>{void 0!==jl&&(jl.verifyMethod=t)},setAccTitle:qi,getAccTitle:Hi,setAccDescription:Vi,getAccDescription:Gi,addElement:t=>(void 0===Wl[t]&&(Wl[t]={name:t,type:Ul.type,docRef:Ul.docRef},Ot.info("Added new requirement: ",t)),Ul={},Wl[t]),getElements:()=>Wl,setNewElementType:t=>{void 0!==Ul&&(Ul.type=t)},setNewElementDocRef:t=>{void 0!==Ul&&(Ul.docRef=t)},addRelationship:(t,e,n)=>{Yl.push({type:t,src:e,dst:n})},getRelationships:()=>Yl,clear:()=>{Yl=[],jl={},zl={},Ul={},Wl={},Wi()}},Hl={CONTAINS:"contains",ARROW:"arrow"},Vl=Hl,Gl=(t,e)=>{let n=t.append("defs").append("marker").attr("id",Hl.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Hl.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${e.line_height},${e.line_height/2}\n M${e.line_height},${e.line_height/2}\n L0,${e.line_height}`).attr("stroke-width",1)};let Xl={},Ql=0;const Kl=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Xl.rect_min_width+"px").attr("height",Xl.rect_min_height+"px"),Jl=(t,e,n)=>{let i=Xl.rect_min_width/2,r=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",Xl.rect_padding).attr("dominant-baseline","hanging"),s=0;n.forEach((t=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",Xl.rect_min_width/2).attr("dy",0).text(t):r.append("tspan").attr("text-anchor","middle").attr("x",Xl.rect_min_width/2).attr("dy",.75*Xl.line_height).text(t),s++}));let a=1.5*Xl.rect_padding+s*Xl.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Xl.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}},th=(t,e,n,i)=>{let r=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Xl.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),s=0;let a=[];return n.forEach((t=>{let e=t.length;for(;e>30&&s<3;){let n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,a[a.length]=n,s++}if(3==s){let t=a[a.length-1];a[a.length-1]=t.substring(0,t.length-4)+"..."}else a[a.length]=t;s=0})),a.forEach((t=>{r.append("tspan").attr("x",Xl.rect_padding).attr("dy",Xl.line_height).text(t)})),r},eh=function(t,e,n,i,r){const s=n.edge(nh(e.src),nh(e.dst)),a=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})),c=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==r.db.Relationships.CONTAINS?c.attr("marker-start","url("+qt.getUrl(Xl.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(c.attr("stroke-dasharray","10,7"),c.attr("marker-end","url("+qt.getUrl(Xl.arrowMarkerAbsolute)+"#"+Vl.ARROW+"_line_ending)")),((t,e,n,i)=>{const r=e.node().getTotalLength(),s=e.node().getPointAtLength(.5*r),a="rel"+Ql;Ql++;const o=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-o.width/2).attr("y",s.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")})(t,c,0,`<<${e.type}>>`)},nh=t=>t.replace(/\s/g,"").replace(/\./g,"_"),ih={draw:(t,e,n,i)=>{Xl=bi().requirement,i.db.clear(),i.parser.parse(t);const r=Xl.securityLevel;let s;"sandbox"===r&&(s=(0,o.Ys)("#i"+e));const a=("sandbox"===r?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body")).select(`[id='${e}']`);Gl(a,Xl);const c=new dt.k({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Xl.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let l=i.db.getRequirements(),h=i.db.getElements(),u=i.db.getRelationships();var d,p,f;d=l,p=c,f=a,Object.keys(d).forEach((t=>{let e=d[t];t=nh(t),Ot.info("Added new requirement: ",t);const n=f.append("g").attr("id",t),i=Kl(n,"req-"+t);let r=Jl(n,t+"_title",[`<<${e.type}>>`,`${e.name}`]);th(n,t+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],r.y);const s=i.node().getBBox();p.setNode(t,{width:s.width,height:s.height,shape:"rect",id:t})})),((t,e,n)=>{Object.keys(t).forEach((i=>{let r=t[i];const s=nh(i),a=n.append("g").attr("id",s),o="element-"+s,c=Kl(a,o);let l=Jl(a,o+"_title",["<>",`${i}`]);th(a,o+"_body",[`Type: ${r.type||"Not Specified"}`,`Doc Ref: ${r.docRef||"None"}`],l.y);const h=c.node().getBBox();e.setNode(s,{width:h.width,height:h.height,shape:"rect",id:s})}))})(h,c,a),((t,e)=>{t.forEach((function(t){let n=nh(t.src),i=nh(t.dst);e.setEdge(n,i,{relationship:t})}))})(u,c),(0,ut.bK)(c),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(a,c),u.forEach((function(t){eh(a,t,c,e,i)}));const g=Xl.rect_padding,y=a.node().getBBox(),m=y.width+2*g,b=y.height+2*g;Ti(a,b,m,Xl.useMaxWidth),a.attr("viewBox",`${y.x-g} ${y.y-g} ${m} ${b}`)}};var rh=function(){var t,e=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},n=[1,2],i=[1,3],r=[1,5],s=[1,7],a=[2,5],o=[1,15],c=[1,17],l=[1,19],h=[1,21],u=[1,22],d=[1,23],p=[1,29],f=[1,30],g=[1,31],y=[1,32],m=[1,33],b=[1,34],_=[1,35],x=[1,36],v=[1,37],k=[1,38],w=[1,39],C=[1,40],T=[1,42],E=[1,43],S=[1,45],A=[1,46],L=[1,47],B=[1,48],N=[1,49],D=[1,50],M=[1,53],I=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],O=[4,5,21,54,56],$=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],F=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],R=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],Z=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],P=[71,72,73],Y=[1,125],j=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],z={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,n,i,r,s,a){var o=s.length-1;switch(r){case 4:return i.apply(s[o]),s[o];case 5:case 10:case 9:case 14:this.$=[];break;case 6:case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 7:case 8:case 12:case 13:case 63:this.$=s[o];break;case 18:s[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(s[o-2])}),s[o-1].push({type:"boxEnd",boxText:s[o-2]}),this.$=s[o-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:s[o-1]};break;case 25:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:s[o-1]};break;case 31:i.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 32:i.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 33:this.$=s[o].trim(),i.setAccTitle(this.$);break;case 34:case 35:this.$=s[o].trim(),i.setAccDescription(this.$);break;case 36:s[o-1].unshift({type:"loopStart",loopText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 37:s[o-1].unshift({type:"rectStart",color:i.parseMessage(s[o-2]),signalType:i.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:i.parseMessage(s[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"optStart",optText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"altStart",altText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=s[o-1];break;case 40:s[o-1].unshift({type:"parStart",parText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=s[o-1];break;case 41:s[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 42:s[o-1].unshift({type:"breakStart",breakText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:i.parseMessage(s[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 45:this.$=s[o-3].concat([{type:"option",optionText:i.parseMessage(s[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 47:this.$=s[o-3].concat([{type:"and",parText:i.parseMessage(s[o-1]),signalType:i.LINETYPE.PAR_AND},s[o]]);break;case 49:this.$=s[o-3].concat([{type:"else",altText:i.parseMessage(s[o-1]),signalType:i.LINETYPE.ALT_ELSE},s[o]]);break;case 50:s[o-3].type="addParticipant",s[o-3].description=i.parseMessage(s[o-1]),this.$=s[o-3];break;case 51:s[o-1].type="addParticipant",this.$=s[o-1];break;case 52:s[o-3].type="addActor",s[o-3].description=i.parseMessage(s[o-1]),this.$=s[o-3];break;case 53:s[o-1].type="addActor",this.$=s[o-1];break;case 54:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 55:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 56:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 57:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 58:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 59:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 62:this.$=[s[o-2],s[o]];break;case 64:this.$=i.PLACEMENT.LEFTOF;break;case 65:this.$=i.PLACEMENT.RIGHTOF;break;case 66:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:s[o-1]}];break;case 67:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:s[o-4]}];break;case 68:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 69:this.$={type:"addParticipant",actor:s[o]};break;case 70:this.$=i.LINETYPE.SOLID_OPEN;break;case 71:this.$=i.LINETYPE.DOTTED_OPEN;break;case 72:this.$=i.LINETYPE.SOLID;break;case 73:this.$=i.LINETYPE.DOTTED;break;case 74:this.$=i.LINETYPE.SOLID_CROSS;break;case 75:this.$=i.LINETYPE.DOTTED_CROSS;break;case 76:this.$=i.LINETYPE.SOLID_POINT;break;case 77:this.$=i.LINETYPE.DOTTED_POINT;break;case 78:this.$=i.parseMessage(s[o].trim().substring(1));break;case 79:i.parseDirective("%%{","open_directive");break;case 80:i.parseDirective(s[o],"type_directive");break;case 81:s[o]=s[o].trim().replace(/'/g,'"'),i.parseDirective(s[o],"arg_directive");break;case 82:i.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:n,5:i,6:4,7:r,14:6,83:s},{1:[3]},{3:8,4:n,5:i,6:4,7:r,14:6,83:s},{3:9,4:n,5:i,6:4,7:r,14:6,83:s},{3:10,4:n,5:i,6:4,7:r,14:6,83:s},e([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],a,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{16:51,17:[1,52],86:M},e([17,86],[2,80]),e(I,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},e(I,[2,8]),e(I,[2,9]),e(I,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:D},{27:61,73:D},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},e(I,[2,31]),e(I,[2,32]),{37:[1,67]},{39:[1,68]},e(I,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},e(I,[2,43]),{27:76,73:D},{27:77,73:D},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:D},{27:92,73:D},{27:93,73:D},{27:94,73:D},e([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},e(I,[2,7]),e(O,[2,10],{11:98}),e(I,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},e(I,[2,23]),{5:[1,102]},{5:[1,103]},e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,30]),e(I,[2,33]),e(I,[2,34]),e($,a,{8:104}),e($,a,{8:105}),e($,a,{8:106}),e(F,a,{45:107,8:108}),e(R,a,{47:109,8:110}),e(Z,a,{49:111,8:112}),e($,a,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:D},e(P,[2,70]),e(P,[2,71]),e(P,[2,72]),e(P,[2,73]),e(P,[2,74]),e(P,[2,75]),e(P,[2,76]),e(P,[2,77]),{27:121,73:D},{27:123,61:122,73:D},{73:[2,64]},{73:[2,65]},{59:124,82:Y},{59:126,82:Y},{59:127,82:Y},{59:128,82:Y},e(j,[2,15]),{16:129,86:M},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:T,56:E},{5:[1,135]},e(I,[2,21]),e(I,[2,22]),e(I,[2,24]),e(I,[2,25]),{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,136],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,137],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,138],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{21:[1,139]},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,48],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,53:[1,140],54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{21:[1,141]},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,46],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,52:[1,142],54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{21:[1,143]},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,44],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,51:[1,144],54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{4:o,5:c,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,145],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:p,35:f,36:g,38:y,40:m,41:b,42:_,43:x,44:v,46:k,48:w,50:C,54:T,56:E,57:S,62:A,63:L,64:B,65:N,73:D,83:s},{20:[1,146]},e(I,[2,51]),{20:[1,147]},e(I,[2,53]),{27:148,73:D},{27:149,73:D},{59:150,82:Y},{59:151,82:Y},{59:152,82:Y},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},e(I,[2,18]),e(O,[2,11]),{13:155,54:T,56:E},e(O,[2,13]),e(O,[2,14]),e(I,[2,20]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),e(I,[2,39]),{20:[1,156]},e(I,[2,40]),{20:[1,157]},e(I,[2,41]),{20:[1,158]},e(I,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:Y},{59:162,82:Y},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:D},e(j,[2,16]),e(O,[2,12]),e(F,a,{8:108,45:164}),e(R,a,{8:110,47:165}),e(Z,a,{8:112,49:166}),e(I,[2,50]),e(I,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],r=[null],s=[],a=this.table,o="",c=0,l=0,h=1,u=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;s.push(g);var y=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||h)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,_,x,v,k,w,C,T,E={};;){if(_=n[n.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==b&&(b=m()),x=a[_]&&a[_][b]),void 0===x||!x.length||!x[0]){var S="";for(k in T=[],a[_])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},U=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:case 53:case 66:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 54:return e.yytext=e.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\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,/^(?: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,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}},t);function W(){this.yy={}}return z.lexer=U,W.prototype=z,z.Parser=W,new W}();rh.parser=rh;const sh=rh,ah=t=>null!==t.match(/^\s*sequenceDiagram/);let oh,ch,lh,hh={},uh=[],dh=[],ph=!1;const fh=function(t,e,n,i){let r=lh;const s=hh[t];if(s){if(lh&&s.box&&lh!==s.box)throw new Error("A same participant should only be defined in one Box: "+s.name+" can't be in '"+s.box.name+"' and in '"+lh.name+"' at the same time.");if(r=s.box?s.box:lh,s.box=r,s&&e===s.name&&null==n)return}null!=n&&null!=n.text||(n={text:e,wrap:null,type:i}),null!=i&&null!=n.text||(n={text:e,wrap:null,type:i}),hh[t]={box:r,name:e,description:n.text,wrap:void 0===n.wrap&&mh()||!!n.wrap,prevActor:oh,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},oh&&hh[oh]&&(hh[oh].nextActor=t),lh&&lh.actorKeys.push(t),oh=t},gh=function(t,e,n={text:void 0,wrap:void 0},i){if(i===bh.ACTIVE_END){const e=(t=>{let e,n=0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return dh.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&mh()||!!n.wrap,type:i}),!0},yh=function(t){return hh[t]},mh=()=>void 0!==ch?ch:bi().sequence.wrap,bh={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},_h=function(t,e,n){n.text,void 0===n.wrap&&mh()||n.wrap;const i=[].concat(t,t);dh.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&mh()||!!n.wrap,type:bh.NOTE,placement:e})},xh=function(t,e){const n=yh(t);try{let t=Pt(e.text,bi());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"=");vh(n,JSON.parse(t))}catch(i){Ot.error("error while parsing actor link text",i)}};function vh(t,e){if(null==t.links)t.links=e;else for(let n in e)t.links[n]=e[n]}const kh=function(t,e){const n=yh(t);try{let t=Pt(e.text,bi());wh(n,JSON.parse(t))}catch(i){Ot.error("error while parsing actor properties text",i)}};function wh(t,e){if(null==t.properties)t.properties=e;else for(let n in e)t.properties[n]=e[n]}const Ch=function(t,e){const n=yh(t),i=document.getElementById(e.text);try{const t=i.innerHTML,e=JSON.parse(t);e.properties&&wh(n,e.properties),e.links&&vh(n,e.links)}catch(r){Ot.error("error while parsing actor details text",r)}},Th=function(t){if(Array.isArray(t))t.forEach((function(t){Th(t)}));else switch(t.type){case"sequenceIndex":dh.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":fh(t.actor,t.actor,t.description,"participant");break;case"addActor":fh(t.actor,t.actor,t.description,"actor");break;case"activeStart":case"activeEnd":gh(t.actor,void 0,void 0,t.signalType);break;case"addNote":_h(t.actor,t.placement,t.text);break;case"addLinks":xh(t.actor,t.text);break;case"addALink":!function(t,e){const n=yh(t);try{const t={};let a=Pt(e.text,bi());var i=a.indexOf("@");a=a.replace(/&/g,"&"),a=a.replace(/=/g,"=");var r=a.slice(0,i-1).trim(),s=a.slice(i+1).trim();t[r]=s,vh(n,t)}catch(a){Ot.error("error while parsing actor link text",a)}}(t.actor,t.text);break;case"addProperties":kh(t.actor,t.text);break;case"addDetails":Ch(t.actor,t.text);break;case"addMessage":gh(t.from,t.to,t.msg,t.signalType);break;case"boxStart":e=t.boxData,uh.push({name:e.text,wrap:void 0===e.wrap&&mh()||!!e.wrap,fill:e.color,actorKeys:[]}),lh=uh.slice(-1)[0];break;case"boxEnd":lh=void 0;break;case"loopStart":gh(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":gh(void 0,void 0,void 0,t.signalType);break;case"rectStart":gh(void 0,void 0,t.color,t.signalType);break;case"optStart":gh(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":gh(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":qi(t.text);break;case"parStart":case"and":gh(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":gh(void 0,void 0,t.criticalText,t.signalType);break;case"option":gh(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":gh(void 0,void 0,t.breakText,t.signalType)}var e},Eh={addActor:fh,addMessage:function(t,e,n,i){dh.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&mh()||!!n.wrap,answer:i})},addSignal:gh,addLinks:xh,addDetails:Ch,addProperties:kh,autoWrap:mh,setWrap:function(t){ch=t},enableSequenceNumbers:function(){ph=!0},disableSequenceNumbers:function(){ph=!1},showSequenceNumbers:()=>ph,getMessages:function(){return dh},getActors:function(){return hh},getActor:yh,getActorKeys:function(){return Object.keys(hh)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getAccTitle:Hi,getBoxes:function(){return uh},getDiagramTitle:Qi,setDiagramTitle:Xi,parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().sequence,clear:function(){hh={},uh=[],dh=[],ph=!1,Wi()},parseMessage:function(t){const e=t.trim(),n={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^:?wrap:/)||null===e.match(/^:?nowrap:/)&&void 0};return Ot.debug("parseMessage:",n),n},parseBoxData:function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let n=null!=e&&e[1]?e[1].trim():"transparent",i=null!=e&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",n)||(n="transparent",i=t.trim());else{const e=(new Option).style;e.color=n,e.color!==n&&(n="transparent",i=t.trim())}return{color:n,text:void 0!==i?Pt(i.replace(/^:?(?:no)?wrap:/,""),bi()):void 0,wrap:void 0!==i?null!==i.match(/^:?wrap:/)||null===i.match(/^:?nowrap:/)&&void 0:void 0}},LINETYPE:bh,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:_h,setAccTitle:qi,apply:Th,setAccDescription:Vi,getAccDescription:Gi,hasAtLeastOneBox:function(){return uh.length>0},hasAtLeastOneBoxWithTitle:function(){return uh.some((t=>t.name))}};let Sh=[];const Ah=()=>{Sh.forEach((t=>{t()})),Sh=[]},Lh=function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Bh=(t,e)=>{var n;n=()=>{const n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){Mh("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){Ih("actor"+e+"_popup")})))},Sh.push(n)},Nh=function(t,e,n,i){const r=t.append("image");r.attr("x",e),r.attr("y",n);var s=(0,a.N)(i);r.attr("xlink:href",s)},Dh=function(t,e,n,i){const r=t.append("use");r.attr("x",e),r.attr("y",n);var s=(0,a.N)(i);r.attr("xlink:href","#"+s)},Mh=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},Ih=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},Oh=function(t,e){let n=0,i=0;const r=e.text.split(qt.lineBreakRegex),[s,a]=si(e.fontSize);let o=[],c=0,l=()=>e.y;if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":l=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":l=()=>Math.round(e.y+(n+i+e.textMargin)/2);break;case"bottom":case"end":l=()=>Math.round(e.y+(n+i+2*e.textMargin)-e.textMargin)}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(let[h,u]of r.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==s&&(c=h*s);const r=t.append("text");if(r.attr("x",e.x),r.attr("y",l()),void 0!==e.anchor&&r.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&r.style("font-family",e.fontFamily),void 0!==a&&r.style("font-size",a),void 0!==e.fontWeight&&r.style("font-weight",e.fontWeight),void 0!==e.fill&&r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class),void 0!==e.dy?r.attr("dy",e.dy):0!==c&&r.attr("dy",c),e.tspan){const t=r.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(u)}else r.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(i+=(r._groups||r)[0][0].getBBox().height,n=i),o.push(r)}return o},$h=function(t,e){const n=t.append("polygon");var i,r,s,a,o;return n.attr("points",(i=e.x,r=e.y,s=e.width,a=e.height,i+","+r+" "+(i+s)+","+r+" "+(i+s)+","+(r+a-(o=7))+" "+(i+s-1.2*o)+","+(r+a)+" "+i+","+(r+a))),n.attr("class","labelBox"),e.y=e.y+e.height/2,Oh(t,e),n};let Fh=-1;const Rh=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},Zh=function(t,e){Lh(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},Ph=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}},Yh=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},jh=function(){function t(t,e,n,r,s,a,o){i(e.append("text").attr("x",n+s/2).attr("y",r+a/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,s,a,o,c){const{actorFontSize:l,actorFontFamily:h,actorFontWeight:u}=c,[d,p]=si(l),f=t.split(qt.lineBreakRegex);for(let g=0;gn?c.width:n;const p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+u),p.attr("x",c.x),p.attr("y",c.height),p.attr("fill",c.fill),p.attr("stroke",c.stroke),p.attr("width",d),p.attr("height",c.height),p.attr("rx",c.rx),p.attr("ry",c.ry),null!=s){var f=20;for(let t in s){var g=h.append("a"),y=(0,a.N)(s[t]);g.attr("xlink:href",y),g.attr("target","_blank"),zh(i)(t,g,c.x+10,c.height+f,d,20,{class:"actor"},i),f+=30}}return p.attr("height",f),{height:c.height+f,width:d}},drawImage:Nh,drawEmbeddedImage:Dh,anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,i,r){const s=Yh(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+r%3,s.width=e.stopx-e.startx,s.height=n-e.starty,Lh(a,s)},drawLoop:function(t,e,n,i){const{boxMargin:r,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:c,messageFontSize:l,messageFontWeight:h}=i,u=t.append("g"),d=function(t,e,n,i){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",i).attr("class","loopLine")};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")}));let p=Ph();p.text=n,p.x=e.startx,p.y=e.starty,p.fontFamily=c,p.fontSize=l,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=a||20,p.textMargin=s,p.class="labelText",$h(u,p),p=Ph(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+r+s,p.anchor="middle",p.valign="middle",p.textMargin=s,p.class="loopText",p.fontFamily=c,p.fontSize=l,p.fontWeight=h,p.wrap=!0;let f=Oh(u,p);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){p.text=t.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[n].y+r+s,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=c,p.fontSize=l,p.fontWeight=h,p.wrap=e.wrap,f=Oh(u,p);let i=Math.round(f.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[n].height+=i-(r+s)}})),e.height=Math.round(e.stopy-e.starty),u},drawBackgroundRect:Zh,insertArrowHead: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")},insertArrowFilledHead: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")},insertSequenceNumber: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)},insertArrowCrossHead:function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",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")},insertDatabaseIcon: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")},insertComputerIcon: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")},insertClockIcon: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")},getTextObj:Ph,getNoteRect:Yh,popupMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},popdownMenu:function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},fixLifeLineHeights:Rh,sanitizeUrl:a.N};let Wh={};const qh={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight: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)))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init: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,Kh(bi())},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,i){const r=this;let s=0;function a(a){return function(o){s++;const c=r.sequenceItems.length-s+1;r.updateVal(o,"starty",e-c*Wh.boxMargin,Math.min),r.updateVal(o,"stopy",i+c*Wh.boxMargin,Math.max),r.updateVal(qh.data,"startx",t-c*Wh.boxMargin,Math.min),r.updateVal(qh.data,"stopx",n+c*Wh.boxMargin,Math.max),"activation"!==a&&(r.updateVal(o,"startx",t-c*Wh.boxMargin,Math.min),r.updateVal(o,"stopx",n+c*Wh.boxMargin,Math.max),r.updateVal(qh.data,"starty",e-c*Wh.boxMargin,Math.min),r.updateVal(qh.data,"stopy",i+c*Wh.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,n,i){const r=Math.min(t,n),s=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(qh.data,"startx",r,Math.min),this.updateVal(qh.data,"starty",a,Math.min),this.updateVal(qh.data,"stopx",s,Math.max),this.updateVal(qh.data,"stopy",o,Math.max),this.updateBounds(r,a,s,o)},newActivation:function(t,e,n){const i=n[t.from.actor],r=Jh(t.from.actor).length||0,s=i.x+i.width/2+(r-1)*Wh.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+Wh.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Uh.anchorElement(e)})},endActivation:function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop: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}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:qh.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Hh=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Vh=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Gh=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});const Xh=function(t,e,n,i,r,s,a){if(!0===r.hideUnusedParticipants){const t=new Set;s.forEach((e=>{t.add(e.from),t.add(e.to)})),n=n.filter((e=>t.has(e)))}let o,c=0,l=0,h=0;for(const u of n){const n=e[u],r=n.box;o&&o!=r&&(a||qh.models.addBox(o),l+=Wh.boxMargin+o.margin),r&&r!=o&&(a||(r.x=c+l,r.y=i),l+=r.margin),n.width=n.width||Wh.width,n.height=Math.max(n.height||Wh.height,Wh.height),n.margin=n.margin||Wh.actorMargin,n.x=c+l,n.y=qh.getVerticalPos();const s=Uh.drawActor(t,n,Wh,a);h=Math.max(h,s),qh.insert(n.x,i,n.x+n.width,n.height),c+=n.width+l,n.box&&(n.box.width=c+r.margin-n.box.x),l=n.margin,o=n.box,qh.models.addActor(n)}o&&!a&&qh.models.addBox(o),qh.bumpVerticalPos(h)},Qh=function(t,e,n,i){let r=0,s=0;for(const a of n){const n=e[a],o=nu(n),c=Uh.drawPopup(t,n,o,Wh,Wh.forceMenus,i);c.height>r&&(r=c.height),c.width+n.x>s&&(s=c.width+n.x)}return{maxHeight:r,maxWidth:s}},Kh=function(t){Rn(Wh,t),t.fontFamily&&(Wh.actorFontFamily=Wh.noteFontFamily=Wh.messageFontFamily=t.fontFamily),t.fontSize&&(Wh.actorFontSize=Wh.noteFontSize=Wh.messageFontSize=t.fontSize),t.fontWeight&&(Wh.actorFontWeight=Wh.noteFontWeight=Wh.messageFontWeight=t.fontWeight)},Jh=function(t){return qh.activations.filter((function(e){return e.actor===t}))},tu=function(t,e){const n=e[t],i=Jh(t);return[i.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),i.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function eu(t,e,n,i,r){qh.bumpVerticalPos(n);let s=i;if(e.id&&e.message&&t[e.id]){const n=t[e.id].width,r=Hh(Wh);e.message=ai.wrapLabel(`[${e.message}]`,n-2*Wh.wrapPadding,r),e.width=n,e.wrap=!0;const a=ai.calculateTextDimensions(e.message,r),o=Math.max(a.height,Wh.labelBoxHeight);s=i+o,Ot.debug(`${o} - ${e.message}`)}r(e),qh.bumpVerticalPos(s)}const nu=function(t){let e=0;const n=Gh(Wh);for(const i in t.links){const t=ai.calculateTextDimensions(i,n).width+2*Wh.wrapPadding+2*Wh.boxMargin;et.actor)).lastIndexOf(t.from.actor);delete qh.activations.splice(e,1)[0]}}void 0!==t.placement?(o=function(t,e,n){const i=e[t.from].x,r=e[t.to].x,s=t.wrap&&t.message;let a=ai.calculateTextDimensions(s?ai.wrapLabel(t.message,Wh.width,Vh(Wh)):t.message,Vh(Wh));const o={width:s?Wh.width:Math.max(Wh.width,a.width+2*Wh.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===n.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(Wh.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Wh.noteMargin),o.startx=i+(e[t.from].width+Wh.actorMargin)/2):t.placement===n.db.PLACEMENT.LEFTOF?(o.width=s?Math.max(Wh.width,a.width+2*Wh.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Wh.noteMargin),o.startx=i-o.width+(e[t.from].width-Wh.actorMargin)/2):t.to===t.from?(a=ai.calculateTextDimensions(s?ai.wrapLabel(t.message,Math.max(Wh.width,e[t.from].width),Vh(Wh)):t.message,Vh(Wh)),o.width=s?Math.max(Wh.width,e[t.from].width):Math.max(e[t.from].width,Wh.width,a.width+2*Wh.noteMargin),o.startx=i+(e[t.from].width-o.width)/2):(o.width=Math.abs(i+e[t.from].width/2-(r+e[t.to].width/2))+Wh.actorMargin,o.startx=i{a=t,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-Wh.labelBoxWidth}))):(c=function(t,e,n){let i=!1;if([n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const r=tu(t.from,e),s=tu(t.to,e),a=r[0]<=s[0]?1:0,o=r[0]0&&s.forEach((n=>{if(a=n,c.startx===c.stopx){const n=e[t.from],i=e[t.to];a.from=Math.min(n.x-c.width/2,n.x-n.width/2,a.from),a.to=Math.max(i.x+c.width/2,i.x+n.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-Wh.labelBoxWidth}else a.from=Math.min(c.startx,a.from),a.to=Math.max(c.stopx,a.to),a.width=Math.max(a.width,c.width)-Wh.labelBoxWidth})))})),qh.activations=[],Ot.debug("Loop type widths:",r),r},ru={bounds:qh,drawActors:Xh,drawActorsPopup:Qh,setConf:Kh,draw:function(t,e,n,i){const{securityLevel:r,sequence:s}=bi();let a;Wh=s,i.db.clear(),i.parser.parse(t),"sandbox"===r&&(a=(0,o.Ys)("#i"+e));const c="sandbox"===r?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body"),l="sandbox"===r?a.nodes()[0].contentDocument:document;qh.init(),Ot.debug(i.db);const h="sandbox"===r?c.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`),u=i.db.getActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),f=i.db.getMessages(),g=i.db.getDiagramTitle(),y=i.db.hasAtLeastOneBox(),m=i.db.hasAtLeastOneBoxWithTitle(),b=function(t,e,n){const i={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){const r=t[e.to];if(e.placement===n.db.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===n.db.PLACEMENT.RIGHTOF&&!r.nextActor)return;const s=void 0!==e.placement,a=!s,o=s?Vh(Wh):Hh(Wh),c=e.wrap?ai.wrapLabel(e.message,Wh.width-2*Wh.wrapPadding,o):e.message,l=ai.calculateTextDimensions(c,o).width+2*Wh.wrapPadding;a&&e.from===r.nextActor?i[e.to]=Math.max(i[e.to]||0,l):a&&e.from===r.prevActor?i[e.from]=Math.max(i[e.from]||0,l):a&&e.from===e.to?(i[e.from]=Math.max(i[e.from]||0,l/2),i[e.to]=Math.max(i[e.to]||0,l/2)):e.placement===n.db.PLACEMENT.RIGHTOF?i[e.from]=Math.max(i[e.from]||0,l):e.placement===n.db.PLACEMENT.LEFTOF?i[r.prevActor]=Math.max(i[r.prevActor]||0,l):e.placement===n.db.PLACEMENT.OVER&&(r.prevActor&&(i[r.prevActor]=Math.max(i[r.prevActor]||0,l/2)),r.nextActor&&(i[e.from]=Math.max(i[e.from]||0,l/2)))}})),Ot.debug("maxMessageWidthPerActor:",i),i}(u,f,i);Wh.height=function(t,e,n){let i=0;Object.keys(t).forEach((e=>{const n=t[e];n.wrap&&(n.description=ai.wrapLabel(n.description,Wh.width-2*Wh.wrapPadding,Gh(Wh)));const r=ai.calculateTextDimensions(n.description,Gh(Wh));n.width=n.wrap?Wh.width:Math.max(Wh.width,r.width+2*Wh.wrapPadding),n.height=n.wrap?Math.max(r.height,Wh.height):Wh.height,i=Math.max(i,n.height)}));for(const s in e){const n=t[s];if(!n)continue;const i=t[n.nextActor];if(!i){const t=e[s]+Wh.actorMargin-n.width/2;n.margin=Math.max(t,Wh.actorMargin);continue}const r=e[s]+Wh.actorMargin-n.width/2-i.width/2;n.margin=Math.max(r,Wh.actorMargin)}let r=0;return n.forEach((e=>{const n=Hh(Wh);let i=e.actorKeys.reduce(((e,n)=>e+(t[n].width+(t[n].margin||0))),0);i-=2*Wh.boxTextMargin,e.wrap&&(e.name=ai.wrapLabel(e.name,i-2*Wh.wrapPadding,n));const s=ai.calculateTextDimensions(e.name,n);r=Math.max(s.height,r);const a=Math.max(i,s.width+2*Wh.wrapPadding);if(e.margin=Wh.boxTextMargin,it.textMaxHeight=r)),Math.max(i,Wh.height)}(u,b,d),Uh.insertComputerIcon(h),Uh.insertDatabaseIcon(h),Uh.insertClockIcon(h),y&&(qh.bumpVerticalPos(Wh.boxMargin),m&&qh.bumpVerticalPos(d[0].textMaxHeight)),Xh(h,u,p,0,Wh,f,!1);const _=iu(f,u,b,i);Uh.insertArrowHead(h),Uh.insertArrowCrossHead(h),Uh.insertArrowFilledHead(h),Uh.insertSequenceNumber(h);let x=1,v=1;const k=[];f.forEach((function(t){let e,n,r;switch(t.type){case i.db.LINETYPE.NOTE:n=t.noteModel,function(t,e){qh.bumpVerticalPos(Wh.boxMargin),e.height=Wh.boxMargin,e.starty=qh.getVerticalPos();const n=Uh.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||Wh.width,n.class="note";const i=t.append("g"),r=Uh.drawRect(i,n),s=Uh.getTextObj();s.x=e.startx,s.y=e.starty,s.width=n.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=Wh.noteFontFamily,s.fontSize=Wh.noteFontSize,s.fontWeight=Wh.noteFontWeight,s.anchor=Wh.noteAlign,s.textMargin=Wh.noteMargin,s.valign="center";const a=Oh(i,s),o=Math.round(a.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));r.attr("height",o+2*Wh.noteMargin),e.height+=o+2*Wh.noteMargin,qh.bumpVerticalPos(o+2*Wh.noteMargin),e.stopy=e.starty+o+2*Wh.noteMargin,e.stopx=e.startx+n.width,qh.insert(e.startx,e.starty,e.stopx,e.stopy),qh.models.addNote(e)}(h,n);break;case i.db.LINETYPE.ACTIVE_START:qh.newActivation(t,h,u);break;case i.db.LINETYPE.ACTIVE_END:!function(t,e){const n=qh.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),Uh.drawActivation(h,n,e,Wh,Jh(t.from.actor).length),qh.insert(n.startx,e-10,n.stopx,e)}(t,qh.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:eu(_,t,Wh.boxMargin,Wh.boxMargin+Wh.boxTextMargin,(t=>qh.newLoop(t)));break;case i.db.LINETYPE.LOOP_END:e=qh.endLoop(),Uh.drawLoop(h,e,"loop",Wh),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos()),qh.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:eu(_,t,Wh.boxMargin,Wh.boxMargin,(t=>qh.newLoop(void 0,t.message)));break;case i.db.LINETYPE.RECT_END:e=qh.endLoop(),Uh.drawBackgroundRect(h,e),qh.models.addLoop(e),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos());break;case i.db.LINETYPE.OPT_START:eu(_,t,Wh.boxMargin,Wh.boxMargin+Wh.boxTextMargin,(t=>qh.newLoop(t)));break;case i.db.LINETYPE.OPT_END:e=qh.endLoop(),Uh.drawLoop(h,e,"opt",Wh),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos()),qh.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:eu(_,t,Wh.boxMargin,Wh.boxMargin+Wh.boxTextMargin,(t=>qh.newLoop(t)));break;case i.db.LINETYPE.ALT_ELSE:eu(_,t,Wh.boxMargin+Wh.boxTextMargin,Wh.boxMargin,(t=>qh.addSectionToLoop(t)));break;case i.db.LINETYPE.ALT_END:e=qh.endLoop(),Uh.drawLoop(h,e,"alt",Wh),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos()),qh.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:eu(_,t,Wh.boxMargin,Wh.boxMargin+Wh.boxTextMargin,(t=>qh.newLoop(t)));break;case i.db.LINETYPE.PAR_AND:eu(_,t,Wh.boxMargin+Wh.boxTextMargin,Wh.boxMargin,(t=>qh.addSectionToLoop(t)));break;case i.db.LINETYPE.PAR_END:e=qh.endLoop(),Uh.drawLoop(h,e,"par",Wh),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos()),qh.models.addLoop(e);break;case i.db.LINETYPE.AUTONUMBER:x=t.message.start||x,v=t.message.step||v,t.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:eu(_,t,Wh.boxMargin,Wh.boxMargin+Wh.boxTextMargin,(t=>qh.newLoop(t)));break;case i.db.LINETYPE.CRITICAL_OPTION:eu(_,t,Wh.boxMargin+Wh.boxTextMargin,Wh.boxMargin,(t=>qh.addSectionToLoop(t)));break;case i.db.LINETYPE.CRITICAL_END:e=qh.endLoop(),Uh.drawLoop(h,e,"critical",Wh),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos()),qh.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:eu(_,t,Wh.boxMargin,Wh.boxMargin+Wh.boxTextMargin,(t=>qh.newLoop(t)));break;case i.db.LINETYPE.BREAK_END:e=qh.endLoop(),Uh.drawLoop(h,e,"break",Wh),qh.bumpVerticalPos(e.stopy-qh.getVerticalPos()),qh.models.addLoop(e);break;default:try{r=t.msgModel,r.starty=qh.getVerticalPos(),r.sequenceIndex=x,r.sequenceVisible=i.db.showSequenceNumbers();const e=function(t,e){qh.bumpVerticalPos(10);const{startx:n,stopx:i,message:r}=e,s=qt.splitBreaks(r).length,a=ai.calculateTextDimensions(r,Hh(Wh)),o=a.height/s;let c;e.height+=o,qh.bumpVerticalPos(o);let l=a.height-10;const h=a.width;if(n===i){c=qh.getVerticalPos()+l,Wh.rightAngles||(l+=Wh.boxMargin,c=qh.getVerticalPos()+l),l+=30;const t=Math.max(h/2,Wh.width/2);qh.insert(n-t,qh.getVerticalPos()-10+l,i+t,qh.getVerticalPos()+30+l)}else l+=Wh.boxMargin,c=qh.getVerticalPos()+l,qh.insert(n,c-10,i,c);return qh.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,qh.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),c}(0,r);k.push({messageModel:r,lineStartY:e}),qh.models.addMessage(r)}catch(s){Ot.error("error while drawing message",s)}}[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].includes(t.type)&&(x+=v)})),k.forEach((t=>function(t,e,n,i){const{startx:r,stopx:s,starty:a,message:o,type:c,sequenceIndex:l,sequenceVisible:h}=e,u=ai.calculateTextDimensions(o,Hh(Wh)),d=Uh.getTextObj();d.x=r,d.y=a+10,d.width=s-r,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=Wh.messageFontFamily,d.fontSize=Wh.messageFontSize,d.fontWeight=Wh.messageFontWeight,d.anchor=Wh.messageAlign,d.valign="center",d.textMargin=Wh.wrapPadding,d.tspan=!1,Oh(t,d);const p=u.width;let f;r===s?f=Wh.rightAngles?t.append("path").attr("d",`M ${r},${n} H ${r+Math.max(Wh.width/2,p/2)} V ${n+25} H ${r}`):t.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):(f=t.append("line"),f.attr("x1",r),f.attr("y1",n),f.attr("x2",s),f.attr("y2",n)),c===i.db.LINETYPE.DOTTED||c===i.db.LINETYPE.DOTTED_CROSS||c===i.db.LINETYPE.DOTTED_POINT||c===i.db.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");let g="";Wh.arrowMarkerAbsolute&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),c!==i.db.LINETYPE.SOLID&&c!==i.db.LINETYPE.DOTTED||f.attr("marker-end","url("+g+"#arrowhead)"),c!==i.db.LINETYPE.SOLID_POINT&&c!==i.db.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+g+"#filled-head)"),c!==i.db.LINETYPE.SOLID_CROSS&&c!==i.db.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+g+"#crosshead)"),(h||Wh.showSequenceNumbers)&&(f.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))}(h,t.messageModel,t.lineStartY,i))),Wh.mirrorActors&&(qh.bumpVerticalPos(2*Wh.boxMargin),Xh(h,u,p,qh.getVerticalPos(),Wh,f,!0),qh.bumpVerticalPos(Wh.boxMargin),Rh(h,qh.getVerticalPos())),qh.models.boxes.forEach((function(t){t.height=qh.getVerticalPos()-t.y,qh.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",Uh.drawBox(h,t,Wh)})),y&&qh.bumpVerticalPos(Wh.boxMargin);const w=Qh(h,u,p,l),{bounds:C}=qh.getBounds();Ot.debug("For line height fix Querying: #"+e+" .actor-line");(0,o.td_)("#"+e+" .actor-line").attr("y2",C.stopy);let T=C.stopy-C.starty;T2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},O=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return 41;case 1:case 44:return 50;case 2:case 45:return 51;case 3:case 46:return 52;case 4:case 47:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:case 11:case 13:case 14:case 15:case 16:case 56:case 58:case 64:break;case 12:case 79:return 5;case 17:case 34:return this.pushState("SCALE"),17;case 18:case 35:return 18;case 19:case 25:case 36:case 51:case 54:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 37:this.pushState("STATE");break;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:case 66:return this.popState(),"ID";case 52:return"STATE_DESCR";case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 57:return this.popState(),21;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:return"NOTE_TEXT";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 69:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 70:case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return e.yytext=e.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/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:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}},t);function $(){this.yy={}}return I.lexer=O,$.prototype=I,I.Parser=$,new $}();su.parser=su;const au=su,ou=(t,e)=>{var n;return"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer)&&null!==t.match(/^\s*stateDiagram/)},cu=(t,e)=>{var n;return null!==t.match(/^\s*stateDiagram-v2/)||!(!t.match(/^\s*stateDiagram/)||"dagre-wrapper"!==(null==(n=null==e?void 0:e.state)?void 0:n.defaultRenderer))},lu="state",hu="relation",uu="default",du="divider",pu="[*]",fu="start",gu=pu,yu="end",mu="color",bu="fill";let _u="LR",xu=[],vu={};let ku={root:{relations:[],states:{},documents:{}}},wu=ku.root,Cu=0,Tu=0;const Eu=t=>JSON.parse(JSON.stringify(t)),Su=(t,e,n)=>{if(e.stmt===hu)Su(t,e.state1,!0),Su(t,e.state2,!1);else if(e.stmt===lu&&("[*]"===e.id?(e.id=n?t.id+"_start":t.id+"_end",e.start=n):e.id=e.id.trim()),e.doc){const t=[];let n,i=[];for(n=0;n0&&i.length>0){const n={stmt:lu,id:Hn(),type:"divider",doc:Eu(i)};t.push(Eu(n)),e.doc=t}e.doc.forEach((t=>Su(e,t,!0)))}},Au=function(t,e=uu,n=null,i=null,r=null,s=null,a=null,o=null){const c=null==t?void 0:t.trim();if(void 0===wu.states[c]?(Ot.info("Adding state ",c,i),wu.states[c]={id:c,descriptions:[],type:e,doc:n,note:r,classes:[],styles:[],textStyles:[]}):(wu.states[c].doc||(wu.states[c].doc=n),wu.states[c].type||(wu.states[c].type=e)),i&&(Ot.info("Setting state description",c,i),"string"==typeof i&&Iu(c,i.trim()),"object"==typeof i&&i.forEach((t=>Iu(c,t.trim())))),r&&(wu.states[c].note=r,wu.states[c].note.text=qt.sanitizeText(wu.states[c].note.text,bi())),s){Ot.info("Setting state classes",c,s);("string"==typeof s?[s]:s).forEach((t=>$u(c,t.trim())))}if(a){Ot.info("Setting state styles",c,a);("string"==typeof a?[a]:a).forEach((t=>Fu(c,t.trim())))}if(o){Ot.info("Setting state styles",c,a);("string"==typeof o?[o]:o).forEach((t=>Ru(c,t.trim())))}},Lu=function(t){ku={root:{relations:[],states:{},documents:{}}},wu=ku.root,Cu=0,vu={},t||Wi()},Bu=function(t){return wu.states[t]};function Nu(t=""){let e=t;return t===pu&&(Cu++,e=`${fu}${Cu}`),e}function Du(t="",e=uu){return t===pu?fu:e}const Mu=function(t,e,n){if("object"==typeof t)!function(t,e,n){let i=Nu(t.id.trim()),r=Du(t.id.trim(),t.type),s=Nu(e.id.trim()),a=Du(e.id.trim(),e.type);Au(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Au(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),wu.relations.push({id1:i,id2:s,relationTitle:qt.sanitizeText(n,bi())})}(t,e,n);else{const i=Nu(t.trim()),r=Du(t),s=function(t=""){let e=t;return t===gu&&(Cu++,e=`${yu}${Cu}`),e}(e.trim()),a=function(t="",e=uu){return t===gu?yu:e}(e);Au(i,r),Au(s,a),wu.relations.push({id1:i,id2:s,title:qt.sanitizeText(n,bi())})}},Iu=function(t,e){const n=wu.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;n.descriptions.push(qt.sanitizeText(i,bi()))},Ou=function(t,e=""){void 0===vu[t]&&(vu[t]={id:t,styles:[],textStyles:[]});const n=vu[t];null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(t.match(mu)){const t=e.replace(bu,"bgFill").replace(mu,bu);n.textStyles.push(t)}n.styles.push(e)}))},$u=function(t,e){t.split(",").forEach((function(t){let n=Bu(t);if(void 0===n){const e=t.trim();Au(e),n=Bu(e)}n.classes.push(e)}))},Fu=function(t,e){const n=Bu(t);void 0!==n&&n.textStyles.push(e)},Ru=function(t,e){const n=Bu(t);void 0!==n&&n.textStyles.push(e)},Zu={parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().state,addState:Au,clear:Lu,getState:Bu,getStates:function(){return wu.states},getRelations:function(){return wu.relations},getClasses:function(){return vu},getDirection:()=>_u,addRelation:Mu,getDividerId:()=>(Tu++,"divider-id-"+Tu),setDirection:t=>{_u=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){Ot.info("Documents = ",ku)},getRootDoc:()=>xu,setRootDoc:t=>{Ot.info("Setting root doc",t),xu=t},getRootDocV2:()=>(Su({id:"root"},{id:"root",doc:xu},!0),{id:"root",doc:xu}),extract:t=>{let e;e=t.doc?t.doc:t,Ot.info(e),Lu(!0),Ot.info("Extract",e),e.forEach((t=>{switch(t.stmt){case lu:Au(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case hu:Mu(t.state1,t.state2,t.description);break;case"classDef":Ou(t.id.trim(),t.classes);break;case"applyClass":$u(t.id.trim(),t.styleClass)}}))},trimColon:t=>t&&":"===t[0]?t.substr(1).trim():t.trim(),getAccTitle:Hi,setAccTitle:qi,getAccDescription:Gi,setAccDescription:Vi,addStyleClass:Ou,setCssClass:$u,addDescription:Iu,setDiagramTitle:Xi,getDiagramTitle:Qi},Pu={},Yu=(t,e)=>{Pu[t]=e},ju=(t,e)=>{const n=t.append("text").attr("x",2*bi().state.padding).attr("y",bi().state.textHeight+1.3*bi().state.padding).attr("font-size",bi().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,r=t.append("text").attr("x",bi().state.padding).attr("y",i+.4*bi().state.padding+bi().state.dividerMargin+bi().state.textHeight).attr("class","state-description");let s=!0,a=!0;e.descriptions.forEach((function(t){s||(!function(t,e,n){const i=t.append("tspan").attr("x",2*bi().state.padding).text(e);n||i.attr("dy",bi().state.textHeight)}(r,t,a),a=!1),s=!1}));const o=t.append("line").attr("x1",bi().state.padding).attr("y1",bi().state.padding+i+bi().state.dividerMargin/2).attr("y2",bi().state.padding+i+bi().state.dividerMargin/2).attr("class","descr-divider"),c=r.node().getBBox(),l=Math.max(c.width,n.width);return o.attr("x2",l+3*bi().state.padding),t.insert("rect",":first-child").attr("x",bi().state.padding).attr("y",bi().state.padding).attr("width",l+2*bi().state.padding).attr("height",c.height+i+2*bi().state.padding).attr("rx",bi().state.radius),t},zu=(t,e,n)=>{const i=bi().state.padding,r=2*bi().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,c=t.append("text").attr("x",0).attr("y",bi().state.titleShift).attr("font-size",bi().state.fontSize).attr("class","state-title").text(e.id),l=c.node().getBBox().width+r;let h,u=Math.max(l,a);u===a&&(u+=r);const d=t.node().getBBox();e.doc,h=o-i,l>a&&(h=(a-u)/2+i),Math.abs(o-d.x)a&&(h=o-(l-a)/2);const p=1-bi().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",u).attr("height",d.height+bi().state.textHeight+bi().state.titleShift+1).attr("rx","0"),c.attr("x",h+i),l<=a&&c.attr("x",o+(u-r)/2-l/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",bi().state.titleShift-bi().state.textHeight-bi().state.padding).attr("width",u).attr("height",3*bi().state.textHeight).attr("rx",bi().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",bi().state.titleShift-bi().state.textHeight-bi().state.padding).attr("width",u).attr("height",d.height+3+2*bi().state.textHeight).attr("rx",bi().state.radius),t},Uu=(t,e)=>{e.attr("class","state-note");const n=e.append("rect").attr("x",0).attr("y",bi().state.padding),i=e.append("g"),{textWidth:r,textHeight:s}=((t,e,n,i)=>{let r=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"
");a=a.replace(/\n/g,"
");const o=a.split(qt.lineBreakRegex);let c=1.25*bi().state.noteMargin;for(const l of o){const t=l.trim();if(t.length>0){const i=s.append("tspan");i.text(t),0===c&&(c+=i.node().getBBox().height),r+=c,i.attr("x",e+bi().state.noteMargin),i.attr("y",n+r+1.25*bi().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:r}})(t,0,0,i);return n.attr("height",s+2*bi().state.noteMargin),n.attr("width",r+2*bi().state.noteMargin),n},Wu=function(t,e){const n=e.id,i={id:n,label:e.id,width:0,height:0},r=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&(t=>{t.append("circle").attr("class","start-state").attr("r",bi().state.sizeUnit).attr("cx",bi().state.padding+bi().state.sizeUnit).attr("cy",bi().state.padding+bi().state.sizeUnit)})(r),"end"===e.type&&(t=>{t.append("circle").attr("class","end-state-outer").attr("r",bi().state.sizeUnit+bi().state.miniPadding).attr("cx",bi().state.padding+bi().state.sizeUnit+bi().state.miniPadding).attr("cy",bi().state.padding+bi().state.sizeUnit+bi().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",bi().state.sizeUnit).attr("cx",bi().state.padding+bi().state.sizeUnit+2).attr("cy",bi().state.padding+bi().state.sizeUnit+2)})(r),"fork"!==e.type&&"join"!==e.type||((t,e)=>{let n=bi().state.forkWidth,i=bi().state.forkHeight;if(e.parentId){let t=n;n=i,i=t}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",i).attr("x",bi().state.padding).attr("y",bi().state.padding)})(r,e),"note"===e.type&&Uu(e.note.text,r),"divider"===e.type&&(t=>{t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",bi().state.textHeight).attr("class","divider").attr("x2",2*bi().state.textHeight).attr("y1",0).attr("y2",0)})(r),"default"===e.type&&0===e.descriptions.length&&((t,e)=>{const n=t.append("text").attr("x",2*bi().state.padding).attr("y",bi().state.textHeight+2*bi().state.padding).attr("font-size",bi().state.fontSize).attr("class","state-title").text(e.id),i=n.node().getBBox();t.insert("rect",":first-child").attr("x",bi().state.padding).attr("y",bi().state.padding).attr("width",i.width+2*bi().state.padding).attr("height",i.height+2*bi().state.padding).attr("rx",bi().state.radius)})(r,e),"default"===e.type&&e.descriptions.length>0&&ju(r,e);const s=r.node().getBBox();return i.width=s.width+2*bi().state.padding,i.height=s.height+2*bi().state.padding,Yu(n,i),i};let qu=0;let Hu;const Vu={},Gu=(t,e,n,i,r,s,a)=>{const c=new dt.k({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l{const e=t.parentElement;let n=0,i=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",n-i-8)}))}else Ot.debug("No Node "+t+": "+JSON.stringify(c.node(t)))}));let y=g.getBBox();c.edges().forEach((function(t){void 0!==t&&void 0!==c.edge(t)&&(Ot.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),function(t,e,n){e.points=e.points.filter((t=>!Number.isNaN(t.y)));const i=e.points,r=(0,o.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(o.$0Z),s=t.append("path").attr("d",r(i)).attr("id","edge"+qu).attr("class","transition");let a="";if(bi().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),s.attr("marker-end","url("+a+"#"+function(t){switch(t){case Zu.relationType.AGGREGATION:return"aggregation";case Zu.relationType.EXTENSION:return"extension";case Zu.relationType.COMPOSITION:return"composition";case Zu.relationType.DEPENDENCY:return"dependency"}}(Zu.relationType.DEPENDENCY)+"End)"),void 0!==n.title){const i=t.append("g").attr("class","stateLabel"),{x:r,y:s}=ai.calcLabelPosition(e.points),a=qt.getRows(n.title);let o=0;const c=[];let l=0,h=0;for(let t=0;t<=a.length;t++){const e=i.append("text").attr("text-anchor","middle").text(a[t]).attr("x",r).attr("y",s+o),n=e.node().getBBox();if(l=Math.max(l,n.width),h=Math.min(h,n.x),Ot.info(n.x,r,s+o),0===o){const t=e.node().getBBox();o=t.height,Ot.info("Title height",o,s)}c.push(e)}let u=o*a.length;if(a.length>1){const t=(a.length-1)*o*.5;c.forEach(((e,n)=>e.attr("y",s+n*o-t))),u=o*a.length}const d=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",r-l/2-bi().state.padding/2).attr("y",s-u/2-bi().state.padding/2-3.5).attr("width",l+bi().state.padding).attr("height",u+bi().state.padding),Ot.info(d)}qu++}(e,c.edge(t),c.edge(t).relation))})),y=g.getBBox();const m={id:n||"root",label:n||"root",width:0,height:0};return m.width=y.width+2*Hu.padding,m.height=y.height+2*Hu.padding,Ot.debug("Doc rendered",m,c),m},Xu={setConf:function(){},draw:function(t,e,n,i){Hu=bi().state;const r=bi().securityLevel;let s;"sandbox"===r&&(s=(0,o.Ys)("#i"+e));const a="sandbox"===r?(0,o.Ys)(s.nodes()[0].contentDocument.body):(0,o.Ys)("body"),c="sandbox"===r?s.nodes()[0].contentDocument:document;Ot.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);l.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");new dt.k({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));const h=i.db.getRootDoc();Gu(h,l,void 0,!1,a,c,i);const u=Hu.padding,d=l.node().getBBox(),p=d.width+2*u,f=d.height+2*u;Ti(l,f,1.75*p,Hu.useMaxWidth),l.attr("viewBox",`${d.x-Hu.padding} ${d.y-Hu.padding} `+p+" "+f)}},Qu="rect",Ku="rectWithTitle",Ju="statediagram",td=`${Ju}-state`,ed="transition",nd=`${ed} note-edge`,id=`${Ju}-note`,rd=`${Ju}-cluster`,sd=`${Ju}-cluster-alt`,ad="parent",od="note",cd="state",ld="----",hd=`${ld}${od}`,ud=`${ld}${ad}`,dd="fill:none",pd="fill: #333",fd="text",gd="normal";let yd={},md=0;function bd(t="",e=0,n="",i=ld){const r=null!==n&&n.length>0?`${i}${n}`:"";return`${cd}-${t}${r}-${e}`}const _d=(t,e,n,i,r,s)=>{const a=n.id,o=null==(c=i[a])?"":c.classes?c.classes.join(" "):"";var c;if("root"!==a){let e=Qu;!0===n.start&&(e="start"),!1===n.start&&(e="end"),n.type!==uu&&(e=n.type),yd[a]||(yd[a]={id:a,shape:e,description:qt.sanitizeText(a,bi()),classes:`${o} ${td}`});const i=yd[a];n.description&&(Array.isArray(i.description)?(i.shape=Ku,i.description.push(n.description)):i.description.length>0?(i.shape=Ku,i.description===a?i.description=[n.description]:i.description=[i.description,n.description]):(i.shape=Qu,i.description=n.description),i.description=qt.sanitizeTextOrArray(i.description,bi())),1===i.description.length&&i.shape===Ku&&(i.shape=Qu),!i.type&&n.doc&&(Ot.info("Setting cluster for ",a,vd(n)),i.type="group",i.dir=vd(n),i.shape=n.type===du?"divider":"roundedWithTitle",i.classes=i.classes+" "+rd+" "+(s?sd:""));const r={labelStyle:"",shape:i.shape,labelText:i.description,classes:i.classes,style:"",id:a,dir:i.dir,domId:bd(a,md),type:i.type,padding:15};if(n.note){const e={labelStyle:"",shape:"note",labelText:n.note.text,classes:id,style:"",id:a+hd+"-"+md,domId:bd(a,md,od),type:i.type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:i.classes,style:"",id:a+ud,domId:bd(a,md,ad),type:"group",padding:0};md++;const o=a+ud;t.setNode(o,s),t.setNode(e.id,e),t.setNode(a,r),t.setParent(a,o),t.setParent(e.id,o);let c=a,l=e.id;"left of"===n.note.position&&(c=e.id,l=a),t.setEdge(c,l,{arrowhead:"none",arrowType:"",style:dd,labelStyle:"",classes:nd,arrowheadStyle:pd,labelpos:"c",labelType:fd,thickness:gd})}else t.setNode(a,r)}e&&"root"!==e.id&&(Ot.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),n.doc&&(Ot.trace("Adding nodes children "),xd(t,n,n.doc,i,r,!s))},xd=(t,e,n,i,r,s)=>{Ot.trace("items",n),n.forEach((n=>{switch(n.stmt){case lu:case uu:_d(t,e,n,i,r,s);break;case hu:{_d(t,e,n.state1,i,r,s),_d(t,e,n.state2,i,r,s);const a={id:"edge"+md,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:dd,labelStyle:"",label:qt.sanitizeText(n.description,bi()),arrowheadStyle:pd,labelpos:"c",labelType:fd,thickness:gd,classes:ed};t.setEdge(n.state1.id,n.state2.id,a,md),md++}}}))},vd=(t,e="TB")=>{let n=e;if(t.doc)for(let i=0;i2&&T.push("'"+this.terminals_[k]+"'");S=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==h?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:g,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(d.yytext),s.push(d.yylloc),n.push(x[1]),b=null,l=d.yyleng,o=d.yytext,c=d.yylineno,g=d.yylloc;break;case 2:if(w=this.productions_[x[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},y&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,l,c,p.yy,x[1],r,s].concat(u))))return v;w&&(n=n.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),r.push(E.$),s.push(E._$),C=a[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}},f=(t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\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:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}},t);function g(){this.yy={}}return p.lexer=f,g.prototype=p,p.Parser=g,new g}();wd.parser=wd;const Cd=wd,Td=t=>null!==t.match(/^\s*journey/);let Ed="";const Sd=[],Ad=[],Ld=[],Bd=function(){let t=!0;for(const[e,n]of Ld.entries())Ld[e].processed,t=t&&n.processed;return t},Nd={parseDirective:function(t,e,n){Tp.parseDirective(this,t,e,n)},getConfig:()=>bi().journey,clear:function(){Sd.length=0,Ad.length=0,Ed="",Ld.length=0,Wi()},setDiagramTitle:Xi,getDiagramTitle:Qi,setAccTitle:qi,getAccTitle:Hi,setAccDescription:Vi,getAccDescription:Gi,addSection:function(t){Ed=t,Sd.push(t)},getSections:function(){return Sd},getTasks:function(){let t=Bd();let e=0;for(;!t&&e<100;)t=Bd(),e++;return Ad.push(...Ld),Ad},addTask:function(t,e){const n=e.substr(1).split(":");let i=0,r=[];1===n.length?(i=Number(n[0]),r=[]):(i=Number(n[0]),r=n[1].split(","));const s=r.map((t=>t.trim())),a={section:Ed,type:Ed,people:s,task:t,score:i};Ld.push(a)},addTaskOrg:function(t){const e={section:Ed,type:Ed,description:t,task:t,classes:[]};Ad.push(e)},getActors:function(){return function(){const t=[];return Ad.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}()}},Dd=function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Md=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},Id=function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i};let Od=-1;const $d=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Fd=function(){function t(t,e,n,r,s,a,o,c){i(e.append("text").attr("x",n+s/2).attr("y",r+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,s,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,d=t.split(//gi);for(let p=0;p3?function(t){const i=(0,o.Nb1)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(n/2).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(r):e.score<3?function(t){const i=(0,o.Nb1)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(n/2).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(r):r.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(r,{cx:i,cy:300+30*(5-e.score),score:e.score});const s=$d();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,Dd(r,s);let a=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:a,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};Md(r,i),a+=10})),Fd(n)(e.task,r,s.x,s.y,s.width,s.height,{class:"task"},n,e.colour)},drawBackgroundRect:function(t,e){Dd(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},getTextObj:function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},getNoteRect:$d,initGraphics: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")}},Zd={};const Pd=bi().journey,Yd=Pd.leftMargin,jd={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(t,e,n,i){const r=bi().journey,s=this;let a=0;var o;this.sequenceItems.forEach((function(c){a++;const l=s.sequenceItems.length-a+1;s.updateVal(c,"starty",e-l*r.boxMargin,Math.min),s.updateVal(c,"stopy",i+l*r.boxMargin,Math.max),s.updateVal(jd.data,"startx",t-l*r.boxMargin,Math.min),s.updateVal(jd.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==o&&(s.updateVal(c,"startx",t-l*r.boxMargin,Math.min),s.updateVal(c,"stopx",n+l*r.boxMargin,Math.max),s.updateVal(jd.data,"starty",e-l*r.boxMargin,Math.min),s.updateVal(jd.data,"stopy",i+l*r.boxMargin,Math.max))}))},insert:function(t,e,n,i){const r=Math.min(t,n),s=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(jd.data,"startx",r,Math.min),this.updateVal(jd.data,"starty",a,Math.min),this.updateVal(jd.data,"stopx",s,Math.max),this.updateVal(jd.data,"stopy",o,Math.max),this.updateBounds(r,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},zd=Pd.sectionFills,Ud=Pd.sectionColours,Wd=function(t,e,n){const i=bi().journey;let r="";const s=n+(2*i.height+i.diagramMarginY);let a=0,o="#CCC",c="black",l=0;for(const[h,u]of e.entries()){if(r!==u.section){o=zd[a%zd.length],l=a%zd.length,c=Ud[a%Ud.length];const e={x:h*i.taskMargin+h*i.width+Yd,y:50,text:u.section,fill:o,num:l,colour:c};Rd.drawSection(t,e,i),r=u.section,a++}const e=u.people.reduce(((t,e)=>(Zd[e]&&(t[e]=Zd[e]),t)),{});u.x=h*i.taskMargin+h*i.width+Yd,u.y=s,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=c,u.fill=o,u.num=l,u.actors=e,Rd.drawTask(t,u,i),jd.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}},qd={setConf:function(t){Object.keys(t).forEach((function(e){Pd[e]=t[e]}))},draw:function(t,e,n,i){const r=bi().journey;i.db.clear(),i.parser.parse(t+"\n");const s=bi().securityLevel;let a;"sandbox"===s&&(a=(0,o.Ys)("#i"+e));const c="sandbox"===s?(0,o.Ys)(a.nodes()[0].contentDocument.body):(0,o.Ys)("body");jd.init();const l=c.select("#"+e);Rd.initGraphics(l);const h=i.db.getTasks(),u=i.db.getDiagramTitle(),d=i.db.getActors();for(const o in Zd)delete Zd[o];let p=0;d.forEach((t=>{Zd[t]={color:r.actorColours[p%r.actorColours.length],position:p},p++})),function(t){const e=bi().journey;let n=60;Object.keys(Zd).forEach((i=>{const r=Zd[i].color,s={cx:20,cy:n,r:7,fill:r,stroke:"#000",pos:Zd[i].position};Rd.drawCircle(t,s);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};Rd.drawText(t,a),n+=20}))}(l),jd.insert(0,0,Yd,50*Object.keys(Zd).length),Wd(l,h,0);const f=jd.getBounds();u&&l.append("text").text(u).attr("x",Yd).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*r.diagramMarginY,y=Yd+f.stopx+2*r.diagramMarginX;Ti(l,g,y,r.useMaxWidth),l.append("line").attr("x1",Yd).attr("y1",4*r.height).attr("x2",y-Yd-4).attr("y2",4*r.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=u?70:0;l.attr("viewBox",`${f.startx} -25 ${y} ${g+m}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",g+m+25)}};let Hd={};const Vd={setConf:function(t){Hd={...Hd,...t}},draw:(t,e,n)=>{try{Ot.debug("Renering svg for syntax error\n");const t=(0,o.Ys)("#"+e),i=t.append("g");i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+n),t.attr("height",100),t.attr("width",500),t.attr("viewBox","768 0 912 512")}catch(r){Ot.error("Error while rendering info diagram"),Ot.error((i=r)instanceof Error?i.message:String(i))}var i}},Gd="flowchart-elk",Xd={id:Gd,detector:(t,e)=>{var n;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&"elk"===(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer))},loader:async()=>{const{diagram:t}=await n.e(9487).then(n.bind(n,19487));return{id:Gd,diagram:t}}},Qd="timeline",Kd={id:Qd,detector:t=>null!==t.match(/^\s*timeline/),loader:async()=>{const{diagram:t}=await n.e(6316).then(n.bind(n,96316));return{id:Qd,diagram:t}}},Jd="mindmap",tp={id:Jd,detector:t=>null!==t.match(/^\s*mindmap/),loader:async()=>{const{diagram:t}=await n.e(7724).then(n.bind(n,47724));return{id:Jd,diagram:t}}};let ep=!1;const np=()=>{ep||(ep=!0,On(Xd,Kd,tp),hr("error",{db:{clear:()=>{}},styles:Li,renderer:Vd,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},(t=>"error"===t.toLowerCase().trim())),hr("---",{db:{clear:()=>{}},styles:Li,renderer:Vd,parser:{parser:{yy:{}},parse:()=>{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 unindented `---` blocks")}},init:()=>null},(t=>t.toLowerCase().trimStart().startsWith("---"))),hr("c4",{parser:Gr,db:hs,renderer:js,styles:Ri,init:t=>{js.setConf(t.c4)}},Xr),hr("class",{parser:Us,db:ca,renderer:va,styles:Si,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ca.clear()}},Ws),hr("classDiagram",{parser:Us,db:ca,renderer:lo,styles:Si,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ca.clear()}},qs),hr("er",{parser:uo,db:mo,renderer:Lo,styles:Ai},po),hr("gantt",{parser:Rc,db:ml,renderer:xl,styles:Ni},Zc),hr("info",{parser:kl,db:Tl,renderer:El,styles:Di},Sl),hr("pie",{parser:Ll,db:Ml,renderer:Fl,styles:Mi},Bl),hr("requirement",{parser:Zl,db:ql,renderer:ih,styles:Ii},Pl),hr("sequence",{parser:sh,db:Eh,renderer:ru,styles:Oi,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");Eh.setWrap(t.wrap),ru.setConf(t.sequence)}},ah),hr("state",{parser:au,db:Zu,renderer:Xu,styles:$i,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Zu.clear()}},ou),hr("stateDiagram",{parser:au,db:Zu,renderer:kd,styles:$i,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Zu.clear()}},cu),hr("journey",{parser:Cd,db:Nd,renderer:qd,styles:Fi,init:t=>{qd.setConf(t.journey),Nd.clear()}},Td),hr("flowchart",{parser:No,db:Lc,renderer:$c,styles:Bi,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Dc(t.flowchart),Lc.clear(),Lc.setGen("gen-1")}},Do),hr("flowchart-v2",{parser:No,db:Lc,renderer:$c,styles:Bi,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mi({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),$c.setConf(t.flowchart),Lc.clear(),Lc.setGen("gen-2")}},Mo),hr("gitGraph",{parser:pr,db:Nr,renderer:qr,styles:Hr},fr))};class ip{constructor(t,e){var n,i;this.txt=t,this.type="graph",this.detectTypeFailed=!1;const r=bi();this.txt=t;try{this.type=In(t,r)}catch(o){this.handleError(o,e),this.type="error",this.detectTypeFailed=!0}const s=ur(this.type);Ot.debug("Type "+this.type),this.db=s.db,null==(i=(n=this.db).clear)||i.call(n),this.renderer=s.renderer,this.parser=s.parser;const a=this.parser.parse.bind(this.parser);this.parser.parse=t=>a(function(t,e){var n;const i=t.match(Bn);if(i){const r=Ln(i[1],{schema:An});return(null==r?void 0:r.title)&&(null==(n=e.setDiagramTitle)||n.call(e,r.title)),t.slice(i[0].length)}return t}(t,this.db)),this.parser.parser.yy=this.db,s.init&&(s.init(r),Ot.info("Initialized diagram "+this.type,r)),this.txt+="\n",this.parse(this.txt,e)}parse(t,e){var n,i;if(this.detectTypeFailed)return!1;try{return t+="\n",null==(i=(n=this.db).clear)||i.call(n),this.parser.parse(t),!0}catch(r){this.handleError(r,e)}return!1}handleError(t,e){if(void 0===e)throw t;ri(t)?e(t.str,t.hash):e(t)}getParser(){return this.parser}getType(){return this.type}}const rp=(t,e)=>{const n=In(t,bi());try{ur(n)}catch(i){const r=Mn[n].loader;if(!r)throw new Error(`Diagram ${n} not found.`);return r().then((({diagram:i})=>(hr(n,i,void 0),new ip(t,e))))}return new ip(t,e)},sp=ip,ap="graphics-document document";const op=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],cp="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",lp="sandbox",hp="loose",up="http://www.w3.org/1999/xlink",dp="http://www.w3.org/1999/xhtml",pp=["foreignobject"],fp=["dominant-baseline"];const gp=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e},yp=function(t){let e=t;return e=e.replace(/\ufb02\xb0\xb0/g,"&#"),e=e.replace(/\ufb02\xb0/g,"&"),e=e.replace(/\xb6\xdf/g,";"),e},mp=(t,e,n=[])=>`\n.${t} ${e} { ${n.join(" !important; ")} !important; }`,bp=(t,e,n,i)=>{const r=((t,e,n={})=>{var i;let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,Mt.Z)(n)&&op.includes(e)){const e=t.htmlLabels||(null==(i=t.flowchart)?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const t in n){const i=n[t];(0,Mt.Z)(i.styles)||e.forEach((t=>{r+=mp(i.id,t,i.styles)})),(0,Mt.Z)(i.textStyles)||(r+=mp(i.id,"tspan",i.textStyles))}}return r})(t,e,n);return F(at(`${i}{${Pi(e,r,t.themeVariables)}}`),R)},_p=(t="",e,n)=>{let i=t;return n||e||(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=yp(i),i=i.replace(/
/g,"
"),i},xp=(t="",e)=>``,vp=(t,e,n,i,r)=>{const s=t.append("div");s.attr("id",n),i&&s.attr("style",i);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return r&&a.attr("xmlns:xlink",r),a.append("g"),t};function kp(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const wp=(t,e,n,i)=>{var r,s,a;null==(r=t.getElementById(e))||r.remove(),null==(s=t.getElementById(n))||s.remove(),null==(a=t.getElementById(i))||a.remove()};function Cp(t,e,n,i){var r,s;s=t,(r=e).attr("role",ap),(0,Mt.Z)(s)||r.attr("aria-roledescription",s),function(t,e,n,i){if(void 0!==t.insert&&(e||n)){if(n){const e="chart-desc-"+i;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(n)}if(e){const n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}}(e,n,i,e.attr("id"))}const Tp=Object.freeze({render:function(t,e,n,i){var r,s,a,c;np(),vi();const l=ai.detectInit(e);l&&(ni(l),xi(l));const u=bi();Ot.debug(u),e.length>((null==u?void 0:u.maxTextSize)??5e4)&&(e=cp),e=e.replace(/\r\n?/g,"\n");const d="#"+t,p="i"+t,f="#"+p,g="d"+t,y="#"+g;let m=(0,o.Ys)("body");const b=u.securityLevel===lp,_=u.securityLevel===hp,x=u.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=kp((0,o.Ys)(i),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)(i);vp(m,t,g,`font-family: ${x}`,up)}else{if(wp(document,t,g,p),b){const t=kp((0,o.Ys)("body"),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)("body");vp(m,t,g)}let v,k;e=gp(e);try{if(v=rp(e),"then"in v)throw new Error("Diagram is a promise. Use renderAsync.")}catch(M){v=new sp("error"),k=M}const w=m.select(y).node(),C=v.type,T=w.firstChild,E=T.firstChild,S=op.includes(C)?v.renderer.getClasses(e,v):{},A=bp(u,C,S,d),L=document.createElement("style");L.innerHTML=A,T.insertBefore(L,E);try{v.renderer.draw(e,t,oi,v)}catch(I){throw Vd.draw(e,t,oi),I}Cp(C,m.select(`${y} svg`),null==(s=(r=v.db).getAccTitle)?void 0:s.call(r),null==(c=(a=v.db).getAccDescription)?void 0:c.call(a)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",dp);let B=m.select(y).node().innerHTML;if(Ot.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),B=_p(B,b,Ut(u.arrowMarkerAbsolute)),b){const t=m.select(y+" svg").node();B=xp(B,t)}else _||(B=h().sanitize(B,{ADD_TAGS:pp,ADD_ATTR:fp}));if(void 0!==n)switch(C){case"flowchart":case"flowchart-v2":n(B,Lc.bindFunctions);break;case"gantt":n(B,ml.bindFunctions);break;case"class":case"classDiagram":n(B,ca.bindFunctions);break;default:n(B)}else Ot.debug("CB = undefined!");Ah();const N=b?f:y,D=(0,o.Ys)(N).node();if(D&&"remove"in D&&D.remove(),k)throw k;return B},renderAsync:async function(t,e,n,i){var r,s,a,c;np(),vi();const l=ai.detectInit(e);l&&(ni(l),xi(l));const u=bi();Ot.debug(u),e.length>((null==u?void 0:u.maxTextSize)??5e4)&&(e=cp),e=e.replace(/\r\n?/g,"\n");const d="#"+t,p="i"+t,f="#"+p,g="d"+t,y="#"+g;let m=(0,o.Ys)("body");const b=u.securityLevel===lp,_=u.securityLevel===hp,x=u.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=kp((0,o.Ys)(i),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)(i);vp(m,t,g,`font-family: ${x}`,up)}else{if(wp(document,t,g,p),b){const t=kp((0,o.Ys)("body"),p);m=(0,o.Ys)(t.nodes()[0].contentDocument.body),m.node().style.margin=0}else m=(0,o.Ys)("body");vp(m,t,g)}let v,k;e=gp(e);try{v=await rp(e)}catch(M){v=new sp("error"),k=M}const w=m.select(y).node(),C=v.type,T=w.firstChild,E=T.firstChild,S=op.includes(C)?v.renderer.getClasses(e,v):{},A=bp(u,C,S,d),L=document.createElement("style");L.innerHTML=A,T.insertBefore(L,E);try{await v.renderer.draw(e,t,oi,v)}catch(I){throw Vd.draw(e,t,oi),I}Cp(C,m.select(`${y} svg`),null==(s=(r=v.db).getAccTitle)?void 0:s.call(r),null==(c=(a=v.db).getAccDescription)?void 0:c.call(a)),m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",dp);let B=m.select(y).node().innerHTML;if(Ot.debug("config.arrowMarkerAbsolute",u.arrowMarkerAbsolute),B=_p(B,b,Ut(u.arrowMarkerAbsolute)),b){const t=m.select(y+" svg").node();B=xp(B,t)}else _||(B=h().sanitize(B,{ADD_TAGS:pp,ADD_ATTR:fp}));if(void 0!==n)switch(C){case"flowchart":case"flowchart-v2":n(B,Lc.bindFunctions);break;case"gantt":n(B,ml.bindFunctions);break;case"class":case"classDiagram":n(B,ca.bindFunctions);break;default:n(B)}else Ot.debug("CB = undefined!");Ah();const N=b?f:y,D=(0,o.Ys)(N).node();if(D&&"remove"in D&&D.remove(),k)throw k;return B},parse:function(t,e){return np(),new sp(t,e).parse(t,e)},parseAsync:async function(t,e){return np(),(await rp(t,e)).parse(t,e)},parseDirective:er,initialize:function(t={}){var e;(null==t?void 0:t.fontFamily)&&!(null==(e=t.themeVariables)?void 0:e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),gi(t),(null==t?void 0:t.theme)&&t.theme in Qt?t.themeVariables=Qt[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Qt.default.getThemeVariables(t.themeVariables));const n="object"==typeof t?fi(t):yi();$t(n.logLevel),np()},getConfig:bi,setConfig:mi,getSiteConfig:yi,updateSiteConfig:t=>(hi=Rn(hi,t),pi(hi,ui),hi),reset:()=>{vi()},globalReset:()=>{vi(ci)},defaultConfig:ci});$t(bi().logLevel),vi(bi());const Ep=(t,e,n)=>{Ot.warn(t),ri(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Sp=async function(t,e,n){const r=Tp.getConfig();let s;if(t&&(Dp.sequenceConfig=t),Ot.debug((n?"":"No ")+"Callback function found"),void 0===e)s=document.querySelectorAll(".mermaid");else if("string"==typeof e)s=document.querySelectorAll(e);else if(e instanceof HTMLElement)s=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");s=e}Ot.debug(`Found ${s.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(Ot.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),Tp.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const a=new ai.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const c=[];for(const h of Array.from(s)){if(Ot.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const t=`mermaid-${a.next()}`;o=h.innerHTML,o=i(ai.entityDecode(o)).trim().replace(//gi,"
");const e=ai.detectInit(o);e&&Ot.debug("Detected early reinit: ",e);try{await Tp.renderAsync(t,o,((e,i)=>{h.innerHTML=e,void 0!==n&&n(t),i&&i(h)}),h)}catch(l){Ep(l,c,Dp.parseError)}}if(c.length>0)throw c[0]},Ap=function(){if(Dp.startOnLoad){const{startOnLoad:t}=Tp.getConfig();t&&Dp.init().catch((t=>Ot.error("Mermaid failed to initialize",t)))}};"undefined"!=typeof document&&window.addEventListener("load",Ap,!1);const Lp=[];let Bp=!1;const Np=async()=>{if(!Bp){for(Bp=!0;Lp.length>0;){const e=Lp.shift();if(e)try{await e()}catch(t){Ot.error("Error executing queue",t)}}Bp=!1}},Dp={startOnLoad:!0,diagrams:{},mermaidAPI:Tp,parse:t=>Tp.parse(t,Dp.parseError),parseAsync:t=>new Promise(((e,n)=>{Lp.push((()=>new Promise(((i,r)=>{Tp.parseAsync(t,Dp.parseError).then((t=>{i(t),e(t)}),(t=>{Ot.error("Error parsing",t),r(t),n(t)}))})))),Np().catch(n)})),render:Tp.render,renderAsync:(t,e,n,i)=>new Promise(((r,s)=>{Lp.push((()=>new Promise(((a,o)=>{Tp.renderAsync(t,e,n,i).then((t=>{a(t),r(t)}),(t=>{Ot.error("Error parsing",t),o(t),s(t)}))})))),Np().catch(s)})),init:async function(t,e,n){try{await Sp(t,e,n)}catch(i){Ot.warn("Syntax Error rendering"),ri(i)&&Ot.warn(i.str),Dp.parseError&&Dp.parseError(i)}},initThrowsErrors:function(t,e,n){const r=Tp.getConfig();let s;if(t&&(Dp.sequenceConfig=t),Ot.debug((n?"":"No ")+"Callback function found"),void 0===e)s=document.querySelectorAll(".mermaid");else if("string"==typeof e)s=document.querySelectorAll(e);else if(e instanceof HTMLElement)s=[e];else{if(!(e instanceof NodeList))throw new Error("Invalid argument nodes for mermaid.init");s=e}Ot.debug(`Found ${s.length} diagrams`),void 0!==(null==t?void 0:t.startOnLoad)&&(Ot.debug("Start On Load: "+(null==t?void 0:t.startOnLoad)),Tp.updateSiteConfig({startOnLoad:null==t?void 0:t.startOnLoad}));const a=new ai.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let o;const c=[];for(const h of Array.from(s)){if(Ot.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const t=`mermaid-${a.next()}`;o=h.innerHTML,o=i(ai.entityDecode(o)).trim().replace(//gi,"
");const e=ai.detectInit(o);e&&Ot.debug("Detected early reinit: ",e);try{Tp.render(t,o,((e,i)=>{h.innerHTML=e,void 0!==n&&n(t),i&&i(h)}),h)}catch(l){Ep(l,c,Dp.parseError)}}if(c.length>0)throw c[0]},initThrowsErrorsAsync:Sp,registerExternalDiagrams:async(t,{lazyLoad:e=!0}={})=>{e?On(...t):await(async(...t)=>{Ot.debug(`Loading ${t.length} external diagrams`);const e=(await Promise.allSettled(t.map((async({id:t,detector:e,loader:n})=>{const{diagram:i}=await n();hr(t,i,e)})))).filter((t=>"rejected"===t.status));if(e.length>0){Ot.error(`Failed to load ${e.length} external diagrams`);for(const t of e)Ot.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}})(...t)},initialize:function(t){Tp.initialize(t)},parseError:void 0,contentLoaded:Ap,setParseErrorHandler:function(t){Dp.parseError=t}}},59373:(t,e,n)=>{"use strict";function i(t,e){let n;if(void 0===e)for(const i of t)null!=i&&(n=i)&&(n=i);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n=r)&&(n=r)}return n}function r(t,e){let n;if(void 0===e)for(const i of t)null!=i&&(n>i||void 0===n&&i>=i)&&(n=i);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}function s(t){return t}n.d(e,{Nb1:()=>oo,LLu:()=>b,F5q:()=>m,$0Z:()=>vo,Dts:()=>wo,WQY:()=>To,qpX:()=>So,u93:()=>Ao,tFB:()=>Bo,YY7:()=>Mo,OvA:()=>Oo,dCK:()=>Fo,zgE:()=>Po,fGX:()=>jo,$m7:()=>Uo,c_6:()=>ho,fxm:()=>qo,FdL:()=>tc,ak_:()=>ec,SxZ:()=>rc,eA_:()=>ac,jsv:()=>cc,iJ:()=>oc,JHv:()=>gi,jvg:()=>fo,Fp7:()=>i,VV$:()=>r,ve8:()=>mo,BYU:()=>cr,PKp:()=>yr,Xf:()=>Da,Ys:()=>Ma,td_:()=>Ia,YPS:()=>Vn,rr1:()=>Mr,i$Z:()=>us,WQD:()=>Nr,Z_i:()=>Lr,F0B:()=>Kr,NGh:()=>Fr});var a=1,o=2,c=3,l=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function p(t){return e=>+t(e)}function f(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function g(){return!this.__axis}function y(t,e){var n=[],i=null,r=null,y=6,m=6,b=3,_="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,x=t===a||t===l?-1:1,v=t===l||t===o?"x":"y",k=t===a||t===c?u:d;function w(u){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,w=null==r?e.tickFormat?e.tickFormat.apply(e,n):s:r,C=Math.max(y,0)+b,T=e.range(),E=+T[0]+_,S=+T[T.length-1]+_,A=(e.bandwidth?f:p)(e.copy(),_),L=u.selection?u.selection():u,B=L.selectAll(".domain").data([null]),N=L.selectAll(".tick").data(d,e).order(),D=N.exit(),M=N.enter().append("g").attr("class","tick"),I=N.select("line"),O=N.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),N=N.merge(M),I=I.merge(M.append("line").attr("stroke","currentColor").attr(v+"2",x*y)),O=O.merge(M.append("text").attr("fill","currentColor").attr(v,x*C).attr("dy",t===a?"0em":t===c?"0.71em":"0.32em")),u!==L&&(B=B.transition(u),N=N.transition(u),I=I.transition(u),O=O.transition(u),D=D.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=A(t))?k(t+_):this.getAttribute("transform")})),M.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return k((e&&isFinite(e=e(t))?e:A(t))+_)}))),D.remove(),B.attr("d",t===l||t===o?m?"M"+x*m+","+E+"H"+_+"V"+S+"H"+x*m:"M"+_+","+E+"V"+S:m?"M"+E+","+x*m+"V"+_+"H"+S+"V"+x*m:"M"+E+","+_+"H"+S),N.attr("opacity",1).attr("transform",(function(t){return k(A(t)+_)})),I.attr(v+"2",x*y),O.attr(v,x*C).text(w),L.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===o?"start":t===l?"end":"middle"),L.each((function(){this.__axis=A}))}return w.scale=function(t){return arguments.length?(e=t,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),w):n.slice()},w.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),w):i&&i.slice()},w.tickFormat=function(t){return arguments.length?(r=t,w):r},w.tickSize=function(t){return arguments.length?(y=m=+t,w):y},w.tickSizeInner=function(t){return arguments.length?(y=+t,w):y},w.tickSizeOuter=function(t){return arguments.length?(m=+t,w):m},w.tickPadding=function(t){return arguments.length?(b=+t,w):b},w.offset=function(t){return arguments.length?(_=+t,w):_},w}function m(t){return y(a,t)}function b(t){return y(c,t)}function _(){}function x(t){return null==t?_:function(){return this.querySelector(t)}}function v(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function k(){return[]}function w(t){return null==t?k:function(){return this.querySelectorAll(t)}}function C(t){return function(){return this.matches(t)}}function T(t){return function(e){return e.matches(t)}}var E=Array.prototype.find;function S(){return this.firstElementChild}var A=Array.prototype.filter;function L(){return Array.from(this.children)}function B(t){return new Array(t.length)}function N(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function D(t,e,n,i,r,s){for(var a,o=0,c=e.length,l=s.length;oe?1:t>=e?0:NaN}N.prototype={constructor:N,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var F="http://www.w3.org/1999/xhtml";const R={svg:"http://www.w3.org/2000/svg",xhtml:F,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Z(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),R.hasOwnProperty(e)?{space:R[e],local:t}:t}function P(t){return function(){this.removeAttribute(t)}}function Y(t){return function(){this.removeAttributeNS(t.space,t.local)}}function j(t,e){return function(){this.setAttribute(t,e)}}function z(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function U(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function H(t){return function(){this.style.removeProperty(t)}}function V(t,e,n){return function(){this.style.setProperty(t,e,n)}}function G(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function X(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function Q(t){return function(){delete this[t]}}function K(t,e){return function(){this[t]=e}}function J(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function it(t,e){for(var n=et(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var At=[null];function Lt(t,e){this._groups=t,this._parents=e}function Bt(){return new Lt([[document.documentElement]],At)}Lt.prototype=Bt.prototype={constructor:Lt,select:function(t){"function"!=typeof t&&(t=x(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r=v&&(v=x+1);!(_=m[v])&&++v=0;)(i=r[s])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=$);for(var n=this._groups,i=n.length,r=new Array(i),s=0;s1?this.each((null==e?H:"function"==typeof e?G:V)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Q:"function"==typeof e?J:K)(t,e)):this.node()[t]},classed:function(t,e){var n=tt(t+"");if(arguments.length<2){for(var i=et(this.node()),r=-1,s=n.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=s.length;if(!(arguments.length<2)){for(o=e?Ct:wt,i=0;i{}};function Mt(){for(var t,e=0,n=arguments.length,i={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,o=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,i,r=new Array(n),s=0;s=0&&e._call.call(void 0,t),e=e._next;--Pt}()}finally{Pt=0,function(){var t,e,n=Rt,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Rt=e);Zt=t,ee(i)}(),Wt=0}}function te(){var t=Ht.now(),e=t-Ut;e>zt&&(qt-=e,Ut=t)}function ee(t){Pt||(Yt&&(Yt=clearTimeout(Yt)),t-Wt>24?(t<1/0&&(Yt=setTimeout(Jt,t-Ht.now()-qt)),jt&&(jt=clearInterval(jt))):(jt||(Ut=Ht.now(),jt=setInterval(te,zt)),Pt=1,Vt(Jt)))}function ne(t,e,n){var i=new Qt;return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}Qt.prototype=Kt.prototype={constructor:Qt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Gt():+n)+(null==e?0:+e),this._next||Zt===this||(Zt?Zt._next=this:Rt=this,Zt=this),this._call=t,this._time=n,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var ie=Ft("start","end","cancel","interrupt"),re=[],se=0,ae=1,oe=2,ce=3,le=4,he=5,ue=6;function de(t,e,n,i,r,s){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function s(t){n.state=ae,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(s){var l,h,u,d;if(n.state!==ae)return c();for(l in r)if((d=r[l]).name===n.name){if(d.state===ce)return ne(a);d.state===le?(d.state=ue,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+lse)throw new Error("too late; already scheduled");return n}function fe(t,e){var n=ge(t,e);if(n.state>ce)throw new Error("too late; already running");return n}function ge(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ye(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var me,be=180/Math.PI,_e={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xe(t,e,n,i,r,s){var a,o,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,c/=o),t*i180?e+=360:e-t>180&&(t+=360),s.push({i:n.push(r(n)+"rotate(",null,i)-2,x:ye(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(s.rotate,a.rotate,o,c),function(t,e,n,s){t!==e?s.push({i:n.push(r(n)+"skewX(",null,i)-2,x:ye(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(s.skewX,a.skewX,o,c),function(t,e,n,i,s,a){if(t!==n||e!==i){var o=s.push(r(s)+"scale(",null,",",null,")");a.push({i:o-4,x:ye(t,n)},{i:o-2,x:ye(e,i)})}else 1===n&&1===i||s.push(r(s)+"scale("+n+","+i+")")}(s.scaleX,s.scaleY,a.scaleX,a.scaleY,o,c),s=a=null,function(t){for(var e,n=-1,i=c.length;++n>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?He(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?He(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=$e.exec(t))?new Xe(e[1],e[2],e[3],1):(e=Fe.exec(t))?new Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Re.exec(t))?He(e[1],e[2],e[3],e[4]):(e=Ze.exec(t))?He(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Pe.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=Ye.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):je.hasOwnProperty(t)?qe(je[t]):"transparent"===t?new Xe(NaN,NaN,NaN,0):null}function qe(t){return new Xe(t>>16&255,t>>8&255,255&t,1)}function He(t,e,n,i){return i<=0&&(t=e=n=NaN),new Xe(t,e,n,i)}function Ve(t){return t instanceof Le||(t=We(t)),t?new Xe((t=t.rgb()).r,t.g,t.b,t.opacity):new Xe}function Ge(t,e,n,i){return 1===arguments.length?Ve(t):new Xe(t,e,n,null==i?1:i)}function Xe(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Qe(){return`#${en(this.r)}${en(this.g)}${en(this.b)}`}function Ke(){const t=Je(this.opacity);return`${1===t?"rgb(":"rgba("}${tn(this.r)}, ${tn(this.g)}, ${tn(this.b)}${1===t?")":`, ${t})`}`}function Je(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function tn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function en(t){return((t=tn(t))<16?"0":"")+t.toString(16)}function nn(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new sn(t,e,n,i)}function rn(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=We(t)),!t)return new sn;if(t instanceof sn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),a=NaN,o=s-r,c=(s+r)/2;return o?(a=e===s?(n-i)/o+6*(n0&&c<1?0:a,new sn(a,o,c,t.opacity)}function sn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function an(t){return(t=(t||0)%360)<0?t+360:t}function on(t){return Math.max(0,Math.min(1,t||0))}function cn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ln(t,e,n,i,r){var s=t*t,a=s*t;return((1-3*t+3*s-a)*e+(4-6*s+3*a)*n+(1+3*t+3*s-3*a)*i+a*r)/6}Se(Le,We,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return rn(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(Xe,Ge,Ae(Le,{brighter(t){return t=null==t?Ne:Math.pow(Ne,t),new Xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Be:Math.pow(Be,t),new Xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xe(tn(this.r),tn(this.g),tn(this.b),Je(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:Qe,formatHex:Qe,formatHex8:function(){return`#${en(this.r)}${en(this.g)}${en(this.b)}${en(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ke,toString:Ke})),Se(sn,(function(t,e,n,i){return 1===arguments.length?rn(t):new sn(t,e,n,null==i?1:i)}),Ae(Le,{brighter(t){return t=null==t?Ne:Math.pow(Ne,t),new sn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Be:Math.pow(Be,t),new sn(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,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Xe(cn(t>=240?t-240:t+120,r,i),cn(t,r,i),cn(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new sn(an(this.h),on(this.s),on(this.l),Je(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Je(this.opacity);return`${1===t?"hsl(":"hsla("}${an(this.h)}, ${100*on(this.s)}%, ${100*on(this.l)}%${1===t?")":`, ${t})`}`}}));const hn=t=>()=>t;function un(t,e){return function(n){return t+n*e}}function dn(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):hn(isNaN(e)?n:e)}}function pn(t,e){var n=e-t;return n?un(t,n):hn(isNaN(t)?e:t)}const fn=function t(e){var n=dn(e);function i(t,e){var i=n((t=Ge(t)).r,(e=Ge(e)).r),r=n(t.g,e.g),s=n(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=s(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function gn(t){return function(e){var n,i,r=e.length,s=new Array(r),a=new Array(r),o=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1],a=i>0?t[i-1]:2*r-s,o=is&&(r=e.slice(s,r),o[a]?o[a]+=r:o[++a]=r),(n=n[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,c.push({i:a,x:ye(n,i)})),s=mn.lastIndex;return s=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?pe:fe;return function(){var a=s(this,t),o=a.on;o!==i&&(r=(i=o).copy()).on(e,n),a.on=r}}(n,t,e))},attr:function(t,e){var n=Z(t),i="transform"===n?we:_n;return this.attrTween(t,"function"==typeof e?(n.local?Tn:Cn)(n,i,Ee(this,"attr."+t,e)):null==e?(n.local?vn:xn)(n):(n.local?wn:kn)(n,i,e))},attrTween:function(t,e){var n="attr."+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;var i=Z(t);return this.tween(n,(i.local?En:Sn)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?ke:_n;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var s=X(this,t),a=(this.style.removeProperty(t),X(this,t));return s===a?null:s===n&&a===i?r:r=e(n=s,i=a)}}(t,i)).on("end.style."+t,Mn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,s;return function(){var a=X(this,t),o=n(this),c=o+"";return null==o&&(this.style.removeProperty(t),c=o=X(this,t)),a===c?null:a===i&&c===r?s:(r=c,s=e(i=a,o))}}(t,i,Ee(this,"style."+t,e))).each(function(t,e){var n,i,r,s,a="style."+e,o="end."+a;return function(){var c=fe(this,t),l=c.on,h=null==c.value[a]?s||(s=Mn(e)):void 0;l===n&&r===h||(i=(n=l).copy()).on(o,r=h),c.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r,s=n+"";return function(){var a=X(this,t);return a===s?null:a===i?r:r=e(i=a,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function s(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,s,n)),i}return s._value=e,s}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ee(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(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,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=ge(this.node(),n).tween,s=0,a=r.length;soe&&n.statefunction(t,e){return fetch(t,e).then(qn)}(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}Hn("application/xml");Hn("text/html");var Vn=Hn("image/svg+xml");const Gn=Math.PI/180,Xn=180/Math.PI,Qn=.96422,Kn=1,Jn=.82521,ti=4/29,ei=6/29,ni=3*ei*ei,ii=ei*ei*ei;function ri(t){if(t instanceof si)return new si(t.l,t.a,t.b,t.opacity);if(t instanceof di)return pi(t);t instanceof Xe||(t=Ve(t));var e,n,i=li(t.r),r=li(t.g),s=li(t.b),a=ai((.2225045*i+.7168786*r+.0606169*s)/Kn);return i===r&&r===s?e=n=a:(e=ai((.4360747*i+.3850649*r+.1430804*s)/Qn),n=ai((.0139322*i+.0971045*r+.7141733*s)/Jn)),new si(116*a-16,500*(e-a),200*(a-n),t.opacity)}function si(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function ai(t){return t>ii?Math.pow(t,1/3):t/ni+ti}function oi(t){return t>ei?t*t*t:ni*(t-ti)}function ci(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function li(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hi(t){if(t instanceof di)return new di(t.h,t.c,t.l,t.opacity);if(t instanceof si||(t=ri(t)),0===t.a&&0===t.b)return new di(NaN,0180||n<-180?n-360*Math.round(n/360):n):hn(isNaN(t)?e:t)}));fi(pn);const yi=Math.sqrt(50),mi=Math.sqrt(10),bi=Math.sqrt(2);function _i(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),a=s>=yi?10:s>=mi?5:s>=bi?2:1;let o,c,l;return r<0?(l=Math.pow(10,-r)/a,o=Math.round(t*l),c=Math.round(e*l),o/le&&--c,l=-l):(l=Math.pow(10,r)*a,o=Math.round(t/l),c=Math.round(e/l),o*le&&--c),ce?1:t>=e?0:NaN}function wi(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Ci(t){let e,n,i;function r(t,i,r=0,s=t.length){if(r>>1;n(t[e],i)<0?r=e+1:s=e}while(rki(t(e),n),i=(e,n)=>t(e)-n):(e=t===ki||t===wi?t:Ti,n=t,i=t),{left:r,center:function(t,e,n=0,s=t.length){const a=r(t,e,n,s-1);return a>n&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,r=0,s=t.length){if(r>>1;n(t[e],i)<=0?r=e+1:s=e}while(re&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),i=c>2?Pi:Zi,r=s=null,u}function u(e){return null==e||isNaN(e=+e)?n:(r||(r=i(a.map(t),o,c)))(t(l(e)))}return u.invert=function(n){return l(e((s||(s=i(o,a.map(t),ye)))(n)))},u.domain=function(t){return arguments.length?(a=Array.from(t,Oi),h()):a.slice()},u.range=function(t){return arguments.length?(o=Array.from(t),h()):o.slice()},u.rangeRound=function(t){return o=Array.from(t),c=Ii,h()},u.clamp=function(t){return arguments.length?(l=!!t||Fi,h()):l!==Fi},u.interpolate=function(t){return arguments.length?(c=t,h()):c},u.unknown=function(t){return arguments.length?(n=t,u):n},function(n,i){return t=n,e=i,h()}}function zi(){return ji()(Fi,Fi)}function Ui(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Wi,qi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hi(t){if(!(e=qi.exec(t)))throw new Error("invalid format: "+t);var e;return new Vi({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]})}function Vi(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+""}function Gi(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Xi(t){return(t=Gi(Math.abs(t)))?t[1]:NaN}function Qi(t,e){var n=Gi(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Hi.prototype=Vi.prototype,Vi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Ki={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Qi(100*t,e),r:Qi,s:function(t,e){var n=Gi(t,e);if(!n)return t+"";var i=n[0],r=n[1],s=r-(Wi=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Gi(t,Math.max(0,e+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ji(t){return t}var tr,er,nr,ir=Array.prototype.map,rr=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function sr(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Ji:(e=ir.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,s=[],a=0,o=e[0],c=0;r>0&&o>0&&(c+o+1>i&&(o=Math.max(1,i-c)),s.push(t.substring(r-=o,r+o)),!((c+=o+1)>i));)o=e[a=(a+1)%e.length];return s.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Ji:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ir.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Hi(t)).fill,n=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,b=t.type;"n"===b?(g=!0,b="g"):Ki[b]||(void 0===y&&(y=12),m=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===d?r:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?s:/[%p]/.test(b)?c:"",v=Ki[b],k=/[defgprs%]/.test(b);function w(t){var r,s,c,d=_,w=x;if("c"===b)w=v(t)+w,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:v(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==u&&(C=!1),d=(C?"("===u?u:l:"-"===u||"("===u?"":u)+d,w=("s"===b?rr[8+Wi/3]:"")+w+(C&&"("===u?")":""),k)for(r=-1,s=t.length;++r(c=t.charCodeAt(r))||c>57){w=(46===c?a+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}g&&!p&&(t=i(t,1/0));var T=d.length+t.length+w.length,E=T>1)+d+t+w+E.slice(T);break;default:t=E+d+t+w}return o(t)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:u,formatPrefix:function(t,e){var n=u(((t=Hi(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Xi(e)/3))),r=Math.pow(10,-i),s=rr[8+i/3];return function(t){return n(r*t)+s}}}}function ar(t,e,n,i){var r,s=vi(t,e,n);switch((i=Hi(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Xi(e)/3)))-Xi(Math.abs(t)))}(s,a))||(i.precision=r),nr(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Xi(e)-Xi(t))+1}(s,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-Xi(Math.abs(t)))}(s))||(i.precision=r-2*("%"===i.type))}return er(i)}function or(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const i=e=r))return[];const o=s-r+1,c=new Array(o);if(i)if(a<0)for(let l=0;l0;){if((r=xi(c,l,n))===i)return s[a]=c,s[o]=l,e(s);if(r>0)c=Math.floor(c/r)*r,l=Math.ceil(l/r)*r;else{if(!(r<0))break;c=Math.ceil(c*r)/r,l=Math.floor(l*r)/r}i=r}return t},t}function cr(){var t=zi();return t.copy=function(){return Yi(t,cr())},Ui.apply(t,arguments),or(t)}tr=sr({thousands:",",grouping:[3],currency:["$",""]}),er=tr.format,nr=tr.formatPrefix;class lr extends Map{constructor(t,e=fr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(ur(this,t))}has(t){return super.has(ur(this,t))}set(t,e){return super.set(dr(this,t),e)}delete(t){return super.delete(pr(this,t))}}class hr extends Set{constructor(t,e=fr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(ur(this,t))}add(t){return super.add(dr(this,t))}delete(t){return super.delete(pr(this,t))}}function ur({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function dr({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function pr({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function fr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const gr=Symbol("implicit");function yr(){var t=new lr,e=[],n=[],i=gr;function r(r){let s=t.get(r);if(void 0===s){if(i!==gr)return i;t.set(r,s=e.push(r)-1)}return n[s%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new lr;for(const i of n)t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return yr(e,n).unknown(i)},Ui.apply(r,arguments),r}const mr=1e3,br=60*mr,_r=60*br,xr=24*_r,vr=7*xr,kr=30*xr,wr=365*xr,Cr=new Date,Tr=new Date;function Er(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=e=>(t(e=new Date(+e)),e),r.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),r.round=t=>{const e=r(t),n=r.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),r.range=(n,i,s)=>{const a=[];if(n=r.ceil(n),s=null==s?1:Math.floor(s),!(n0))return a;let o;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(oEr((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})),n&&(r.count=(e,i)=>(Cr.setTime(+e),Tr.setTime(+i),t(Cr),t(Tr),Math.floor(n(Cr,Tr))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?e=>i(e)%t==0:e=>r.count(0,e)%t==0):r:null)),r}const Sr=Er((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Sr.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Er((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Sr:null);Sr.range;const Ar=Er((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*mr)}),((t,e)=>(e-t)/mr),(t=>t.getUTCSeconds())),Lr=(Ar.range,Er((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mr)}),((t,e)=>{t.setTime(+t+e*br)}),((t,e)=>(e-t)/br),(t=>t.getMinutes()))),Br=(Lr.range,Er((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*br)}),((t,e)=>(e-t)/br),(t=>t.getUTCMinutes()))),Nr=(Br.range,Er((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mr-t.getMinutes()*br)}),((t,e)=>{t.setTime(+t+e*_r)}),((t,e)=>(e-t)/_r),(t=>t.getHours()))),Dr=(Nr.range,Er((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*_r)}),((t,e)=>(e-t)/_r),(t=>t.getUTCHours()))),Mr=(Dr.range,Er((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*br)/xr),(t=>t.getDate()-1))),Ir=(Mr.range,Er((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/xr),(t=>t.getUTCDate()-1))),Or=(Ir.range,Er((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/xr),(t=>Math.floor(t/xr))));Or.range;function $r(t){return Er((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*br)/vr))}const Fr=$r(0),Rr=$r(1),Zr=$r(2),Pr=$r(3),Yr=$r(4),jr=$r(5),zr=$r(6);Fr.range,Rr.range,Zr.range,Pr.range,Yr.range,jr.range,zr.range;function Ur(t){return Er((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/vr))}const Wr=Ur(0),qr=Ur(1),Hr=Ur(2),Vr=Ur(3),Gr=Ur(4),Xr=Ur(5),Qr=Ur(6),Kr=(Wr.range,qr.range,Hr.range,Vr.range,Gr.range,Xr.range,Qr.range,Er((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()))),Jr=(Kr.range,Er((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()))),ts=(Jr.range,Er((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())));ts.every=t=>isFinite(t=Math.floor(t))&&t>0?Er((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null;ts.range;const es=Er((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()));es.every=t=>isFinite(t=Math.floor(t))&&t>0?Er((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null;es.range;function ns(t,e,n,i,r,s){const a=[[Ar,1,mr],[Ar,5,5*mr],[Ar,15,15*mr],[Ar,30,30*mr],[s,1,br],[s,5,5*br],[s,15,15*br],[s,30,30*br],[r,1,_r],[r,3,3*_r],[r,6,6*_r],[r,12,12*_r],[i,1,xr],[i,2,2*xr],[n,1,vr],[e,1,kr],[e,3,3*kr],[t,1,wr]];function o(e,n,i){const r=Math.abs(n-e)/i,s=Ci((([,,t])=>t)).right(a,r);if(s===a.length)return t.every(vi(e/wr,n/wr,i));if(0===s)return Sr.every(Math.max(vi(e,n,i),1));const[o,c]=a[r/a[s-1][2][t.toLowerCase(),e])))}function xs(t,e,n){var i=ps.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function vs(t,e,n){var i=ps.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function ks(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function ws(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Cs(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Ts(t,e,n){var i=ps.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Es(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Ss(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function As(t,e,n){var i=ps.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function Ls(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Bs(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ns(t,e,n){var i=ps.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Ds(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Ms(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Is(t,e,n){var i=ps.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Os(t,e,n){var i=ps.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function $s(t,e,n){var i=ps.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Fs(t,e,n){var i=fs.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Rs(t,e,n){var i=ps.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Zs(t,e,n){var i=ps.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Ps(t,e){return ys(t.getDate(),e,2)}function Ys(t,e){return ys(t.getHours(),e,2)}function js(t,e){return ys(t.getHours()%12||12,e,2)}function zs(t,e){return ys(1+Mr.count(ts(t),t),e,3)}function Us(t,e){return ys(t.getMilliseconds(),e,3)}function Ws(t,e){return Us(t,e)+"000"}function qs(t,e){return ys(t.getMonth()+1,e,2)}function Hs(t,e){return ys(t.getMinutes(),e,2)}function Vs(t,e){return ys(t.getSeconds(),e,2)}function Gs(t){var e=t.getDay();return 0===e?7:e}function Xs(t,e){return ys(Fr.count(ts(t)-1,t),e,2)}function Qs(t){var e=t.getDay();return e>=4||0===e?Yr(t):Yr.ceil(t)}function Ks(t,e){return t=Qs(t),ys(Yr.count(ts(t),t)+(4===ts(t).getDay()),e,2)}function Js(t){return t.getDay()}function ta(t,e){return ys(Rr.count(ts(t)-1,t),e,2)}function ea(t,e){return ys(t.getFullYear()%100,e,2)}function na(t,e){return ys((t=Qs(t)).getFullYear()%100,e,2)}function ia(t,e){return ys(t.getFullYear()%1e4,e,4)}function ra(t,e){var n=t.getDay();return ys((t=n>=4||0===n?Yr(t):Yr.ceil(t)).getFullYear()%1e4,e,4)}function sa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ys(e/60|0,"0",2)+ys(e%60,"0",2)}function aa(t,e){return ys(t.getUTCDate(),e,2)}function oa(t,e){return ys(t.getUTCHours(),e,2)}function ca(t,e){return ys(t.getUTCHours()%12||12,e,2)}function la(t,e){return ys(1+Ir.count(es(t),t),e,3)}function ha(t,e){return ys(t.getUTCMilliseconds(),e,3)}function ua(t,e){return ha(t,e)+"000"}function da(t,e){return ys(t.getUTCMonth()+1,e,2)}function pa(t,e){return ys(t.getUTCMinutes(),e,2)}function fa(t,e){return ys(t.getUTCSeconds(),e,2)}function ga(t){var e=t.getUTCDay();return 0===e?7:e}function ya(t,e){return ys(Wr.count(es(t)-1,t),e,2)}function ma(t){var e=t.getUTCDay();return e>=4||0===e?Gr(t):Gr.ceil(t)}function ba(t,e){return t=ma(t),ys(Gr.count(es(t),t)+(4===es(t).getUTCDay()),e,2)}function _a(t){return t.getUTCDay()}function xa(t,e){return ys(qr.count(es(t)-1,t),e,2)}function va(t,e){return ys(t.getUTCFullYear()%100,e,2)}function ka(t,e){return ys((t=ma(t)).getUTCFullYear()%100,e,2)}function wa(t,e){return ys(t.getUTCFullYear()%1e4,e,4)}function Ca(t,e){var n=t.getUTCDay();return ys((t=n>=4||0===n?Gr(t):Gr.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ta(){return"+0000"}function Ea(){return"%"}function Sa(t){return+t}function Aa(t){return Math.floor(+t/1e3)}function La(t){return new Date(t)}function Ba(t){return t instanceof Date?+t:+new Date(+t)}function Na(t,e,n,i,r,s,a,o,c,l){var h=zi(),u=h.invert,d=h.domain,p=l(".%L"),f=l(":%S"),g=l("%I:%M"),y=l("%I %p"),m=l("%a %d"),b=l("%b %d"),_=l("%B"),x=l("%Y");function v(t){return(c(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Sa,s:Aa,S:Vs,u:Gs,U:Xs,V:Ks,w:Js,W:ta,x:null,X:null,y:ea,Y:ia,Z:sa,"%":Ea},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:aa,e:aa,f:ua,g:ka,G:Ca,H:oa,I:ca,j:la,L:ha,m:da,M:pa,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Sa,s:Aa,S:fa,u:ga,U:ya,V:ba,w:_a,W:xa,x:null,X:null,y:va,Y:wa,Z:Ta,"%":Ea},v={a:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=u.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=b.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=g.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return C(t,e,n,i)},d:Bs,e:Bs,f:$s,g:Es,G:Ts,H:Ds,I:Ds,j:Ns,L:Os,m:Ls,M:Ms,p:function(t,e,n){var i=l.exec(e.slice(n));return i?(t.p=h.get(i[0].toLowerCase()),n+i[0].length):-1},q:As,Q:Rs,s:Zs,S:Is,u:vs,U:ks,V:ws,w:xs,W:Cs,x:function(t,e,i){return C(t,n,e,i)},X:function(t,e,n){return C(t,i,e,n)},y:Es,Y:Ts,Z:Ss,"%":Fs};function k(t,e){return function(n){var i,r,s,a=[],o=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++o53)return null;"w"in s||(s.w=1),"Z"in s?(r=(i=cs(ls(s.y,0,1))).getUTCDay(),i=r>4||0===r?qr.ceil(i):qr(i),i=Ir.offset(i,7*(s.V-1)),s.y=i.getUTCFullYear(),s.m=i.getUTCMonth(),s.d=i.getUTCDate()+(s.w+6)%7):(r=(i=os(ls(s.y,0,1))).getDay(),i=r>4||0===r?Rr.ceil(i):Rr(i),i=Mr.offset(i,7*(s.V-1)),s.y=i.getFullYear(),s.m=i.getMonth(),s.d=i.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),r="Z"in s?cs(ls(s.y,0,1)).getUTCDay():os(ls(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(r+5)%7:s.w+7*s.U-(r+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,cs(s)):os(s)}}function C(t,e,n,i){for(var r,s,a=0,o=e.length,c=n.length;a=c)return-1;if(37===(r=e.charCodeAt(a++))){if(r=e.charAt(a++),!(s=v[r in ds?e.charAt(a++):r])||(i=s(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return _.x=k(n,_),_.X=k(i,_),_.c=k(e,_),x.x=k(n,x),x.X=k(i,x),x.c=k(e,x),{format:function(t){var e=k(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}(t),us=hs.format,hs.parse,hs.utcFormat,hs.utcParse}({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"]});const $a=Math.abs,Fa=Math.atan2,Ra=Math.cos,Za=Math.max,Pa=Math.min,Ya=Math.sin,ja=Math.sqrt,za=1e-12,Ua=Math.PI,Wa=Ua/2,qa=2*Ua;function Ha(t){return t>=1?Wa:t<=-1?-Wa:Math.asin(t)}const Va=Math.PI,Ga=2*Va,Xa=1e-6,Qa=Ga-Xa;function Ka(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ka;const n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;eXa)if(Math.abs(h*o-c*l)>Xa&&r){let d=n-s,p=i-a,f=o*o+c*c,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),b=r*Math.tan((Va-Math.acos((f+u-g)/(2*y*m)))/2),_=b/m,x=b/y;Math.abs(_-1)>Xa&&this._append`L${t+_*l},${e+_*h}`,this._append`A${r},${r},0,0,${+(h*d>l*p)},${this._x1=t+x*o},${this._y1=e+x*c}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,i,r,s){if(t=+t,e=+e,s=!!s,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(i),o=n*Math.sin(i),c=t+a,l=e+o,h=1^s,u=s?i-r:r-i;null===this._x1?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Xa||Math.abs(this._y1-l)>Xa)&&this._append`L${c},${l}`,n&&(u<0&&(u=u%Ga+Ga),u>Qa?this._append`A${n},${n},0,1,${h},${t-a},${e-o}A${n},${n},0,1,${h},${this._x1=c},${this._y1=l}`:u>Xa&&this._append`A${n},${n},0,${+(u>=Va)},${h},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function to(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Ja(e)}function eo(t){return t.innerRadius}function no(t){return t.outerRadius}function io(t){return t.startAngle}function ro(t){return t.endAngle}function so(t){return t&&t.padAngle}function ao(t,e,n,i,r,s,a){var o=t-n,c=e-i,l=(a?s:-s)/ja(o*o+c*c),h=l*c,u=-l*o,d=t+h,p=e+u,f=n+h,g=i+u,y=(d+f)/2,m=(p+g)/2,b=f-d,_=g-p,x=b*b+_*_,v=r-s,k=d*g-f*p,w=(_<0?-1:1)*ja(Za(0,v*v*x-k*k)),C=(k*_-b*w)/x,T=(-k*b-_*w)/x,E=(k*_+b*w)/x,S=(-k*b+_*w)/x,A=C-y,L=T-m,B=E-y,N=S-m;return A*A+L*L>B*B+N*N&&(C=E,T=S),{cx:C,cy:T,x01:-h,y01:-u,x11:C*(r/v-1),y11:T*(r/v-1)}}function oo(){var t=eo,e=no,n=Oa(0),i=null,r=io,s=ro,a=so,o=null,c=to(l);function l(){var l,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=r.apply(this,arguments)-Wa,g=s.apply(this,arguments)-Wa,y=$a(g-f),m=g>f;if(o||(o=l=c()),pza)if(y>qa-za)o.moveTo(p*Ra(f),p*Ya(f)),o.arc(0,0,p,f,g,!m),d>za&&(o.moveTo(d*Ra(g),d*Ya(g)),o.arc(0,0,d,g,f,m));else{var b,_,x=f,v=g,k=f,w=g,C=y,T=y,E=a.apply(this,arguments)/2,S=E>za&&(i?+i.apply(this,arguments):ja(d*d+p*p)),A=Pa($a(p-d)/2,+n.apply(this,arguments)),L=A,B=A;if(S>za){var N=Ha(S/d*Ya(E)),D=Ha(S/p*Ya(E));(C-=2*N)>za?(k+=N*=m?1:-1,w-=N):(C=0,k=w=(f+g)/2),(T-=2*D)>za?(x+=D*=m?1:-1,v-=D):(T=0,x=v=(f+g)/2)}var M=p*Ra(x),I=p*Ya(x),O=d*Ra(w),$=d*Ya(w);if(A>za){var F,R=p*Ra(v),Z=p*Ya(v),P=d*Ra(k),Y=d*Ya(k);if(y1?0:u<-1?Ua:Math.acos(u))/2),H=ja(F[0]*F[0]+F[1]*F[1]);L=Pa(A,(d-H)/(q-1)),B=Pa(A,(p-H)/(q+1))}else L=B=0}T>za?B>za?(b=ao(P,Y,M,I,p,B,m),_=ao(R,Z,O,$,p,B,m),o.moveTo(b.cx+b.x01,b.cy+b.y01),Bza&&C>za?L>za?(b=ao(O,$,R,Z,d,-L,m),_=ao(M,I,P,Y,d,-L,m),o.lineTo(b.cx+b.x01,b.cy+b.y01),Lt?1:e>=t?0:NaN}function yo(t){return t}function mo(){var t=yo,e=go,n=null,i=Oa(0),r=Oa(qa),s=Oa(0);function a(a){var o,c,l,h,u,d=(a=co(a)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(qa,Math.max(-qa,r.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/d,s.apply(this,arguments)),_=b*(m<0?-1:1);for(o=0;o0&&(p+=u);for(null!=e?f.sort((function(t,n){return e(g[t],g[n])})):null!=n&&f.sort((function(t,e){return n(a[t],a[e])})),o=0,l=p?(m-d*_)/p:0;o0?u*l:0)+_,g[c]={data:a[c],index:o,value:u,startAngle:y,endAngle:h,padAngle:b};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Oa(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Oa(+t),a):i},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Oa(+t),a):r},a.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:Oa(+t),a):s},a}function bo(){}function _o(t,e,n){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+n)/6)}function xo(t){this._context=t}function vo(t){return new xo(t)}function ko(t){this._context=t}function wo(t){return new ko(t)}function Co(t){this._context=t}function To(t){return new Co(t)}lo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point: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)}}},xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_o(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},point: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:_o(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ko.prototype={areaStart:bo,areaEnd:bo,lineStart: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},lineEnd: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)}},point: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:_o(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Co.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point: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 n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:_o(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class Eo{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}}function So(t){return new Eo(t,!0)}function Ao(t){return new Eo(t,!1)}function Lo(t,e){this._basis=new xo(t),this._beta=e}Lo.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],s=e[0],a=t[n]-r,o=e[n]-s,c=-1;++c<=n;)i=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*a),this._beta*e[c]+(1-this._beta)*(s+i*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Bo=function t(e){function n(t){return 1===e?new xo(t):new Lo(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function No(t,e,n){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-n),t._x2,t._y2)}function Do(t,e){this._context=t,this._k=(1-e)/6}Do.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:No(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point: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:No(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}};const Mo=function t(e){function n(t){return new Do(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Io(t,e){this._context=t,this._k=(1-e)/6}Io.prototype={areaStart:bo,areaEnd:bo,lineStart: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},lineEnd: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)}},point: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:No(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}};const Oo=function t(e){function n(t){return new Io(t,e)}return n.tension=function(e){return t(+e)},n}(0);function $o(t,e){this._context=t,this._k=(1-e)/6}$o.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point: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:No(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}};const Fo=function t(e){function n(t){return new $o(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ro(t,e,n){var i=t._x1,r=t._y1,s=t._x2,a=t._y2;if(t._l01_a>za){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>za){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*l+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,s,a,t._x2,t._y2)}function Zo(t,e){this._context=t,this._alpha=e}Zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd: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},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}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;default:Ro(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}};const Po=function t(e){function n(t){return e?new Zo(t,e):new Do(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Yo(t,e){this._context=t,this._alpha=e}Yo.prototype={areaStart:bo,areaEnd:bo,lineStart: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},lineEnd: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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(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:Ro(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}};const jo=function t(e){function n(t){return e?new Yo(t,e):new Io(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zo(t,e){this._context=t,this._alpha=e}zo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart: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},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(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:Ro(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}};const Uo=function t(e){function n(t){return e?new zo(t,e):new $o(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Wo(t){this._context=t}function qo(t){return new Wo(t)}function Ho(t){return t<0?-1:1}function Vo(t,e,n){var i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||r<0&&-0),a=(n-t._y1)/(r||i<0&&-0),o=(s*r+a*i)/(i+r);return(Ho(s)+Ho(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function Go(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Xo(t,e,n){var i=t._x0,r=t._y0,s=t._x1,a=t._y1,o=(s-i)/3;t._context.bezierCurveTo(i+o,r+o*e,s-o,a-o*n,s,a)}function Qo(t){this._context=t}function Ko(t){this._context=new Jo(t)}function Jo(t){this._context=t}function tc(t){return new Qo(t)}function ec(t){return new Ko(t)}function nc(t){this._context=t}function ic(t){var e,n,i=t.length-1,r=new Array(i),s=new Array(i),a=new Array(i);for(r[0]=0,s[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(a[e]-r[e+1])/s[e];for(s[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point: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:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},lc.prototype={constructor:lc,scale:function(t){return 1===t?this:new lc(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new lc(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new lc(1,0,0);lc.prototype},23352:(t,e,n)=>{"use strict";function i(t,e,n,i){var s,a,o,c,l,h,u,d,p,f,g,y,m;if(s=e.y-t.y,o=t.x-e.x,l=e.x*t.y-t.x*e.y,p=s*n.x+o*n.y+l,f=s*i.x+o*i.y+l,!(0!==p&&0!==f&&r(p,f)||(a=i.y-n.y,c=n.x-i.x,h=i.x*n.y-n.x*i.y,u=a*t.x+c*t.y+h,d=a*e.x+c*e.y+h,0!==u&&0!==d&&r(u,d)||0==(g=s*c-a*o))))return y=Math.abs(g/2),{x:(m=o*h-c*l)<0?(m-y)/g:(m+y)/g,y:(m=a*l-s*h)<0?(m-y)/g:(m+y)/g}}function r(t,e){return t*e>0}function s(t,e,n){var r=t.x,s=t.y,a=[],o=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){o=Math.min(o,t.x),c=Math.min(c,t.y)}));for(var l=r-t.width/2-o,h=s-t.height/2-c,u=0;u1&&a.sort((function(t,e){var i=t.x-n.x,r=t.y-n.y,s=Math.sqrt(i*i+r*r),a=e.x-n.x,o=e.y-n.y,c=Math.sqrt(a*a+o*o);return ss})},22930:(t,e,n)=>{"use strict";function i(t,e){var n,i,r=t.x,s=t.y,a=e.x-r,o=e.y-s,c=t.width/2,l=t.height/2;return Math.abs(o)*c>Math.abs(a)*l?(o<0&&(l=-l),n=0===o?0:l*a/o,i=l):(a<0&&(c=-c),n=c,i=0===a?0:c*o/a),{x:r+n,y:s+i}}n.d(e,{q:()=>i})},43349:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});var i=n(96225);function r(t,e){var n=t.append("foreignObject").attr("width","100000"),r=n.append("xhtml:div");r.attr("xmlns","http://www.w3.org/1999/xhtml");var s=e.label;switch(typeof s){case"function":r.insert(s);break;case"object":r.insert((function(){return s}));break;default:r.html(s)}i.bg(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap");var a=r.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},96225:(t,e,n)=>{"use strict";n.d(e,{$p:()=>h,O1:()=>a,WR:()=>u,bF:()=>s,bg:()=>l});var i=n(37514),r=n(73234);function s(t,e){return!!t.children(e).length}function a(t){return c(t.v)+":"+c(t.w)+":"+c(t.name)}var o=/:/g;function c(t){return t?String(t).replace(o,"\\:"):""}function l(t,e){e&&t.attr("style",e)}function h(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))}function u(t,e){var n=e.graph();if(i.Z(n)){var s=n.transition;if(r.Z(s))return s(t)}return t}},70277:(t,e,n)=>{"use strict";n.d(e,{bK:()=>Qe});var i=n(70870),r=n(66749),s=n(17452),a=n(62002),o=n(27961),c=n(43836),l=n(74379),h=n(45625);class u{constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return d(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&d(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e}toString(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,p)),n=n._prev;return"["+t.join(", ")+"]"}}function d(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function p(t,e){if("_next"!==t&&"_prev"!==t)return e}var f=a.Z(1);function g(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new h.k,r=0,s=0;i.Z(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),i.Z(t.edges(),(function(t){var i=n.edge(t.v,t.w)||0,a=e(t),o=i+a;n.setEdge(t.v,t.w,o),s=Math.max(s,n.node(t.v).out+=a),r=Math.max(r,n.node(t.w).in+=a)}));var a=l.Z(s+r+3).map((function(){return new u})),o=r+1;return i.Z(n.nodes(),(function(t){m(a,o,n.node(t))})),{graph:n,buckets:a,zeroIdx:o}}(t,e||f),r=function(t,e,n){var i,r=[],s=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;i=a.dequeue();)y(t,e,n,i);for(;i=s.dequeue();)y(t,e,n,i);if(t.nodeCount())for(var o=e.length-2;o>0;--o)if(i=e[o].dequeue()){r=r.concat(y(t,e,n,i,!0));break}}return r}(n.graph,n.buckets,n.zeroIdx);return o.Z(c.Z(r,(function(e){return t.outEdges(e.v,e.w)})))}function y(t,e,n,r,s){var a=s?[]:void 0;return i.Z(t.inEdges(r.v),(function(i){var r=t.edge(i),o=t.node(i.v);s&&a.push({v:i.v,w:i.w}),o.out-=r,m(e,n,o)})),i.Z(t.outEdges(r.v),(function(i){var r=t.edge(i),s=i.w,a=t.node(s);a.in-=r,m(e,n,a)})),t.removeNode(r.v),a}function m(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}function b(t){var e="greedy"===t.graph().acyclicer?g(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},r={};function a(o){s.Z(r,o)||(r[o]=!0,n[o]=!0,i.Z(t.outEdges(o),(function(t){s.Z(n,t.w)?e.push(t):a(t.w)})),delete n[o])}return i.Z(t.nodes(),a),e}(t);i.Z(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.Z("rev"))}))}var _=n(31667),x=n(74752),v=n(79651);const k=function(t,e,n){(void 0!==n&&!(0,v.Z)(t[e],n)||void 0===n&&!(e in t))&&(0,x.Z)(t,e,n)};var w=n(61395),C=n(91050),T=n(12701),E=n(87215),S=n(73658),A=n(29169),L=n(27771),B=n(836),N=n(77008),D=n(73234),M=n(77226),I=n(37514),O=n(18843);const $=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var F=n(31899),R=n(32957);const Z=function(t){return(0,F.Z)(t,(0,R.Z)(t))};const P=function(t,e,n,i,r,s,a){var o=$(t,n),c=$(e,n),l=a.get(c);if(l)k(t,n,l);else{var h=s?s(o,c,n+"",t,e,a):void 0,u=void 0===h;if(u){var d=(0,L.Z)(c),p=!d&&(0,N.Z)(c),f=!d&&!p&&(0,O.Z)(c);h=c,d||p||f?(0,L.Z)(o)?h=o:(0,B.Z)(o)?h=(0,E.Z)(o):p?(u=!1,h=(0,C.Z)(c,!0)):f?(u=!1,h=(0,T.Z)(c,!0)):h=[]:(0,I.Z)(c)||(0,A.Z)(c)?(h=o,(0,A.Z)(o)?h=Z(o):(0,M.Z)(o)&&!(0,D.Z)(o)||(h=(0,S.Z)(c))):u=!1}u&&(a.set(c,h),r(h,c,i,s,a),a.delete(c)),k(t,n,h)}};const Y=function t(e,n,i,r,s){e!==n&&(0,w.Z)(n,(function(a,o){if(s||(s=new _.Z),(0,M.Z)(a))P(e,n,o,i,t,r,s);else{var c=r?r($(e,o),a,o+"",e,n,s):void 0;void 0===c&&(c=a),k(e,o,c)}}),R.Z)};var j=n(69581),z=n(50439);const U=function(t){return(0,j.Z)((function(e,n){var i=-1,r=n.length,s=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(r--,s):void 0,a&&(0,z.Z)(n[0],n[1],a)&&(s=r<3?void 0:s,r=1),e=Object(e);++ie};var X=n(69203);const Q=function(t){return t&&t.length?V(t,X.Z,G):void 0};const K=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};var J=n(2693),tt=n(74765);const et=function(t,e){var n={};return e=(0,tt.Z)(e,3),(0,J.Z)(t,(function(t,i,r){(0,x.Z)(n,i,e(t,i,r))})),n};var nt=n(49360);const it=function(t,e){return tMath.abs(a)*l?(o<0&&(l=-l),n=l*a/o,i=l):(a<0&&(c=-c),n=c,i=c*o/a),{x:r+n,y:s+i}}function ht(t){var e=c.Z(l.Z(dt(t)+1),(function(){return[]}));return i.Z(t.nodes(),(function(n){var i=t.node(n),r=i.rank;nt.Z(r)||(e[r][i.order]=n)})),e}function ut(t,e,n,i){var r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),ot(t,"border",r,e)}function dt(t){return Q(c.Z(t.nodes(),(function(e){var n=t.node(e).rank;if(!nt.Z(n))return n})))}function pt(t,e){var n=at();try{return e()}finally{console.log(t+" time: "+(at()-n)+"ms")}}function ft(t,e){return e()}function gt(t,e,n,i,r,s){var a={width:0,height:0,rank:s,borderType:e},o=r[e][s-1],c=ot(t,"border",a,n);r[e][s]=c,t.setParent(c,i),o&&t.setEdge(o,c,{weight:1})}function yt(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){i.Z(t.nodes(),(function(e){_t(t.node(e))})),i.Z(t.edges(),(function(e){var n=t.edge(e);i.Z(n.points,_t),s.Z(n,"y")&&_t(n)}))}(t),"lr"!==e&&"rl"!==e||(!function(t){i.Z(t.nodes(),(function(e){xt(t.node(e))})),i.Z(t.edges(),(function(e){var n=t.edge(e);i.Z(n.points,xt),s.Z(n,"x")&&xt(n)}))}(t),mt(t))}function mt(t){i.Z(t.nodes(),(function(e){bt(t.node(e))})),i.Z(t.edges(),(function(e){bt(t.edge(e))}))}function bt(t){var e=t.width;t.width=t.height,t.height=e}function _t(t){t.y=-t.y}function xt(t){var e=t.x;t.x=t.y,t.y=e}function vt(t){t.graph().dummyChains=[],i.Z(t.edges(),(function(e){!function(t,e){var n,i,r,s=e.v,a=t.node(s).rank,o=e.w,c=t.node(o).rank,l=e.name,h=t.edge(e),u=h.labelRank;if(c===a+1)return;for(t.removeEdge(e),r=0,++a;a-1?r[s?e[a]:a]:void 0}};var Dt=n(21692),Mt=n(94099);const It=function(t){var e=(0,Mt.Z)(t),n=e%1;return e==e?n?e-n:e:0};var Ot=Math.max;const $t=Nt((function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:It(n);return r<0&&(r=Ot(i+r,0)),(0,Dt.Z)(t,(0,tt.Z)(e,3),r)}));var Ft=n(13445);a.Z(1);a.Z(1);n(39473),n(83970),n(93589),n(18533);(0,n(54193).Z)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Rt="\\ud800-\\udfff",Zt="["+Rt+"]",Pt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Yt="\\ud83c[\\udffb-\\udfff]",jt="[^"+Rt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",Wt="(?:"+Pt+"|"+Yt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Ht=qt+Wt+("(?:\\u200d(?:"+[jt,zt,Ut].join("|")+")"+qt+Wt+")*"),Vt="(?:"+[jt+Pt+"?",Pt,zt,Ut,Zt].join("|")+")";RegExp(Yt+"(?="+Yt+")|"+Vt+Ht,"g");function Gt(){}function Xt(t,e,n){L.Z(e)||(e=[e]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),s=[],a={};return i.Z(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);Qt(t,e,"post"===n,a,r,s)})),s}function Qt(t,e,n,r,a,o){s.Z(r,e)||(r[e]=!0,n||o.push(e),i.Z(a(e),(function(e){Qt(t,e,n,r,a,o)})),n&&o.push(e))}Gt.prototype=new Error;n(52544);function Kt(t){t=function(t){var e=(new h.k).setGraph(t.graph());return i.Z(t.nodes(),(function(n){e.setNode(n,t.node(n))})),i.Z(t.edges(),(function(n){var i=e.edge(n.v,n.w)||{weight:0,minlen:1},r=t.edge(n);e.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})})),e}(t),wt(t);var e,n=Tt(t);for(ee(n),Jt(n,t);e=ie(n);)se(n,t,e,re(n,t,e))}function Jt(t,e){var n=function(t,e){return Xt(t,e,"post")}(t,t.nodes());n=n.slice(0,n.length-1),i.Z(n,(function(n){!function(t,e,n){var i=t.node(n),r=i.parent;t.edge(n,r).cutvalue=te(t,e,n)}(t,e,n)}))}function te(t,e,n){var r=t.node(n).parent,s=!0,a=e.edge(n,r),o=0;return a||(s=!1,a=e.edge(r,n)),o=a.weight,i.Z(e.nodeEdges(n),(function(i){var a,c,l=i.v===n,h=l?i.w:i.v;if(h!==r){var u=l===s,d=e.edge(i).weight;if(o+=u?d:-d,a=n,c=h,t.hasEdge(a,c)){var p=t.edge(n,h).cutvalue;o+=u?-p:p}}})),o}function ee(t,e){arguments.length<2&&(e=t.nodes()[0]),ne(t,{},1,e)}function ne(t,e,n,r,a){var o=n,c=t.node(r);return e[r]=!0,i.Z(t.neighbors(r),(function(i){s.Z(e,i)||(n=ne(t,e,n,i,r))})),c.low=o,c.lim=n++,a?c.parent=a:delete c.parent,n}function ie(t){return $t(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function re(t,e,n){var i=n.v,r=n.w;e.hasEdge(i,r)||(i=n.w,r=n.v);var s=t.node(i),a=t.node(r),o=s,c=!1;s.lim>a.lim&&(o=a,c=!0);var l=Ft.Z(e.edges(),(function(e){return c===ae(t,t.node(e.v),o)&&c!==ae(t,t.node(e.w),o)}));return kt(l,(function(t){return Ct(e,t)}))}function se(t,e,n,r){var s=n.v,a=n.w;t.removeEdge(s,a),t.setEdge(r.v,r.w,{}),ee(t),Jt(t,e),function(t,e){var n=$t(t.nodes(),(function(t){return!e.node(t).parent})),r=function(t,e){return Xt(t,e,"pre")}(t,n);r=r.slice(1),i.Z(r,(function(n){var i=t.node(n).parent,r=e.edge(n,i),s=!1;r||(r=e.edge(i,n),s=!0),e.node(n).rank=e.node(i).rank+(s?r.minlen:-r.minlen)}))}(t,e)}function ae(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}function oe(t){switch(t.graph().ranker){case"network-simplex":default:le(t);break;case"tight-tree":!function(t){wt(t),Tt(t)}(t);break;case"longest-path":ce(t)}}Kt.initLowLimValues=ee,Kt.initCutValues=Jt,Kt.calcCutValue=te,Kt.leaveEdge=ie,Kt.enterEdge=re,Kt.exchangeEdges=se;var ce=wt;function le(t){Kt(t)}var he=n(34148),ue=n(92344);function de(t){var e=ot(t,"root",{},"_root"),n=function(t){var e={};function n(r,s){var a=t.children(r);a&&a.length&&i.Z(a,(function(t){n(t,s+1)})),e[r]=s}return i.Z(t.children(),(function(t){n(t,1)})),e}(t),r=Q(he.Z(n))-1,s=2*r+1;t.graph().nestingRoot=e,i.Z(t.edges(),(function(e){t.edge(e).minlen*=s}));var a=function(t){return ue.Z(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;i.Z(t.children(),(function(i){pe(t,e,s,a,r,n,i)})),t.graph().nodeRankFactor=s}function pe(t,e,n,r,s,a,o){var c=t.children(o);if(c.length){var l=ut(t,"_bt"),h=ut(t,"_bb"),u=t.node(o);t.setParent(l,o),u.borderTop=l,t.setParent(h,o),u.borderBottom=h,i.Z(c,(function(i){pe(t,e,n,r,s,a,i);var c=t.node(i),u=c.borderTop?c.borderTop:i,d=c.borderBottom?c.borderBottom:i,p=c.borderTop?r:2*r,f=u!==d?1:s-a[o]+1;t.setEdge(l,u,{weight:p,minlen:f,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:f,nestingEdge:!0})})),t.parent(o)||t.setEdge(e,l,{weight:0,minlen:s+a[o]})}else o!==e&&t.setEdge(e,o,{weight:0,minlen:n})}var fe=n(48451),ge=1,ye=4;const me=function(t){return(0,fe.Z)(t,ge|ye)};function be(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.Z("_root")););return e}(t),o=new h.k({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return i.Z(t.nodes(),(function(r){var c=t.node(r),l=t.parent(r);(c.rank===e||c.minRank<=e&&e<=c.maxRank)&&(o.setNode(r),o.setParent(r,l||a),i.Z(t[n](r),(function(e){var n=e.v===r?e.w:e.v,i=o.edge(n,r),s=nt.Z(i)?0:i.weight;o.setEdge(n,r,{weight:t.edge(e).weight+s})})),s.Z(c,"minRank")&&o.setNode(r,{borderLeft:c.borderLeft[e],borderRight:c.borderRight[e]}))})),o}var _e=n(72954);const xe=function(t,e,n){for(var i=-1,r=t.length,s=e.length,a={};++ie||s&&a&&c&&!o&&!l||i&&a&&c||!n&&c||!r)return 1;if(!i&&!s&&!l&&t=o?c:c*("desc"==n[i]?-1:1)}return t.index-e.index};const Be=function(t,e,n){e=e.length?(0,we.Z)(e,(function(t){return(0,L.Z)(t)?function(e){return(0,Ce.Z)(e,1===t.length?t[0]:t)}:t})):[X.Z];var i=-1;e=(0,we.Z)(e,(0,Se.Z)(tt.Z));var r=(0,Te.Z)(t,(function(t,n,r){return{criteria:(0,we.Z)(e,(function(e){return e(t)})),index:++i,value:t}}));return Ee(r,(function(t,e){return Le(t,e,n)}))};const Ne=(0,j.Z)((function(t,e){if(null==t)return[];var n=e.length;return n>1&&(0,z.Z)(t,e[0],e[1])?e=[]:n>2&&(0,z.Z)(e[0],e[1],e[2])&&(e=[e[0]]),Be(t,(0,ke.Z)(e,1),[])}));function De(t,e){for(var n=0,i=1;i0;)e%2&&(n+=h[e+1]),h[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}function Ie(t,e){var n={};return i.Z(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};nt.Z(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),i.Z(e.edges(),(function(t){var e=n[t.v],i=n[t.w];nt.Z(e)||nt.Z(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(nt.Z(e.barycenter)||nt.Z(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,i=0;t.weight&&(n+=t.barycenter*t.weight,i+=t.weight);e.weight&&(n+=e.barycenter*e.weight,i+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function r(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var s=t.pop();e.push(s),i.Z(s.in.reverse(),n(s)),i.Z(s.out,r(s))}return c.Z(Ft.Z(e,(function(t){return!t.merged})),(function(t){return W.Z(t,["vs","i","barycenter","weight"])}))}(Ft.Z(n,(function(t){return!t.indegree})))}function Oe(t,e){var n,r=function(t,e){var n={lhs:[],rhs:[]};return i.Z(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n}(t,(function(t){return s.Z(t,"barycenter")})),a=r.lhs,c=Ne(r.rhs,(function(t){return-t.i})),l=[],h=0,u=0,d=0;a.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),d=$e(l,c,d),i.Z(a,(function(t){d+=t.vs.length,l.push(t.vs),h+=t.barycenter*t.weight,u+=t.weight,d=$e(l,c,d)}));var p={vs:o.Z(l)};return u&&(p.barycenter=h/u,p.weight=u),p}function $e(t,e,n){for(var i;e.length&&(i=K(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}function Fe(t,e,n,r){var a=t.children(e),l=t.node(e),h=l?l.borderLeft:void 0,u=l?l.borderRight:void 0,d={};h&&(a=Ft.Z(a,(function(t){return t!==h&&t!==u})));var p=function(t,e){return c.Z(e,(function(e){var n=t.inEdges(e);if(n.length){var i=ue.Z(n,(function(e,n){var i=t.edge(n),r=t.node(n.v);return{sum:e.sum+i.weight*r.order,weight:e.weight+i.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}(t,a);i.Z(p,(function(e){if(t.children(e.v).length){var i=Fe(t,e.v,n,r);d[e.v]=i,s.Z(i,"barycenter")&&(a=e,o=i,nt.Z(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var f=Ie(p,n);!function(t,e){i.Z(t,(function(t){t.vs=o.Z(t.vs.map((function(t){return e[t]?e[t].vs:t})))}))}(f,d);var g=Oe(f,r);if(h&&(g.vs=o.Z([h,g.vs,u]),t.predecessors(h).length)){var y=t.node(t.predecessors(h)[0]),m=t.node(t.predecessors(u)[0]);s.Z(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+m.order)/(g.weight+2),g.weight+=2}return g}function Re(t){var e=dt(t),n=Ze(t,l.Z(1,e+1),"inEdges"),r=Ze(t,l.Z(e-1,-1,-1),"outEdges"),a=function(t){var e={},n=Ft.Z(t.nodes(),(function(e){return!t.children(e).length})),r=Q(c.Z(n,(function(e){return t.node(e).rank}))),a=c.Z(l.Z(r+1),(function(){return[]})),o=Ne(n,(function(e){return t.node(e).rank}));return i.Z(o,(function n(r){if(!s.Z(e,r)){e[r]=!0;var o=t.node(r);a[o.rank].push(r),i.Z(t.successors(r),n)}})),a}(t);Ye(t,a);for(var o,h=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){Pe(u%2?n:r,u%4>=2);var p=De(t,a=ht(t));pc||l>e[r].lim));s=r,r=i;for(;(r=t.parent(r))!==s;)o.push(r);return{path:a.concat(o.reverse()),lca:s}}(t,e,r.v,r.w),a=s.path,o=s.lca,c=0,l=a[c],h=!0;n!==r.w;){if(i=t.node(n),h){for(;(l=a[c])!==o&&t.node(l).maxRankn){var i=e;e=n,n=i}var r=t[e];r||(t[e]=r={}),r[n]=!0}function He(t,e,n){if(e>n){var i=e;e=n,n=i}return s.Z(t[e],n)}function Ve(t,e,n,r,a){var o={},c=function(t,e,n,r){var a=new h.k,o=t.graph(),c=function(t,e,n){return function(i,r,a){var o,c=i.node(r),l=i.node(a),h=0;if(h+=c.width/2,s.Z(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":o=-c.width/2;break;case"r":o=c.width/2}if(o&&(h+=n?o:-o),o=0,h+=(c.dummy?e:t)/2,h+=(l.dummy?e:t)/2,h+=l.width/2,s.Z(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":o=l.width/2;break;case"r":o=-l.width/2}return o&&(h+=n?o:-o),o=0,h}}(o.nodesep,o.edgesep,r);return i.Z(e,(function(e){var r;i.Z(e,(function(e){var i=n[e];if(a.setNode(i),r){var s=n[r],o=a.edge(s,i);a.setEdge(s,i,Math.max(c(t,e,r),o||0))}r=e}))})),a}(t,e,n,a),l=a?"borderLeft":"borderRight";function u(t,e){for(var n=c.nodes(),i=n.pop(),r={};i;)r[i]?t(i):(r[i]=!0,n.push(i),n=n.concat(e(i))),i=n.pop()}return u((function(t){o[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,o[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),u((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,o[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),i=t.node(e);n!==Number.POSITIVE_INFINITY&&i.borderType!==l&&(o[e]=Math.max(o[e],n))}),c.successors.bind(c)),i.Z(r,(function(t){o[t]=o[n[t]]})),o}function Ge(t){var e,n=ht(t),r=U(We(t,n),function(t,e){var n={};function r(e,r,s,a,o){var c;i.Z(l.Z(r,s),(function(r){c=e[r],t.node(c).dummy&&i.Z(t.predecessors(c),(function(e){var i=t.node(e);i.dummy&&(i.ordero)&&qe(n,e,c)}))}))}return ue.Z(e,(function(e,n){var s,a=-1,o=0;return i.Z(n,(function(i,c){if("border"===t.node(i).dummy){var l=t.predecessors(i);l.length&&(s=t.node(l[0]).order,r(n,o,c,a,s),o=c,a=s)}r(n,o,n.length,s,e.length)})),n})),n}(t,n)),s={};i.Z(["u","d"],(function(a){e="u"===a?n:he.Z(n).reverse(),i.Z(["l","r"],(function(n){"r"===n&&(e=c.Z(e,(function(t){return he.Z(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),l=function(t,e,n,r){var s={},a={},o={};return i.Z(e,(function(t){i.Z(t,(function(t,e){s[t]=t,a[t]=t,o[t]=e}))})),i.Z(e,(function(t){var e=-1;i.Z(t,(function(t){var i=r(t);if(i.length){i=Ne(i,(function(t){return o[t]}));for(var c=(i.length-1)/2,l=Math.floor(c),h=Math.ceil(c);l<=h;++l){var u=i[l];a[t]===t&&e{"use strict";n.d(e,{k:()=>O});var i=n(17452),r=n(62002),s=n(73234),a=n(17179),o=n(13445),c=n(79697),l=n(70870),h=n(49360),u=n(10626),d=n(69581),p=n(63001),f=n(21692);const g=function(t){return t!=t};const y=function(t,e,n){for(var i=n-1,r=t.length;++i-1};const _=function(t,e,n){for(var i=-1,r=null==t?0:t.length;++i=E){var l=e?null:T(t);if(l)return(0,w.Z)(l);a=!1,r=x.Z,c=new p.Z}else c=e?[]:o;t:for(;++i1?i.setNode(t,e):i.setNode(t)})),this}setNode(t,e){return i.Z(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=M,this._children[t]={},this._children[M][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 i.Z(this._nodes,t)}removeNode(t){var e=this;if(i.Z(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],l.Z(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),l.Z(a.Z(this._in[t]),n),delete this._in[t],delete this._preds[t],l.Z(a.Z(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h.Z(e))e=M;else{for(var n=e+="";!h.Z(n);n=this.parent(n))if(n===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){var e=this._parent[t];if(e!==M)return e}}children(t){if(h.Z(t)&&(t=M),this._isCompound){var e=this._children[t];if(e)return a.Z(e)}else{if(t===M)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return a.Z(e)}successors(t){var e=this._sucs[t];if(e)return a.Z(e)}neighbors(t){var e=this.predecessors(t);if(e)return L(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;l.Z(this._nodes,(function(n,i){t(i)&&e.setNode(i,n)})),l.Z(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function r(t){var s=n.parent(t);return void 0===s||e.hasNode(s)?(i[t]=s,s):s in i?i[s]:r(s)}return this._isCompound&&l.Z(e.nodes(),(function(t){e.setParent(t,r(t))})),e}setDefaultEdgeLabel(t){return s.Z(t)||(t=r.Z(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return B.Z(this._edgeObjs)}setPath(t,e){var n=this,i=arguments;return N.Z(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this}setEdge(){var t,e,n,r,s=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(t=a.v,e=a.w,n=a.name,2===arguments.length&&(r=arguments[1],s=!0)):(t=a,e=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],s=!0)),t=""+t,e=""+e,h.Z(n)||(n=""+n);var o=R(this._isDirected,t,e,n);if(i.Z(this._edgeLabels,o))return s&&(this._edgeLabels[o]=r),this;if(!h.Z(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=s?r:this._defaultEdgeLabelFn(t,e,n);var c=function(t,e,n,i){var r=""+e,s=""+n;if(!t&&r>s){var a=r;r=s,s=a}var o={v:r,w:s};i&&(o.name=i);return o}(this._isDirected,t,e,n);return t=c.v,e=c.w,Object.freeze(c),this._edgeObjs[o]=c,$(this._preds[e],t),$(this._sucs[t],e),this._in[e][o]=c,this._out[t][o]=c,this._edgeCount++,this}edge(t,e,n){var i=1===arguments.length?Z(this._isDirected,arguments[0]):R(this._isDirected,t,e,n);return this._edgeLabels[i]}hasEdge(t,e,n){var r=1===arguments.length?Z(this._isDirected,arguments[0]):R(this._isDirected,t,e,n);return i.Z(this._edgeLabels,r)}removeEdge(t,e,n){var i=1===arguments.length?Z(this._isDirected,arguments[0]):R(this._isDirected,t,e,n),r=this._edgeObjs[i];return r&&(t=r.v,e=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],F(this._preds[e],t),F(this._sucs[t],e),delete this._in[e][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,e){var n=this._in[t];if(n){var i=B.Z(n);return e?o.Z(i,(function(t){return t.v===e})):i}}outEdges(t,e){var n=this._out[t];if(n){var i=B.Z(n);return e?o.Z(i,(function(t){return t.w===e})):i}}nodeEdges(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}}function $(t,e){t[e]?t[e]++:t[e]=1}function F(t,e){--t[e]||delete t[e]}function R(t,e,n,i){var r=""+e,s=""+n;if(!t&&r>s){var a=r;r=s,s=a}return r+I+s+I+(h.Z(i)?D:i)}function Z(t,e){return R(t,e.v,e.w,e.name)}O.prototype._nodeCount=0,O.prototype._edgeCount=0},45625:(t,e,n)=>{"use strict";n.d(e,{k:()=>i.k});var i=n(52544)},39354:(t,e,n)=>{"use strict";n.d(e,{c:()=>c});var i=n(49360),r=n(48451),s=4;const a=function(t){return(0,r.Z)(t,s)};var o=n(43836);n(52544);function c(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:l(t),edges:h(t)};return i.Z(t.graph())||(e.value=a(t.graph())),e}function l(t){return o.Z(t.nodes(),(function(e){var n=t.node(e),r=t.parent(e),s={v:e};return i.Z(n)||(s.value=n),i.Z(r)||(s.parent=r),s}))}function h(t){return o.Z(t.edges(),(function(e){var n=t.edge(e),r={v:e.v,w:e.w};return i.Z(e.name)||(r.name=e.name),i.Z(n)||(r.value=n),r}))}},91518:(t,e,n)=>{"use strict";n.d(e,{sY:()=>T});var i=n(59373),r=n(17452),s=n(3688),a=n(70870),o=n(70277),c=n(96225),l={normal:function(t,e,n,i){var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");c.bg(r,n[i+"Style"]),n[i+"Class"]&&r.attr("class",n[i+"Class"])},vee:function(t,e,n,i){var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");c.bg(r,n[i+"Style"]),n[i+"Class"]&&r.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");c.bg(r,n[i+"Style"]),n[i+"Class"]&&r.attr("class",n[i+"Class"])}};var h=n(43349);function u(t,e,n){var i=e.label,r=t.append("g");"svg"===e.labelType?function(t,e){var n=t;n.node().appendChild(e.label),c.bg(n,e.labelStyle)}(r,e):"string"!=typeof i||"html"===e.labelType?(0,h.a)(r,e):function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",i=!1,r=0;r{"use strict";n.d(e,{Z:()=>a});var i=n(61691),r=n(82142);const s=class{constructor(){this.type=r.w.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=r.w.ALL}is(t){return this.type===t}};const a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new s}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=r.w.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=i.Z.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=i.Z.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=i.Z.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=i.Z.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=i.Z.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=i.Z.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(r.w.HSL)||void 0===e?(this._ensureHSL(),i.Z.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(r.w.HSL)||void 0===e?(this._ensureHSL(),i.Z.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(r.w.HSL)||void 0===e?(this._ensureHSL(),i.Z.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(r.w.RGB)||void 0===e?(this._ensureRGB(),i.Z.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(r.w.RGB)||void 0===e?(this._ensureRGB(),i.Z.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(r.w.RGB)||void 0===e?(this._ensureRGB(),i.Z.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(r.w.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(r.w.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(r.w.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(r.w.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(r.w.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(r.w.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},71610:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g});var i=n(21883),r=n(82142);const s={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(s.re);if(!e)return;const n=e[1],r=parseInt(n,16),a=n.length,o=a%4==0,c=a>4,l=c?1:17,h=c?8:4,u=o?0:-1,d=c?255:15;return i.Z.set({r:(r>>h*(u+3)&d)*l,g:(r>>h*(u+2)&d)*l,b:(r>>h*(u+1)&d)*l,a:o?(r&d)*l/255:1},t)},stringify:t=>{const{r:e,g:n,b:i,a:s}=t;return s<1?`#${r.Q[Math.round(e)]}${r.Q[Math.round(n)]}${r.Q[Math.round(i)]}${r.Q[Math.round(255*s)]}`:`#${r.Q[Math.round(e)]}${r.Q[Math.round(n)]}${r.Q[Math.round(i)]}`}},a=s;var o=n(61691);const c={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:t=>{const e=t.match(c.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return o.Z.channel.clamp.h(.9*parseFloat(t));case"rad":return o.Z.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return o.Z.channel.clamp.h(360*parseFloat(t))}}return o.Z.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(c.re);if(!n)return;const[,r,s,a,l,h]=n;return i.Z.set({h:c._hue2deg(r),s:o.Z.channel.clamp.s(parseFloat(s)),l:o.Z.channel.clamp.l(parseFloat(a)),a:l?o.Z.channel.clamp.a(h?parseFloat(l)/100:parseFloat(l)):1},t)},stringify:t=>{const{h:e,s:n,l:i,a:r}=t;return r<1?`hsla(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}%, ${o.Z.lang.round(i)}%, ${r})`:`hsl(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}%, ${o.Z.lang.round(i)}%)`}},l=c,h={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:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const n in h.colors)if(h.colors[n]===e)return n}},u=h,d={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:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(d.re);if(!n)return;const[,r,s,a,c,l,h,u,p]=n;return i.Z.set({r:o.Z.channel.clamp.r(s?2.55*parseFloat(r):parseFloat(r)),g:o.Z.channel.clamp.g(c?2.55*parseFloat(a):parseFloat(a)),b:o.Z.channel.clamp.b(h?2.55*parseFloat(l):parseFloat(l)),a:u?o.Z.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:i,a:r}=t;return r<1?`rgba(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}, ${o.Z.lang.round(i)}, ${o.Z.lang.round(r)})`:`rgb(${o.Z.lang.round(e)}, ${o.Z.lang.round(n)}, ${o.Z.lang.round(i)})`}},p=d,f={format:{keyword:h,hex:a,rgb:d,rgba:d,hsl:c,hsla:c},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||p.parse(t)||l.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(r.w.HSL)||void 0===t.data.r?l.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):a.stringify(t)},g=f},82142:(t,e,n)=>{"use strict";n.d(e,{Q:()=>r,w:()=>s});var i=n(61691);const r={};for(let a=0;a<=255;a++)r[a]=i.Z.unit.dec2hex(a);const s={ALL:0,RGB:1,HSL:2}},26174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(61691),r=n(71610);const s=(t,e,n)=>{const s=r.Z.parse(t),a=s[e],o=i.Z.channel.clamp[e](a+n);return a!==o&&(s[e]=o),r.Z.stringify(s)}},7201:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(26174);const r=(t,e)=>(0,i.Z)(t,"l",-e)},12281:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(26174);const r=(t,e)=>(0,i.Z)(t,"l",e)},61691:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const i={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const s=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-s;switch(r){case"r":return 255*i.hue2rgb(a,s,t+1/3);case"g":return 255*i.hue2rgb(a,s,t);case"b":return 255*i.hue2rgb(a,s,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},i)=>{t/=255,e/=255,n/=255;const r=Math.max(t,e,n),s=Math.min(t,e,n),a=(r+s)/2;if("l"===i)return 100*a;if(r===s)return 0;const o=r-s;if("s"===i)return 100*(a>.5?o/(2-r-s):o/(r+s));switch(r){case t:return 60*((e-n)/o+(ee>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},67308:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});const i=function(){this.__data__=[],this.size=0};var r=n(79651);const s=function(t,e){for(var n=t.length;n--;)if((0,r.Z)(t[n][0],e))return n;return-1};var a=Array.prototype.splice;const o=function(t){var e=this.__data__,n=s(e,t);return!(n<0)&&(n==e.length-1?e.pop():a.call(e,n,1),--this.size,!0)};const c=function(t){var e=this.__data__,n=s(e,t);return n<0?void 0:e[n][1]};const l=function(t){return s(this.__data__,t)>-1};const h=function(t,e){var n=this.__data__,i=s(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{"use strict";n.d(e,{Z:()=>s});var i=n(62508),r=n(66092);const s=(0,i.Z)(r.Z,"Map")},37834:(t,e,n)=>{"use strict";n.d(e,{Z:()=>T});const i=(0,n(62508).Z)(Object,"create");const r=function(){this.__data__=i?i(null):{},this.size=0};const s=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var a="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;if(i){var n=e[t];return n===a?void 0:n}return o.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const h=function(t){var e=this.__data__;return i?void 0!==e[t]:l.call(e,t)};var u="__lodash_hash_undefined__";const d=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=i&&void 0===e?u:e,this};function p(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{"use strict";n.d(e,{Z:()=>s});var i=n(62508),r=n(66092);const s=(0,i.Z)(r.Z,"Set")},63001:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(37834),r="__lodash_hash_undefined__";const s=function(t){return this.__data__.set(t,r),this};const a=function(t){return this.__data__.has(t)};function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new i.Z;++e{"use strict";n.d(e,{Z:()=>p});var i=n(67308);const r=function(){this.__data__=new i.Z,this.size=0};const s=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};const a=function(t){return this.__data__.get(t)};const o=function(t){return this.__data__.has(t)};var c=n(86183),l=n(37834),h=200;const u=function(t,e){var n=this.__data__;if(n instanceof i.Z){var r=n.__data__;if(!c.Z||r.length{"use strict";n.d(e,{Z:()=>i});const i=n(66092).Z.Symbol},84073:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=n(66092).Z.Uint8Array},76579:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=null==t?0:t.length;++n{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n{"use strict";n.d(e,{Z:()=>h});const i=function(t,e){for(var n=-1,i=Array(t);++n{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){for(var n=-1,i=e.length,r=t.length;++n{"use strict";n.d(e,{Z:()=>a});var i=n(74752),r=n(79651),s=Object.prototype.hasOwnProperty;const a=function(t,e,n){var a=t[e];s.call(t,e)&&(0,r.Z)(a,n)&&(void 0!==n||e in t)||(0,i.Z)(t,e,n)}},74752:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(77904);const r=function(t,e,n){"__proto__"==e&&i.Z?(0,i.Z)(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},48451:(t,e,n)=>{"use strict";n.d(e,{Z:()=>Ct});var i=n(31667),r=n(76579),s=n(72954),a=n(31899),o=n(17179);const c=function(t,e){return t&&(0,a.Z)(e,(0,o.Z)(e),t)};var l=n(32957);const h=function(t,e){return t&&(0,a.Z)(e,(0,l.Z)(e),t)};var u=n(91050),d=n(87215),p=n(95695);const f=function(t,e){return(0,a.Z)(t,(0,p.Z)(t),e)};var g=n(58694),y=n(12513),m=n(60532);const b=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,g.Z)(e,(0,p.Z)(t)),t=(0,y.Z)(t);return e}:m.Z;const _=function(t,e){return(0,a.Z)(t,b(t),e)};var x=n(1808),v=n(63327);const k=function(t){return(0,v.Z)(t,l.Z,b)};var w=n(83970),C=Object.prototype.hasOwnProperty;const T=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&C.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var E=n(41884);const S=function(t,e){var n=e?(0,E.Z)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)};var A=/\w*$/;const L=function(t){var e=new t.constructor(t.source,A.exec(t));return e.lastIndex=t.lastIndex,e};var B=n(17685),N=B.Z?B.Z.prototype:void 0,D=N?N.valueOf:void 0;const M=function(t){return D?Object(D.call(t)):{}};var I=n(12701),O="[object Boolean]",$="[object Date]",F="[object Map]",R="[object Number]",Z="[object RegExp]",P="[object Set]",Y="[object String]",j="[object Symbol]",z="[object ArrayBuffer]",U="[object DataView]",W="[object Float32Array]",q="[object Float64Array]",H="[object Int8Array]",V="[object Int16Array]",G="[object Int32Array]",X="[object Uint8Array]",Q="[object Uint8ClampedArray]",K="[object Uint16Array]",J="[object Uint32Array]";const tt=function(t,e,n){var i=t.constructor;switch(e){case z:return(0,E.Z)(t);case O:case $:return new i(+t);case U:return S(t,n);case W:case q:case H:case V:case G:case X:case Q:case K:case J:return(0,I.Z)(t,n);case F:return new i;case R:case Y:return new i(t);case Z:return L(t);case P:return new i;case j:return M(t)}};var et=n(73658),nt=n(27771),it=n(77008),rt=n(18533),st="[object Map]";const at=function(t){return(0,rt.Z)(t)&&(0,w.Z)(t)==st};var ot=n(21162),ct=n(98351),lt=ct.Z&&ct.Z.isMap;const ht=lt?(0,ot.Z)(lt):at;var ut=n(77226),dt="[object Set]";const pt=function(t){return(0,rt.Z)(t)&&(0,w.Z)(t)==dt};var ft=ct.Z&&ct.Z.isSet;const gt=ft?(0,ot.Z)(ft):pt;var yt=1,mt=2,bt=4,_t="[object Arguments]",xt="[object Function]",vt="[object GeneratorFunction]",kt="[object Object]",wt={};wt[_t]=wt["[object Array]"]=wt["[object ArrayBuffer]"]=wt["[object DataView]"]=wt["[object Boolean]"]=wt["[object Date]"]=wt["[object Float32Array]"]=wt["[object Float64Array]"]=wt["[object Int8Array]"]=wt["[object Int16Array]"]=wt["[object Int32Array]"]=wt["[object Map]"]=wt["[object Number]"]=wt[kt]=wt["[object RegExp]"]=wt["[object Set]"]=wt["[object String]"]=wt["[object Symbol]"]=wt["[object Uint8Array]"]=wt["[object Uint8ClampedArray]"]=wt["[object Uint16Array]"]=wt["[object Uint32Array]"]=!0,wt["[object Error]"]=wt[xt]=wt["[object WeakMap]"]=!1;const Ct=function t(e,n,a,p,g,y){var m,b=n&yt,v=n&mt,C=n&bt;if(a&&(m=g?a(e,p,g,y):a(e)),void 0!==m)return m;if(!(0,ut.Z)(e))return e;var E=(0,nt.Z)(e);if(E){if(m=T(e),!b)return(0,d.Z)(e,m)}else{var S=(0,w.Z)(e),A=S==xt||S==vt;if((0,it.Z)(e))return(0,u.Z)(e,b);if(S==kt||S==_t||A&&!g){if(m=v||A?{}:(0,et.Z)(e),!b)return v?_(e,h(m,e)):f(e,c(m,e))}else{if(!wt[S])return g?e:{};m=tt(e,S,b)}}y||(y=new i.Z);var L=y.get(e);if(L)return L;y.set(e,m),gt(e)?e.forEach((function(i){m.add(t(i,n,a,i,e,y))})):ht(e)&&e.forEach((function(i,r){m.set(r,t(i,n,a,r,e,y))}));var B=C?v?k:x.Z:v?l.Z:o.Z,N=E?void 0:B(e);return(0,r.Z)(N||e,(function(i,r){N&&(i=e[r=i]),(0,s.Z)(m,r,t(i,n,a,r,e,y))})),m}},49811:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(2693),r=n(50585);const s=function(t,e){return function(n,i){if(null==n)return n;if(!(0,r.Z)(n))return t(n,i);for(var s=n.length,a=e?s:-1,o=Object(n);(e?a--:++a{"use strict";n.d(e,{Z:()=>i});const i=function(t,e,n,i){for(var r=t.length,s=n+(i?1:-1);i?s--:++s{"use strict";n.d(e,{Z:()=>l});var i=n(58694),r=n(17685),s=n(29169),a=n(27771),o=r.Z?r.Z.isConcatSpreadable:void 0;const c=function(t){return(0,a.Z)(t)||(0,s.Z)(t)||!!(o&&t&&t[o])};const l=function t(e,n,r,s,a){var o=-1,l=e.length;for(r||(r=c),a||(a=[]);++o0&&r(h)?n>1?t(h,n-1,r,s,a):(0,i.Z)(a,h):s||(a[a.length]=h)}return a}},61395:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(e,n,i){for(var r=-1,s=Object(e),a=i(e),o=a.length;o--;){var c=a[t?o:++r];if(!1===n(s[c],c,s))break}return e}}()},2693:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(61395),r=n(17179);const s=function(t,e){return t&&(0,i.Z)(t,e,r.Z)}},13317:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(22823),r=n(62281);const s=function(t,e){for(var n=0,s=(e=(0,i.Z)(e,t)).length;null!=t&&n{"use strict";n.d(e,{Z:()=>s});var i=n(58694),r=n(27771);const s=function(t,e,n){var s=e(t);return(0,r.Z)(t)?s:(0,i.Z)(s,n(t))}},93589:(t,e,n)=>{"use strict";n.d(e,{Z:()=>f});var i=n(17685),r=Object.prototype,s=r.hasOwnProperty,a=r.toString,o=i.Z?i.Z.toStringTag:void 0;const c=function(t){var e=s.call(t,o),n=t[o];try{t[o]=void 0;var i=!0}catch(c){}var r=a.call(t);return i&&(e?t[o]=n:delete t[o]),r};var l=Object.prototype.toString;const h=function(t){return l.call(t)};var u="[object Null]",d="[object Undefined]",p=i.Z?i.Z.toStringTag:void 0;const f=function(t){return null==t?void 0===t?d:u:p&&p in Object(t)?c(t):h(t)}},74765:(t,e,n)=>{"use strict";n.d(e,{Z:()=>ft});var i=n(31667),r=n(63001);const s=function(t,e){for(var n=-1,i=null==t?0:t.length;++nd))return!1;var f=h.get(t),g=h.get(e);if(f&&g)return f==e&&g==t;var y=-1,m=!0,b=n&c?new r.Z:void 0;for(h.set(t,e),h.set(e,t);++y{"use strict";n.d(e,{Z:()=>a});var i=n(72764);const r=(0,n(1851).Z)(Object.keys,Object);var s=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,i.Z)(t))return r(t);var e=[];for(var n in Object(t))s.call(t,n)&&"constructor"!=n&&e.push(n);return e}},21018:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(49811),r=n(50585);const s=function(t,e){var n=-1,s=(0,r.Z)(t)?Array(t.length):[];return(0,i.Z)(t,(function(t,i,r){s[++n]=e(t,i,r)})),s}},54193:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(e){return null==e?void 0:e[t]}}},69581:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(69203),r=n(81211),s=n(27227);const a=function(t,e){return(0,s.Z)((0,r.Z)(t,e,i.Z),t+"")}},21162:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(e){return t(e)}}},59548:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){return t.has(e)}},68882:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(69203);const r=function(t){return"function"==typeof t?t:i.Z}},22823:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(27771),r=n(99365),s=n(42454),a=500;var o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g;const l=function(t){var e=(0,s.Z)(t,(function(t){return n.size===a&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,i,r){e.push(i?r.replace(c,"$1"):n||t)})),e}));var h=n(50751);const u=function(t,e){return(0,i.Z)(t)?t:(0,r.Z)(t,e)?[t]:l((0,h.Z)(t))}},41884:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(84073);const r=function(t){var e=new t.constructor(t.byteLength);return new i.Z(e).set(new i.Z(t)),e}},91050:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(66092),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===r?i.Z.Buffer:void 0,o=a?a.allocUnsafe:void 0;const c=function(t,e){if(e)return t.slice();var n=t.length,i=o?o(n):new t.constructor(n);return t.copy(i),i}},12701:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(41884);const r=function(t,e){var n=e?(0,i.Z)(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},87215:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n{"use strict";n.d(e,{Z:()=>s});var i=n(72954),r=n(74752);const s=function(t,e,n,s){var a=!n;n||(n={});for(var o=-1,c=e.length;++o{"use strict";n.d(e,{Z:()=>r});var i=n(62508);const r=function(){try{var t=(0,i.Z)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},13413:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},1808:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(63327),r=n(95695),s=n(17179);const a=function(t){return(0,i.Z)(t,s.Z,r.Z)}},62508:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var i=n(73234);const r=n(66092).Z["__core-js_shared__"];var s,a=(s=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"";const o=function(t){return!!a&&a in t};var c=n(77226),l=n(90019),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,c.Z)(t)||o(t))&&((0,i.Z)(t)?g:h).test((0,l.Z)(t))};const m=function(t,e){return null==t?void 0:t[e]};const b=function(t,e){var n=m(t,e);return y(n)?n:void 0}},12513:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=(0,n(1851).Z)(Object.getPrototypeOf,Object)},95695:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(68774),r=n(60532),s=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;const o=a?function(t){return null==t?[]:(t=Object(t),(0,i.Z)(a(t),(function(e){return s.call(t,e)})))}:r.Z},83970:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var i=n(62508),r=n(66092);const s=(0,i.Z)(r.Z,"DataView");var a=n(86183);const o=(0,i.Z)(r.Z,"Promise");var c=n(93203);const l=(0,i.Z)(r.Z,"WeakMap");var h=n(93589),u=n(90019),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.Z)(s),b=(0,u.Z)(a.Z),_=(0,u.Z)(o),x=(0,u.Z)(c.Z),v=(0,u.Z)(l),k=h.Z;(s&&k(new s(new ArrayBuffer(1)))!=y||a.Z&&k(new a.Z)!=d||o&&k(o.resolve())!=p||c.Z&&k(new c.Z)!=f||l&&k(new l)!=g)&&(k=function(t){var e=(0,h.Z)(t),n="[object Object]"==e?t.constructor:void 0,i=n?(0,u.Z)(n):"";if(i)switch(i){case m:return y;case b:return d;case _:return p;case x:return f;case v:return g}return e});const w=k},16174:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(22823),r=n(29169),s=n(27771),a=n(56009),o=n(1656),c=n(62281);const l=function(t,e,n){for(var l=-1,h=(e=(0,i.Z)(e,t)).length,u=!1;++l{"use strict";n.d(e,{Z:()=>c});var i=n(77226),r=Object.create;const s=function(){function t(){}return function(e){if(!(0,i.Z)(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var a=n(12513),o=n(72764);const c=function(t){return"function"!=typeof t.constructor||(0,o.Z)(t)?{}:s((0,a.Z)(t))}},56009:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=9007199254740991,r=/^(?:0|[1-9]\d*)$/;const s=function(t,e){var n=typeof t;return!!(e=null==e?i:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t{"use strict";n.d(e,{Z:()=>o});var i=n(79651),r=n(50585),s=n(56009),a=n(77226);const o=function(t,e,n){if(!(0,a.Z)(n))return!1;var o=typeof e;return!!("number"==o?(0,r.Z)(n)&&(0,s.Z)(e,n.length):"string"==o&&e in n)&&(0,i.Z)(n[e],t)}},99365:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(27771),r=n(72714),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const o=function(t,e){if((0,i.Z)(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!(0,r.Z)(t))||(a.test(t)||!s.test(t)||null!=e&&t in Object(e))}},72764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=Object.prototype;const r=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},98351:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(13413),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===r&&i.Z.process;const o=function(){try{var t=s&&s.require&&s.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}()},1851:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){return function(n){return t(e(n))}}},81211:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});const i=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)};var r=Math.max;const s=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var s=arguments,a=-1,o=r(s.length-e,0),c=Array(o);++a{"use strict";n.d(e,{Z:()=>s});var i=n(13413),r="object"==typeof self&&self&&self.Object===Object&&self;const s=i.Z||r||Function("return this")()},6545:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},27227:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(62002),r=n(77904),s=n(69203);const a=r.Z?function(t,e){return(0,r.Z)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.Z)(e),writable:!0})}:s.Z;var o=800,c=16,l=Date.now;const h=function(t){var e=0,n=0;return function(){var i=l(),r=c-(i-n);if(n=i,r>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(a)},62281:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(72714),r=1/0;const s=function(t){if("string"==typeof t||(0,i.Z)(t))return t;var e=t+"";return"0"==e&&1/t==-r?"-0":e}},90019:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=Function.prototype.toString;const r=function(t){if(null!=t){try{return i.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},62002:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return function(){return t}}},3688:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(69581),r=n(79651),s=n(50439),a=n(32957),o=Object.prototype,c=o.hasOwnProperty;const l=(0,i.Z)((function(t,e){t=Object(t);var n=-1,i=e.length,l=i>2?e[2]:void 0;for(l&&(0,s.Z)(e[0],e[1],l)&&(i=1);++n{"use strict";n.d(e,{Z:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},13445:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(68774),r=n(49811);const s=function(t,e){var n=[];return(0,r.Z)(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n};var a=n(74765),o=n(27771);const c=function(t,e){return((0,o.Z)(t)?i.Z:s)(t,(0,a.Z)(e,3))}},27961:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(10626);const r=function(t){return(null==t?0:t.length)?(0,i.Z)(t,1):[]}},70870:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(76579),r=n(49811),s=n(68882),a=n(27771);const o=function(t,e){return((0,a.Z)(t)?i.Z:r.Z)(t,(0,s.Z)(e))}},17452:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=Object.prototype.hasOwnProperty;const r=function(t,e){return null!=t&&i.call(t,e)};var s=n(16174);const a=function(t,e){return null!=t&&(0,s.Z)(t,e,r)}},75487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});const i=function(t,e){return null!=t&&e in Object(t)};var r=n(16174);const s=function(t,e){return null!=t&&(0,r.Z)(t,e,i)}},69203:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return t}},29169:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(93589),r=n(18533),s="[object Arguments]";const a=function(t){return(0,r.Z)(t)&&(0,i.Z)(t)==s};var o=Object.prototype,c=o.hasOwnProperty,l=o.propertyIsEnumerable;const h=a(function(){return arguments}())?a:function(t){return(0,r.Z)(t)&&c.call(t,"callee")&&!l.call(t,"callee")}},27771:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=Array.isArray},50585:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(73234),r=n(1656);const s=function(t){return null!=t&&(0,r.Z)(t.length)&&!(0,i.Z)(t)}},836:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(50585),r=n(18533);const s=function(t){return(0,r.Z)(t)&&(0,i.Z)(t)}},77008:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var i=n(66092);const r=function(){return!1};var s="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=s&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===s?i.Z.Buffer:void 0;const c=(o?o.isBuffer:void 0)||r},79697:(t,e,n)=>{"use strict";n.d(e,{Z:()=>f});var i=n(39473),r=n(83970),s=n(29169),a=n(27771),o=n(50585),c=n(77008),l=n(72764),h=n(18843),u="[object Map]",d="[object Set]",p=Object.prototype.hasOwnProperty;const f=function(t){if(null==t)return!0;if((0,o.Z)(t)&&((0,a.Z)(t)||"string"==typeof t||"function"==typeof t.splice||(0,c.Z)(t)||(0,h.Z)(t)||(0,s.Z)(t)))return!t.length;var e=(0,r.Z)(t);if(e==u||e==d)return!t.size;if((0,l.Z)(t))return!(0,i.Z)(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},73234:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var i=n(93589),r=n(77226),s="[object AsyncFunction]",a="[object Function]",o="[object GeneratorFunction]",c="[object Proxy]";const l=function(t){if(!(0,r.Z)(t))return!1;var e=(0,i.Z)(t);return e==a||e==o||e==s||e==c}},1656:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=9007199254740991;const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}},77226:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},18533:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},37514:(t,e,n)=>{"use strict";n.d(e,{Z:()=>d});var i=n(93589),r=n(12513),s=n(18533),a="[object Object]",o=Function.prototype,c=Object.prototype,l=o.toString,h=c.hasOwnProperty,u=l.call(Object);const d=function(t){if(!(0,s.Z)(t)||(0,i.Z)(t)!=a)return!1;var e=(0,r.Z)(t);if(null===e)return!0;var n=h.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},72714:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(93589),r=n(18533),s="[object Symbol]";const a=function(t){return"symbol"==typeof t||(0,r.Z)(t)&&(0,i.Z)(t)==s}},18843:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(93589),r=n(1656),s=n(18533),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const o=function(t){return(0,s.Z)(t)&&(0,r.Z)(t.length)&&!!a[(0,i.Z)(t)]};var c=n(21162),l=n(98351),h=l.Z&&l.Z.isTypedArray;const u=h?(0,c.Z)(h):o},49360:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const i=function(t){return void 0===t}},17179:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(87668),r=n(39473),s=n(50585);const a=function(t){return(0,s.Z)(t)?(0,i.Z)(t):(0,r.Z)(t)}},32957:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var i=n(87668),r=n(77226),s=n(72764);const a=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var o=Object.prototype.hasOwnProperty;const c=function(t){if(!(0,r.Z)(t))return a(t);var e=(0,s.Z)(t),n=[];for(var i in t)("constructor"!=i||!e&&o.call(t,i))&&n.push(i);return n};var l=n(50585);const h=function(t){return(0,l.Z)(t)?(0,i.Z)(t,!0):c(t)}},43836:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(74073),r=n(74765),s=n(21018),a=n(27771);const o=function(t,e){return((0,a.Z)(t)?i.Z:s.Z)(t,(0,r.Z)(e,3))}},42454:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(37834),r="Expected a function";function s(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(r);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var a=t.apply(this,i);return n.cache=s.set(r,a)||s,a};return n.cache=new(s.Cache||i.Z),n}s.Cache=i.Z;const a=s},61666:(t,e,n)=>{"use strict";n.d(e,{Z:()=>y});var i=n(13317),r=n(72954),s=n(22823),a=n(56009),o=n(77226),c=n(62281);const l=function(t,e,n,i){if(!(0,o.Z)(t))return t;for(var l=-1,h=(e=(0,s.Z)(e,t)).length,u=h-1,d=t;null!=d&&++l{"use strict";n.d(e,{Z:()=>c});var i=Math.ceil,r=Math.max;const s=function(t,e,n,s){for(var a=-1,o=r(i((e-t)/(n||1)),0),c=Array(o);o--;)c[s?o:++a]=t,t+=n;return c};var a=n(50439),o=n(94099);const c=function(t){return function(e,n,i){return i&&"number"!=typeof i&&(0,a.Z)(e,n,i)&&(n=i=void 0),e=(0,o.Z)(e),void 0===n?(n=e,e=0):n=(0,o.Z)(n),i=void 0===i?e{"use strict";n.d(e,{Z:()=>c});const i=function(t,e,n,i){var r=-1,s=null==t?0:t.length;for(i&&s&&(n=t[++r]);++r{"use strict";n.d(e,{Z:()=>i});const i=function(){return[]}},94099:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var i=/\s/;const r=function(t){for(var e=t.length;e--&&i.test(t.charAt(e)););return e};var s=/^\s+/;const a=function(t){return t?t.slice(0,r(t)+1).replace(s,""):t};var o=n(77226),c=n(72714),l=NaN,h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,p=parseInt;const f=function(t){if("number"==typeof t)return t;if((0,c.Z)(t))return l;if((0,o.Z)(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=(0,o.Z)(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=a(t);var n=u.test(t);return n||d.test(t)?p(t.slice(2),n?2:8):h.test(t)?l:+t};var g=1/0,y=17976931348623157e292;const m=function(t){return t?(t=f(t))===g||t===-g?(t<0?-1:1)*y:t==t?t:0:0===t?t:0}},50751:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(17685),r=n(74073),s=n(27771),a=n(72714),o=1/0,c=i.Z?i.Z.prototype:void 0,l=c?c.toString:void 0;const h=function t(e){if("string"==typeof e)return e;if((0,s.Z)(e))return(0,r.Z)(e,t)+"";if((0,a.Z)(e))return l?l.call(e):"";var n=e+"";return"0"==n&&1/e==-o?"-0":n};const u=function(t){return null==t?"":h(t)}},66749:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(50751),r=0;const s=function(t){var e=++r;return(0,i.Z)(t)+e}},34148:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var i=n(74073);const r=function(t,e){return(0,i.Z)(e,(function(e){return t[e]}))};var s=n(17179);const a=function(t){return null==t?[]:r(t,(0,s.Z)(t))}}}]); \ No newline at end of file diff --git a/assets/js/17896441.38f6818d.js.LICENSE.txt b/assets/js/17896441.38f6818d.js.LICENSE.txt new file mode 100644 index 0000000000..2b642da41d --- /dev/null +++ b/assets/js/17896441.38f6818d.js.LICENSE.txt @@ -0,0 +1,7 @@ +/*! + * Wait for document loaded before starting the execution + */ + +/*! Check if previously processed */ + +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ diff --git a/assets/js/18b31bd9.917d7d7d.js b/assets/js/18b31bd9.917d7d7d.js new file mode 100644 index 0000000000..99643b04d1 --- /dev/null +++ b/assets/js/18b31bd9.917d7d7d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8498],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>d});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var o=r.createContext({}),p=function(e){var t=r.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},c=function(e){var t=p(e.components);return r.createElement(o.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(a),h=n,d=u["".concat(o,".").concat(h)]||u[h]||m[h]||i;return a?r.createElement(d,l(l({ref:t},c),{},{components:a})):r.createElement(d,l({ref:t},c))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,l=new Array(i);l[0]=h;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[u]="string"==typeof e?e:n,l[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var r=a(87462),n=(a(67294),a(3905));const i={},l="Examples & Tutorials",s={unversionedId:"examples-tutorials/overview",id:"examples-tutorials/overview",title:"Examples & Tutorials",description:"Below you can find tutorials to help you get started with Tracetest.",source:"@site/docs/examples-tutorials/overview.md",sourceDirName:"examples-tutorials",slug:"/examples-tutorials/overview",permalink:"/examples-tutorials/overview",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/overview.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",next:{title:"Recipes",permalink:"/examples-tutorials/recipes"}},o={},p=[{value:"Recipes",id:"recipes",level:2},{value:"Tutorials",id:"tutorials",level:2},{value:"Integrations",id:"integrations",level:3},{value:"Best Practices",id:"best-practices",level:3},{value:"OpenTelemetry Community",id:"opentelemetry-community",level:3},{value:"Webinars",id:"webinars",level:3},{value:"Conference Talks",id:"conference-talks",level:3},{value:"Video Courses",id:"video-courses",level:3}],c={toc:p},u="wrapper";function m(e){let{components:t,...a}=e;return(0,n.kt)(u,(0,r.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"examples--tutorials"},"Examples & Tutorials"),(0,n.kt)("p",null,"Below you can find tutorials to help you get started with Tracetest."),(0,n.kt)("h2",{id:"recipes"},"Recipes"),(0,n.kt)("p",null,"If you're already building something with Tracetest, please explore ",(0,n.kt)("a",{parentName:"p",href:"/examples-tutorials/recipes"},"Recipes")," \u2014 short, self-contained, and runnable solutions to popular use cases."),(0,n.kt)("h2",{id:"tutorials"},"Tutorials"),(0,n.kt)("p",null,"Check out the following blog posts with Tracetest-related content."),(0,n.kt)("h3",{id:"integrations"},"Integrations"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/honeycomb-tracetest-observability-driven-development"},"Honeycomb + Tracetest: Observability-driven Development")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/trace-based-testing-cloud-native-apps-with-aws-x-ray-and-tracetest"},"Trace-based testing cloud-native apps with AWS X-Ray and Tracetest")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/event-driven-kubernetes-testing-with-testkube-and-tracetest"},"Event-driven Kubernetes testing with Testkube and Tracetest")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/announcing-the-tracetest-integration-with-keptn-the-control-plane-for-cloud-native-application-life-cycle-orchestration"},"Announcing the Tracetest integration with Keptn")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/announcing-the-tracetest-integration-with-k6-deep-load-testing-of-your-cloud-native-system"},"Tracetest + k6: Deep Load Testing of your Cloud Native System")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/tracetest-integration-elastic-trace-based-testing-application-performance-monitoring"},"Tracetest + Elastic: Trace-based testing meets APM")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/tracetest-integration-with-lightstep"},"Announcing the Tracetest integration with Lightstep")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/observability-trace-based-testing-aws-serverless-opensearch-tracetest"},"Observability and Trace-based Testing in AWS")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/tracetest-opensearch-integration"},"Enabling Tracetest to Work Directly with OpenSearch")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/integrating-tracetest-with-github-actions-in-a-ci-pipeline"},"Integrating Tracetest with GitHub Actions in a CI pipeline"))),(0,n.kt)("h3",{id:"best-practices"},"Best Practices"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/tracetest-in-action-running-trace-based-tests-on-the-opentelemetry-demo-app-with-nomad"},"Running Trace-Based Tests on the OpenTelemetry Demo App with Nomad")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/ad-hoc-testing-of-distributed-systems"},"Ad Hoc Testing of Distributed Systems")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/chaining-api-tests-to-handle-complex-distributed-system-testing"},"Chaining API Tests to Handle Complex Distributed System Testing")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/observability-driven-development-with-go-and-tracetest"},"Observability-driven development with Go and Tracetest")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/the-difference-between-tdd-and-odd"},"The difference between test-driven & observability-driven development")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/integration-tests-pros-and-cons-of-doubles-vs-trace-based-testing"},"Integration Tests: Pros and Cons of Doubles vs. Trace-Based Testing")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/detect-fix-performance-issues-using-tracetest"},"Detect & Fix Performance Issues Using Tracetest"))),(0,n.kt)("h3",{id:"opentelemetry-community"},"OpenTelemetry Community"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/frontend-overhaul-opentelemetry-demo"},"Frontend Overhaul of the OpenTelemetry Demo (Go to Next.js)")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/is-it-observable-with-henrik-rexed"},"Is it Observable? with Henrik Rexed")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://tracetest.io/blog/tracing-the-history-of-distributed-tracing-opentelemetry"},"Tracing the History of Distributed Tracing & OpenTelemetry"))),(0,n.kt)("h3",{id:"webinars"},"Webinars"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=OrstjSvMFio"},"Tracetest Community Call in April 2023 - Tracetest turns 1 year old!")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=U_94bEptrrE"},"Tracetest Community Call in March 2023")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=nAp3zYgykok"},"Trace-based testing in Kubernetes")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=v0lgw6t58YA"},"Tracetest Community Call in February 2023")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=Dog70D7aVyg"},"Integrating k6 and Tracetest (k6 Office Hours #77)")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://youtu.be/-9X3XTdGK_s?t=767"},"Keptn Community & Developer Meeting - Feb 1, 2023")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=n5ESTR8vpH8"},"Tracetest Community Call in January 2023")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=mp7f4RVi97g"},"Tracetest v0.8 Release - Transactions and Environments")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=iqGYysqNQNk"},"Tracetest v0.7 Release - Installation & Workflow Updates")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=xj7tS2owRvk"},"Is it Observable | Introduction to Tracetest - with Ken Hamric")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=xpEKHK5VXB0"},"Tracetest v0.6 Release - gRPC, Postman and More")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://youtu.be/mqwJRxqBNCg"},"Introduction to Tracetest - E2E Tests Powered by OpenTelemetry"))),(0,n.kt)("h3",{id:"conference-talks"},"Conference Talks"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://2023.fosdem.sojourner.rocks/event/14490"},"Observability-driven development with OpenTelemetry - FOSDEM 2023")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=x5sQg4MNFxI"},"How Testability Drives Observability - Open Source Summit Dublin 2022"))),(0,n.kt)("h3",{id:"video-courses"},"Video Courses"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Observability-driven development 3-part video tutorial:",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=LXVBnPqxspY"},"Part 1")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=gLl_QmIU7UA"},"Part 2")),(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("a",{parentName:"li",href:"https://www.youtube.com/watch?v=lHMDDyAtxWE"},"Part 3"))))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/18e1cbc2.d68b3131.js b/assets/js/18e1cbc2.d68b3131.js new file mode 100644 index 0000000000..aaf72d9964 --- /dev/null +++ b/assets/js/18e1cbc2.d68b3131.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7847],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>h});var n=r(67294);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,s=e.mdxType,a=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=l(r),f=s,h=u["".concat(c,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(h,o(o({ref:t},p),{},{components:r})):n.createElement(h,o({ref:t},p))}));function h(e,t){var r=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=r.length,o=new Array(a);o[0]=f;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[u]="string"==typeof e?e:s,o[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(87462),s=(r(67294),r(3905));const a={},o="Working with Traces",i={unversionedId:"working-with-traces",id:"working-with-traces",title:"Working with Traces",description:"All tests will be listed in the dashboard:",source:"@site/docs/working-with-traces.md",sourceDirName:".",slug:"/working-with-traces",permalink:"/working-with-traces",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/working-with-traces.md",tags:[],version:"current",frontMatter:{}},c={},l=[],p={toc:l},u="wrapper";function d(e){let{components:t,...a}=e;return(0,s.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"working-with-traces"},"Working with Traces"),(0,s.kt)("p",null,"All tests will be listed in the dashboard:"),(0,s.kt)("p",null,(0,s.kt)("img",{alt:"Test List",src:r(22600).Z,width:"2870",height:"1404"})),(0,s.kt)("p",null,"Select a test to see its trace details:"),(0,s.kt)("p",null,(0,s.kt)("img",{alt:"Select",src:r(61425).Z,width:"2870",height:"1384"})),(0,s.kt)("p",null,"Each run of the test is listed here along with the Execution Time, Status, Total Number of Assertions, Number of Assertions Passed, Number of Assertions Failed and Actions available for the test."),(0,s.kt)("p",null,(0,s.kt)("img",{alt:"Test Run List",src:r(95503).Z,width:"2870",height:"1452"})),(0,s.kt)("p",null,"Select a run of the test and the Tracetest dashboard will display:"),(0,s.kt)("p",null,(0,s.kt)("img",{alt:"Tracetest Dashboard",src:r(94552).Z,width:"2870",height:"1570"})))}d.isMDXComponent=!0},22600:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/list-of-tests-run-50528eb8188ee2fc0968c3e8bdc560fa.png"},61425:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/select-test-54db6567dac85a7cfd66779d5749636d.png"},95503:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/test-run-list-795e94d76d799a4e63c98ebe8a5ffa03.png"},94552:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/tracetest-dashboard-597116b88189d77d836cc27a0b932444.png"}}]); \ No newline at end of file diff --git a/assets/js/1900a2f2.612e72ad.js b/assets/js/1900a2f2.612e72ad.js new file mode 100644 index 0000000000..1b275cf610 --- /dev/null +++ b/assets/js/1900a2f2.612e72ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8744],{3905:(e,t,r)=>{r.d(t,{Zo:()=>d,kt:()=>g});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},d=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=l(r),m=a,g=u["".concat(s,".").concat(m)]||u[m]||p[m]||i;return r?n.createElement(g,o(o({ref:t},d),{},{components:r})):n.createElement(g,o({ref:t},d))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[u]="string"==typeof e?e:a,o[1]=c;for(var l=2;l{r.d(t,{Z:()=>d});var n=r(87462),a=r(67294),i=r(86010),o=r(97325),c=r(20107),s=r(83699);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function d(e){let{as:t,id:r,...d}=e;const{navbar:{hideOnScroll:u}}=(0,c.L)();if("h1"===t||!r)return a.createElement(t,(0,n.Z)({},d,{id:void 0}));const p=(0,o.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:r});return a.createElement(t,(0,n.Z)({},d,{className:(0,i.Z)("anchor",u?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,d.className),id:r}),d.children,a.createElement(s.Z,{className:"hash-link",to:`#${r}`,"aria-label":p,title:p},"\u200b"))}},34447:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>y,contentTitle:()=>g,default:()=>w,frontMatter:()=>m,metadata:()=>b,toc:()=>v});var n=r(87462),a=r(67294),i=r(3905),o=r(86010),c=r(83699),s=r(97325),l=r(13899);const d=[{name:"\ud83d\udc47 Install Tracetest",url:"./installation",description:a.createElement(s.Z,null,"Set up Tracetest and start trace-based testing your distributed system."),button:"Set up Tracetest"},{name:"\ud83d\ude4c Open Tracetest",url:"./open",description:a.createElement(s.Z,null,"After installing it, open Tracetest start to creating trace-based tests."),button:"Create tests"},{name:"\ud83e\udd14 Don't have OpenTelemetry?",url:"./no-otel",description:a.createElement(s.Z,null,"Install OpenTelemetry in 5 minutes without any code changes!"),button:"Set up OTel"},{name:"\ud83e\udd29 Open Source",url:"https://github.com/kubeshop/tracetest",description:a.createElement(s.Z,null,"Check out the Tracetest GitHub repo! Please consider giving us a star! \u2b50\ufe0f"),button:"Go to GitHub"}];function u(e){let{name:t,url:r,description:n,button:i}=e;return a.createElement("div",{className:"col col--6 margin-bottom--lg"},a.createElement("div",{className:(0,o.Z)("card")},a.createElement("div",{className:"card__body"},a.createElement(l.Z,{as:"h3"},t),a.createElement("p",null,n)),a.createElement("div",{className:"card__footer"},a.createElement("div",{className:"button-group button-group--block"},a.createElement(c.Z,{className:"button button--secondary",to:r},i)))))}function p(){return a.createElement("div",{className:"row"},d.map((e=>a.createElement(u,(0,n.Z)({key:e.name},e)))))}const m={id:"overview",title:"Getting Started with Tracetest \ud83d\ude80",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",hide_table_of_contents:!1,keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png"},g=void 0,b={unversionedId:"getting-started/overview",id:"getting-started/overview",title:"Getting Started with Tracetest \ud83d\ude80",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",source:"@site/docs/getting-started/overview.mdx",sourceDirName:"getting-started",slug:"/getting-started/overview",permalink:"/getting-started/overview",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/getting-started/overview.mdx",tags:[],version:"current",frontMatter:{id:"overview",title:"Getting Started with Tracetest \ud83d\ude80",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",hide_table_of_contents:!1,keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png"},sidebar:"tutorialSidebar",previous:{title:"Welcome to Tracetest Docs! \ud83d\udc4b",permalink:"/"},next:{title:"Installing Tracetest",permalink:"/getting-started/installation"}},y={},v=[],h={toc:v},f="wrapper";function w(e){let{components:t,...r}=e;return(0,i.kt)(f,(0,n.Z)({},h,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Tracetest is a cloud-native application, packaged and distributed a Docker image and designed to run in a containerized environment."),(0,i.kt)(p,{mdxType:"GettingStartedGuideCardsRow"}))}w.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/195b6708.e9fbe922.js b/assets/js/195b6708.e9fbe922.js new file mode 100644 index 0000000000..2e0f884002 --- /dev/null +++ b/assets/js/195b6708.e9fbe922.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9002],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),m=a,f=p["".concat(l,".").concat(m)]||p[m]||d[m]||i;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={},o="Configuring your CLI",s={unversionedId:"cli/configuring-your-cli",id:"cli/configuring-your-cli",title:"Configuring your CLI",description:"Our web interface makes it easier to visualize your traces and add assertions, but sometimes a CLI is needed for automation. The CLI was developed for users creating tests and executing them each time a change is made in the system, so Tracetest can detect regressions and check your Service Level Objectives (SLOs).",source:"@site/docs/cli/configuring-your-cli.md",sourceDirName:"cli",slug:"/cli/configuring-your-cli",permalink:"/cli/configuring-your-cli",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/configuring-your-cli.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Installation Reference",permalink:"/cli/cli-installation-reference"},next:{title:"Defining Data Stores as Text Files",permalink:"/cli/creating-data-stores"}},l={},c=[{value:"Available Commands",id:"available-commands",level:2},{value:"Configure",id:"configure",level:3},{value:"Test List",id:"test-list",level:3},{value:"Run a Test",id:"run-a-test",level:3},{value:"Running Tracetest CLI from Docker",id:"running-tracetest-cli-from-docker",level:3}],u={toc:c},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"configuring-your-cli"},"Configuring your CLI"),(0,a.kt)("p",null,"Our web interface makes it easier to visualize your traces and add assertions, but sometimes a CLI is needed for automation. The CLI was developed for users creating tests and executing them each time a change is made in the system, so Tracetest can detect regressions and check your Service Level Objectives (SLOs)."),(0,a.kt)("h2",{id:"available-commands"},"Available Commands"),(0,a.kt)("p",null,"Here is a list of all available commands and how to use them:"),(0,a.kt)("h3",{id:"configure"},"Configure"),(0,a.kt)("p",null,"Configure your CLI to connect to your Tracetest server."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"How to Use"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest configure\n")),(0,a.kt)("p",null,"If you want to set values without having to answer questions from a prompt, you can provide the flag ",(0,a.kt)("inlineCode",{parentName:"p"},"--endpoint")," to define the server endpoint."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest configure --endpoint http://my-tracetest-server:11633\n")),(0,a.kt)("h3",{id:"test-list"},"Test List"),(0,a.kt)("p",null,"Allows you to list all tests."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"How to Use"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest list test\n")),(0,a.kt)("h3",{id:"run-a-test"},"Run a Test"),(0,a.kt)("p",null,"Allows you to run a test by referencing a ",(0,a.kt)("a",{parentName:"p",href:"./creating-tests"},"test definition file"),"."),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"Note: If the definition file contains the field ",(0,a.kt)("inlineCode",{parentName:"p"},"id"),", this command will not create a new test. Instead, it will update the test with that ID. If that test doesn't exist, a new one will be created with that ID on the server.")),(0,a.kt)("p",null,"Every time the test is run, changes are detected and, if any change is introduced, we use Tractest's ",(0,a.kt)("a",{parentName:"p",href:"../concepts/versioning"},"versioning")," mechanism to ensure that it will not cause problems with previous test runs."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"How to Use"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test --file \n")),(0,a.kt)("h3",{id:"running-tracetest-cli-from-docker"},"Running Tracetest CLI from Docker"),(0,a.kt)("p",null,"There are times when it is easier to directly execute the Tracetest CLI from a Docker image rather than installing the CLI on your local machine. This can be convenient when you wish to execute the CLI in a CI/CD environment."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"How to Use"),":"),(0,a.kt)("p",null,"Use the command below, substituting the following placeholders:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"your-tracetest-server-url")," - The URL to the running Tracetest server you wish to execute the test on. Example: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://localhost:11633/")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"file-path")," - The path to the saved Tracetest test. Example: ",(0,a.kt)("inlineCode",{parentName:"li"},"./mytest.yaml"))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash",metastring:"wordWrap=true",wordWrap:"true"},"docker run --rm -it -v$(pwd):$(pwd) -w $(pwd) --network host --entrypoint tracetest kubeshop/tracetest:latest -s run test --file \n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/19e521d6.8637e5f2.js b/assets/js/19e521d6.8637e5f2.js new file mode 100644 index 0000000000..94ac36e6d1 --- /dev/null +++ b/assets/js/19e521d6.8637e5f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2340],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),c=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),d=r,g=u["".concat(s,".").concat(d)]||u[d]||m[d]||a;return n?o.createElement(g,i(i({ref:t},p),{},{components:n})):o.createElement(g,i({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var o=n(87462),r=(n(67294),n(3905));const a={},i="OpenTelemetry Collector Configuration File Reference",l={unversionedId:"configuration/opentelemetry-collector-configuration-file-reference",id:"configuration/opentelemetry-collector-configuration-file-reference",title:"OpenTelemetry Collector Configuration File Reference",description:"This page contains a reference for using the OpenTelemetry Collector to send trace data from your application to any of Tracetest's supported trace data stores.",source:"@site/docs/configuration/opentelemetry-collector-configuration-file-reference.md",sourceDirName:"configuration",slug:"/configuration/opentelemetry-collector-configuration-file-reference",permalink:"/configuration/opentelemetry-collector-configuration-file-reference",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/opentelemetry-collector-configuration-file-reference.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Upgrade Tracetest Version",permalink:"/configuration/upgrade"},next:{title:"Deployment",permalink:"/deployment/overview"}},s={},c=[{value:"Supported Trace Data Stores",id:"supported-trace-data-stores",level:2},{value:"Configure OpenTelemetry Collector to Send Traces to Jaeger",id:"configure-opentelemetry-collector-to-send-traces-to-jaeger",level:2},{value:"Configure OpenTelemetry Collector to Send Traces to OpenSearch",id:"configure-opentelemetry-collector-to-send-traces-to-opensearch",level:2},{value:"Configure OpenTelemetry Collector to Send Traces to Elastic APM",id:"configure-opentelemetry-collector-to-send-traces-to-elastic-apm",level:2},{value:"Configure OpenTelemetry Collector to Send Traces to SignalFx",id:"configure-opentelemetry-collector-to-send-traces-to-signalfx",level:2},{value:"Configure OpenTelemetry Collector to Send Traces to Tempo",id:"configure-opentelemetry-collector-to-send-traces-to-tempo",level:2},{value:"Configure OpenTelemetry Collector to Send Traces to Azure App Insights",id:"configure-opentelemetry-collector-to-send-traces-to-azure-app-insights",level:2}],p={toc:c},u="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"opentelemetry-collector-configuration-file-reference"},"OpenTelemetry Collector Configuration File Reference"),(0,r.kt)("p",null,"This page contains a reference for using the OpenTelemetry Collector to send trace data from your application to any of Tracetest's supported trace data stores."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest can be found in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,r.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,r.kt)("h2",{id:"supported-trace-data-stores"},"Supported Trace Data Stores"),(0,r.kt)("p",null,"Tracetest is designed to work with different trace data stores. To enable Tracetest to run end-to-end tests against trace data, you need to configure Tracetest to access trace data."),(0,r.kt)("p",null,"Currently, Tracetest supports the following data stores. Click on the respective data store to view configuration examples:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/jaeger"},"Jaeger")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/opensearch"},"OpenSearch")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/elasticapm"},"Elastic APM")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/signalfx"},"SignalFX")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/tempo"},"Grafana Tempo")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/lightstep"},"Lightstep")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/new-relic"},"New Relic")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/configuration/connecting-to-data-stores/awsxray"},"AWS X-Ray"),"3"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/datadog"},"Datadog")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/configuration/connecting-to-data-stores/honeycomb"},"Honeycomb")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/configuration/connecting-to-data-stores/azure-app-insights"},"Azure App Insights")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"./connecting-to-data-stores/dynatrace"},"Dynatrace"))),(0,r.kt)("p",null,"Continue reading below to learn how to configure the OpenTelemetry Collector to send trace data from your application to any of the trace data stores above."),(0,r.kt)("h2",{id:"configure-opentelemetry-collector-to-send-traces-to-jaeger"},"Configure OpenTelemetry Collector to Send Traces to Jaeger"),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file, make sure to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"jaeger"),", with the ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," pointing to your Jaeger instance on port ",(0,r.kt)("inlineCode",{parentName:"p"},"14250"),". If you are running Tracetest with Docker, the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"http://jaeger:14250"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and still use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n jaeger:\n endpoint: jaeger:14250\n tls:\n insecure: true\n\nservice:\n pipelines:\n # You probably already have a traces pipeline, you don't have to change it.\n # Just add this one to your configuration. Just make sure to not have two\n # pipelines with the same name.\n traces/1:\n receivers: [otlp] # your receiver\n processors: [batch] # make sure to add the batch processor\n exporters: [jaeger] # your exporter pointing to your Jaeger instance\n")),(0,r.kt)("h2",{id:"configure-opentelemetry-collector-to-send-traces-to-opensearch"},"Configure OpenTelemetry Collector to Send Traces to OpenSearch"),(0,r.kt)("p",null,"You'll configure the OpenTelemetry Collector to receive traces from your system and then send them to OpenSearch via Data Prepper. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file, make sure to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"otlp"),", with the ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," pointing to the Data Prepper on port ",(0,r.kt)("inlineCode",{parentName:"p"},"21890"),". If you are running Tracetest with Docker, the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"data-prepper:21890"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n loglevel: debug\n otlp/2:\n endpoint: data-prepper:21890\n tls:\n insecure: true\n insecure_skip_verify: true\n\nservice:\n pipelines:\n # You probably already have a traces pipeline, you don't have to change it.\n # Just add this one to your configuration. Just make sure to not have two\n # pipelines with the same name.\n traces/1:\n receivers: [otlp] # your receiver\n processors: [batch] # make sure to add the batch processor\n exporters: [otlp/2] # your exporter pointing to your Data Prepper instance\n")),(0,r.kt)("h2",{id:"configure-opentelemetry-collector-to-send-traces-to-elastic-apm"},"Configure OpenTelemetry Collector to Send Traces to Elastic APM"),(0,r.kt)("p",null,"You'll configure the OpenTelemetry Collector to receive traces from your system and then send them to Elasticsearch via Elastic APM. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file, make sure to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"otlp"),", with the ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," pointing to the Elastic APM server on port ",(0,r.kt)("inlineCode",{parentName:"p"},"8200"),". If you are running Tracetest with Docker, the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"apm-server:8200"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n otlp/elastic:\n endpoint: apm-server:8200\n tls:\n insecure: true\n insecure_skip_verify: true\n\nservice:\n pipelines:\n # You probably already have a traces pipeline, you don't have to change it.\n # Just add this one to your configuration. Just make sure to not have two\n # pipelines with the same name.\n traces/1:\n receivers: [otlp] # your receiver\n processors: [batch] # make sure to add the batch processor\n exporters: [otlp/elastic] # your exporter pointing to your Elastic APM server instance\n")),(0,r.kt)("h2",{id:"configure-opentelemetry-collector-to-send-traces-to-signalfx"},"Configure OpenTelemetry Collector to Send Traces to SignalFx"),(0,r.kt)("p",null,"You'll configure the OpenTelemetry Collector to receive traces from your system and then send them to SignalFx. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file, make sure to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"sapm"),", with the ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," pointing to the SignalFx trace ingestion endpoint. The endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"https://ingest.us1.signalfx.com/v2/trace"),". Also make sure to add your SignalFx ",(0,r.kt)("inlineCode",{parentName:"p"},"access_token"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n sapm:\n access_token: # UPDATE THIS\n access_token_passthrough: true\n endpoint: https://ingest.us1.signalfx.com/v2/trace # UPDATE THIS IF NEEDED\n max_connections: 100\n num_workers: 8\n\nservice:\n pipelines:\n # your probably already have a traces pipeline, you don't have to change it.\n # just add this one to your configuration. Just make sure to not have two\n # pipelines with the same name\n traces/1:\n receivers: [otlp] # your receiver\n processors: [batch] # make sure to add the batch processor\n exporters: [sapm] # your exporter pointing to your SignalFx instance\n")),(0,r.kt)("h2",{id:"configure-opentelemetry-collector-to-send-traces-to-tempo"},"Configure OpenTelemetry Collector to Send Traces to Tempo"),(0,r.kt)("p",null,"You'll configure the OpenTelemetry Collector to receive traces from your system and then send them to Tempo. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file, make sure to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"tempo"),", with the ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," pointing to your Tempo's instance on port ",(0,r.kt)("inlineCode",{parentName:"p"},"4317"),". If you are running Tracetest with Docker, the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"http://tempo:4317"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and still use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n otlp/2:\n endpoint: tempo:4317\n tls:\n insecure: true\n\nservice:\n pipelines:\n # your probably already have a traces pipeline, you don't have to change it.\n # just add this one to your configuration. Just make sure to not have two\n # pipelines with the same name\n traces/1:\n receivers: [otlp] # your receiver\n processors: [batch] # make sure to have the probabilistic_sampler before your batch processor\n exporters: [otlp/2] # your exporter pointing to your Tempo instance\n")),(0,r.kt)("h2",{id:"configure-opentelemetry-collector-to-send-traces-to-azure-app-insights"},"Configure OpenTelemetry Collector to Send Traces to Azure App Insights"),(0,r.kt)("p",null,"You'll configure the OpenTelemetry Collector to receive traces from your system and then send them to Azure App Insights. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file, make sure to set the ",(0,r.kt)("inlineCode",{parentName:"p"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"azuremonitor"),", with the ",(0,r.kt)("inlineCode",{parentName:"p"},"endpoint")," instrumentation key of your Azure App Insights instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and still use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nexporters:\n azuremonitor:\n instrumentation_key: \n\nservice:\n pipelines:\n traces/appinsights:\n receivers: [otlp] # your receiver\n exporters: [azuremonitor] # your exporter pointing to your Azure App Insights instance\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1be78505.c78e352f.js b/assets/js/1be78505.c78e352f.js new file mode 100644 index 0000000000..d63ac59aa4 --- /dev/null +++ b/assets/js/1be78505.c78e352f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9514,4248],{81299:(e,t,n)=>{n.r(t),n.d(t,{default:()=>he});var a=n(67294),o=n(86010),l=n(35463),r=n(23702),i=n(60246),c=n(78259),s=n(58801),d=n(84432),m=n(32517),u=n(97325),b=n(72957),p=n(43266);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),l=(0,a.useRef)(!1),{startScroll:r,cancelScroll:i}=(0,b.Ct)();return(0,b.RF)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(l.current?l.current=!1:a>=r?(i(),o(!1)):a{e.location.hash&&(l.current=!0,o(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.Z)("clean-btn",r.k.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(58986),g=n(16550),v=n(13488),k=n(20107),_=n(96811),C=n(87462);function S(e){return a.createElement("svg",(0,C.Z)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const I={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function N(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.I)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.Z)("button button--secondary button--outline",I.collapseSidebarButton),onClick:t},a.createElement(S,{className:I.collapseSidebarButtonIcon}))}var T=n(65830),x=n(43768);const Z=Symbol("EmptyContext"),B=a.createContext(Z);function y(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),l=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return a.createElement(B.Provider,{value:l},t)}var w=n(54639),L=n(69003),A=n(83699),H=n(51048);function M(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.I)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function F(e){let{item:t,onItemClick:n,activePath:l,level:i,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,k.L)(),f=function(e){const t=(0,H.Z)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,c.Wl)(e):void 0),[e,t])}(t),g=(0,c._F)(t,l),v=(0,L.Mg)(h,l),{collapsed:_,setCollapsed:S}=(0,w.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:I,setExpandedItem:N}=function(){const e=(0,a.useContext)(B);if(e===Z)throw new x.i6("DocSidebarItemsExpandedStateProvider");return e}(),T=function(e){void 0===e&&(e=!_),N(e?null:s),S(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const l=(0,x.D9)(t);(0,a.useEffect)((()=>{t&&!l&&n&&o(!1)}),[t,l,n,o])}({isActive:g,collapsed:_,updateCollapsed:T}),(0,a.useEffect)((()=>{b&&null!=I&&I!==s&&E&&S(!0)}),[b,I,s,S,E]),a.createElement("li",{className:(0,o.Z)(r.k.docs.docSidebarItemCategory,r.k.docs.docSidebarItemCategoryLevel(i),"menu__list-item",{"menu__list-item--collapsed":_},p)},a.createElement("div",{className:(0,o.Z)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v})},a.createElement(A.Z,(0,C.Z)({className:(0,o.Z)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?T(!1):(e.preventDefault(),T())}:()=>{n?.(t)},"aria-current":v?"page":void 0,"aria-expanded":b?!_:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(M,{categoryLabel:u,onClick:e=>{e.preventDefault(),T()}})),a.createElement(w.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:_},a.createElement(j,{items:m,tabIndex:_?-1:0,onItemClick:n,activePath:l,level:i+1})))}var P=n(2735),W=n(14082);const D={menuExternalLink:"menuExternalLink_NmtK"};function R(e){let{item:t,onItemClick:n,activePath:l,level:i,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,c._F)(t,l),E=(0,P.Z)(m);return a.createElement("li",{className:(0,o.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(i),"menu__list-item",b),key:u},a.createElement(A.Z,(0,C.Z)({className:(0,o.Z)("menu__link",!E&&D.menuExternalLink,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(W.Z,null)))}const V={menuHtmlItem:"menuHtmlItem_M9Kj"};function z(e){let{item:t,level:n,index:l}=e;const{value:i,defaultStyle:c,className:s}=t;return a.createElement("li",{className:(0,o.Z)(r.k.docs.docSidebarItemLink,r.k.docs.docSidebarItemLinkLevel(n),c&&[V.menuHtmlItem,"menu__list-item"],s),key:l,dangerouslySetInnerHTML:{__html:i}})}function U(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(F,(0,C.Z)({item:t},n));case"html":return a.createElement(z,(0,C.Z)({item:t},n));default:return a.createElement(R,(0,C.Z)({item:t},n))}}function K(e){let{items:t,...n}=e;return a.createElement(y,null,t.map(((e,t)=>a.createElement(U,(0,C.Z)({key:t,item:e,index:t},n)))))}const j=(0,a.memo)(K),q={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function G(e){let{path:t,sidebar:n,className:l}=e;const i=function(){const{isActive:e}=(0,T.nT)(),[t,n]=(0,a.useState)(e);return(0,b.RF)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{"aria-label":(0,u.I)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.Z)("menu thin-scrollbar",q.menu,i&&q.menuWithAnnouncementBar,l)},a.createElement("ul",{className:(0,o.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:n,activePath:t,level:1})))}const Y={sidebar:"sidebar_njMd",sidebarWithHideableNavbar:"sidebarWithHideableNavbar_wUlq",sidebarHidden:"sidebarHidden_VK0M",sidebarLogo:"sidebarLogo_isFc"};function O(e){let{path:t,sidebar:n,onCollapse:l,isHidden:r}=e;const{navbar:{hideOnScroll:i},docs:{sidebar:{hideable:c}}}=(0,k.L)();return a.createElement("div",{className:(0,o.Z)(Y.sidebar,i&&Y.sidebarWithHideableNavbar,r&&Y.sidebarHidden)},i&&a.createElement(_.Z,{tabIndex:-1,className:Y.sidebarLogo}),a.createElement(G,{path:t,sidebar:n}),c&&a.createElement(N,{onClick:l}))}const X=a.memo(O);var J=n(53086),Q=n(60735);const $=e=>{let{sidebar:t,path:n}=e;const l=(0,Q.e)();return a.createElement("ul",{className:(0,o.Z)(r.k.docs.docSidebarMenu,"menu__list")},a.createElement(j,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&l.toggle(),"link"===e.type&&l.toggle()},level:1}))};function ee(e){return a.createElement(J.Zo,{component:$,props:e})}const te=a.memo(ee);function ne(e){const t=(0,v.i)(),n="desktop"===t||"ssr"===t,o="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(X,e),o&&a.createElement(te,e))}const ae={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function oe(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:ae.expandButton,title:(0,u.I)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.I)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(S,{className:ae.expandButtonIcon}))}const le={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry",sidebarViewport:"sidebarViewport_Xe31"};function re(e){let{children:t}=e;const n=(0,d.V)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function ie(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:l}=e;const{pathname:i}=(0,g.TH)(),[c,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{c&&s(!1),!c&&(0,f.n)()&&s(!0),l((e=>!e))}),[l,c]);return a.createElement("aside",{className:(0,o.Z)(r.k.docs.docSidebarContainer,le.docSidebarContainer,n&&le.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(le.docSidebarContainer)&&n&&s(!0)}},a.createElement(re,null,a.createElement("div",{className:(0,o.Z)(le.sidebarViewport,c&&le.sidebarViewportHidden)},a.createElement(ne,{sidebar:t,path:i,onCollapse:d,isHidden:c}),c&&a.createElement(oe,{toggleSidebar:d}))))}const ce={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function se(e){let{hiddenSidebarContainer:t,children:n}=e;const l=(0,d.V)();return a.createElement("main",{className:(0,o.Z)(ce.docMainContainer,(t||!l)&&ce.docMainContainerEnhanced)},a.createElement("div",{className:(0,o.Z)("container padding-top--md padding-bottom--lg",ce.docItemWrapper,t&&ce.docItemWrapperEnhanced)},n))}const de={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX"};function me(e){let{children:t}=e;const n=(0,d.V)(),[o,l]=(0,a.useState)(!1);return a.createElement(m.Z,{wrapperClassName:de.docsWrapper},a.createElement(E,null),a.createElement("div",{className:de.docPage},n&&a.createElement(ie,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:l}),a.createElement(se,{hiddenSidebarContainer:o},t)))}var ue=n(74248),be=n(33647);function pe(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(be.Z,{version:t.version,tag:(0,i.os)(t.pluginId,t.version)}),a.createElement(l.d,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function he(e){const{versionMetadata:t}=e,n=(0,c.hI)(e);if(!n)return a.createElement(ue.default,null);const{docElement:i,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(pe,e),a.createElement(l.FG,{className:(0,o.Z)(r.k.wrapper.docsPages,r.k.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.q,{version:t},a.createElement(d.b,{name:m,items:u},a.createElement(me,null,i)))))}},74248:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var a=n(67294),o=n(97325),l=n(35463),r=n(32517);function i(){return a.createElement(a.Fragment,null,a.createElement(l.d,{title:(0,o.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.Z,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(o.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(o.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},58801:(e,t,n)=>{n.d(t,{E:()=>i,q:()=>r});var a=n(67294),o=n(43768);const l=a.createContext(null);function r(e){let{children:t,version:n}=e;return a.createElement(l.Provider,{value:n},t)}function i(){const e=(0,a.useContext)(l);if(null===e)throw new o.i6("DocsVersionProvider");return e}}}]); \ No newline at end of file diff --git a/assets/js/1c2206c0.0143e720.js b/assets/js/1c2206c0.0143e720.js new file mode 100644 index 0000000000..6833bc3318 --- /dev/null +++ b/assets/js/1c2206c0.0143e720.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1976],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=o.createContext({}),l=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},u="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},g=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(n),g=r,d=u["".concat(c,".").concat(g)]||u[g]||h[g]||a;return n?o.createElement(d,i(i({ref:t},p),{},{components:n})):o.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=g;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var o=n(87462),r=(n(67294),n(3905));const a={},i="Lightstep",s={unversionedId:"configuration/connecting-to-data-stores/lightstep",id:"configuration/connecting-to-data-stores/lightstep",title:"Lightstep",description:"If you want to use Lightstep as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Lightstep. And, you don't have to change your existing pipelines to do so.",source:"@site/docs/configuration/connecting-to-data-stores/lightstep.md",sourceDirName:"configuration/connecting-to-data-stores",slug:"/configuration/connecting-to-data-stores/lightstep",permalink:"/configuration/connecting-to-data-stores/lightstep",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/connecting-to-data-stores/lightstep.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Jaeger",permalink:"/configuration/connecting-to-data-stores/jaeger"},next:{title:"New Relic",permalink:"/configuration/connecting-to-data-stores/new-relic"}},c={},l=[{value:"Configuring OpenTelemetry Collector to Send Traces to both Lightstep and Tracetest",id:"configuring-opentelemetry-collector-to-send-traces-to-both-lightstep-and-tracetest",level:2},{value:"Configure Tracetest to Use Lightstep as a Trace Data Store",id:"configure-tracetest-to-use-lightstep-as-a-trace-data-store",level:2},{value:"Connect Tracetest to Lightstep with the Web UI",id:"connect-tracetest-to-lightstep-with-the-web-ui",level:2},{value:"Connect Tracetest to Lightstep with the CLI",id:"connect-tracetest-to-lightstep-with-the-cli",level:2}],p={toc:l},u="wrapper";function h(e){let{components:t,...a}=e;return(0,r.kt)(u,(0,o.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"lightstep"},"Lightstep"),(0,r.kt)("p",null,"If you want to use ",(0,r.kt)("a",{parentName:"p",href:"https://lightstep.com/"},"Lightstep")," as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Lightstep. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest with Lightstep can be found in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,r.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,r.kt)("h2",{id:"configuring-opentelemetry-collector-to-send-traces-to-both-lightstep-and-tracetest"},"Configuring OpenTelemetry Collector to Send Traces to both Lightstep and Tracetest"),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"otlp/tracetest")),(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," to your Tracetest instance on port ",(0,r.kt)("inlineCode",{parentName:"li"},"4317"))),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"If you are running Tracetest with Docker, and Tracetest's service name is ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest"),", then the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"http://tracetest:4317"))),(0,r.kt)("p",null,"Additionally, add another config:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"otlp/lightstep")),(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," pointing to your Lightstep account and the Lightstep ingest API"),(0,r.kt)("li",{parentName:"ul"},"Set your Lightstep access token as a ",(0,r.kt)("inlineCode",{parentName:"li"},"header"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and still use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n logLevel: debug\n # OTLP for Tracetest\n otlp/tracetest:\n endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n # OTLP for Lightstep\n otlp/lightstep:\n endpoint: ingest.lightstep.com:443\n headers:\n "lightstep-access-token": "" # Send traces to Lightstep. Read more in docs here: https://docs.lightstep.com/otel/otel-quick-start\n\nservice:\n pipelines:\n # Your probably already have a traces pipeline, you don\'t have to change it.\n # Add these two to your configuration. Just make sure to not have two\n # pipelines with the same name\n traces/tracetest:\n receivers: [otlp] # your receiver\n processors: [batch]\n exporters: [otlp/tracetest] # your exporter pointing to your tracetest instance\n traces/lightstep:\n receivers: [otlp] # your receiver\n processors: [batch]\n exporters: [logging, otlp/lightstep] # your exporter pointing to your lighstep account\n')),(0,r.kt)("h2",{id:"configure-tracetest-to-use-lightstep-as-a-trace-data-store"},"Configure Tracetest to Use Lightstep as a Trace Data Store"),(0,r.kt)("p",null,"Configure your Tracetest instance to expose an ",(0,r.kt)("inlineCode",{parentName:"p"},"otlp")," endpoint to make it aware it will receive traces from the OpenTelemetry Collector. This will expose Tracetest's trace receiver on port ",(0,r.kt)("inlineCode",{parentName:"p"},"4317"),"."),(0,r.kt)("h2",{id:"connect-tracetest-to-lightstep-with-the-web-ui"},"Connect Tracetest to Lightstep with the Web UI"),(0,r.kt)("p",null,"In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Lightstep."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Lightstep",src:n(55635).Z,width:"2856",height:"1578"})),(0,r.kt)("h2",{id:"connect-tracetest-to-lightstep-with-the-cli"},"Connect Tracetest to Lightstep with the CLI"),(0,r.kt)("p",null,"Or, if you prefer using the CLI, you can use this file config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Lightstep pipeline\n type: lightstep\n default: true\n")),(0,r.kt)("p",null,"Proceed to run this command in the terminal and specify the file above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"To learn more, ",(0,r.kt)("a",{parentName:"p",href:"/examples-tutorials/recipes/running-tracetest-with-lightstep"},"read the recipe on running a sample app with Lightstep and Tracetest"),".")))}h.isMDXComponent=!0},55635:(e,t,n)=>{n.d(t,{Z:()=>o});const o=n.p+"assets/images/Lightstep-settings-c866e393a26cc5d1f52f1bd9c8800ccd.png"}}]); \ No newline at end of file diff --git a/assets/js/1c241028.6a6eca9c.js b/assets/js/1c241028.6a6eca9c.js new file mode 100644 index 0000000000..2ff344975f --- /dev/null +++ b/assets/js/1c241028.6a6eca9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1986],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>g});var n=r(67294);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,s=e.mdxType,a=e.originalType,c=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(r),m=s,g=d["".concat(c,".").concat(m)]||d[m]||u[m]||a;return r?n.createElement(g,o(o({ref:t},p),{},{components:r})):n.createElement(g,o({ref:t},p))}));function g(e,t){var r=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=r.length,o=new Array(a);o[0]=m;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:s,o[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(87462),s=(r(67294),r(3905));const a={},o="OpenTelemetry Store - Get recommended products",i={unversionedId:"live-examples/opentelemetry-store/use-cases/get-recommended-products",id:"live-examples/opentelemetry-store/use-cases/get-recommended-products",title:"OpenTelemetry Store - Get recommended products",description:"In this use case, we want to validate the following story:",source:"@site/docs/live-examples/opentelemetry-store/use-cases/get-recommended-products.md",sourceDirName:"live-examples/opentelemetry-store/use-cases",slug:"/live-examples/opentelemetry-store/use-cases/get-recommended-products",permalink:"/live-examples/opentelemetry-store/use-cases/get-recommended-products",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/live-examples/opentelemetry-store/use-cases/get-recommended-products.md",tags:[],version:"current",frontMatter:{},sidebar:"liveExamplesSidebar",previous:{title:"OpenTelemetry Store - Checkout",permalink:"/live-examples/opentelemetry-store/use-cases/checkout"},next:{title:"OpenTelemetry Store - User Purchasing Products",permalink:"/live-examples/opentelemetry-store/use-cases/user-purchasing-products"}},c={},l=[{value:"Building a Test for This Scenario",id:"building-a-test-for-this-scenario",level:2},{value:"Traces",id:"traces",level:3},{value:"Assertions",id:"assertions",level:3},{value:"Test Definition",id:"test-definition",level:3}],p={toc:l},d="wrapper";function u(e){let{components:t,...a}=e;return(0,s.kt)(d,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"opentelemetry-store---get-recommended-products"},"OpenTelemetry Store - Get recommended products"),(0,s.kt)("p",null,"In this use case, we want to validate the following story:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre"},"As a consumer, after landing at home page\nI want to see what are the recommended products\nSo I can add them into my shopping cart.\n")),(0,s.kt)("p",null,"You can trigger this use case by calling the endpoint ",(0,s.kt)("inlineCode",{parentName:"p"},"GET /api/recommendations?productIds=&sessionId={some-uuid}¤cyCode=")," from the Frontend service. It should return a payload similar to this:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'[\n {\n "id": "0PUK6V6EV0",\n "name": "Solar System Color Imager",\n "description": "You have your new telescope and have observed Saturn and Jupiter. Now you\'re ready to take the next step and start imaging them. But where do you begin? The NexImage 10 Solar System Imager is the perfect solution.",\n "picture": "/images/products/SolarSystemColorImager.jpg",\n "priceUsd": {\n "currencyCode": "USD",\n "units": 175,\n "nanos": 0\n },\n "categories": [\n "accessories",\n "telescopes"\n ]\n },\n // ...\n]\n')),(0,s.kt)("h2",{id:"building-a-test-for-this-scenario"},"Building a Test for This Scenario"),(0,s.kt)("p",null,"Using Tracetest, we can ",(0,s.kt)("a",{parentName:"p",href:"/web-ui/creating-tests"},"create a test")," that will execute an API call on ",(0,s.kt)("inlineCode",{parentName:"p"},"GET /api/recommendations?productIds=&sessionId={some-uuid}¤cyCode=")," and validate the following properties:"),(0,s.kt)("ul",null,(0,s.kt)("li",{parentName:"ul"},"It should have 4 products on this list."),(0,s.kt)("li",{parentName:"ul"},"The feature flagger should be called for one product.")),(0,s.kt)("h3",{id:"traces"},"Traces"),(0,s.kt)("p",null,"Running these tests for the first time will create an Observability trace like the image below, where you can see spans for the API calls (HTTP and gRPC) and database calls:\n",(0,s.kt)("img",{src:r(18142).Z,width:"2228",height:"2000"})),(0,s.kt)("h3",{id:"assertions"},"Assertions"),(0,s.kt)("p",null,"With this trace, now we can build ",(0,s.kt)("a",{parentName:"p",href:"/concepts/assertions"},"assertions")," on Tracetest and validate the properties:"),(0,s.kt)("ul",null,(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},(0,s.kt)("strong",{parentName:"p"},"It should have 4 products on this list."),"\n",(0,s.kt)("img",{src:r(93942).Z,width:"3164",height:"850"}))),(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},(0,s.kt)("strong",{parentName:"p"},"The feature flagger should be called for one product."),"\n",(0,s.kt)("img",{src:r(35804).Z,width:"3152",height:"750"})))),(0,s.kt)("p",null,"Now you can validate this entire use case."),(0,s.kt)("h3",{id:"test-definition"},"Test Definition"),(0,s.kt)("p",null,"To replicate this entire test on Tracetest, you can replicate these steps on our Web UI or using our CLI by saving the following test definition as the file ",(0,s.kt)("inlineCode",{parentName:"p"},"test-definition.yml")," and later running:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f test-definition.yml\n")),(0,s.kt)("p",null,"We are assuming that the Frontend service is exposed on ",(0,s.kt)("inlineCode",{parentName:"p"},"http://otel-demo-frontend:8080"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: OpenTelemetry Store - Get recommended products\n trigger:\n type: http\n httpRequest:\n url: http://otel-demo-frontend:8080/api/recommendations?productIds=&sessionId=8c0465e2-32bb-4ecb-a9c8-5a2861629ff1¤cyCode=\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="rpc" name="grpc.hipstershop.ProductCatalogService/GetProduct"\n rpc.system="grpc" rpc.method="GetProduct" rpc.service="hipstershop.ProductCatalogService"]\n assertions:\n - attr:tracetest.selected_spans.count = 4\n - selector: span[tracetest.span.type="rpc" name="/hipstershop.FeatureFlagService/GetFlag"\n rpc.system="grpc" rpc.method="GetFlag" rpc.service="hipstershop.FeatureFlagService"]\n assertions:\n - attr:tracetest.selected_spans.count = 1\n')))}u.isMDXComponent=!0},35804:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/get-recommended-products-feature-flagger-test-spec-c858e453dc7cd2e78f813c6a66d94570.png"},93942:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/get-recommended-products-get-product-test-spec-53951fd0269678842ffd35394f162598.png"},18142:(e,t,r)=>{r.d(t,{Z:()=>n});const n=r.p+"assets/images/get-recommended-products-trace-d068772054e457b60ab936c103b15392.png"}}]); \ No newline at end of file diff --git a/assets/js/1c9ef271.788ef891.js b/assets/js/1c9ef271.788ef891.js new file mode 100644 index 0000000000..930af90f61 --- /dev/null +++ b/assets/js/1c9ef271.788ef891.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4848],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=r.createContext({}),c=function(e){var t=r.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},l=function(e){var t=c(e.components);return r.createElement(d.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,d=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),p=c(n),h=a,m=p["".concat(d,".").concat(h)]||p[h]||u[h]||i;return n?r.createElement(m,s(s({ref:t},l),{},{components:n})):r.createElement(m,s({ref:t},l))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,s=new Array(i);s[0]=h;var o={};for(var d in t)hasOwnProperty.call(t,d)&&(o[d]=t[d]);o.originalType=e,o[p]="string"==typeof e?e:a,s[1]=o;for(var c=2;c{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={},s="Editing Tests",o={unversionedId:"web-ui/editing-tests",id:"web-ui/editing-tests",title:"Editing Tests",description:"Tracetest enables the update of test details at anytime, if you have to update any of the details regarding the triggering method or the basic details such as name and/or description.",source:"@site/docs/web-ui/editing-tests.md",sourceDirName:"web-ui",slug:"/web-ui/editing-tests",permalink:"/web-ui/editing-tests",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/web-ui/editing-tests.md",tags:[],version:"current",frontMatter:{}},d={},c=[{value:"The Edit Form",id:"the-edit-form",level:2}],l={toc:c},p="wrapper";function u(e){let{components:t,...i}=e;return(0,a.kt)(p,(0,r.Z)({},l,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"editing-tests"},"Editing Tests"),(0,a.kt)("p",null,"Tracetest enables the update of test details at anytime, if you have to update any of the details regarding the triggering method or the basic details such as ",(0,a.kt)("strong",{parentName:"p"},"name")," and/or ",(0,a.kt)("strong",{parentName:"p"},"description"),"."),(0,a.kt)("p",null,"This process is really simple and can be achieved from three different places within the app:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"The home page."),(0,a.kt)("li",{parentName:"ol"},"The test details page."),(0,a.kt)("li",{parentName:"ol"},"The Result/Trace page.")),(0,a.kt)("p",null,"In any of these pages you'll find a dropdown menu that indicates there are more actions that can be executed for the viewed element."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Home Dropdown",src:n(51131).Z,width:"368",height:"448"}),"\n",(0,a.kt)("img",{alt:"Trace Dropdown",src:n(41669).Z,width:"420",height:"400"})),(0,a.kt)("h2",{id:"the-edit-form"},"The Edit Form"),(0,a.kt)("p",null,"The edit form is composed by the basic details and the request details sections."),(0,a.kt)("p",null,"The basic details section includes the information regarding the test metadata like ",(0,a.kt)("strong",{parentName:"p"},"name, description, Test Suite (future)"),".\nRequest details is a changing section depending on which triggering method was used to create the request. For example, if the test was created using the RPC triggering method instead of HTTP, the request details will show different inputs like ",(0,a.kt)("strong",{parentName:"p"},"method, message and metadata"),"."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Edit Test Form",src:n(18834).Z,width:"1386",height:"1792"})),(0,a.kt)("p",null,"After updating the different information displayed in the form, simply click ",(0,a.kt)("strong",{parentName:"p"},"Save"),"."),(0,a.kt)("p",null,"Every time the test is updated, a new run will be executed with the latest information and the version of the test will increase by one.\nThen you will be redirected to the run/trace page where you can determine if any of the previous assertions has failed, the trace was changed or other updates from the trace."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Edit Test Trace",src:n(64783).Z,width:"3342",height:"1836"})))}u.isMDXComponent=!0},18834:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/edit-test-form-12a4a16a9b227b53273d7c4f075d697d.png"},51131:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/edit-test-home-dropdown-8713d84c2e495d5667ca232f3aa857ec.png"},41669:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/edit-test-trace-dropdown-097a020dca2de2c338412ca865de5252.png"},64783:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/edit-test-trace-bdfc2f590992f2cf80e2702a6c0bae2e.png"}}]); \ No newline at end of file diff --git a/assets/js/2153.87d04a02.js b/assets/js/2153.87d04a02.js new file mode 100644 index 0000000000..78d16bcc31 --- /dev/null +++ b/assets/js/2153.87d04a02.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2153],{12153:(e,s,t)=>{t.r(s)}}]); \ No newline at end of file diff --git a/assets/js/218e9cc0.fbdeb115.js b/assets/js/218e9cc0.fbdeb115.js new file mode 100644 index 0000000000..3554572cd9 --- /dev/null +++ b/assets/js/218e9cc0.fbdeb115.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9628],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=n.createContext({}),s=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(r),f=o,m=u["".concat(i,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=f;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[u]="string"==typeof e?e:o,c[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const a={},c="CLI Reference",l={unversionedId:"cli/reference/tracetest_delete",id:"cli/reference/tracetest_delete",title:"CLI Reference",description:"tracetest delete",source:"@site/docs/cli/reference/tracetest_delete.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_delete",permalink:"/cli/reference/tracetest_delete",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_delete.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_dashboard"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_export"}},i={},s=[{value:"tracetest delete",id:"tracetest-delete",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:s},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,o.kt)("h2",{id:"tracetest-delete"},"tracetest delete"),(0,o.kt)("p",null,"Delete resources"),(0,o.kt)("h3",{id:"synopsis"},"Synopsis"),(0,o.kt)("p",null,"Delete resources from your Tracetest server"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"tracetest delete analyzer|config|datastore|demo|env|organization|pollingprofile|test|testrunner|testsuite|variableset [flags]\n")),(0,o.kt)("h3",{id:"options"},"Options"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," -h, --help help for delete\n --id string id of the resource to delete\n")),(0,o.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,o.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/cli/reference/tracetest"},"tracetest"),"\t - CLI to configure, install and execute tests on a Tracetest server")),(0,o.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/265fe735.8504f56f.js b/assets/js/265fe735.8504f56f.js new file mode 100644 index 0000000000..c16ab7703b --- /dev/null +++ b/assets/js/265fe735.8504f56f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9666],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),u=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=u(n),d=r,b=p["".concat(s,".").concat(d)]||p[d]||m[d]||i;return n?a.createElement(b,l(l({ref:t},c),{},{components:n})):a.createElement(b,l({ref:t},c))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[p]="string"==typeof e?e:r,l[1]=o;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>u});var a=n(87462),r=(n(67294),n(3905));const i={},l="attribute-naming",o={unversionedId:"analyzer/rules/attribute-naming",id:"analyzer/rules/attribute-naming",title:"attribute-naming",description:"Enforce attribute keys to follow common specifications.",source:"@site/docs/analyzer/rules/attribute-naming.md",sourceDirName:"analyzer/rules",slug:"/analyzer/rules/attribute-naming",permalink:"/analyzer/rules/attribute-naming",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/analyzer/rules/attribute-naming.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"span-naming",permalink:"/analyzer/rules/span-naming"},next:{title:"required-attributes",permalink:"/analyzer/rules/required-attributes"}},s={},u=[{value:"Rule Details",id:"rule-details",level:2},{value:"Options",id:"options",level:2},{value:"When Not To Use It",id:"when-not-to-use-it",level:2}],c={toc:u},p="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"attribute-naming"},"attribute-naming"),(0,r.kt)("p",null,"Enforce attribute keys to follow common specifications."),(0,r.kt)("h2",{id:"rule-details"},"Rule Details"),(0,r.kt)("p",null,"An\xa0",(0,r.kt)("inlineCode",{parentName:"p"},"Attribute"),"\xa0is a key-value pair, which is encapsulated as part of a span. The attribute key should follow a set of common specifications to be considered valid."),(0,r.kt)("p",null,"The following OpenTelemetry Semantic Conventions for attribute keys are defined:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"It must be a non-null\xa0and non-empty string."),(0,r.kt)("li",{parentName:"ul"},"It must be a valid Unicode sequence."),(0,r.kt)("li",{parentName:"ul"},"It should use namespacing to avoid name clashes. Delimit the namespaces using a dot character. For example\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"service.version"),"\xa0denotes the service version where\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"service"),"\xa0is the namespace and\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"version"),"\xa0is an attribute in that namespace."),(0,r.kt)("li",{parentName:"ul"},"Namespaces can be nested. For example\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"telemetry.sdk"),"\xa0is a namespace inside top-level\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"telemetry"),"\xa0namespace and\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"telemetry.sdk.name"),"\xa0is an attribute inside\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"telemetry.sdk"),"\xa0namespace."),(0,r.kt)("li",{parentName:"ul"},"For each multi-word separate the words by underscores (use snake_case). For example\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"http.status_code"),"\xa0denotes the status code in the http namespace."),(0,r.kt)("li",{parentName:"ul"},"Names should not coincide with namespaces. For example if\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"service.instance.id"),"\xa0is an attribute name then it is no longer valid to have an attribute named\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"service.instance"),"\xa0because\xa0",(0,r.kt)("inlineCode",{parentName:"li"},"service.instance"),"\xa0is already a namespace.")),(0,r.kt)("h2",{id:"options"},"Options"),(0,r.kt)("p",null,"This rule has the following options:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"error"')," requires attribute keys to follow the OTel semantic convention"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"disabled"')," disables the attribute keys verification"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},'"warning"')," verifies attribute keys to follow the OTel semantic convention but does not impact the analyzer score")),(0,r.kt)("h2",{id:"when-not-to-use-it"},"When Not To Use It"),(0,r.kt)("p",null,"If you don\u2019t want to enforce OTel attribute keys, don\u2019t enable this rule."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/270b2bd5.e5ae0dd2.js b/assets/js/270b2bd5.e5ae0dd2.js new file mode 100644 index 0000000000..dc8a8a4e15 --- /dev/null +++ b/assets/js/270b2bd5.e5ae0dd2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2108],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=p(n),c=r,h=d["".concat(l,".").concat(c)]||d[c]||m[c]||i;return n?a.createElement(h,o(o({ref:t},u),{},{components:n})):a.createElement(h,o({ref:t},u))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=c;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={},o="Defining Tests as Text Files",s={unversionedId:"cli/creating-tests",id:"cli/creating-tests",title:"Defining Tests as Text Files",description:"One important aspect of testing your code is the ability to quickly implement changes while not breaking your application. If you change your application, it is important to be able to update your tests and run them against your new implementation as soon as possible for a timely development feedback loop.",source:"@site/docs/cli/creating-tests.md",sourceDirName:"cli",slug:"/cli/creating-tests",permalink:"/cli/creating-tests",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/creating-tests.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Defining Data Stores as Text Files",permalink:"/cli/creating-data-stores"},next:{title:"Defining Test Specifications in Text Files",permalink:"/cli/creating-test-specifications"}},l={},p=[{value:"Motivation",id:"motivation",level:2},{value:"Definition",id:"definition",level:2},{value:"Test Information",id:"test-information",level:2},{value:"Trigger",id:"trigger",level:2},{value:"HTTP Trigger",id:"http-trigger",level:3},{value:"Authentication",id:"authentication",level:4},{value:"Body",id:"body",level:4},{value:"Generator Functions",id:"generator-functions",level:3}],u={toc:p},d="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"defining-tests-as-text-files"},"Defining Tests as Text Files"),(0,r.kt)("p",null,"One important aspect of testing your code is the ability to quickly implement changes while not breaking your application. If you change your application, it is important to be able to update your tests and run them against your new implementation as soon as possible for a timely development feedback loop."),(0,r.kt)("p",null,"As Tracetest is mainly a visual tool, this might make it difficult to update tests in an auditable way and execute those changes only when we are sure the application has been deployed with the new changes. With that in mind, we built a new way for you to define your tests: using a YAML test definition!"),(0,r.kt)("h2",{id:"motivation"},"Motivation"),(0,r.kt)("p",null,"Imagine that you were assigned a ticket to improve your application database usage. You notice that every time a specific endpoint is called, your application executes ",(0,r.kt)("inlineCode",{parentName:"p"},"N+1")," select statements on the database instead of only one statement. You probably already have a test in place to ensure the correct functionality of that endpoint: it inserts the necessary information into the database, calls that specific endpoint using our tool and ensures you get the expected results using the trace generated by your application. It works fine, but there is a problem. That test is managed by Tracetest on its server and the test cannot be changed until the new patch is deployed. Otherwise, if the test is run using a non-patched version of the application, the test would fail."),(0,r.kt)("p",null,"To solve that, the best approach would be to enable developers to define their tests as text files and allow them to run those tests using a CLI, so you can integrate the execution of those tests to your existing CI pipeline. There are many benefits of this functionality for your tests:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Peers can review your tests before merging them to the main branch."),(0,r.kt)("li",{parentName:"ul"},"Ensure your test works before merging it to the main branch."),(0,r.kt)("li",{parentName:"ul"},"Have different versions of the same test running in parallel in different branches, so you and your peers can work on the same code modules and update the same test without interfering with each other.")),(0,r.kt)("h2",{id:"definition"},"Definition"),(0,r.kt)("p",null,"The definition can be broken into three parts: ",(0,r.kt)("inlineCode",{parentName:"p"},"test information")," including ",(0,r.kt)("inlineCode",{parentName:"p"},"triggering transaction"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"assertions"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"outputs"),". Here is a real test we have on Tracetest to test our Pokemon demo API:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: DEMO Pokemon - Import - Import a Pokemon\n description: "Import a pokemon"\n trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon/import\n method: POST\n headers:\n - key: Content-Type\n value: application/json\n body: \'{ "id": 52 }\'\n specs:\n - selector: span[name = "POST /pokemon/import"]\n assertions:\n - attr:tracetest.span.duration <= 500ms\n - attr:http.status_code = 200\n - selector: span[name = "send message to queue"]\n assertions:\n - attr:messaging.message.payload contains 52\n - selector: span[name = "consume message from queue"]:last\n assertions:\n - attr:messaging.message.payload contains 52\n - selector: span[name = "consume message from queue"]:last span[name = "import pokemon\n from pokeapi"]\n assertions:\n - attr:http.status_code = 200\n - selector: span[name = "consume message from queue"]:last span[name = "save pokemon\n on database"]\n assertions:\n - attr:db.repository.operation = "create"\n - attr:tracetest.span.duration <= 500ms\n outputs:\n - name: POKEMON_ID\n selector: span[name = "POST /pokemon/import"]\n value: attr:http.response.body | json_path \'.id\'\n\n')),(0,r.kt)("h2",{id:"test-information"},"Test Information"),(0,r.kt)("p",null,"Currently, you can only define the test name."),(0,r.kt)("h2",{id:"trigger"},"Trigger"),(0,r.kt)("p",null,"This section defines how Tracetest will interact with your application: send an HTTP request, a GRPC call, send a message to a message broker, etc. Currently, only HTTP calls are supported, please let us know any other triggering mechanism that you require to test your application."),(0,r.kt)("p",null,"The attribute ",(0,r.kt)("inlineCode",{parentName:"p"},"type")," defines which trigger method you are going to use to interact with your application. The rest of the attributes in this section rely on the value you define there."),(0,r.kt)("h3",{id:"http-trigger"},"HTTP Trigger"),(0,r.kt)("p",null,"When defining a HTTP trigger, you are required to define a ",(0,r.kt)("inlineCode",{parentName:"p"},"httpRequest")," object containing the request Tracetest will send to your system, this is where you define: ",(0,r.kt)("inlineCode",{parentName:"p"},"url"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"method"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"headers"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"authentication"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"body"),"."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Note: Some APIs require the ",(0,r.kt)("inlineCode",{parentName:"p"},"Content-Type")," header to respond. If you are not able to trigger your application, check if you are sending this header and if its value is correct.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon/import\n method: POST\n headers:\n - key: Content-Type\n value: application/json\n body: '{ \"id\": 52 }'\n")),(0,r.kt)("h4",{id:"authentication"},"Authentication"),(0,r.kt)("p",null,"Currently, we support three authentication methods for HTTP requests: ",(0,r.kt)("inlineCode",{parentName:"p"},"basic authentication"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"api key"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"bearer token"),". Here is one example of each authentication method:"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Basic Authentication")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"trigger:\n type: http\n httpRequest:\n url: http://my-api.com\n method: GET\n authentication:\n type: basic\n basic:\n user: my-username\n password: mypassword\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"API Key Authentication")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'trigger:\n type: http\n httpRequest:\n url: http://my-api.com\n method: GET\n authentication:\n type: apiKey\n apiKey:\n key: X-Key\n value: my-key\n in: header # Either "header" or "query"\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Bearer Token Authentication")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"trigger:\n type: http\n httpRequest:\n url: http://my-api.com\n method: GET\n authentication:\n type: bearer\n bearer:\n token: my-token\n")),(0,r.kt)("h4",{id:"body"},"Body"),(0,r.kt)("p",null,"Currently, Testkube supports ",(0,r.kt)("inlineCode",{parentName:"p"},"raw")," body types that enable you to send text formats over HTTP: JSON, for example."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'trigger:\n type: http\n httpRequest:\n url: http://my-api.com\n method: POST\n body: \'{"name": "my Json Object"}\'\n')),(0,r.kt)("h3",{id:"generator-functions"},"Generator Functions"),(0,r.kt)("p",null,"Sometimes we want to randomize our test data. Maybe we want to try new values or maybe we know our API will fail if the same id is provided more than once. For this use case, you can define generator functions in the test trigger."),(0,r.kt)("p",null,"Generator functions can be invoked as part of expressions. Therefore, you only need to invoke it as ",(0,r.kt)("inlineCode",{parentName:"p"},"uuid()"),". However, you might want to generate values and concatenate them with static texts as well. For this, you can use the string interpolation feature: ",(0,r.kt)("inlineCode",{parentName:"p"},'"your user id is ${uuid()}'),"."),(0,r.kt)("p",null,"Available functions:"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Function"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"uuid()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random v4 uuid.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"firstName()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random English first name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"lastName()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random English last name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"fullName()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random English first and last name.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"email()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random email address.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"phone()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random phone number.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"creditCard()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random credit card number (from 12 to 19 digits).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"creditCardCvv()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random credit card cvv (3 digits).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"creditCardExpDate()")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random credit card expiration date (mm/yy).")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"randomInt(min, max)")),(0,r.kt)("td",{parentName:"tr",align:null},"Generates a random integer contained in the closed interval defined by ","[",(0,r.kt)("inlineCode",{parentName:"td"},"min"),", ",(0,r.kt)("inlineCode",{parentName:"td"},"max"),"]",".")))),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"/cli/creating-test-specifications"},"Continue reading about Test Specs, here."))),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"/cli/creating-test-outputs"},"Continue reading about Test Outputs, here."))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/274fb8f5.e07f329b.js b/assets/js/274fb8f5.e07f329b.js new file mode 100644 index 0000000000..6f4df461ea --- /dev/null +++ b/assets/js/274fb8f5.e07f329b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[6256],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>y});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),c=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(a),m=r,y=u["".concat(s,".").concat(m)]||u[m]||d[m]||o;return a?n.createElement(y,l(l({ref:t},p),{},{components:a})):n.createElement(y,l({ref:t},p))}));function y(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=a.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:r,l[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=a(87462),r=(a(67294),a(3905));const o={},l="Defining Data Stores as Text Files",i={unversionedId:"cli/creating-data-stores",id:"cli/creating-data-stores",title:"Defining Data Stores as Text Files",description:"You might have multiple Tracetest instances that need to be connected to the same data stores. An easy way of sharing the configuration is by using a configuration file that can be applied to your Tracetest instance.",source:"@site/docs/cli/creating-data-stores.md",sourceDirName:"cli",slug:"/cli/creating-data-stores",permalink:"/cli/creating-data-stores",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/creating-data-stores.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Configuring your CLI",permalink:"/cli/configuring-your-cli"},next:{title:"Defining Tests as Text Files",permalink:"/cli/creating-tests"}},s={},c=[{value:"Supported Trace Data Stores",id:"supported-trace-data-stores",level:2},{value:"Jaeger",id:"jaeger",level:3},{value:"OpenSearch",id:"opensearch",level:3},{value:"Elastic APM",id:"elastic-apm",level:3},{value:"SignalFX",id:"signalfx",level:3},{value:"Tempo",id:"tempo",level:3},{value:"Lightstep",id:"lightstep",level:3},{value:"New Relic",id:"new-relic",level:3},{value:"AWS X-Ray",id:"aws-x-ray",level:3},{value:"Datadog",id:"datadog",level:3},{value:"Dynatrace",id:"dynatrace",level:3},{value:"Honeycomb",id:"honeycomb",level:3},{value:"Using the OpenTelemetry Collector",id:"using-the-opentelemetry-collector",level:3},{value:"Apply Configuration",id:"apply-configuration",level:2},{value:"Additional Information",id:"additional-information",level:2}],p={toc:c},u="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(u,(0,n.Z)({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"defining-data-stores-as-text-files"},"Defining Data Stores as Text Files"),(0,r.kt)("p",null,"You might have multiple Tracetest instances that need to be connected to the same data stores. An easy way of sharing the configuration is by using a configuration file that can be applied to your Tracetest instance."),(0,r.kt)("h2",{id:"supported-trace-data-stores"},"Supported Trace Data Stores"),(0,r.kt)("h3",{id:"jaeger"},"Jaeger"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Jaeger\n type: jaeger\n default: true\n jaeger:\n endpoint: jaeger:16685\n tls:\n insecure: true\n")),(0,r.kt)("h3",{id:"opensearch"},"OpenSearch"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: OpenSearch\n type: opensearch\n default: true\n opensearch:\n addresses:\n - http://opensearch:9200\n index: traces\n")),(0,r.kt)("h3",{id:"elastic-apm"},"Elastic APM"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Elastic APM\n type: elasticapm\n default: true\n elasticapm:\n addresses:\n - https://es01:9200\n username: elastic\n password: changeme\n index: traces-apm-default\n insecureSkipVerify: true\n")),(0,r.kt)("h3",{id:"signalfx"},"SignalFX"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: SignalFX\n type: signalfx\n default: true\n signalfx:\n realm: us1\n token: mytoken\n")),(0,r.kt)("h3",{id:"tempo"},"Tempo"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Grafana Tempo\n type: tempo\n default: true\n tempo:\n endpoint: tempo:9095\n tls:\n insecure: true\n")),(0,r.kt)("h3",{id:"lightstep"},"Lightstep"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Lightstep pipeline\n type: lightstep\n default: true\n")),(0,r.kt)("h3",{id:"new-relic"},"New Relic"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: New Relic pipeline\n type: newrelic\n default: true\n")),(0,r.kt)("h3",{id:"aws-x-ray"},"AWS X-Ray"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'type: DataStore\nspec:\n name: AWS X-Ray\n type: awsxray\n default: true\n awsxray:\n accessKeyId: \n secretAccessKey: \n sessionToken: \n region: "us-west-2"\n')),(0,r.kt)("h3",{id:"datadog"},"Datadog"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Datadog pipeline\n type: datadog\n default: true\n")),(0,r.kt)("h3",{id:"dynatrace"},"Dynatrace"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Dynatrace pipeline\n type: dynatrace\n default: true\n")),(0,r.kt)("h3",{id:"honeycomb"},"Honeycomb"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Honeycomb pipeline\n type: honeycomb\n default: true\n")),(0,r.kt)("h3",{id:"using-the-opentelemetry-collector"},"Using the OpenTelemetry Collector"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Opentelemetry Collector pipeline\n type: otlp\n default: true\n")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Consider reading about ",(0,r.kt)("a",{parentName:"p",href:"/configuration/connecting-to-data-stores/opentelemetry-collector"},"how to use the OTEL collector")," to send traces to your Tracetest instance.")),(0,r.kt)("h2",{id:"apply-configuration"},"Apply Configuration"),(0,r.kt)("p",null,"To apply the configuration, you need a ",(0,r.kt)("a",{parentName:"p",href:"/cli/configuring-your-cli"},"configured CLI")," pointed to the instance you want to apply the data store. Then use the following command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")),(0,r.kt)("h2",{id:"additional-information"},"Additional Information"),(0,r.kt)("p",null,"In the current version, you can only have one active data store at any given time. The flag ",(0,r.kt)("inlineCode",{parentName:"p"},"default")," defines which data store should be used by your tests. So, if you want to add a new data store and make sure it will be used in future test runs, make sure to define ",(0,r.kt)("inlineCode",{parentName:"p"},"default")," as ",(0,r.kt)("inlineCode",{parentName:"p"},"true")," in the data store configuration file."),(0,r.kt)("p",null,"After a configuration is applied, you can export it using the CLI by using the following command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"tracetest export datastore -f my/file/location.yaml --id my-data-store-id\n")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/286cdff1.fcbb530f.js b/assets/js/286cdff1.fcbb530f.js new file mode 100644 index 0000000000..cf23c41411 --- /dev/null +++ b/assets/js/286cdff1.fcbb530f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9716],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},p="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},h=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),h=r,d=p["".concat(l,".").concat(h)]||p[h]||y[h]||i;return n?o.createElement(d,a(a({ref:t},u),{},{components:n})):o.createElement(d,a({ref:t},u))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:r,a[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>y,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var o=n(87462),r=(n(67294),n(3905));const i={},a="Versioning",s={unversionedId:"concepts/versioning",id:"concepts/versioning",title:"Versioning",description:"As your system evolves, your tests tend to do the same. However, that might be confusing if you don't have a versioning mechanism in place. Imagine that you wrote a new test for the version v0.5.0 of your application. After some months, your application is in version v0.13.7. Most likely, your tests changed as you moved your application forward. But without versioning, if you revisit that first test you created, it will look like exactly the one you use today instead of the test you originally wrote. That happens because while you have multiple versions of your application, you only keep track of one version of your tests: the current version. So there is no way to go back in time and see what a test looked like in the past.",source:"@site/docs/concepts/versioning.md",sourceDirName:"concepts",slug:"/concepts/versioning",permalink:"/concepts/versioning",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/concepts/versioning.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Ad-hoc Testing",permalink:"/concepts/ad-hoc-testing"},next:{title:"Trace Analyzer Concepts",permalink:"/analyzer/concepts"}},l={},c=[{value:"How It Works",id:"how-it-works",level:2},{value:"Change Detection",id:"change-detection",level:3},{value:"Problems",id:"problems",level:3}],u={toc:c},p="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"versioning"},"Versioning"),(0,r.kt)("p",null,"As your system evolves, your tests tend to do the same. However, that might be confusing if you don't have a versioning mechanism in place. Imagine that you wrote a new test for the version ",(0,r.kt)("inlineCode",{parentName:"p"},"v0.5.0")," of your application. After some months, your application is in version ",(0,r.kt)("inlineCode",{parentName:"p"},"v0.13.7"),". Most likely, your tests changed as you moved your application forward. But without versioning, if you revisit that first test you created, it will look like exactly the one you use today instead of the test you originally wrote. That happens because while you have multiple versions of your application, you only keep track of one version of your tests: the current version. So there is no way to go back in time and see what a test looked like in the past."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"But that is not a problem if you use Tracetest. It has versioning built-in!")),(0,r.kt)("h2",{id:"how-it-works"},(0,r.kt)("strong",{parentName:"h2"},"How It Works")),(0,r.kt)("p",null,"Once you create a test, it is tagged as the initial version (",(0,r.kt)("inlineCode",{parentName:"p"},"v1"),"). Every time you change something in your test (edit its identification details, add assertions, change selectors, etc), Tracetest detects those changes and increases the version by 1. If no changes were made, the version is kept untouched."),(0,r.kt)("h3",{id:"change-detection"},(0,r.kt)("strong",{parentName:"h3"},"Change Detection")),(0,r.kt)("p",null,"These are the fields of a test that are checked to verify if it has changed:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"name"),(0,r.kt)("li",{parentName:"ul"},"description"),(0,r.kt)("li",{parentName:"ul"},"trigger"),(0,r.kt)("li",{parentName:"ul"},"test definition",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"selectors"),(0,r.kt)("li",{parentName:"ul"},"assertions"))),(0,r.kt)("li",{parentName:"ul"},"test outputs")),(0,r.kt)("h3",{id:"problems"},(0,r.kt)("strong",{parentName:"h3"},"Problems")),(0,r.kt)("p",null,"If you notice you are editing fields and your test version is not changing, let us know by opening a ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/issues"},"bug report")," on our Github Repository."))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/29002602.5de4006a.js b/assets/js/29002602.5de4006a.js new file mode 100644 index 0000000000..3fded72ffa --- /dev/null +++ b/assets/js/29002602.5de4006a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[945],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>g});var r=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var u=r.createContext({}),c=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},l=function(e){var t=c(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,s=e.mdxType,a=e.originalType,u=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),p=c(n),d=s,g=p["".concat(u,".").concat(d)]||p[d]||f[d]||a;return n?r.createElement(g,o(o({ref:t},l),{},{components:n})):r.createElement(g,o({ref:t},l))}));function g(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=n.length,o=new Array(a);o[0]=d;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[p]="string"==typeof e?e:s,o[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>f,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=n(87462),s=(n(67294),n(3905));const a={},o="Test Runner Settings",i={unversionedId:"configuration/test-runner",id:"configuration/test-runner",title:"Test Runner Settings",description:"The Test Runner settings allow you to configure the default behavior used when executing your tests to determine whether to mark the test as passed or failed. Only the enabled gates will be will be used to determine whether a test is passed or failed.",source:"@site/docs/configuration/test-runner.md",sourceDirName:"configuration",slug:"/configuration/test-runner",permalink:"/configuration/test-runner",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/test-runner.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Tracetest Analyzer Settings",permalink:"/configuration/tracetest-analyzer"},next:{title:"Demo Settings",permalink:"/configuration/demo"}},u={},c=[{value:"Setting Up the Default Test Runner Settings",id:"setting-up-the-default-test-runner-settings",level:2}],l={toc:c},p="wrapper";function f(e){let{components:t,...a}=e;return(0,s.kt)(p,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"test-runner-settings"},"Test Runner Settings"),(0,s.kt)("p",null,"The Test Runner settings allow you to configure the default behavior used when executing your tests to determine whether to mark the test as passed or failed. Only the enabled gates will be will be used to determine whether a test is passed or failed."),(0,s.kt)("h2",{id:"setting-up-the-default-test-runner-settings"},"Setting Up the Default Test Runner Settings"),(0,s.kt)("p",null,"In the Tracetest settings, on the ",(0,s.kt)("strong",{parentName:"p"},"Test Runner")," tab, select the default gates used for every test to determine success or failure:"),(0,s.kt)("p",null,(0,s.kt)("img",{alt:"Test Runner",src:n(61407).Z,width:"2874",height:"1590"})),(0,s.kt)("p",null,"For a specific test, change the gates used when running that test from the ",(0,s.kt)("strong",{parentName:"p"},"Automate")," tab: "),(0,s.kt)("p",null,(0,s.kt)("img",{alt:"Test Runner Settings in App",src:n(96426).Z,width:"1154",height:"732"})))}f.isMDXComponent=!0},96426:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/test-runner-in-app-384827a7f1e28ff5511e01cc3b5ebaec.png"},61407:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/test-runner-settings-04ce718e45c157c496ddcaa744317c7d.png"}}]); \ No newline at end of file diff --git a/assets/js/2fc8fea6.0675cd37.js b/assets/js/2fc8fea6.0675cd37.js new file mode 100644 index 0000000000..2a18cbc83f --- /dev/null +++ b/assets/js/2fc8fea6.0675cd37.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1427],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),f=a,d=u["".concat(l,".").concat(f)]||u[f]||m[f]||o;return n?r.createElement(d,i(i({ref:t},p),{},{components:n})):r.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const o={},i="Configuring the Tracetest Server",s={unversionedId:"configuration/server",id:"configuration/server",title:"Configuring the Tracetest Server",description:"Tracetest requires a very minimal configuration to be launched, needing just the connection information to connect with the PostgreSQL database which is installed as part of the server install. There are a couple of ways to provide this database connection information.",source:"@site/docs/configuration/server.md",sourceDirName:"configuration",slug:"/configuration/server",permalink:"/configuration/server",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/server.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Signoz",permalink:"/configuration/connecting-to-data-stores/signoz"},next:{title:"Provisioning a Tracetest Server",permalink:"/configuration/provisioning"}},l={},c=[],p={toc:c},u="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"configuring-the-tracetest-server"},"Configuring the Tracetest Server"),(0,a.kt)("p",null,"Tracetest requires a very minimal configuration to be launched, needing just the connection information to connect with the PostgreSQL database which is installed as part of the server install. There are a couple of ways to provide this database connection information."),(0,a.kt)("p",null,"For Docker-based installs, the server configuration file is placed in the ",(0,a.kt)("inlineCode",{parentName:"p"},"./tracetest/tracetest.yaml")," file by default when you run the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest server install")," command and select the ",(0,a.kt)("inlineCode",{parentName:"p"},"Using Docker Compose")," option. The configuration file is mounted to ",(0,a.kt)("inlineCode",{parentName:"p"},"/app/config.yaml")," within the Tracetest Docker container. When Tracetest is run with a ",(0,a.kt)("inlineCode",{parentName:"p"},"docker compose -f tracetest/docker-compose.yaml up -d")," command, the server will use the contents of this file to connect to the Postgres database. All other configuration data is stored in the Postgres instance."),(0,a.kt)("p",null,"This is an example of a ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.yaml")," file:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n\nserver: \n httpPort: 11633\n pathPrefix: /\n")),(0,a.kt)("p",null,"Alternatively, we support setting a series of environment variables which can contain the connection information for the Postgres instance. If these environment variables are set, they will be used by the Tracetest server to connect to the database."),(0,a.kt)("p",null,"The list of environment variables and example values is:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_POSTGRES_HOST: "postgres"')),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_POSTGRES_PORT: "5432"')),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_POSTGRES_DBNAME: "postgres"')),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_POSTGRES_USER: "postgres"')),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_POSTGRES_PASSWORD: "postgres"')),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_POSTGRES_PARAMS: ""'))),(0,a.kt)("p",null,"You can also change the defaults for the Tracetest server, altering the port and path you access the dashboard from. For a Docker-based install done locally, this URL is typically ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),". You can alter it by setting either of the environment variables or using the ",(0,a.kt)("inlineCode",{parentName:"p"},"server")," object in the server configuration file:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},"TRACETEST_SERVER_HTTPPORT=11633")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'TRACETEST_SERVER_PATHPREFIX="/"'))),(0,a.kt)("p",null,"You can also intitalize the server with a number of resources the first time it is launched by using ",(0,a.kt)("a",{parentName:"p",href:"./provisioning"},"provisioning"),"."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/308a71d7.51e345dd.js b/assets/js/308a71d7.51e345dd.js new file mode 100644 index 0000000000..73d120490e --- /dev/null +++ b/assets/js/308a71d7.51e345dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5942],{3905:(e,t,a)=>{a.d(t,{Zo:()=>l,kt:()=>u});var n=a(67294);function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(s[a]=e[a]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}var p=n.createContext({}),c=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},l=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,s=e.mdxType,o=e.originalType,p=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),d=c(a),m=s,u=d["".concat(p,".").concat(m)]||d[m]||h[m]||o;return a?n.createElement(u,r(r({ref:t},l),{},{components:a})):n.createElement(u,r({ref:t},l))}));function u(e,t){var a=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=a.length,r=new Array(o);r[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[d]="string"==typeof e?e:s,r[1]=i;for(var c=2;c{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=a(87462),s=(a(67294),a(3905));const o={},r="Pokeshop API - Get Pokemon by ID",i={unversionedId:"live-examples/pokeshop/use-cases/get-pokemon-by-id",id:"live-examples/pokeshop/use-cases/get-pokemon-by-id",title:"Pokeshop API - Get Pokemon by ID",description:"This use case retrieves a specific Pokemon from the cache if it is cached or from the database (Postgres) also populating the cache. The idea of this query is to showcase a straightforward scenario, where the API layer receives a request from the outside and needs to evaluate a different behavior depending of its dependencies.",source:"@site/docs/live-examples/pokeshop/use-cases/get-pokemon-by-id.md",sourceDirName:"live-examples/pokeshop/use-cases",slug:"/live-examples/pokeshop/use-cases/get-pokemon-by-id",permalink:"/live-examples/pokeshop/use-cases/get-pokemon-by-id",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/live-examples/pokeshop/use-cases/get-pokemon-by-id.md",tags:[],version:"current",frontMatter:{},sidebar:"liveExamplesSidebar",previous:{title:"Pokeshop API - List Pokemon",permalink:"/live-examples/pokeshop/use-cases/list-pokemon"},next:{title:"Pokeshop API - Import Pokemon",permalink:"/live-examples/pokeshop/use-cases/import-pokemon"}},p={},c=[{value:"Building a Test for the Described Scenarios",id:"building-a-test-for-the-described-scenarios",level:2},{value:"Traces",id:"traces",level:3},{value:"Assertions",id:"assertions",level:3},{value:"Test Definition",id:"test-definition",level:3},{value:"Cache Miss Scenario",id:"cache-miss-scenario",level:4},{value:"Cache Miss Scenario",id:"cache-miss-scenario-1",level:4}],l={toc:c},d="wrapper";function h(e){let{components:t,...o}=e;return(0,s.kt)(d,(0,n.Z)({},l,o,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"pokeshop-api---get-pokemon-by-id"},"Pokeshop API - Get Pokemon by ID"),(0,s.kt)("p",null,"This use case retrieves a specific Pokemon from the cache if it is cached or from the database (Postgres) also populating the cache. The idea of this query is to showcase a straightforward scenario, where the API layer receives a request from the outside and needs to evaluate a different behavior depending of its dependencies."),(0,s.kt)("mermaid",{value:"sequenceDiagram\n participant Endpoint as GET /pokemon/:id\n participant API as API\n participant Database as Postgres\n participant Cache as Redis\n \n Endpoint->>API: request\n\n API->>Cache: query cache\n Cache--\x3e>API: cache response\n\n alt cache hit\n API--\x3e>Endpoint: 200 OK
\n else cache miss\n API->>Database: get specific of pokemon\n Database--\x3e>API: pokemon\n\n API->>Cache: populate cache\n Cache--\x3e>API: ok\n\n API--\x3e>Endpoint: 200 OK
\n end"}),(0,s.kt)("p",null,"You can trigger this use case by calling the endpoint ",(0,s.kt)("inlineCode",{parentName:"p"},"GET /pokemon/25")," without payload and should receive a payload similar to this: "),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": 25,\n "name": "pikachu",\n "type": "electric",\n "imageUrl": "https://assets.pokemon.com/assets/cms2/img/pokedex/full/025.png",\n "isFeatured": true\n}\n')),(0,s.kt)("h2",{id:"building-a-test-for-the-described-scenarios"},"Building a Test for the Described Scenarios"),(0,s.kt)("p",null,"Using Tracetest, we can ",(0,s.kt)("a",{parentName:"p",href:"/web-ui/creating-tests"},"create two tests")," that will execute an API call on ",(0,s.kt)("inlineCode",{parentName:"p"},"GET /pokemon/25")," and validate the following scenarios:"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("strong",{parentName:"li"},"An API call with a cache hit."),(0,s.kt)("ul",{parentName:"li"},(0,s.kt)("li",{parentName:"ul"},"The API should return a valid result with HTTP 200 OK."),(0,s.kt)("li",{parentName:"ul"},"The cache should be queried."),(0,s.kt)("li",{parentName:"ul"},"The database should not be queried."))),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("strong",{parentName:"li"},"An API call with a cache miss."),(0,s.kt)("ul",{parentName:"li"},(0,s.kt)("li",{parentName:"ul"},"The API should return a valid result with HTTP 200 OK."),(0,s.kt)("li",{parentName:"ul"},"The cache should be queried."),(0,s.kt)("li",{parentName:"ul"},"The cache should be populated."),(0,s.kt)("li",{parentName:"ul"},"The database should be queried.")))),(0,s.kt)("h3",{id:"traces"},"Traces"),(0,s.kt)("p",null,"Running these tests for the first time will create an Observability trace with two different shapes, depending on the cache situation."),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("p",{parentName:"li"},(0,s.kt)("strong",{parentName:"p"},"Cache Miss")," where we can see spans from the API, database, and cache:\n",(0,s.kt)("img",{src:a(68954).Z,width:"2232",height:"1344"}))),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("p",{parentName:"li"},(0,s.kt)("strong",{parentName:"p"},"Cache Hit")," where we can see spans from the API and cache:\n",(0,s.kt)("img",{src:a(97301).Z,width:"1340",height:"1330"})))),(0,s.kt)("h3",{id:"assertions"},"Assertions"),(0,s.kt)("p",null,"With this trace, we can build ",(0,s.kt)("a",{parentName:"p",href:"/concepts/assertions"},"assertions")," on Tracetest and validate API, cache, and database responses:"),(0,s.kt)("ul",null,(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},"[Both Cases]"," The API should return a valid result with HTTP 200 OK.\n",(0,s.kt)("img",{src:a(96008).Z,width:"2852",height:"848"}))),(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},"[Both Cases]"," The cache should be queried.\n",(0,s.kt)("img",{src:a(23758).Z,width:"2840",height:"752"}))),(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},"[Cache Hit]"," The database should not be queried.\n",(0,s.kt)("img",{src:a(86431).Z,width:"2794",height:"822"}))),(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},"[Cache Miss]"," The cache should be populated.\n",(0,s.kt)("img",{src:a(5505).Z,width:"2850",height:"756"}))),(0,s.kt)("li",{parentName:"ul"},(0,s.kt)("p",{parentName:"li"},"[Cache Miss]"," The database should be queried.\n",(0,s.kt)("img",{src:a(93932).Z,width:"2830",height:"816"})))),(0,s.kt)("p",null,"Now you can validate this entire use case."),(0,s.kt)("h3",{id:"test-definition"},"Test Definition"),(0,s.kt)("p",null,"If you want to replicate those tests on Tracetest, you can replicate these steps on our Web UI or using our CLI, saving one of the test definitions as the file ",(0,s.kt)("inlineCode",{parentName:"p"},"test-definition.yml")," and running:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f test-definition.yml\n")),(0,s.kt)("h4",{id:"cache-miss-scenario"},"Cache Miss Scenario"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: Pokeshop - Get Pokemon by ID [cache miss scenario]\n trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon/${var:POKEMON_ID}\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="http" http.method="GET"]\n assertions:\n - attr:http.status_code = 200\n - attr:http.response.body | json_path \'$.id\' = \'${var:POKEMON_ID}\'\n - selector: span[tracetest.span.type="database" db.system="redis" db.operation="get"]\n assertions:\n - attr:name = "get pokemon-${var:POKEMON_ID}"\n - selector: span[tracetest.span.type="database" db.system="redis" db.operation="set"]\n assertions:\n - attr:name = "set pokemon-${var:POKEMON_ID}"\n - selector: |-\n span[tracetest.span.type="database" name="findOne pokeshop.pokemon"\n db.system="postgres" db.name="pokeshop" db.operation="findOne" db.sql.table="pokemon"]\n assertions:\n - attr:tracetest.selected_spans.count > 0\n')),(0,s.kt)("h4",{id:"cache-miss-scenario-1"},"Cache Miss Scenario"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yml"},'type: Test\nspec:\n name: Pokeshop - Get Pokemon by ID [cache hit scenario]\n trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon/${var:POKEMON_ID}\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="http" http.method="GET"]\n assertions:\n - attr:http.status_code = 200\n - attr:http.response.body | json_path \'$.id\' = "${var:POKEMON_ID}"\n - selector: span[tracetest.span.type="database" db.system="redis" db.operation="get"]\n assertions:\n - attr:name = "get pokemon-${var:POKEMON_ID}"\n - attr:db.result | json_path \'$.id\' = "${var:POKEMON_ID}"\n - selector: |-\n span[tracetest.span.type="database" name="findOne pokeshop.pokemon"\n db.system="postgres" db.name="pokeshop" db.operation="findOne" db.sql.table="pokemon"]\n assertions:\n - attr:tracetest.selected_spans.count = 0\n')))}h.isMDXComponent=!0},96008:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-api-test-spec-28803fd335ae3e027dbe1e09d3ec8cb9.png"},86431:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-db-no-query-test-spec-8ed173ccda4aeb6df1d14f8e50c30023.png"},93932:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-db-query-test-spec-58f77885b9ae58ae62ccb836f1766c94.png"},23758:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-redis-query-test-spec-9a71452c55098fd744926666c9343170.png"},5505:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-redis-set-test-spec-e8a50d2f17ca3604bfaa10054d19dd0d.png"},97301:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-trace-cachehit-d3709b282862f0c259c6e4ac212b856b.png"},68954:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/get-pokemon-by-id-trace-cachemiss-05b6015135529457df14833d58199f2b.png"}}]); \ No newline at end of file diff --git a/assets/js/31214d19.30b91558.js b/assets/js/31214d19.30b91558.js new file mode 100644 index 0000000000..05e1e3f195 --- /dev/null +++ b/assets/js/31214d19.30b91558.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8980],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=l(n),g=o,d=p["".concat(s,".").concat(g)]||p[g]||f[g]||a;return n?r.createElement(d,i(i({ref:t},u),{},{components:n})):r.createElement(d,i({ref:t},u))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=g;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:o,i[1]=c;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var r=n(87462),o=(n(67294),n(3905));const a={},i="Server configuration",c={unversionedId:"server-configuration",id:"server-configuration",title:"Server configuration",description:"Tracetest can be configured using a config.yaml file placed on the same directory as its executable. It is useful to configure some aspects of how tracetest should behave. This section is dedicated to explain the options we currently have available.",source:"@site/docs/server-configuration.md",sourceDirName:".",slug:"/server-configuration",permalink:"/server-configuration",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/server-configuration.md",tags:[],version:"current",frontMatter:{}},s={},l=[{value:"Configuration file example",id:"configuration-file-example",level:2},{value:"Providing a configuration when running a container",id:"providing-a-configuration-when-running-a-container",level:2}],u={toc:l},p="wrapper";function f(e){let{components:t,...n}=e;return(0,o.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"server-configuration"},"Server configuration"),(0,o.kt)("p",null,"Tracetest can be configured using a config.yaml file placed on the same directory as its executable. It is useful to configure some aspects of how tracetest should behave. This section is dedicated to explain the options we currently have available."),(0,o.kt)("h2",{id:"configuration-file-example"},"Configuration file example"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yaml"},'# Connection string to the postgres instance\npostgres:\n host: localhost\n user: postgres\n password: postgres\n\n# Instance of jaeger that will be used to retrieve the trace of the service under test\ntracingBackend:\n dataStore:\n type: jaeger\n jaeger:\n endpoint: localhost:16685\n tls:\n insecure: true\n\n# Configure how traces should be pooled from the tracing storage.\npoolingConfig:\n # How long tracetest can wait for a trace to be complete? After this period, the pooling process will timeout\n # and the test will be marked as failed.\n maxWaitTimeForTrace: 90s\n\n # How much time tracetest should wait before trying to fetch the trace since the last execution?\n retryDelay: 5s\n\n# Server configuration\nserver:\n # Enables you to add a prefix to the server path. So, instead of running tracetest on http://localhost:11633, it would run on http://localhost:11633/tracetest instead.\n pathPrefix: /tracetest\n httpPort: 11633\n\n# Google analytics configuration\ngoogleAnalytics:\n enabled: false\n measurementId: ""\n secretKey: ""\n\n# How tracetest should generate telemetry data.\ntelemetry:\n serviceName: tracetest\n sampling: 100\n otelCollectorEndpoint: localhost:4317\n')),(0,o.kt)("h2",{id:"providing-a-configuration-when-running-a-container"},"Providing a configuration when running a container"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-cmd"},'docker run --volume "`pwd`/my-config-file.yaml:/app/config.yaml" kubeshop/tracetest\n')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/316.d3e73517.js b/assets/js/316.d3e73517.js new file mode 100644 index 0000000000..26fa9e0e3b --- /dev/null +++ b/assets/js/316.d3e73517.js @@ -0,0 +1,1355 @@ +"use strict"; +exports.id = 316; +exports.ids = [316]; +exports.modules = { + +/***/ 96316: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "diagram": () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(87115); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59373); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(91619); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(12281); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(7201); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27484); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17967); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20683); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70277); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45625); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39354); +/* harmony import */ var dagre_d3_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91518); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59542); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(10285); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28734); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 5], $V2 = [6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 17], $V6 = [1, 18], $V7 = [1, 19], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 27], $Vb = [4, 6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "directive": 7, "line": 8, "SPACE": 9, "statement": 10, "NEWLINE": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, ":": 15, "argDirective": 16, "title": 17, "acc_title": 18, "acc_title_value": 19, "acc_descr": 20, "acc_descr_value": 21, "acc_descr_multiline_value": 22, "section": 23, "period_statement": 24, "event_statement": 25, "period": 26, "event": 27, "open_directive": 28, "type_directive": 29, "arg_directive": 30, "close_directive": 31, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 26: "period", 27: "event", 28: "open_directive", 29: "type_directive", 30: "arg_directive", 31: "close_directive" }, + productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [24, 1], [25, 1], [12, 1], [13, 1], [16, 1], [14, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 3: + this.$ = []; + break; + case 4: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 5: + case 6: + this.$ = $$[$0]; + break; + case 7: + case 8: + this.$ = []; + break; + case 11: + yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 12: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccTitle(this.$); + break; + case 13: + case 14: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccDescription(this.$); + break; + case 15: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 19: + yy.addTask($$[$0], 0, ""); + this.$ = $$[$0]; + break; + case 20: + yy.addEvent($$[$0].substr(2)); + this.$ = $$[$0]; + break; + case 21: + yy.parseDirective("%%{", "open_directive"); + break; + case 22: + yy.parseDirective($$[$0], "type_directive"); + break; + case 23: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); + yy.parseDirective($$[$0], "arg_directive"); + break; + case 24: + yy.parseDirective("}%%", "close_directive", "timeline"); + break; + } + }, + table: [{ 3: 1, 4: $V0, 7: 3, 12: 4, 28: $V1 }, { 1: [3] }, o($V2, [2, 3], { 5: 6 }), { 3: 7, 4: $V0, 7: 3, 12: 4, 28: $V1 }, { 13: 8, 29: [1, 9] }, { 29: [2, 21] }, { 6: [1, 10], 7: 22, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: 20, 25: 21, 26: $V8, 27: $V9, 28: $V1 }, { 1: [2, 2] }, { 14: 25, 15: [1, 26], 31: $Va }, o([15, 31], [2, 22]), o($V2, [2, 8], { 1: [2, 1] }), o($V2, [2, 4]), { 7: 22, 10: 28, 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: 20, 25: 21, 26: $V8, 27: $V9, 28: $V1 }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), { 19: [1, 29] }, { 21: [1, 30] }, o($V2, [2, 14]), o($V2, [2, 15]), o($V2, [2, 16]), o($V2, [2, 17]), o($V2, [2, 18]), o($V2, [2, 19]), o($V2, [2, 20]), { 11: [1, 31] }, { 16: 32, 30: [1, 33] }, { 11: [2, 24] }, o($V2, [2, 5]), o($V2, [2, 12]), o($V2, [2, 13]), o($Vb, [2, 9]), { 14: 34, 31: $Va }, { 31: [2, 23] }, { 11: [1, 35] }, o($Vb, [2, 10])], + defaultActions: { 5: [2, 21], 7: [2, 2], 27: [2, 24], 33: [2, 23] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("open_directive"); + return 28; + case 1: + this.begin("type_directive"); + return 29; + case 2: + this.popState(); + this.begin("arg_directive"); + return 15; + case 3: + this.popState(); + this.popState(); + return 31; + case 4: + return 30; + case 5: + break; + case 6: + break; + case 7: + return 11; + case 8: + break; + case 9: + break; + case 10: + return 4; + case 11: + return 17; + case 12: + this.begin("acc_title"); + return 18; + case 13: + this.popState(); + return "acc_title_value"; + case 14: + this.begin("acc_descr"); + return 20; + case 15: + this.popState(); + return "acc_descr_value"; + case 16: + this.begin("acc_descr_multiline"); + break; + case 17: + this.popState(); + break; + case 18: + return "acc_descr_multiline_value"; + case 19: + return 23; + case 20: + return 27; + case 21: + return 26; + case 22: + return 6; + case 23: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\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;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "open_directive": { "rules": [1], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "acc_descr_multiline": { "rules": [17, 18], "inclusive": false }, "acc_descr": { "rules": [15], "inclusive": false }, "acc_title": { "rules": [13], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +let currentTaskId = 0; +const sections = []; +const tasks = []; +const rawTasks = []; +const getCommonDb = () => _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.j; +const parseDirective = (statement, context, type) => { + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.k)(globalThis, statement, context, type); +}; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.m)(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const addTask = function(period, length, event) { + const rawTask = { + id: currentTaskId++, + section: currentSection, + type: currentSection, + task: period, + score: length ? length : 0, + //if event is defined, then add it the events array + events: event ? [event] : [] + }; + rawTasks.push(rawTask); +}; +const addEvent = function(event) { + const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); + currentTask.events.push(event); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const timelineDb = { + clear, + getCommonDb, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + addEvent, + parseDirective +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent, + addSection, + addTask, + addTaskOrg, + clear, + default: timelineDb, + getCommonDb, + getSections, + getTasks, + parseDirective +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const drawRect = function(elem, rectData) { + const rectElem = elem.append("rect"); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.y); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", rectData.width); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (rectData.class !== void 0) { + rectElem.attr("class", rectData.class); + } + return rectElem; +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .Nb1)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .Nb1)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + const nText = textData.text.replace(//gi, " "); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf2) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf2)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf2) { + const center = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + task.x + 14; + _drawTextCandidateFunc(conf2)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf2, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds) { + const rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: "rect" + }); + rectElem.lower(); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content.split(//gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.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"); +}; +function wrap(text, width) { + text.each(function() { + var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(this), words = text2.text().split(/(\s+|
)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "
") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "
") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const drawNode = function(elem, node, fullSection, conf2) { + const section = fullSection % MAX_SECTIONS - 1; + const nodeElem = elem.append("g"); + node.section = section; + nodeElem.attr( + "class", + (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) + ); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf2.fontSize && conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.height = Math.max(node.height, node.maxHeight); + node.width = node.width + 2 * node.padding; + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + defaultBkg(bkgElem, node, section); + return node; +}; +const getVirtualNodeHeight = function(elem, node, conf2) { + const textElem = elem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf2.fontSize && conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + textElem.remove(); + return bbox.height + fontSize * 1.1 * 0.5 + node.padding; +}; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + getTextObj, + getNoteRect, + initGraphics, + drawNode, + getVirtualNodeHeight +}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + keys.forEach(function(key) { + conf[key] = cnf[key]; + }); +}; +const draw = function(text, id, version, diagObj) { + const conf2 = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.g)(); + const LEFT_MARGIN = conf2.leftMargin ? conf2.leftMargin : 50; + diagObj.db.clear(); + diagObj.parser.parse(text + "\n"); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("timeline", diagObj.db); + const securityLevel = conf2.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body"); + const svg = root.select("#" + id); + svg.append("g"); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getCommonDb().getDiagramTitle(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("task", tasks2); + svgDraw.initGraphics(svg); + const sections2 = diagObj.db.getSections(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sections", sections2); + let maxSectionHeight = 0; + let maxTaskHeight = 0; + let depthY = 0; + let sectionBeginY = 0; + let masterX = 50 + LEFT_MARGIN; + let masterY = 50; + sectionBeginY = 50; + let sectionNumber = 0; + let hasSections = true; + sections2.forEach(function(section) { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf2); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sectionHeight before draw", sectionHeight); + maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); + }); + let maxEventCount = 0; + let maxEventLineLength = 0; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("tasks.length", tasks2.length); + for (const [i, task] of tasks2.entries()) { + const taskNode = { + number: i, + descr: task, + section: task.section, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf2); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskHeight before draw", taskHeight); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); + maxEventCount = Math.max(maxEventCount, task.events.length); + let maxEventLineLengthTemp = 0; + for (let j = 0; j < task.events.length; j++) { + const event = task.events[j]; + const eventNode = { + descr: event, + section: task.section, + number: task.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf2); + } + maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); + } + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("maxSectionHeight before draw", maxSectionHeight); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("maxTaskHeight before draw", maxTaskHeight); + if (sections2 && sections2.length > 0) { + sections2.forEach((section) => { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sectionNode", sectionNode); + const sectionNodeWrapper = svg.append("g"); + const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf2); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sectionNode output", node); + sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); + masterY += maxSectionHeight + 50; + const tasksForSection = tasks2.filter((task) => task.section === section); + if (tasksForSection.length > 0) { + drawTasks( + svg, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf2, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); + } + masterX += 200 * Math.max(tasksForSection.length, 1); + masterY = sectionBeginY; + sectionNumber++; + }); + } else { + hasSections = false; + drawTasks( + svg, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf2, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); + } + const box = svg.node().getBBox(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("bounds", box); + if (title) { + svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); + } + depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; + const lineWrapper = svg.append("g").attr("class", "lineWrapper"); + lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.s)( + void 0, + svg, + conf2.timeline.padding ? conf2.timeline.padding : 50, + conf2.timeline.useMaxWidth ? conf2.timeline.useMaxWidth : false + ); +}; +const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf2, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { + for (const task of tasks2) { + const taskNode = { + descr: task.task, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskNode", taskNode); + const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); + const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf2); + const taskHeight = node.height; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskHeight after draw", taskHeight); + taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight); + if (task.events) { + const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); + let linelength = maxTaskHeight; + masterY += 100; + linelength = linelength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf2); + masterY -= 100; + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + masterX = masterX + 200; + if (isWithoutSections && !(0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.g)().timeline.disableMulticolor) { + sectionColor++; + } + } + masterY = masterY - 10; +}; +const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf2) { + let maxEventHeight = 0; + const eventBeginY = masterY; + masterY = masterY + 100; + for (const event of events) { + const eventNode = { + descr: event, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: 50 + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("eventNode", eventNode); + const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); + const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf2); + const eventHeight = node.height; + maxEventHeight = maxEventHeight + eventHeight; + eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + masterY = masterY + 10 + eventHeight; + } + masterY = eventBeginY; + return maxEventHeight; +}; +const renderer = { + setConf, + draw +}; +const genSections = (options) => { + let sections2 = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if ((0,khroma__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(options["lineColor" + i])) { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections2 += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${options["cScaleLabel" + i]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser: parser$1, + styles +}; + +//# sourceMappingURL=timeline-definition-8e5a9bc6.js.map + + +/***/ }), + +/***/ 91619: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": () => (/* binding */ is_dark) +}); + +// EXTERNAL MODULE: ./node_modules/khroma/dist/utils/index.js + 3 modules +var utils = __webpack_require__(61691); +// EXTERNAL MODULE: ./node_modules/khroma/dist/color/index.js + 4 modules +var dist_color = __webpack_require__(71610); +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/luminance.js +/* IMPORT */ + + +/* MAIN */ +//SOURCE: https://planetcalc.com/7779 +const luminance = (color) => { + const { r, g, b } = dist_color/* default.parse */.Z.parse(color); + const luminance = .2126 * utils/* default.channel.toLinear */.Z.channel.toLinear(r) + .7152 * utils/* default.channel.toLinear */.Z.channel.toLinear(g) + .0722 * utils/* default.channel.toLinear */.Z.channel.toLinear(b); + return utils/* default.lang.round */.Z.lang.round(luminance); +}; +/* EXPORT */ +/* harmony default export */ const methods_luminance = (luminance); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_light.js +/* IMPORT */ + +/* MAIN */ +const isLight = (color) => { + return methods_luminance(color) >= .5; +}; +/* EXPORT */ +/* harmony default export */ const is_light = (isLight); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_dark.js +/* IMPORT */ + +/* MAIN */ +const isDark = (color) => { + return !is_light(color); +}; +/* EXPORT */ +/* harmony default export */ const is_dark = (isDark); + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/31cd5920.cfcdaa78.js b/assets/js/31cd5920.cfcdaa78.js new file mode 100644 index 0000000000..02d862ce60 --- /dev/null +++ b/assets/js/31cd5920.cfcdaa78.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8534],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),u=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(n),m=a,f=p["".concat(o,".").concat(m)]||p[m]||d[m]||i;return n?r.createElement(f,s(s({ref:t},c),{},{components:n})):r.createElement(f,s({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,s=new Array(i);s[0]=m;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[p]="string"==typeof e?e:a,s[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var r=n(87462),a=(n(67294),n(3905));const i={},s="Undefined Variables",l={unversionedId:"cli/undefined-variables",id:"cli/undefined-variables",title:"Undefined Variables",description:"When a user runs a test or a Test Suite, any variables that will be needed but are not defined will be prompted for:",source:"@site/docs/cli/undefined-variables.md",sourceDirName:"cli",slug:"/cli/undefined-variables",permalink:"/cli/undefined-variables",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/undefined-variables.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Running Tests From the Command Line Interface (CLI)",permalink:"/cli/running-tests"},next:{title:"Defining Test Suites as Text Files",permalink:"/cli/creating-test-suites"}},o={},u=[],c={toc:u},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"undefined-variables"},"Undefined Variables"),(0,a.kt)("p",null,"When a user runs a test or a Test Suite, any variables that will be needed but are not defined will be prompted for:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Output:"',title:'"Output:"'},"WARNING Some variables are required by one or more tests\nINFO Fill the values for each variable:\nPOKEID:\nPOKENAME:\n")),(0,a.kt)("p",null,"Undefined variables are dependent on the variable set selected and whether or not the variable is defined in the current variable set. Select the variable set to run the Test or Test Suite by passing it into the test run command."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest list variableset\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Output:"',title:'"Output:"'}," ID NAME DESCRIPTION\n--------- --------- -------------\n testvars testvars testvars\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest get variableset --id testvars\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Output:"',title:'"Output:"'},'---\ntype: VariableSet\nspec:\n id: testvars\n name: testvars\n description: testvars\n values:\n - key: POKEID\n value: "42"\n - key: POKENAME\n value: oddish\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml --vars testvars\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Output:"',title:'"Output:"'},"\u2714 Pokeshop - Import (http://your-domain:11633/test/XRHjfH_4R/run/XYZ/test)\n")),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"/concepts/ad-hoc-testing"},"Check out use-cases for using undefined variables here."))))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/330f318b.4660ba1f.js b/assets/js/330f318b.4660ba1f.js new file mode 100644 index 0000000000..98a82da63a --- /dev/null +++ b/assets/js/330f318b.4660ba1f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4853],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=l(n),d=o,h=u["".concat(p,".").concat(d)]||u[d]||m[d]||a;return n?r.createElement(h,s(s({ref:t},c),{},{components:n})):r.createElement(h,s({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,s=new Array(a);s[0]=d;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[u]="string"==typeof e?e:o,s[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>m,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var r=n(87462),o=(n(67294),n(3905));const a={},s="Running Tracetest with Azure App Insights (Node.js + OpenTelemetry Collector)",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector",id:"examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector",title:"Running Tracetest with Azure App Insights (Node.js + OpenTelemetry Collector)",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector",permalink:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest with Azure App Insights (ApplicationInsights Node.js SDK)",permalink:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights"},next:{title:"Running Tracetest with Azure App Insights (OpenTelemetry Collector & Pokeshop API)",permalink:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights-pokeshop"}},p={},l=[{value:"Sample Node.js App with Azure App Insights, The OpenTelemetry Collector and Tracetest",id:"sample-nodejs-app-with-azure-app-insights-the-opentelemetry-collector-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:l},u="wrapper";function m(e){let{components:t,...n}=e;return(0,o.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"running-tracetest-with-azure-app-insights-nodejs--opentelemetry-collector"},"Running Tracetest with Azure App Insights (Node.js + OpenTelemetry Collector)"),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},(0,o.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-azure-app-insights-collector"},"Check out the source code on GitHub here."))),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,o.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview"},"Azure Application Insights")," is an extension of Azure Monitor and provides application performance monitoring (APM) features. APM tools are useful to monitor applications from development, through test, and into production in the following ways:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Proactively understand how an application is performing."),(0,o.kt)("li",{parentName:"ul"},"Reactively review application execution data to determine the cause of an incident.")),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/open-telemetry/opentelemetry-collector-contrib"},"OpenTelemetry Collector Contrib")," - The official OpenTelemetry Distribution for packages outside of the core collector."),(0,o.kt)("h2",{id:"sample-nodejs-app-with-azure-app-insights-the-opentelemetry-collector-and-tracetest"},"Sample Node.js App with Azure App Insights, The OpenTelemetry Collector and Tracetest"),(0,o.kt)("p",null,"This is a simple quick start guide on how to configure a Node.js app to use instrumentation with traces and Tracetest for enhancing your E2E and integration tests with trace-based testing. The infrastructure will use Azure App Insights as the trace data store, the OpenTelemetry Collector to process and route the telemetry data and a Node.js app to generate it."),(0,o.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,o.kt)("p",null,"You will need ",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this quick start app!"),(0,o.kt)("p",null,"And the ",(0,o.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/bot-service/bot-service-resources-app-insights-keys?view=azure-bot-service-4.0"},"App Insights Instrumentation Key")," from your instance."),(0,o.kt)("h2",{id:"project-structure"},"Project Structure"),(0,o.kt)("p",null,"The project is built with Docker Compose."),(0,o.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Dockerfile")," and the ",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the root directory is for the Node.js app."),(0,o.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,o.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml"),", and ",(0,o.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,o.kt)("inlineCode",{parentName:"p"},"tracetest")," directory are for the setting up the Node.js App and Tracetest."),(0,o.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,o.kt)("p",null,"All ",(0,o.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services."),(0,o.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,o.kt)("p",null,"The Node.js app is a simple Express app, contained in the ",(0,o.kt)("inlineCode",{parentName:"p"},"src/index.js")," file."),(0,o.kt)("p",null,"It is instrumented using the ",(0,o.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/@opentelemetry/sdk-node"},"Official OpenTelemetry Node.js SDK")," wrapping the application code to send telemetry data to the OpenTelemetry Collector."),(0,o.kt)("p",null,"The following is the instrumentation code from the ",(0,o.kt)("inlineCode",{parentName:"p"},"src/tracing.js")," file."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-js"},"const opentelemetry = require('@opentelemetry/sdk-node')\nconst { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node')\nconst { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc');\n\nconst sdk = new opentelemetry.NodeSDK({\n traceExporter: new OTLPTraceExporter({ url: 'http://otel-collector:4317' }),\n instrumentations: [getNodeAutoInstrumentations()],\n serviceName: 'tracetest-azure-app-insights-collector'\n})\nsdk.start()\n")),(0,o.kt)("p",null,"To start the server, run this command:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"npm start\n")),(0,o.kt)("p",null,"As you can see the ",(0,o.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\n\nCOPY ./src/package*.json ./\n\nRUN npm install\nCOPY ./src .\n\nEXPOSE 3000\nCMD [ "npm", "start" ]\n')),(0,o.kt)("h2",{id:"tracetest"},"Tracetest"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," includes three other services."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,o.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/open-telemetry/opentelemetry-collector-contrib"},(0,o.kt)("strong",{parentName:"a"},"OpenTelemetry Collector Contrib"))," - The official Open Telemetry Distribution for packages outside of the core collector.")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yaml"},'services:\n postgres:\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test:\n - CMD-SHELL\n - pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n timeout: 5s\n interval: 1s\n retries: 60\n image: postgres:14\n networks:\n default: null\n ports:\n - mode: ingress\n target: 5432\n published: 5432\n protocol: tcp\n tracetest:\n command: --provisioning-file /app/provision.yaml\n platform: linux/amd64\n depends_on:\n postgres:\n condition: service_healthy\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n extra_hosts:\n host.docker.internal: host-gateway\n healthcheck:\n test:\n - CMD\n - wget\n - --spider\n - localhost:11633\n timeout: 3s\n interval: 1s\n retries: 60\n image: kubeshop/tracetest:${TAG:-latest}\n networks:\n default: null\n ports:\n - mode: ingress\n target: 11633\n published: 11633\n protocol: tcp\n volumes:\n - type: bind\n source: tracetest/tracetest.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: tracetest/tracetest-provision.yaml\n target: /app/provision.yaml\n otel-collector:\n image: otel/opentelemetry-collector-contrib:latest\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./collector.config.yaml:/otel-local-config.yaml\n environment:\n INSTRUMENTATION_KEY: ${INSTRUMENTATION_KEY}\n ports:\n - 4317:4317\nnetworks:\n default:\n name: _default\n')),(0,o.kt)("p",null,"Tracetest depends on Postgres and requires config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,o.kt)("inlineCode",{parentName:"p"},"root")," directory and the respective config files."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml")," file defines the trace data store, set to Azure App Insights using the collector connection, meaning the traces will be sent to the OpenTelemetry collector to be processed and routed to both Tracetest and the Azure cloud."),(0,o.kt)("p",null,"But how does Tracetest fetch traces?"),(0,o.kt)("p",null,"The OpenTelemetry collector is configured with the ",(0,o.kt)("inlineCode",{parentName:"p"},"azuremonitor")," and the ",(0,o.kt)("inlineCode",{parentName:"p"},"otlp/tracetest")," exporter and sending telemetry data to both the Azure Cloud and Tracetest."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n\nexporters:\n azuremonitor:\n instrumentation_key: ${INSTRUMENTATION_KEY}\n otlp/tracetest:\n endpoint: tracetest:4317\n tls:\n insecure: true\n\nservice:\n pipelines:\n traces/tracetest:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/tracetest]\n traces/appinsights:\n receivers: [otlp]\n exporters: [azuremonitor]\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"tracetest/tracetest.provision.yaml")," file defines the trace data store, set to the Azure App Insights with the ",(0,o.kt)("inlineCode",{parentName:"p"},"collector")," as connection type."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: azureappinsights\n type: azureappinsights\n azureappinsights:\n connectionType: collector\n useAzureActiveDirectoryAuth: false\n")),(0,o.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,o.kt)("p",null,"To start both the Node.js app and Tracetest, run this command:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose -f ./docker-compose.yaml -f ./tracetest/docker-compose.yaml up -d\n")),(0,o.kt)("p",null,"This will start your Tracetest instance on ",(0,o.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),". Open it and start creating tests!\nMake sure to use the ",(0,o.kt)("inlineCode",{parentName:"p"},"http://app:3000/")," URL in your test creation because your Node.js app and Tracetest are in the same network."),(0,o.kt)("h2",{id:"learn-more"},"Learn More"),(0,o.kt)("p",null,"Please visit our ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,o.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/33e79e82.43bce9b0.js b/assets/js/33e79e82.43bce9b0.js new file mode 100644 index 0000000000..89c0744190 --- /dev/null +++ b/assets/js/33e79e82.43bce9b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8517],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>h});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),c=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(r),d=n,h=u["".concat(l,".").concat(d)]||u[d]||m[d]||o;return r?a.createElement(h,i(i({ref:t},p),{},{components:r})):a.createElement(h,i({ref:t},p))}));function h(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:n,i[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var a=r(87462),n=(r(67294),r(3905));const o={},i="OTel-Demo testing game @ KubeconNA 2022",s={unversionedId:"kubecon",id:"kubecon",title:"OTel-Demo testing game @ KubeconNA 2022",description:"Play our game, learn to run trace-based tests using TraceTest, get familiar with the OpenTelemetry Community Demo, and win a Plushie!",source:"@site/docs/kubecon.md",sourceDirName:".",slug:"/kubecon",permalink:"/kubecon",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/kubecon.md",tags:[],version:"current",frontMatter:{}},l={},c=[{value:"Instructions",id:"instructions",level:2},{value:"Help",id:"help",level:2}],p={toc:c},u="wrapper";function m(e){let{components:t,...r}=e;return(0,n.kt)(u,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"otel-demo-testing-game--kubeconna-2022"},"OTel-Demo testing game @ KubeconNA 2022"),(0,n.kt)("p",null,"Play our game, learn to run trace-based tests using TraceTest, get familiar with the ",(0,n.kt)("a",{parentName:"p",href:"https://github.com/open-telemetry/opentelemetry-demo"},"OpenTelemetry Community Demo"),", and win a Plushie!"),(0,n.kt)("p",null,"We have deployed the otel demo at ",(0,n.kt)("a",{parentName:"p",href:"http://otel-demo.tracetest.io/"},"http://otel-demo.tracetest.io/"),", and a Tracetest instance ready to connect to it at ",(0,n.kt)("a",{parentName:"p",href:"http://tracetest-otel-demo.tracetest.io/"},"http://tracetest-otel-demo.tracetest.io/")),(0,n.kt)("h2",{id:"instructions"},"Instructions"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},"Go to ",(0,n.kt)("a",{parentName:"p",href:"http://tracetest-otel-demo.tracetest.io/"},"http://tracetest-otel-demo.tracetest.io/"))),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},"Create a new test. The goal will be to run tests over a trace generated by a call to the ",(0,n.kt)("inlineCode",{parentName:"p"},"Checkout API"),". You can use the ",(0,n.kt)("inlineCode",{parentName:"p"},"Choose example")," dropdown to select the correct one. Add your name to the name of the test.")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},"When the test finishes running, you will be able to see and play around with the generated trace. Now comes the interesting part.")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},"Using the ",(0,n.kt)("inlineCode",{parentName:"p"},"Test")," section, find your way into adding ",(0,n.kt)("inlineCode",{parentName:"p"},"Test Specs")," to do the following assertions:"),(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"All spans with a type of ",(0,n.kt)("inlineCode",{parentName:"li"},"RPC")," have been successful (a.k.a ",(0,n.kt)("inlineCode",{parentName:"li"},"grpc.status_code")," equals 0)"),(0,n.kt)("li",{parentName:"ul"},"Since we\u2019re trying to checkout an empty cart, the shipping cost will be zero. Assert that the ",(0,n.kt)("inlineCode",{parentName:"li"},"get-quote")," span reflects that information"),(0,n.kt)("li",{parentName:"ul"},"Finally, we want to be sure the user provided credit card is valid, so make sure the ",(0,n.kt)("inlineCode",{parentName:"li"},"charge")," span shows if the given card is valid or not.")))),(0,n.kt)("ol",{start:5},(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},'Don\u2019t forget to "Publish" your changes once you created all your specs.')),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},"Complete ",(0,n.kt)("a",{parentName:"p",href:"https://forms.gle/pAyCFjKUeBAKhTFP7"},"our survey"),". You will need to copy/paste your test URL. Make sure it is correct by copy/pasting it into a new browser window. If it\u2019s correct, you should see your test with all the specs you added.")),(0,n.kt)("li",{parentName:"ol"},(0,n.kt)("p",{parentName:"li"},"Come by the stand and reclaim your plushie!"))),(0,n.kt)("h2",{id:"help"},"Help"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"You can use our docs: ",(0,n.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/"},"https://docs.tracetest.io/"),". Some relevant pages:",(0,n.kt)("ul",{parentName:"li"},(0,n.kt)("li",{parentName:"ul"},"Creating tests: ",(0,n.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/create-test/"},"https://docs.tracetest.io/create-test/")),(0,n.kt)("li",{parentName:"ul"},"Adding test spec: ",(0,n.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/adding-assertions/"},"https://docs.tracetest.io/adding-assertions/")),(0,n.kt)("li",{parentName:"ul"},"Advanced selectors: ",(0,n.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/advanced-selectors/"},"https://docs.tracetest.io/advanced-selectors/")))),(0,n.kt)("li",{parentName:"ul"},"Selectors can be hard, so we have a cheatsheet: ",(0,n.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/img/cheatsheet.pdf"},"https://docs.tracetest.io/img/cheatsheet.pdf")),(0,n.kt)("li",{parentName:"ul"},"You can ask for help in our Discord channel: ",(0,n.kt)("a",{parentName:"li",href:"https://discord.com/invite/6zupCZFQbe"},"https://discord.com/invite/6zupCZFQbe"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37c0f7e1.84056ec0.js b/assets/js/37c0f7e1.84056ec0.js new file mode 100644 index 0000000000..3ff1c119d0 --- /dev/null +++ b/assets/js/37c0f7e1.84056ec0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1750],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},u=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=p(n),u=a,h=d["".concat(l,".").concat(u)]||d[u]||m[u]||o;return n?r.createElement(h,s(s({ref:t},c),{},{components:n})):r.createElement(h,s({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:a,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var r=n(87462),a=(n(67294),n(3905));const o={},s="Running Tracetest with Jaeger",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-jaeger",id:"examples-tutorials/recipes/running-tracetest-with-jaeger",title:"Running Tracetest with Jaeger",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-jaeger.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-jaeger",permalink:"/examples-tutorials/recipes/running-tracetest-with-jaeger",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-jaeger.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running a Python app with OpenTelemetry manual instrumention",permalink:"/examples-tutorials/recipes/running-python-app-with-opentelemetry-collector-and-tracetest"},next:{title:"Running Tracetest with OpenSearch",permalink:"/examples-tutorials/recipes/running-tracetest-with-opensearch"}},l={},p=[{value:"Sample Node.js App with Jaeger, OpenTelemetry and Tracetest",id:"sample-nodejs-app-with-jaeger-opentelemetry-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-tracetest-with-jaeger"},"Running Tracetest with Jaeger"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/quick-start-jaeger-nodejs"},"Check out the source code on GitHub here."))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://www.jaegertracing.io/"},"Jaeger")," is an open-source, end-to-end distributed tracing solution. It allows you to monitor and troubleshoot transactions in complex distributed systems. It was developed and then open sourced by Uber Technologies. Jaeger provides a distributed tracing solution to enable transactions across multiple heterogeneous systems or microservices to be tracked and displayed as a cascading series of spans."),(0,a.kt)("h2",{id:"sample-nodejs-app-with-jaeger-opentelemetry-and-tracetest"},"Sample Node.js App with Jaeger, OpenTelemetry and Tracetest"),(0,a.kt)("p",null,"This is a simple quick start on how to configure a Node.js app to use OpenTelemetry instrumentation with traces and Tracetest for enhancing your E2E and integration tests with trace-based testing. The infrastructure will use Jaeger as the trace data store, and OpenTelemetry Collector to receive traces from the Node.js app and send them to Jaeger."),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"You will need ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this quick start app!"),(0,a.kt)("h2",{id:"project-structure"},"Project Structure"),(0,a.kt)("p",null,"The project is built with Docker Compose. It contains two distinct ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," files."),(0,a.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file and ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory are for the Node.js app."),(0,a.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml"),", and ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory are for the setting up Tracetest, Jaeger, and the OpenTelemetry Collector."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest."),(0,a.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,a.kt)("p",null,"All ",(0,a.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services. For example, ",(0,a.kt)("inlineCode",{parentName:"p"},"jaeger:14250")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," will map to the ",(0,a.kt)("inlineCode",{parentName:"p"},"jaeger")," service, where the port ",(0,a.kt)("inlineCode",{parentName:"p"},"14250")," is the port where Jaeger accepts traces. And, ",(0,a.kt)("inlineCode",{parentName:"p"},"jaeger:16685")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml")," will map to the ",(0,a.kt)("inlineCode",{parentName:"p"},"jaeger")," service and port ",(0,a.kt)("inlineCode",{parentName:"p"},"16685")," where Tracetest will fetch trace data from Jaeger."),(0,a.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,a.kt)("p",null,"The Node.js app is a simple Express app contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"app.js")," file."),(0,a.kt)("p",null,"The OpenTelemetry tracing is contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.http.js")," files.\nTraces will be sent to the OpenTelemetry Collector."),(0,a.kt)("p",null,"Here's the content of the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracing.otel.grpc.js")," file:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'const opentelemetry = require("@opentelemetry/sdk-node");\nconst {\n getNodeAutoInstrumentations,\n} = require("@opentelemetry/auto-instrumentations-node");\nconst {\n OTLPTraceExporter,\n} = require("@opentelemetry/exporter-trace-otlp-grpc");\n\nconst sdk = new opentelemetry.NodeSDK({\n traceExporter: new OTLPTraceExporter({ url: "http://otel-collector:4317" }),\n instrumentations: [getNodeAutoInstrumentations()],\n});\nsdk.start();\n')),(0,a.kt)("p",null,"Depending on which of these you choose, traces will be sent to either the ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http")," endpoint."),(0,a.kt)("p",null,"The hostnames and ports for these are:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"GRPC: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4317")),(0,a.kt)("li",{parentName:"ul"},"HTTP: ",(0,a.kt)("inlineCode",{parentName:"li"},"http://otel-collector:4318/v1/traces"))),(0,a.kt)("p",null,"Enabling the tracer is done by preloading the trace file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"node -r ./tracing.otel.grpc.js app.js\n")),(0,a.kt)("p",null,"In the ",(0,a.kt)("inlineCode",{parentName:"p"},"package.json")," you will see two npm scripts for running the respective tracers alongside the ",(0,a.kt)("inlineCode",{parentName:"p"},"app.js"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'"scripts": {\n "with-grpc-tracer":"node -r ./tracing.otel.grpc.js app.js",\n "with-http-tracer":"node -r ./tracing.otel.http.js app.js"\n},\n')),(0,a.kt)("p",null,"To start the server, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"npm run with-grpc-tracer\n# or\nnpm run with-http-tracer\n")),(0,a.kt)("p",null,"As you can see the ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nEXPOSE 8080\nCMD [ "npm", "run", "with-grpc-tracer" ]\n')),(0,a.kt)("p",null,"And, the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," contains just one service for the Node.js app."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\nservices:\n app:\n image: quick-start-nodejs\n build: .\n ports:\n - "8080:8080"\n')),(0,a.kt)("p",null,"To start it, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose build # optional if you haven't already built the image\ndocker compose up\n")),(0,a.kt)("p",null,"This will start the Node.js app. But, you're not sending the traces anywhere."),(0,a.kt)("p",null,"Let's fix this by configuring Tracetest and OpenTelemetry Collector."),(0,a.kt)("h2",{id:"tracetest"},"Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is configured with four services."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://opentelemetry.io/docs/collector/"},(0,a.kt)("strong",{parentName:"a"},"OpenTelemetry Collector"))," - A vendor-agnostic implementation of how to receive, process and export telemetry data."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://www.jaegertracing.io/"},(0,a.kt)("strong",{parentName:"a"},"Jaeger"))," - A trace data store."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,a.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\nservices:\n tracetest:\n image: kubeshop/tracetest:${TAG:-latest}\n platform: linux/amd64\n volumes:\n - type: bind\n source: ./tracetest/tracetest.config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: tracetest/tracetest-provision.yaml\n target: /app/provision.yaml\n command: --provisioning-file /app/provision.yaml\n ports:\n - 11633:11633\n depends_on:\n postgres:\n condition: service_healthy\n jaeger:\n condition: service_started\n otel-collector:\n condition: service_started\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n\n postgres:\n image: postgres:14\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n\n otel-collector:\n image: otel/opentelemetry-collector-contrib:0.59.0\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./tracetest/collector.config.yaml:/otel-local-config.yaml\n\n jaeger:\n image: jaegertracing/all-in-one:latest\n restart: unless-stopped\n ports:\n - "16686:16686"\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:16686"]\n interval: 1s\n timeout: 3s\n retries: 60\n')),(0,a.kt)("p",null,"Tracetest depends on Postgres, Jaeger and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest")," directory and the respective config files."),(0,a.kt)("p",null,"To start both the Node.js app and Tracetest we will run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up # add --build if the images are not built already\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n\ntelemetry:\n exporters:\n collector:\n serviceName: tracetest\n sampling: 100 # 100%\n exporter:\n type: collector\n collector:\n endpoint: otel-collector:4317\n\nserver:\n telemetry:\n exporter: collector\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml")," file defines the trace data store, set to Jaeger, meaning the traces will be stored in Jaeger and Tracetest will fetch them from Jaeger when running tests."),(0,a.kt)("p",null,"But how does Tracetest fetch traces?"),(0,a.kt)("p",null,"Tracetest uses ",(0,a.kt)("inlineCode",{parentName:"p"},"jaeger:16685")," to connect to Jaeger and fetch trace data."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"---\ntype: PollingProfile\nspec:\n name: Default\n strategy: periodic\n default: true\n periodic:\n retryDelay: 5s\n timeout: 10m\n\n---\ntype: DataStore\nspec:\n name: Jaeger\n type: jaeger\n default: true\n jaeger:\n endpoint: jaeger:16685\n tls:\n insecure: true\n")),(0,a.kt)("p",null,"How do traces reach Jaeger?"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," explains that. It receives traces via either ",(0,a.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"http"),". Then, exports them to Jaegers's ",(0,a.kt)("inlineCode",{parentName:"p"},"model.proto")," endpoint ",(0,a.kt)("inlineCode",{parentName:"p"},"jaeger:14250"),"."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n loglevel: debug\n jaeger:\n endpoint: jaeger:14250\n tls:\n insecure: true\n\nservice:\n pipelines:\n traces/1:\n receivers: [otlp]\n processors: [batch]\n exporters: [jaeger]\n")),(0,a.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,a.kt)("p",null,"To start both the Node.js app and Tracetest, we will run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up # add --build if the images are not built already\n")),(0,a.kt)("p",null,"This will start your Tracetest instance on ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),"."),(0,a.kt)("p",null,"Open the URL and start creating tests! Make sure to use the ",(0,a.kt)("inlineCode",{parentName:"p"},"http://app:8080/")," URL in your test creation, because your Node.js app and Tracetest are in the same network."),(0,a.kt)("h2",{id:"learn-more"},"Learn More"),(0,a.kt)("p",null,"Feel free to check out our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/37c366b1.e16ad42e.js b/assets/js/37c366b1.e16ad42e.js new file mode 100644 index 0000000000..6e67e76656 --- /dev/null +++ b/assets/js/37c366b1.e16ad42e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4014],{3905:(t,e,n)=>{n.d(e,{Zo:()=>m,kt:()=>h});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function l(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var s=a.createContext({}),p=function(t){var e=a.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):l(l({},e),t)),n},m=function(t){var e=p(t.components);return a.createElement(s.Provider,{value:e},t.children)},u="mdxType",c={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,o=t.originalType,s=t.parentName,m=i(t,["components","mdxType","originalType","parentName"]),u=p(n),d=r,h=u["".concat(s,".").concat(d)]||u[d]||c[d]||o;return n?a.createElement(h,l(l({ref:e},m),{},{components:n})):a.createElement(h,l({ref:e},m))}));function h(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in e)hasOwnProperty.call(e,s)&&(i[s]=e[s]);i.originalType=t,i[u]="string"==typeof t?t:r,l[1]=i;for(var p=2;p{n.d(e,{Z:()=>l});var a=n(67294),r=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(t){let{children:e,hidden:n,className:l}=t;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(o.tabItem,l),hidden:n},e)}},73992:(t,e,n)=>{n.d(e,{Z:()=>v});var a=n(87462),r=n(67294),o=n(86010),l=n(72957),i=n(16550),s=n(75238),p=n(33609),m=n(92560);function u(t){return function(t){return r.Children.map(t,(t=>{if(!t||(0,r.isValidElement)(t)&&function(t){const{props:e}=t;return!!e&&"object"==typeof e&&"value"in e}(t))return t;throw new Error(`Docusaurus error: Bad child <${"string"==typeof t.type?t.type:t.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(t).map((t=>{let{props:{value:e,label:n,attributes:a,default:r}}=t;return{value:e,label:n,attributes:a,default:r}}))}function c(t){const{values:e,children:n}=t;return(0,r.useMemo)((()=>{const t=e??u(n);return function(t){const e=(0,p.l)(t,((t,e)=>t.value===e.value));if(e.length>0)throw new Error(`Docusaurus error: Duplicate values "${e.map((t=>t.value)).join(", ")}" found in . Every value needs to be unique.`)}(t),t}),[e,n])}function d(t){let{value:e,tabValues:n}=t;return n.some((t=>t.value===e))}function h(t){let{queryString:e=!1,groupId:n}=t;const a=(0,i.k6)(),o=function(t){let{queryString:e=!1,groupId:n}=t;if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,s._X)(o),(0,r.useCallback)((t=>{if(!o)return;const e=new URLSearchParams(a.location.search);e.set(o,t),a.replace({...a.location,search:e.toString()})}),[o,a])]}function y(t){const{defaultValue:e,queryString:n=!1,groupId:a}=t,o=c(t),[l,i]=(0,r.useState)((()=>function(t){let{defaultValue:e,tabValues:n}=t;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!d({value:e,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map((t=>t.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const a=n.find((t=>t.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:e,tabValues:o}))),[s,p]=h({queryString:n,groupId:a}),[u,y]=function(t){let{groupId:e}=t;const n=function(t){return t?`docusaurus.tab.${t}`:null}(e),[a,o]=(0,m.Nk)(n);return[a,(0,r.useCallback)((t=>{n&&o.set(t)}),[n,o])]}({groupId:a}),g=(()=>{const t=s??u;return d({value:t,tabValues:o})?t:null})();(0,r.useLayoutEffect)((()=>{g&&i(g)}),[g]);return{selectedValue:l,selectValue:(0,r.useCallback)((t=>{if(!d({value:t,tabValues:o}))throw new Error(`Can't select invalid tab value=${t}`);i(t),p(t),y(t)}),[p,y,o]),tabValues:o}}var g=n(51048);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function f(t){let{className:e,block:n,selectedValue:i,selectValue:s,tabValues:p}=t;const m=[],{blockElementScrollPositionUntilNextRender:u}=(0,l.o5)(),c=t=>{const e=t.currentTarget,n=m.indexOf(e),a=p[n].value;a!==i&&(u(e),s(a))},d=t=>{let e=null;switch(t.key){case"Enter":c(t);break;case"ArrowRight":{const n=m.indexOf(t.currentTarget)+1;e=m[n]??m[0];break}case"ArrowLeft":{const n=m.indexOf(t.currentTarget)-1;e=m[n]??m[m.length-1];break}}e?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},e)},p.map((t=>{let{value:e,label:n,attributes:l}=t;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===e?0:-1,"aria-selected":i===e,key:e,ref:t=>m.push(t),onKeyDown:d,onClick:c},l,{className:(0,o.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":i===e})}),n??e)})))}function b(t){let{lazy:e,children:n,selectedValue:a}=t;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const t=o.find((t=>t.props.value===a));return t?(0,r.cloneElement)(t,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},o.map(((t,e)=>(0,r.cloneElement)(t,{key:e,hidden:t.props.value!==a}))))}function N(t){const e=y(t);return r.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},r.createElement(f,(0,a.Z)({},t,e)),r.createElement(b,(0,a.Z)({},t,e)))}function v(t){const e=(0,g.Z)();return r.createElement(N,(0,a.Z)({key:String(e)},t))}},65389:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>m,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>p,toc:()=>u});var a=n(87462),r=(n(67294),n(3905)),o=n(73992),l=n(18679);const i={id:"no-otel",title:"What if I don't have OpenTelemetry installed?",hide_table_of_contents:!0,description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces. Learn how to install OpenTelemetry in less than 5 minutes.",keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png"},s="What if I don't have OpenTelemetry installed?",p={unversionedId:"getting-started/no-otel",id:"getting-started/no-otel",title:"What if I don't have OpenTelemetry installed?",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces. Learn how to install OpenTelemetry in less than 5 minutes.",source:"@site/docs/getting-started/no-otel.mdx",sourceDirName:"getting-started",slug:"/getting-started/no-otel",permalink:"/getting-started/no-otel",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/getting-started/no-otel.mdx",tags:[],version:"current",frontMatter:{id:"no-otel",title:"What if I don't have OpenTelemetry installed?",hide_table_of_contents:!0,description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces. Learn how to install OpenTelemetry in less than 5 minutes.",keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png"},sidebar:"tutorialSidebar",previous:{title:"Opening Tracetest",permalink:"/getting-started/open"},next:{title:"Configuration",permalink:"/configuration/overview"}},m={},u=[{value:"1. Install cert-manager",id:"1-install-cert-manager",level:2},{value:"This is required for the OpenTelemetry Operator to work.",id:"this-is-required-for-the-opentelemetry-operator-to-work",level:4},{value:"2. Install the OpenTelemetry Operator",id:"2-install-the-opentelemetry-operator",level:2},{value:"Traces will be generated and collected automatically.",id:"traces-will-be-generated-and-collected-automatically",level:4},{value:"3. Create a file named otel-collector.yaml for the OpenTelemetry config",id:"3-create-a-file-named-otel-collectoryaml-for-the-opentelemetry-config",level:2},{value:"1. The Instrumentation, which is an init-container that will run on any pod you explictly mark (see step 5).",id:"1-the-instrumentation-which-is-an-init-container-that-will-run-on-any-pod-you-explictly-mark-see-step-5",level:4},{value:"2. The OpenTelemetry collector, which will collect the traces from the init-container and send them to Tracetest, and/or your trace data store.",id:"2-the-opentelemetry-collector-which-will-collect-the-traces-from-the-init-container-and-send-them-to-tracetest-andor-your-trace-data-store",level:4},{value:"4. Apply the otel-collector.yaml config file",id:"4-apply-the-otel-collectoryaml-config-file",level:2},{value:"5. Update any service you want to instrument",id:"5-update-any-service-you-want-to-instrument",level:2},{value:"Odigos, is a new open source project that can do this for you without a single line of code.",id:"odigos-is-a-new-open-source-project-that-can-do-this-for-you-without-a-single-line-of-code",level:4}],c={toc:u},d="wrapper";function h(t){let{components:e,...n}=t;return(0,r.kt)(d,(0,a.Z)({},c,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"what-if-i-dont-have-opentelemetry-installed"},"What if I don't have OpenTelemetry installed?"),(0,r.kt)("p",null,"No worries! You can get started with no code changes at all!"),(0,r.kt)("p",null,"This page will explain getting started with OpenTelemetry:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Injecting auto instrumentation with ",(0,r.kt)("strong",{parentName:"li"},"no code changes"),"."),(0,r.kt)("li",{parentName:"ul"},"Auto instrumentation with limited code changes."),(0,r.kt)("li",{parentName:"ul"},"Manual instrumentation with code changes.")),(0,r.kt)("p",null,"You can also find more ways to instrument OpenTelemetry in their ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/docs/instrumentation/"},"documentation"),"."),(0,r.kt)(o.Z,{groupId:"otel-install-options",mdxType:"Tabs"},(0,r.kt)(l.Z,{value:"no-code-changes",label:"No Code Changes",default:!0,mdxType:"TabItem"},(0,r.kt)("p",null,"You can install the OpenTelemetry Operator in any existing Kubernetes environment in under 5 minutes by running the following set of commands."),(0,r.kt)("h2",{id:"1-install-cert-manager"},"1. Install ",(0,r.kt)("a",{parentName:"h2",href:"https://cert-manager.io/"},(0,r.kt)("inlineCode",{parentName:"a"},"cert-manager"))),(0,r.kt)("h4",{id:"this-is-required-for-the-opentelemetry-operator-to-work"},"This is required for the OpenTelemetry Operator to work."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml\n")),(0,r.kt)("h2",{id:"2-install-the-opentelemetry-operator"},"2. Install the ",(0,r.kt)("a",{parentName:"h2",href:"https://opentelemetry.io/docs/k8s-operator/"},"OpenTelemetry Operator")),(0,r.kt)("h4",{id:"traces-will-be-generated-and-collected-automatically"},"Traces will be generated and collected automatically."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml\n")),(0,r.kt)("h2",{id:"3-create-a-file-named-otel-collectoryaml-for-the-opentelemetry-config"},"3. Create a file named ",(0,r.kt)("inlineCode",{parentName:"h2"},"otel-collector.yaml")," for the OpenTelemetry config"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="otel-collector.yaml"',title:'"otel-collector.yaml"'},"apiVersion: opentelemetry.io/v1alpha1\nkind: Instrumentation\nmetadata:\nname: otel-instrumentation\nspec:\nexporter:\n endpoint: http://otel-collector:4317\npropagators:\n - tracecontext\n - baggage\n - b3\n\n---\napiVersion: opentelemetry.io/v1alpha1\nkind: OpenTelemetryCollector\nmetadata:\nname: otel\nspec:\nconfig: |\n receivers:\n otlp:\n protocols:\n grpc:\n http:\n processors:\n batch:\n timeout: 100ms\n exporters:\n otlp/tracetest:\n endpoint: tracetest:4317\n tls:\n insecure: true\n service:\n pipelines:\n traces:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/tracetest]\n")),(0,r.kt)("p",null,"You configure 2 separate things:"),(0,r.kt)("h4",{id:"1-the-instrumentation-which-is-an-init-container-that-will-run-on-any-pod-you-explictly-mark-see-step-5"},"1. The Instrumentation, which is an init-container that will run on any pod you explictly mark (see step 5)."),(0,r.kt)("h4",{id:"2-the-opentelemetry-collector-which-will-collect-the-traces-from-the-init-container-and-send-them-to-tracetest-andor-your-trace-data-store"},"2. The OpenTelemetry collector, which will collect the traces from the init-container and send them to Tracetest, and/or your trace data store."),(0,r.kt)("p",null,"What's amazing here is that you can add other exporters to this config file to ",(0,r.kt)("a",{parentName:"p",href:"/configuration/overview"},"send the traces to other services as explained here"),"."),(0,r.kt)("h2",{id:"4-apply-the-otel-collectoryaml-config-file"},"4. Apply the ",(0,r.kt)("inlineCode",{parentName:"h2"},"otel-collector.yaml")," config file"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash",metastring:'title="Terminal"',title:'"Terminal"'},"kubectl apply -f otel-collector.yaml\n")),(0,r.kt)("h2",{id:"5-update-any-service-you-want-to-instrument"},"5. Update any service you want to instrument"),(0,r.kt)("p",null,"Use the ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/docs/k8s-operator/automatic/"},"following annotations as seen in the OpenTelemetry docs"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},".NET"),": ",(0,r.kt)("inlineCode",{parentName:"li"},'instrumentation.opentelemetry.io/inject-dotnet: "true"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Java"),": ",(0,r.kt)("inlineCode",{parentName:"li"},'instrumentation.opentelemetry.io/inject-java: "true"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Node.js"),": ",(0,r.kt)("inlineCode",{parentName:"li"},'instrumentation.opentelemetry.io/inject-nodejs: "true"')),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Python"),": ",(0,r.kt)("inlineCode",{parentName:"li"},'instrumentation.opentelemetry.io/inject-python: "true"'))),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Add an environment variable named ",(0,r.kt)("inlineCode",{parentName:"p"},"SERVICE_NAME")," to your service so that you can\nlater identify it in the tests.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"apiVersion: apps/v1\nkind: Deployment\nmetadata:\nname: your-service\nspec:\nreplicas: 1\ntemplate:\n annotations:\n instrumentation.opentelemetry.io/inject-nodejs: 'true'\nspec:\n containers:\n var:\n - name: SERVICE_NAME\n value: 'your-service'\n")),(0,r.kt)("p",null,"This will automatically instrument your service with OpenTelemetry and send the traces to the OpenTelemetry collector."),(0,r.kt)("p",null,"Apply the changes and you're ready! You can start writing integration and end-to-end tests with trace-based testing!"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"Check the ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/docs/k8s-operator/automatic/"},"official OpenTelemetry docs")," explaining how to use the OpenTelemetry Operator."))),(0,r.kt)(l.Z,{value:"other-options",label:"Other Options",default:!0,mdxType:"TabItem"},(0,r.kt)("h4",{id:"odigos-is-a-new-open-source-project-that-can-do-this-for-you-without-a-single-line-of-code"},(0,r.kt)("a",{parentName:"h4",href:"https://docs.odigos.io/intro"},"Odigos"),", is a new open source project that can do this for you without a single line of code.")),(0,r.kt)(l.Z,{value:"auto-instrumentation",label:"Auto Instrumentation",default:!0,mdxType:"TabItem"},(0,r.kt)("p",null,"Below we provide quick links to all key docs and samples."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Language"),(0,r.kt)("th",{parentName:"tr",align:null},"Docs"),(0,r.kt)("th",{parentName:"tr",align:null},"GitHub"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"C#/.NET")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/net/automatic/"},"https://opentelemetry.io/docs/instrumentation/net/automatic/")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation"},"https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Java")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/java/automatic/"},"https://opentelemetry.io/docs/instrumentation/java/automatic/")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/open-telemetry/opentelemetry-java-instrumentation"},"https://github.com/open-telemetry/opentelemetry-java-instrumentation"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"JavaScript")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/js/automatic/"},"https://opentelemetry.io/docs/instrumentation/js/automatic/")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/open-telemetry/opentelemetry-js"},"https://github.com/open-telemetry/opentelemetry-js"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"PHP")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/php/automatic/"},"https://opentelemetry.io/docs/instrumentation/php/automatic/")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/open-telemetry/opentelemetry-php-instrumentation"},"https://github.com/open-telemetry/opentelemetry-php-instrumentation"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Python")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/python/automatic/"},"https://opentelemetry.io/docs/instrumentation/python/automatic/")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/open-telemetry/opentelemetry-python-contrib"},"https://github.com/open-telemetry/opentelemetry-python-contrib"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Ruby")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/ruby/automatic/"},"https://opentelemetry.io/docs/instrumentation/ruby/automatic/")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://github.com/open-telemetry/opentelemetry-ruby"},"https://github.com/open-telemetry/opentelemetry-ruby")))))),(0,r.kt)(l.Z,{value:"manual-instrumentation",label:"Manual Instrumentation",default:!0,mdxType:"TabItem"},(0,r.kt)("p",null,"Below we provide quick links to all key docs."),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Language"),(0,r.kt)("th",{parentName:"tr",align:null},"Docs"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"C++")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/cpp/"},"https://opentelemetry.io/docs/instrumentation/cpp/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"C#/.NET")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/net/"},"https://opentelemetry.io/docs/instrumentation/net/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Erlang/Elixir")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/erlang/"},"https://opentelemetry.io/docs/instrumentation/erlang/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Go")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/go/"},"https://opentelemetry.io/docs/instrumentation/go/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Java")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/java/"},"https://opentelemetry.io/docs/instrumentation/java/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"JavaScript")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/js/"},"https://opentelemetry.io/docs/instrumentation/js/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"PHP")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/php/"},"https://opentelemetry.io/docs/instrumentation/php/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Python")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/python/"},"https://opentelemetry.io/docs/instrumentation/python/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Ruby")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/ruby/"},"https://opentelemetry.io/docs/instrumentation/ruby/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Rust")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/rust/"},"https://opentelemetry.io/docs/instrumentation/rust/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Swift")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/swift/"},"https://opentelemetry.io/docs/instrumentation/swift/"))),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("strong",{parentName:"td"},"Other")),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"https://opentelemetry.io/docs/instrumentation/other/"},"https://opentelemetry.io/docs/instrumentation/other/"))))))),(0,r.kt)("admonition",{title:"We suggest you go back to and install Tracetest!",type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Jump back to the ",(0,r.kt)("a",{parentName:"p",href:"/getting-started/installation"},"installation guide")," once you have OpenTelemetry installed.")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3b84e690.f879b769.js b/assets/js/3b84e690.f879b769.js new file mode 100644 index 0000000000..3e3b9782cc --- /dev/null +++ b/assets/js/3b84e690.f879b769.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[340],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),l=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},s="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,p=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),s=l(r),f=o,m=s["".concat(p,".").concat(f)]||s[f]||d[f]||c;return r?n.createElement(m,i(i({ref:t},u),{},{components:r})):n.createElement(m,i({ref:t},u))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,i=new Array(c);i[0]=f;var a={};for(var p in t)hasOwnProperty.call(t,p)&&(a[p]=t[p]);a.originalType=e,a[s]="string"==typeof e?e:o,i[1]=a;for(var l=2;l{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>i,default:()=>d,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));const c={},i=void 0,a={unversionedId:"deployment/production-checklist",id:"deployment/production-checklist",title:"production-checklist",description:"",source:"@site/docs/deployment/production-checklist.md",sourceDirName:"deployment",slug:"/deployment/production-checklist",permalink:"/deployment/production-checklist",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/deployment/production-checklist.md",tags:[],version:"current",frontMatter:{}},p={},l=[],u={toc:l},s="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(s,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3c2823d6.bd5823cf.js b/assets/js/3c2823d6.bd5823cf.js new file mode 100644 index 0000000000..e208e63678 --- /dev/null +++ b/assets/js/3c2823d6.bd5823cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5257],{3905:(e,t,a)=>{a.d(t,{Zo:()=>p,kt:()=>h});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=n.createContext({}),c=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},p=function(e){var t=c(e.components);return n.createElement(o.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(a),g=r,h=u["".concat(o,".").concat(g)]||u[g]||d[g]||s;return a?n.createElement(h,i(i({ref:t},p),{},{components:a})):n.createElement(h,i({ref:t},p))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,i=new Array(s);i[0]=g;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[u]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var n=a(87462),r=(a(67294),a(3905));const s={},i="Tracetest Analyzer Settings",l={unversionedId:"configuration/tracetest-analyzer",id:"configuration/tracetest-analyzer",title:"Tracetest Analyzer Settings",description:"Tracetest Analyzer is provided in the Tracetest application to aid in the analysis of traces and easily pinpoint issues to speed up resolution.",source:"@site/docs/configuration/tracetest-analyzer.md",sourceDirName:"configuration",slug:"/configuration/tracetest-analyzer",permalink:"/configuration/tracetest-analyzer",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/tracetest-analyzer.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Trace Polling Settings",permalink:"/configuration/trace-polling"},next:{title:"Test Runner Settings",permalink:"/configuration/test-runner"}},o={},c=[{value:"Create a Test",id:"create-a-test",level:2},{value:"View the Trace Analyzer Results",id:"view-the-trace-analyzer-results",level:2},{value:"Disable Tracetest Analyzer",id:"disable-tracetest-analyzer",level:2},{value:"Tracetest Analyzer in the CLI",id:"tracetest-analyzer-in-the-cli",level:2}],p={toc:c},u="wrapper";function d(e){let{components:t,...s}=e;return(0,r.kt)(u,(0,n.Z)({},p,s,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"tracetest-analyzer-settings"},"Tracetest Analyzer Settings"),(0,r.kt)("p",null,"Tracetest Analyzer is provided in the Tracetest application to aid in the analysis of traces and easily pinpoint issues to speed up resolution."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"/analyzer/concepts"},"Read more about Tracetest Analyzer concepts here."))),(0,r.kt)("h2",{id:"create-a-test"},"Create a Test"),(0,r.kt)("p",null,"For this example, we will use the Pokemon List test provided in the Tracetest Pokeshop demo."),(0,r.kt)("p",null,"Start Tracetest, click the ",(0,r.kt)("strong",{parentName:"p"},"Create")," button and select ",(0,r.kt)("strong",{parentName:"p"},"Create New Test")," in the drop down:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Create a Test Button",src:a(53795).Z,width:"2874",height:"1590"})),(0,r.kt)("p",null,"Select the ",(0,r.kt)("strong",{parentName:"p"},"HTTP Request")," trigger and click ",(0,r.kt)("strong",{parentName:"p"},"Next"),":"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Select HTTP Trigger",src:a(6695).Z,width:"2874",height:"1586"})),(0,r.kt)("p",null,"Select ",(0,r.kt)("strong",{parentName:"p"},"Pokemon List")," and click ",(0,r.kt)("strong",{parentName:"p"},"Next"),":"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Select Pokeshop List",src:a(20039).Z,width:"2874",height:"1586"})),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Select Pokeshop List Next",src:a(71851).Z,width:"2874",height:"1590"})),(0,r.kt)("p",null,"Leave the default values and click ",(0,r.kt)("strong",{parentName:"p"},"Create and Run"),":"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Select Pokeshop Create Run ",src:a(70602).Z,width:"2874",height:"1588"})),(0,r.kt)("h2",{id:"view-the-trace-analyzer-results"},"View the Trace Analyzer Results"),(0,r.kt)("p",null,"The Tracetest Analyzer results help teams improve their instrumentation data, find potential problems and provide tips to fix the problems."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Analyzer Results",src:a(7113).Z,width:"2874",height:"1590"})),(0,r.kt)("p",null,"Click the arrow next to any category to see suggestions for trace improvements:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Analyzer Results Expanded",src:a(44225).Z,width:"2874",height:"1584"})),(0,r.kt)("h2",{id:"disable-tracetest-analyzer"},"Disable Tracetest Analyzer"),(0,r.kt)("p",null,"In the Tracetest UI, go to ",(0,r.kt)("strong",{parentName:"p"},"Settings")," and the ",(0,r.kt)("strong",{parentName:"p"},"Analyzer")," tab:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Analyzer Settings",src:a(20400).Z,width:"2874",height:"1576"})),(0,r.kt)("p",null,"Toggle ",(0,r.kt)("inlineCode",{parentName:"p"},"Enable Analyzer for All Tests")," off to disable the Analyzer."),(0,r.kt)("p",null,"Here, you can also set the thresholds for ",(0,r.kt)("inlineCode",{parentName:"p"},"Otel Semantic Conventions"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"Common Problems")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"Security")," analyzer settings."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Analyzer Settings 2",src:a(89784).Z,width:"2874",height:"1568"})),(0,r.kt)("h2",{id:"tracetest-analyzer-in-the-cli"},"Tracetest Analyzer in the CLI"),(0,r.kt)("p",null,"You can use Tracetest Analyzer in the CLI to analyze per individual test. Visit the ",(0,r.kt)("a",{parentName:"p",href:"/web-ui/creating-test-suites"},"Creating Transactions")," page for details."))}d.isMDXComponent=!0},6695:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-create-new-http-request-6634de6ef48da2b7b916e59a1b57c4ea.png"},53795:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-create-test-62c79cdfa3e636e5d7ee4c9ec656b706.png"},44225:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-expanded-ed1647909d5c988f75260c8738a04f4b.png"},70602:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-pokeshop-list-create-run-b2a0e27bc4df77b3f96a9a3545419e4a.png"},71851:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-pokeshop-list-next-42a36f06cc99a6b333cb65ef889f906c.png"},20039:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-pokeshop-list-54c7607e361c0adfbed904f369e42965.png"},7113:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-results-9b388e578a149358959e2a23be8cceff.png"},89784:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-settings-2-809849b80885a21e9a917ffb342a6048.png"},20400:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/analyzer-settings-db544d7e91b923b24f35769774a1bf95.png"}}]); \ No newline at end of file diff --git a/assets/js/3d27932a.a60aa9c2.js b/assets/js/3d27932a.a60aa9c2.js new file mode 100644 index 0000000000..7909df2a9c --- /dev/null +++ b/assets/js/3d27932a.a60aa9c2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1361],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(n),g=r,m=u["".concat(l,".").concat(g)]||u[g]||f[g]||o;return n?a.createElement(m,i(i({ref:t},p),{},{components:n})):a.createElement(m,i({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:r,i[1]=c;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>c,toc:()=>s});var a=n(87462),r=(n(67294),n(3905));const o={},i="SignalFx",c={unversionedId:"configuration/connecting-to-data-stores/signalfx",id:"configuration/connecting-to-data-stores/signalfx",title:"SignalFx",description:"Tracetest fetches traces from SignalFx's realm and token.",source:"@site/docs/configuration/connecting-to-data-stores/signalfx.md",sourceDirName:"configuration/connecting-to-data-stores",slug:"/configuration/connecting-to-data-stores/signalfx",permalink:"/configuration/connecting-to-data-stores/signalfx",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/connecting-to-data-stores/signalfx.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"OpenTelemetry Collector",permalink:"/configuration/connecting-to-data-stores/opentelemetry-collector"},next:{title:"Signoz",permalink:"/configuration/connecting-to-data-stores/signoz"}},l={},s=[{value:"Configure Tracetest to Use SignalFx as a Trace Data Store",id:"configure-tracetest-to-use-signalfx-as-a-trace-data-store",level:2},{value:"Connect Tracetest to SignalFx with the Web UI",id:"connect-tracetest-to-signalfx-with-the-web-ui",level:2},{value:"Connect Tracetest to SignalFx with the CLI",id:"connect-tracetest-to-signalfx-with-the-cli",level:2}],p={toc:s},u="wrapper";function f(e){let{components:t,...o}=e;return(0,r.kt)(u,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"signalfx"},"SignalFx"),(0,r.kt)("p",null,"Tracetest fetches traces from ",(0,r.kt)("a",{parentName:"p",href:"https://docs.splunk.com/Observability/references/organizations.html"},"SignalFx's realm and token"),"."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest can be found in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,r.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,r.kt)("h2",{id:"configure-tracetest-to-use-signalfx-as-a-trace-data-store"},"Configure Tracetest to Use SignalFx as a Trace Data Store"),(0,r.kt)("p",null,"Configure Tracetest to be aware that it has to fetch trace data from SignalFx."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Need help configuring the OpenTelemetry Collector so send trace data from your application to SignalFx? Read more in ",(0,r.kt)("a",{parentName:"p",href:"../opentelemetry-collector-configuration-file-reference"},"the reference page here"),").")),(0,r.kt)("h2",{id:"connect-tracetest-to-signalfx-with-the-web-ui"},"Connect Tracetest to SignalFx with the Web UI"),(0,r.kt)("p",null,"In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, (3) select SignalFx."),(0,r.kt)("p",null,"You need your SignalFx:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Realm")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Token"))),(0,r.kt)("p",null,"Follow this ",(0,r.kt)("a",{parentName:"p",href:"https://docs.splunk.com/Observability/references/organizations.html"},"guide"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"SignalFX",src:n(38799).Z,width:"2838",height:"1456"})),(0,r.kt)("h2",{id:"connect-tracetest-to-signalfx-with-the-cli"},"Connect Tracetest to SignalFx with the CLI"),(0,r.kt)("p",null,"Or, if you prefer using the CLI, you can use this file config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: SignalFX\n type: signalfx\n default: true\n signalfx:\n realm: us1\n token: mytoken\n")),(0,r.kt)("p",null,"Proceed to run this command in the terminal, and specify the file above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")))}f.isMDXComponent=!0},38799:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/SignalFX-settings-8acd421c68d79b1214a9b95518a37120.png"}}]); \ No newline at end of file diff --git a/assets/js/3f794bf0.25cfb080.js b/assets/js/3f794bf0.25cfb080.js new file mode 100644 index 0000000000..8bfcd93bb9 --- /dev/null +++ b/assets/js/3f794bf0.25cfb080.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7783],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>y});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),p=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},l=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,s=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=p(r),m=o,y=u["".concat(s,".").concat(m)]||u[m]||f[m]||c;return r?n.createElement(y,a(a({ref:t},l),{},{components:r})):n.createElement(y,a({ref:t},l))}));function y(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,a=new Array(c);a[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:o,a[1]=i;for(var p=2;p{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>f,frontMatter:()=>c,metadata:()=>i,toc:()=>p});var n=r(87462),o=(r(67294),r(3905));const c={},a=void 0,i={unversionedId:"concepts/what-is-tracing",id:"concepts/what-is-tracing",title:"what-is-tracing",description:"",source:"@site/docs/concepts/what-is-tracing.md",sourceDirName:"concepts",slug:"/concepts/what-is-tracing",permalink:"/concepts/what-is-tracing",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/concepts/what-is-tracing.md",tags:[],version:"current",frontMatter:{}},s={},p=[],l={toc:p},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4248.f78c1067.js b/assets/js/4248.f78c1067.js new file mode 100644 index 0000000000..9725a44d34 --- /dev/null +++ b/assets/js/4248.f78c1067.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4248],{74248:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var n=a(67294),l=a(97325),o=a(35463),r=a(32517);function c(){return n.createElement(n.Fragment,null,n.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),n.createElement(r.Z,null,n.createElement("main",{className:"container margin-vert--xl"},n.createElement("div",{className:"row"},n.createElement("div",{className:"col col--6 col--offset-3"},n.createElement("h1",{className:"hero__title"},n.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),n.createElement("p",null,n.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),n.createElement("p",null,n.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/assets/js/478a870d.e61f1a49.js b/assets/js/478a870d.e61f1a49.js new file mode 100644 index 0000000000..d52fefb021 --- /dev/null +++ b/assets/js/478a870d.e61f1a49.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[6727],{83769:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/47992bbd.d170d5ad.js b/assets/js/47992bbd.d170d5ad.js new file mode 100644 index 0000000000..be7d34ac1c --- /dev/null +++ b/assets/js/47992bbd.d170d5ad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3790],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>m});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),l=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=l(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=l(n),y=r,m=d["".concat(s,".").concat(y)]||d[y]||u[y]||o;return n?a.createElement(m,c(c({ref:t},p),{},{components:n})):a.createElement(m,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,c=new Array(o);c[0]=y;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[d]="string"==typeof e?e:r,c[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var a=n(87462),r=(n(67294),n(3905));const o={},c="Dynatrace",i={unversionedId:"configuration/connecting-to-data-stores/dynatrace",id:"configuration/connecting-to-data-stores/dynatrace",title:"Dynatrace",description:"If you want to use Dynatrace as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Dynatrace. And, you don't have to change your existing pipelines to do so.",source:"@site/docs/configuration/connecting-to-data-stores/dynatrace.md",sourceDirName:"configuration/connecting-to-data-stores",slug:"/configuration/connecting-to-data-stores/dynatrace",permalink:"/configuration/connecting-to-data-stores/dynatrace",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/connecting-to-data-stores/dynatrace.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Datadog",permalink:"/configuration/connecting-to-data-stores/datadog"},next:{title:"Elastic APM",permalink:"/configuration/connecting-to-data-stores/elasticapm"}},s={},l=[{value:"Configuring OpenTelemetry Collector to Send Traces to both Dynatrace and Tracetest",id:"configuring-opentelemetry-collector-to-send-traces-to-both-dynatrace-and-tracetest",level:2},{value:"Configure Tracetest to Use Dynatrace as a Trace Data Store",id:"configure-tracetest-to-use-dynatrace-as-a-trace-data-store",level:2},{value:"Connect Tracetest to Dynatrace with the Web UI",id:"connect-tracetest-to-dynatrace-with-the-web-ui",level:2},{value:"Connect Tracetest to Dynatrace with the CLI",id:"connect-tracetest-to-dynatrace-with-the-cli",level:2}],p={toc:l},d="wrapper";function u(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"dynatrace"},"Dynatrace"),(0,r.kt)("p",null,"If you want to use ",(0,r.kt)("a",{parentName:"p",href:"https://www.dynatrace.com/"},"Dynatrace")," as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Dynatrace. And, you don't have to change your existing pipelines to do so."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest with Dynatrace can be found in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,r.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,r.kt)("h2",{id:"configuring-opentelemetry-collector-to-send-traces-to-both-dynatrace-and-tracetest"},"Configuring OpenTelemetry Collector to Send Traces to both Dynatrace and Tracetest"),(0,r.kt)("p",null,"In your OpenTelemetry Collector config file:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"otlp/tracetest")),(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," to your Tracetest instance on port ",(0,r.kt)("inlineCode",{parentName:"li"},"4317"))),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"If you are running Tracetest with Docker, and Tracetest's service name is ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest"),", then the endpoint might look like this ",(0,r.kt)("inlineCode",{parentName:"p"},"http://tracetest:4317"))),(0,r.kt)("p",null,"Additionally, add another config:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"exporter")," to ",(0,r.kt)("inlineCode",{parentName:"li"},"otlphttp/dynatrace")),(0,r.kt)("li",{parentName:"ul"},"Set the ",(0,r.kt)("inlineCode",{parentName:"li"},"endpoint")," to your Dynatrace tenant and include the: ",(0,r.kt)("inlineCode",{parentName:"li"},"https://{your-environment-id}.live.dynatrace.com/api/v2/otlp"))),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# collector.config.yaml\n\n# If you already have receivers declared, you can just ignore\n# this one and still use yours instead.\nreceivers:\n otlp:\n protocols:\n grpc:\n http:\n\nprocessors:\n batch:\n timeout: 100ms\n\nexporters:\n logging:\n verbosity: detailed\n # OTLP for Tracetest\n otlp/tracetest:\n endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n # OTLP for Dynatrace\n otlphttp/dynatrace:\n endpoint: https://abc123.live.dynatrace.com/api/v2/otlp # Send traces to Dynatrace. Read more in docs here: https://www.dynatrace.com/support/help/extend-dynatrace/opentelemetry/collector#configuration\n headers:\n Authorization: "Api-Token dt0c01.sample.secret" # Requires "openTelemetryTrace.ingest" permission\nservice:\n pipelines:\n traces/tracetest: # Pipeline to send data to Tracetest\n receivers: [otlp]\n processors: [batch]\n exporters: [logging, otlp/tracetest]\n traces/Dynatrace: # Pipeline to send data to Dynatrace\n receivers: [otlp]\n processors: [batch]\n exporters: [logging, otlphttp/dynatrace]\n')),(0,r.kt)("h2",{id:"configure-tracetest-to-use-dynatrace-as-a-trace-data-store"},"Configure Tracetest to Use Dynatrace as a Trace Data Store"),(0,r.kt)("p",null,"Configure your Tracetest instance to expose an ",(0,r.kt)("inlineCode",{parentName:"p"},"otlp")," endpoint to make it aware it will receive traces from the OpenTelemetry Collector. This will expose Tracetest's trace receiver on port ",(0,r.kt)("inlineCode",{parentName:"p"},"4317"),"."),(0,r.kt)("h2",{id:"connect-tracetest-to-dynatrace-with-the-web-ui"},"Connect Tracetest to Dynatrace with the Web UI"),(0,r.kt)("p",null,"In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Dynatrace."),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Dynatrace",src:n(53761).Z,width:"2560",height:"1600"})),(0,r.kt)("h2",{id:"connect-tracetest-to-dynatrace-with-the-cli"},"Connect Tracetest to Dynatrace with the CLI"),(0,r.kt)("p",null,"Or, if you prefer using the CLI, you can use this file config."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Dynatrace pipeline\n type: dynatrace\n default: true\n")),(0,r.kt)("p",null,"Proceed to run this command in the terminal and specify the file above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")))}u.isMDXComponent=!0},53761:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/Dynatrace-settings-6a9e99866d9a2b96b291819c73d47eeb.png"}}]); \ No newline at end of file diff --git a/assets/js/482c184d.c46a163d.js b/assets/js/482c184d.c46a163d.js new file mode 100644 index 0000000000..eb9fe7e77d --- /dev/null +++ b/assets/js/482c184d.c46a163d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8106],{3905:(e,r,t)=>{t.d(r,{Zo:()=>u,kt:()=>g});var n=t(67294);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var f=n.createContext({}),l=function(e){var r=n.useContext(f),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},u=function(e){var r=l(e.components);return n.createElement(f.Provider,{value:r},e.children)},p="mdxType",s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},m=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,c=e.originalType,f=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),p=l(t),m=o,g=p["".concat(f,".").concat(m)]||p[m]||s[m]||c;return t?n.createElement(g,i(i({ref:r},u),{},{components:t})):n.createElement(g,i({ref:r},u))}));function g(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var c=t.length,i=new Array(c);i[0]=m;var a={};for(var f in r)hasOwnProperty.call(r,f)&&(a[f]=r[f]);a.originalType=e,a[p]="string"==typeof e?e:o,i[1]=a;for(var l=2;l{t.r(r),t.d(r,{assets:()=>f,contentTitle:()=>i,default:()=>s,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var n=t(87462),o=(t(67294),t(3905));const c={},i=void 0,a={unversionedId:"configuration/config-file-reference",id:"configuration/config-file-reference",title:"config-file-reference",description:"",source:"@site/docs/configuration/config-file-reference.md",sourceDirName:"configuration",slug:"/configuration/config-file-reference",permalink:"/configuration/config-file-reference",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/config-file-reference.md",tags:[],version:"current",frontMatter:{}},f={},l=[],u={toc:l},p="wrapper";function s(e){let{components:r,...t}=e;return(0,o.kt)(p,(0,n.Z)({},u,t,{components:r,mdxType:"MDXLayout"}))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/487.d15b7a8e.js b/assets/js/487.d15b7a8e.js new file mode 100644 index 0000000000..ac33b854d7 --- /dev/null +++ b/assets/js/487.d15b7a8e.js @@ -0,0 +1,7371 @@ +exports.id = 487; +exports.ids = [487]; +exports.modules = { + +/***/ 17295: +/***/ ((module) => { + +(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=undefined;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=undefined,i=0;i 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, + defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt, + _ref$algorithms = _ref.algorithms, + algorithms = _ref$algorithms === undefined ? ['layered', 'stress', 'mrtree', 'radial', 'force', 'disco', 'sporeOverlap', 'sporeCompaction', 'rectpacking'] : _ref$algorithms, + workerFactory = _ref.workerFactory, + workerUrl = _ref.workerUrl; + + _classCallCheck(this, ELK); + + this.defaultLayoutOptions = defaultLayoutOptions; + this.initialized = false; + + // check valid worker construction possible + if (typeof workerUrl === 'undefined' && typeof workerFactory === 'undefined') { + throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); + } + var factory = workerFactory; + if (typeof workerUrl !== 'undefined' && typeof workerFactory === 'undefined') { + // use default Web Worker + factory = function factory(url) { + return new Worker(url); + }; + } + + // create the worker + var worker = factory(workerUrl); + if (typeof worker.postMessage !== 'function') { + throw new TypeError("Created worker does not provide" + " the required 'postMessage' function."); + } + + // wrap the worker to return promises + this.worker = new PromisedWorker(worker); + + // initially register algorithms + this.worker.postMessage({ + cmd: 'register', + algorithms: algorithms + }).then(function (r) { + return _this.initialized = true; + }).catch(console.err); + } + + _createClass(ELK, [{ + key: 'layout', + value: function layout(graph) { + var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref2$layoutOptions = _ref2.layoutOptions, + layoutOptions = _ref2$layoutOptions === undefined ? this.defaultLayoutOptions : _ref2$layoutOptions, + _ref2$logging = _ref2.logging, + logging = _ref2$logging === undefined ? false : _ref2$logging, + _ref2$measureExecutio = _ref2.measureExecutionTime, + measureExecutionTime = _ref2$measureExecutio === undefined ? false : _ref2$measureExecutio; + + if (!graph) { + return Promise.reject(new Error("Missing mandatory parameter 'graph'.")); + } + return this.worker.postMessage({ + cmd: 'layout', + graph: graph, + layoutOptions: layoutOptions, + options: { + logging: logging, + measureExecutionTime: measureExecutionTime + } + }); + } + }, { + key: 'knownLayoutAlgorithms', + value: function knownLayoutAlgorithms() { + return this.worker.postMessage({ cmd: 'algorithms' }); + } + }, { + key: 'knownLayoutOptions', + value: function knownLayoutOptions() { + return this.worker.postMessage({ cmd: 'options' }); + } + }, { + key: 'knownLayoutCategories', + value: function knownLayoutCategories() { + return this.worker.postMessage({ cmd: 'categories' }); + } + }, { + key: 'terminateWorker', + value: function terminateWorker() { + this.worker.terminate(); + } + }]); + + return ELK; +}(); + +exports.default = ELK; + +var PromisedWorker = function () { + function PromisedWorker(worker) { + var _this2 = this; + + _classCallCheck(this, PromisedWorker); + + if (worker === undefined) { + throw new Error("Missing mandatory parameter 'worker'."); + } + this.resolvers = {}; + this.worker = worker; + this.worker.onmessage = function (answer) { + // why is this necessary? + setTimeout(function () { + _this2.receive(_this2, answer); + }, 0); + }; + } + + _createClass(PromisedWorker, [{ + key: 'postMessage', + value: function postMessage(msg) { + var id = this.id || 0; + this.id = id + 1; + msg.id = id; + var self = this; + return new Promise(function (resolve, reject) { + // prepare the resolver + self.resolvers[id] = function (err, res) { + if (err) { + self.convertGwtStyleError(err); + reject(err); + } else { + resolve(res); + } + }; + // post the message + self.worker.postMessage(msg); + }); + } + }, { + key: 'receive', + value: function receive(self, answer) { + var json = answer.data; + var resolver = self.resolvers[json.id]; + if (resolver) { + delete self.resolvers[json.id]; + if (json.error) { + resolver(json.error); + } else { + resolver(null, json.data); + } + } + } + }, { + key: 'terminate', + value: function terminate() { + if (this.worker.terminate) { + this.worker.terminate(); + } + } + }, { + key: 'convertGwtStyleError', + value: function convertGwtStyleError(err) { + if (!err) { + return; + } + // Somewhat flatten the way GWT stores nested exception(s) + var javaException = err['__java$exception']; + if (javaException) { + // Note that the property name of the nested exception is different + // in the non-minified ('cause') and the minified (not deterministic) version. + // Hence, the version below only works for the non-minified version. + // However, as the minified stack trace is not of much use anyway, one + // should switch the used version for debugging in such a case. + if (javaException.cause && javaException.cause.backingJsObject) { + err.cause = javaException.cause.backingJsObject; + this.convertGwtStyleError(err.cause); + } + delete err['__java$exception']; + } + } + }]); + + return PromisedWorker; +}(); +},{}],2:[function(require,module,exports){ +(function (global){(function (){ +'use strict'; + +// -------------- FAKE ELEMENTS GWT ASSUMES EXIST -------------- +var $wnd; +if (typeof window !== 'undefined') + $wnd = window +else if (typeof global !== 'undefined') + $wnd = global // nodejs +else if (typeof self !== 'undefined') + $wnd = self // web worker + +var $moduleName, + $moduleBase; + +// -------------- WORKAROUND STRICT MODE, SEE #127 -------------- +var g, i, o; + +// -------------- GENERATED CODE -------------- +function nb(){} +function xb(){} +function Fd(){} +function $g(){} +function _p(){} +function yq(){} +function Sq(){} +function Es(){} +function Jw(){} +function Vw(){} +function VA(){} +function dA(){} +function MA(){} +function PA(){} +function PB(){} +function bx(){} +function cx(){} +function vy(){} +function Nz(){} +function Yz(){} +function Ylb(){} +function Ymb(){} +function xmb(){} +function Fmb(){} +function Qmb(){} +function gcb(){} +function ccb(){} +function jcb(){} +function jtb(){} +function otb(){} +function qtb(){} +function _fb(){} +function bpb(){} +function kpb(){} +function ppb(){} +function Gpb(){} +function drb(){} +function dzb(){} +function fzb(){} +function fxb(){} +function Vxb(){} +function Ovb(){} +function byb(){} +function zyb(){} +function Zyb(){} +function _yb(){} +function hzb(){} +function jzb(){} +function lzb(){} +function nzb(){} +function rzb(){} +function zzb(){} +function Czb(){} +function Ezb(){} +function Gzb(){} +function Izb(){} +function Mzb(){} +function bBb(){} +function NBb(){} +function PBb(){} +function RBb(){} +function iCb(){} +function OCb(){} +function SCb(){} +function GDb(){} +function JDb(){} +function fEb(){} +function xEb(){} +function CEb(){} +function GEb(){} +function yFb(){} +function KGb(){} +function tIb(){} +function vIb(){} +function xIb(){} +function zIb(){} +function OIb(){} +function SIb(){} +function TJb(){} +function VJb(){} +function XJb(){} +function XKb(){} +function fKb(){} +function VKb(){} +function VLb(){} +function jLb(){} +function nLb(){} +function GLb(){} +function KLb(){} +function MLb(){} +function OLb(){} +function RLb(){} +function YLb(){} +function bMb(){} +function gMb(){} +function lMb(){} +function pMb(){} +function wMb(){} +function zMb(){} +function CMb(){} +function FMb(){} +function LMb(){} +function zNb(){} +function PNb(){} +function kOb(){} +function pOb(){} +function tOb(){} +function yOb(){} +function FOb(){} +function GPb(){} +function aQb(){} +function cQb(){} +function eQb(){} +function gQb(){} +function iQb(){} +function CQb(){} +function MQb(){} +function OQb(){} +function ASb(){} +function fTb(){} +function kTb(){} +function STb(){} +function fUb(){} +function DUb(){} +function VUb(){} +function YUb(){} +function _Ub(){} +function _Wb(){} +function QWb(){} +function XWb(){} +function jVb(){} +function DVb(){} +function VVb(){} +function $Vb(){} +function dXb(){} +function hXb(){} +function lXb(){} +function gYb(){} +function HYb(){} +function SYb(){} +function VYb(){} +function dZb(){} +function P$b(){} +function T$b(){} +function h1b(){} +function m1b(){} +function q1b(){} +function u1b(){} +function y1b(){} +function C1b(){} +function e2b(){} +function g2b(){} +function m2b(){} +function q2b(){} +function u2b(){} +function S2b(){} +function U2b(){} +function W2b(){} +function _2b(){} +function e3b(){} +function h3b(){} +function p3b(){} +function t3b(){} +function w3b(){} +function y3b(){} +function A3b(){} +function M3b(){} +function Q3b(){} +function U3b(){} +function Y3b(){} +function l4b(){} +function q4b(){} +function s4b(){} +function u4b(){} +function w4b(){} +function y4b(){} +function L4b(){} +function N4b(){} +function P4b(){} +function R4b(){} +function T4b(){} +function X4b(){} +function I5b(){} +function Q5b(){} +function T5b(){} +function Z5b(){} +function l6b(){} +function o6b(){} +function t6b(){} +function z6b(){} +function L6b(){} +function M6b(){} +function P6b(){} +function X6b(){} +function $6b(){} +function a7b(){} +function c7b(){} +function g7b(){} +function j7b(){} +function m7b(){} +function r7b(){} +function x7b(){} +function D7b(){} +function D9b(){} +function b9b(){} +function h9b(){} +function j9b(){} +function l9b(){} +function w9b(){} +function F9b(){} +function hac(){} +function jac(){} +function pac(){} +function uac(){} +function Iac(){} +function Kac(){} +function Sac(){} +function obc(){} +function rbc(){} +function vbc(){} +function Fbc(){} +function Jbc(){} +function Xbc(){} +function ccc(){} +function fcc(){} +function lcc(){} +function occ(){} +function tcc(){} +function ycc(){} +function Acc(){} +function Ccc(){} +function Ecc(){} +function Gcc(){} +function Zcc(){} +function _cc(){} +function bdc(){} +function fdc(){} +function jdc(){} +function pdc(){} +function sdc(){} +function ydc(){} +function Adc(){} +function Cdc(){} +function Edc(){} +function Idc(){} +function Ndc(){} +function Qdc(){} +function Sdc(){} +function Udc(){} +function Wdc(){} +function Ydc(){} +function aec(){} +function hec(){} +function jec(){} +function lec(){} +function nec(){} +function uec(){} +function wec(){} +function yec(){} +function Aec(){} +function Fec(){} +function Jec(){} +function Lec(){} +function Nec(){} +function Rec(){} +function Uec(){} +function Zec(){} +function Zfc(){} +function lfc(){} +function tfc(){} +function xfc(){} +function zfc(){} +function Ffc(){} +function Jfc(){} +function Nfc(){} +function Pfc(){} +function Vfc(){} +function _fc(){} +function fgc(){} +function jgc(){} +function lgc(){} +function Bgc(){} +function ehc(){} +function ghc(){} +function ihc(){} +function khc(){} +function mhc(){} +function ohc(){} +function qhc(){} +function yhc(){} +function Ahc(){} +function Ghc(){} +function Ihc(){} +function Khc(){} +function Mhc(){} +function Shc(){} +function Uhc(){} +function Whc(){} +function dic(){} +function dlc(){} +function blc(){} +function flc(){} +function hlc(){} +function jlc(){} +function Glc(){} +function Ilc(){} +function Klc(){} +function Mlc(){} +function Mjc(){} +function Qjc(){} +function Qlc(){} +function Ulc(){} +function Ylc(){} +function Lkc(){} +function Nkc(){} +function Pkc(){} +function Rkc(){} +function Xkc(){} +function _kc(){} +function gmc(){} +function kmc(){} +function zmc(){} +function Fmc(){} +function Wmc(){} +function $mc(){} +function anc(){} +function mnc(){} +function wnc(){} +function Hnc(){} +function Jnc(){} +function Lnc(){} +function Nnc(){} +function Pnc(){} +function Ync(){} +function eoc(){} +function Aoc(){} +function Coc(){} +function Eoc(){} +function Joc(){} +function Loc(){} +function Zoc(){} +function _oc(){} +function bpc(){} +function hpc(){} +function kpc(){} +function ppc(){} +function pFc(){} +function Ryc(){} +function QCc(){} +function PDc(){} +function xGc(){} +function HGc(){} +function JGc(){} +function NGc(){} +function GIc(){} +function iKc(){} +function mKc(){} +function wKc(){} +function yKc(){} +function AKc(){} +function EKc(){} +function KKc(){} +function OKc(){} +function QKc(){} +function SKc(){} +function UKc(){} +function YKc(){} +function aLc(){} +function fLc(){} +function hLc(){} +function nLc(){} +function pLc(){} +function tLc(){} +function vLc(){} +function zLc(){} +function BLc(){} +function DLc(){} +function FLc(){} +function sMc(){} +function JMc(){} +function hNc(){} +function RNc(){} +function ZNc(){} +function _Nc(){} +function bOc(){} +function dOc(){} +function fOc(){} +function hOc(){} +function hRc(){} +function jRc(){} +function KRc(){} +function NRc(){} +function NQc(){} +function LQc(){} +function _Qc(){} +function cPc(){} +function iPc(){} +function kPc(){} +function mPc(){} +function xPc(){} +function zPc(){} +function zSc(){} +function BSc(){} +function GSc(){} +function ISc(){} +function NSc(){} +function TSc(){} +function NTc(){} +function NVc(){} +function oVc(){} +function SVc(){} +function VVc(){} +function XVc(){} +function ZVc(){} +function bWc(){} +function bXc(){} +function CXc(){} +function FXc(){} +function IXc(){} +function MXc(){} +function UXc(){} +function bYc(){} +function fYc(){} +function oYc(){} +function qYc(){} +function uYc(){} +function pZc(){} +function G$c(){} +function h0c(){} +function N0c(){} +function k1c(){} +function I1c(){} +function Q1c(){} +function f2c(){} +function i2c(){} +function k2c(){} +function w2c(){} +function O2c(){} +function S2c(){} +function Z2c(){} +function v3c(){} +function x3c(){} +function R3c(){} +function U3c(){} +function e4c(){} +function w4c(){} +function x4c(){} +function z4c(){} +function B4c(){} +function D4c(){} +function F4c(){} +function H4c(){} +function J4c(){} +function L4c(){} +function N4c(){} +function P4c(){} +function R4c(){} +function T4c(){} +function V4c(){} +function X4c(){} +function Z4c(){} +function _4c(){} +function _7c(){} +function b5c(){} +function d5c(){} +function f5c(){} +function h5c(){} +function H5c(){} +function Hfd(){} +function Zfd(){} +function Zed(){} +function ged(){} +function Jed(){} +function Ned(){} +function Red(){} +function Ved(){} +function bbd(){} +function mdd(){} +function _fd(){} +function fgd(){} +function kgd(){} +function Mgd(){} +function Ahd(){} +function Ald(){} +function Tld(){} +function xkd(){} +function rmd(){} +function knd(){} +function Jod(){} +function JCd(){} +function Bpd(){} +function BFd(){} +function oFd(){} +function bqd(){} +function bvd(){} +function jvd(){} +function yud(){} +function Hxd(){} +function EBd(){} +function aDd(){} +function MGd(){} +function vHd(){} +function RHd(){} +function wNd(){} +function zNd(){} +function CNd(){} +function KNd(){} +function XNd(){} +function $Nd(){} +function HPd(){} +function lUd(){} +function XUd(){} +function DWd(){} +function GWd(){} +function JWd(){} +function MWd(){} +function PWd(){} +function SWd(){} +function VWd(){} +function YWd(){} +function _Wd(){} +function xYd(){} +function BYd(){} +function mZd(){} +function EZd(){} +function GZd(){} +function JZd(){} +function MZd(){} +function PZd(){} +function SZd(){} +function VZd(){} +function YZd(){} +function _Zd(){} +function c$d(){} +function f$d(){} +function i$d(){} +function l$d(){} +function o$d(){} +function r$d(){} +function u$d(){} +function x$d(){} +function A$d(){} +function D$d(){} +function G$d(){} +function J$d(){} +function M$d(){} +function P$d(){} +function S$d(){} +function V$d(){} +function Y$d(){} +function _$d(){} +function c_d(){} +function f_d(){} +function i_d(){} +function l_d(){} +function o_d(){} +function r_d(){} +function u_d(){} +function x_d(){} +function A_d(){} +function D_d(){} +function G_d(){} +function J_d(){} +function M_d(){} +function P_d(){} +function S_d(){} +function V_d(){} +function Y_d(){} +function h5d(){} +function U6d(){} +function U9d(){} +function _8d(){} +function fae(){} +function hae(){} +function kae(){} +function nae(){} +function qae(){} +function tae(){} +function wae(){} +function zae(){} +function Cae(){} +function Fae(){} +function Iae(){} +function Lae(){} +function Oae(){} +function Rae(){} +function Uae(){} +function Xae(){} +function $ae(){} +function bbe(){} +function ebe(){} +function hbe(){} +function kbe(){} +function nbe(){} +function qbe(){} +function tbe(){} +function wbe(){} +function zbe(){} +function Cbe(){} +function Fbe(){} +function Ibe(){} +function Lbe(){} +function Obe(){} +function Rbe(){} +function Ube(){} +function Xbe(){} +function $be(){} +function bce(){} +function ece(){} +function hce(){} +function kce(){} +function nce(){} +function qce(){} +function tce(){} +function wce(){} +function zce(){} +function Cce(){} +function Fce(){} +function Ice(){} +function Lce(){} +function Oce(){} +function Rce(){} +function Uce(){} +function Xce(){} +function ude(){} +function Vge(){} +function dhe(){} +function s_b(a){} +function jSd(a){} +function ol(){wb()} +function oPb(){nPb()} +function EPb(){CPb()} +function gFb(){fFb()} +function TRb(){SRb()} +function ySb(){wSb()} +function PSb(){OSb()} +function dTb(){bTb()} +function i4b(){b4b()} +function D2b(){x2b()} +function J6b(){D6b()} +function u9b(){q9b()} +function $9b(){I9b()} +function Umc(){Imc()} +function abc(){Vac()} +function ZCc(){VCc()} +function kCc(){hCc()} +function rCc(){oCc()} +function Tcc(){Occ()} +function xkc(){gkc()} +function xDc(){rDc()} +function iDc(){cDc()} +function kwc(){jwc()} +function tJc(){jJc()} +function dJc(){aJc()} +function Pyc(){Nyc()} +function VBc(){SBc()} +function CFc(){yFc()} +function CUc(){wUc()} +function lUc(){fUc()} +function sUc(){pUc()} +function IUc(){GUc()} +function IWc(){HWc()} +function _Wc(){ZWc()} +function fHc(){dHc()} +function f0c(){d0c()} +function B0c(){A0c()} +function L0c(){J0c()} +function LTc(){JTc()} +function sTc(){rTc()} +function KLc(){ILc()} +function wNc(){tNc()} +function PYc(){OYc()} +function nZc(){lZc()} +function q3c(){p3c()} +function Z7c(){X7c()} +function Z9c(){Y9c()} +function _ad(){Zad()} +function kdd(){idd()} +function $md(){Smd()} +function HGd(){tGd()} +function hLd(){NKd()} +function J6d(){Uge()} +function Mvb(a){uCb(a)} +function Yb(a){this.a=a} +function cc(a){this.a=a} +function cj(a){this.a=a} +function ij(a){this.a=a} +function Dj(a){this.a=a} +function df(a){this.a=a} +function kf(a){this.a=a} +function ah(a){this.a=a} +function lh(a){this.a=a} +function th(a){this.a=a} +function Ph(a){this.a=a} +function vi(a){this.a=a} +function Ci(a){this.a=a} +function Fk(a){this.a=a} +function Ln(a){this.a=a} +function ap(a){this.a=a} +function zp(a){this.a=a} +function Yp(a){this.a=a} +function qq(a){this.a=a} +function Dq(a){this.a=a} +function wr(a){this.a=a} +function Ir(a){this.b=a} +function sj(a){this.c=a} +function sw(a){this.a=a} +function fw(a){this.a=a} +function xw(a){this.a=a} +function Cw(a){this.a=a} +function Qw(a){this.a=a} +function Rw(a){this.a=a} +function Xw(a){this.a=a} +function Xv(a){this.a=a} +function Sv(a){this.a=a} +function eu(a){this.a=a} +function Zx(a){this.a=a} +function _x(a){this.a=a} +function xy(a){this.a=a} +function xB(a){this.a=a} +function HB(a){this.a=a} +function TB(a){this.a=a} +function fC(a){this.a=a} +function wB(){this.a=[]} +function MBb(a,b){a.a=b} +function w_b(a,b){a.a=b} +function x_b(a,b){a.b=b} +function YOb(a,b){a.b=b} +function $Ob(a,b){a.b=b} +function ZGb(a,b){a.j=b} +function qNb(a,b){a.g=b} +function rNb(a,b){a.i=b} +function dRb(a,b){a.c=b} +function eRb(a,b){a.d=b} +function z_b(a,b){a.d=b} +function y_b(a,b){a.c=b} +function __b(a,b){a.k=b} +function E0b(a,b){a.c=b} +function njc(a,b){a.c=b} +function mjc(a,b){a.a=b} +function dFc(a,b){a.a=b} +function eFc(a,b){a.f=b} +function nOc(a,b){a.a=b} +function oOc(a,b){a.b=b} +function pOc(a,b){a.d=b} +function qOc(a,b){a.i=b} +function rOc(a,b){a.o=b} +function sOc(a,b){a.r=b} +function $Pc(a,b){a.a=b} +function _Pc(a,b){a.b=b} +function DVc(a,b){a.e=b} +function EVc(a,b){a.f=b} +function FVc(a,b){a.g=b} +function SZc(a,b){a.e=b} +function TZc(a,b){a.f=b} +function c$c(a,b){a.f=b} +function bJd(a,b){a.n=b} +function A1d(a,b){a.a=b} +function J1d(a,b){a.a=b} +function B1d(a,b){a.c=b} +function K1d(a,b){a.c=b} +function L1d(a,b){a.d=b} +function M1d(a,b){a.e=b} +function N1d(a,b){a.g=b} +function d2d(a,b){a.a=b} +function e2d(a,b){a.c=b} +function f2d(a,b){a.d=b} +function g2d(a,b){a.e=b} +function h2d(a,b){a.f=b} +function i2d(a,b){a.j=b} +function Z8d(a,b){a.a=b} +function $8d(a,b){a.b=b} +function g9d(a,b){a.a=b} +function Cic(a){a.b=a.a} +function Dg(a){a.c=a.d.d} +function vib(a){this.d=a} +function eib(a){this.a=a} +function Pib(a){this.a=a} +function Vib(a){this.a=a} +function $ib(a){this.a=a} +function mcb(a){this.a=a} +function Mcb(a){this.a=a} +function Xcb(a){this.a=a} +function Ndb(a){this.a=a} +function _db(a){this.a=a} +function teb(a){this.a=a} +function Qeb(a){this.a=a} +function djb(a){this.a=a} +function Gjb(a){this.a=a} +function Njb(a){this.a=a} +function Bjb(a){this.b=a} +function lnb(a){this.b=a} +function Dnb(a){this.b=a} +function anb(a){this.a=a} +function Mob(a){this.a=a} +function Rob(a){this.a=a} +function iob(a){this.c=a} +function olb(a){this.c=a} +function qub(a){this.c=a} +function Tub(a){this.a=a} +function Vub(a){this.a=a} +function Xub(a){this.a=a} +function Zub(a){this.a=a} +function tpb(a){this.a=a} +function _pb(a){this.a=a} +function Wqb(a){this.a=a} +function nsb(a){this.a=a} +function Rxb(a){this.a=a} +function Txb(a){this.a=a} +function Xxb(a){this.a=a} +function bzb(a){this.a=a} +function tzb(a){this.a=a} +function vzb(a){this.a=a} +function xzb(a){this.a=a} +function Kzb(a){this.a=a} +function Ozb(a){this.a=a} +function iAb(a){this.a=a} +function kAb(a){this.a=a} +function mAb(a){this.a=a} +function BAb(a){this.a=a} +function hBb(a){this.a=a} +function jBb(a){this.a=a} +function nBb(a){this.a=a} +function TBb(a){this.a=a} +function XBb(a){this.a=a} +function QCb(a){this.a=a} +function WCb(a){this.a=a} +function _Cb(a){this.a=a} +function dEb(a){this.a=a} +function QGb(a){this.a=a} +function YGb(a){this.a=a} +function tKb(a){this.a=a} +function CLb(a){this.a=a} +function JMb(a){this.a=a} +function RNb(a){this.a=a} +function kQb(a){this.a=a} +function mQb(a){this.a=a} +function FQb(a){this.a=a} +function ETb(a){this.a=a} +function UTb(a){this.a=a} +function dUb(a){this.a=a} +function hUb(a){this.a=a} +function EZb(a){this.a=a} +function j$b(a){this.a=a} +function v$b(a){this.e=a} +function J0b(a){this.a=a} +function M0b(a){this.a=a} +function R0b(a){this.a=a} +function U0b(a){this.a=a} +function i2b(a){this.a=a} +function k2b(a){this.a=a} +function o2b(a){this.a=a} +function s2b(a){this.a=a} +function G2b(a){this.a=a} +function I2b(a){this.a=a} +function K2b(a){this.a=a} +function M2b(a){this.a=a} +function W3b(a){this.a=a} +function $3b(a){this.a=a} +function V4b(a){this.a=a} +function u5b(a){this.a=a} +function A7b(a){this.a=a} +function G7b(a){this.a=a} +function J7b(a){this.a=a} +function M7b(a){this.a=a} +function Mbc(a){this.a=a} +function Pbc(a){this.a=a} +function lac(a){this.a=a} +function nac(a){this.a=a} +function qcc(a){this.a=a} +function Gdc(a){this.a=a} +function $dc(a){this.a=a} +function cec(a){this.a=a} +function _ec(a){this.a=a} +function pfc(a){this.a=a} +function Bfc(a){this.a=a} +function Lfc(a){this.a=a} +function ygc(a){this.a=a} +function Dgc(a){this.a=a} +function shc(a){this.a=a} +function uhc(a){this.a=a} +function whc(a){this.a=a} +function Chc(a){this.a=a} +function Ehc(a){this.a=a} +function Ohc(a){this.a=a} +function Yhc(a){this.a=a} +function Tkc(a){this.a=a} +function Vkc(a){this.a=a} +function Olc(a){this.a=a} +function pnc(a){this.a=a} +function rnc(a){this.a=a} +function dpc(a){this.a=a} +function fpc(a){this.a=a} +function GCc(a){this.a=a} +function KCc(a){this.a=a} +function mDc(a){this.a=a} +function jEc(a){this.a=a} +function HEc(a){this.a=a} +function FEc(a){this.c=a} +function qoc(a){this.b=a} +function bFc(a){this.a=a} +function GFc(a){this.a=a} +function iGc(a){this.a=a} +function kGc(a){this.a=a} +function mGc(a){this.a=a} +function $Gc(a){this.a=a} +function hIc(a){this.a=a} +function lIc(a){this.a=a} +function pIc(a){this.a=a} +function tIc(a){this.a=a} +function xIc(a){this.a=a} +function zIc(a){this.a=a} +function CIc(a){this.a=a} +function LIc(a){this.a=a} +function CKc(a){this.a=a} +function IKc(a){this.a=a} +function MKc(a){this.a=a} +function $Kc(a){this.a=a} +function cLc(a){this.a=a} +function jLc(a){this.a=a} +function rLc(a){this.a=a} +function xLc(a){this.a=a} +function OMc(a){this.a=a} +function ZOc(a){this.a=a} +function ZRc(a){this.a=a} +function aSc(a){this.a=a} +function I$c(a){this.a=a} +function K$c(a){this.a=a} +function M$c(a){this.a=a} +function O$c(a){this.a=a} +function U$c(a){this.a=a} +function n1c(a){this.a=a} +function z1c(a){this.a=a} +function B1c(a){this.a=a} +function Q2c(a){this.a=a} +function U2c(a){this.a=a} +function z3c(a){this.a=a} +function med(a){this.a=a} +function Xed(a){this.a=a} +function _ed(a){this.a=a} +function Qfd(a){this.a=a} +function Bgd(a){this.a=a} +function $gd(a){this.a=a} +function lrd(a){this.a=a} +function urd(a){this.a=a} +function vrd(a){this.a=a} +function wrd(a){this.a=a} +function xrd(a){this.a=a} +function yrd(a){this.a=a} +function zrd(a){this.a=a} +function Ard(a){this.a=a} +function Brd(a){this.a=a} +function Crd(a){this.a=a} +function Ird(a){this.a=a} +function Krd(a){this.a=a} +function Lrd(a){this.a=a} +function Mrd(a){this.a=a} +function Nrd(a){this.a=a} +function Prd(a){this.a=a} +function Srd(a){this.a=a} +function Yrd(a){this.a=a} +function Zrd(a){this.a=a} +function _rd(a){this.a=a} +function asd(a){this.a=a} +function bsd(a){this.a=a} +function csd(a){this.a=a} +function dsd(a){this.a=a} +function msd(a){this.a=a} +function osd(a){this.a=a} +function qsd(a){this.a=a} +function ssd(a){this.a=a} +function Wsd(a){this.a=a} +function Lsd(a){this.b=a} +function thd(a){this.f=a} +function qtd(a){this.a=a} +function yBd(a){this.a=a} +function GBd(a){this.a=a} +function MBd(a){this.a=a} +function SBd(a){this.a=a} +function iCd(a){this.a=a} +function YMd(a){this.a=a} +function GNd(a){this.a=a} +function EPd(a){this.a=a} +function EQd(a){this.a=a} +function NTd(a){this.a=a} +function qOd(a){this.b=a} +function lVd(a){this.c=a} +function VVd(a){this.e=a} +function iYd(a){this.a=a} +function RYd(a){this.a=a} +function ZYd(a){this.a=a} +function z0d(a){this.a=a} +function O0d(a){this.a=a} +function s0d(a){this.d=a} +function W5d(a){this.a=a} +function cge(a){this.a=a} +function xfe(a){this.e=a} +function Tfd(){this.a=0} +function jkb(){Vjb(this)} +function Rkb(){Ckb(this)} +function Lqb(){Uhb(this)} +function lEb(){kEb(this)} +function A_b(){s_b(this)} +function UQd(){this.c=FQd} +function v6d(a,b){b.Wb(a)} +function moc(a,b){a.b+=b} +function yXb(a){a.b=new Ji} +function vbb(a){return a.e} +function DB(a){return a.a} +function LB(a){return a.a} +function ZB(a){return a.a} +function lC(a){return a.a} +function EC(a){return a.a} +function wC(){return null} +function SB(){return null} +function hcb(){mvd();ovd()} +function zJb(a){a.b.tf(a.e)} +function j5b(a,b){a.b=b-a.b} +function g5b(a,b){a.a=b-a.a} +function PXc(a,b){b.ad(a.a)} +function plc(a,b){G0b(b,a)} +function hp(a,b,c){a.Od(c,b)} +function As(a,b){a.e=b;b.b=a} +function Zl(a){Ql();this.a=a} +function jq(a){Ql();this.a=a} +function sq(a){Ql();this.a=a} +function Fq(a){im();this.a=a} +function Sz(a){Rz();Qz.be(a)} +function gz(){Xy.call(this)} +function xcb(){Xy.call(this)} +function pcb(){gz.call(this)} +function tcb(){gz.call(this)} +function Bdb(){gz.call(this)} +function Vdb(){gz.call(this)} +function Ydb(){gz.call(this)} +function Geb(){gz.call(this)} +function bgb(){gz.call(this)} +function Apb(){gz.call(this)} +function Jpb(){gz.call(this)} +function utb(){gz.call(this)} +function x2c(){gz.call(this)} +function rQd(){this.a=this} +function MPd(){this.Bb|=256} +function tTb(){this.b=new mt} +function fA(){fA=ccb;new Lqb} +function rcb(){pcb.call(this)} +function dCb(a,b){a.length=b} +function Tvb(a,b){Ekb(a.a,b)} +function sKb(a,b){UHb(a.c,b)} +function SMc(a,b){Qqb(a.b,b)} +function vBd(a,b){uAd(a.a,b)} +function wBd(a,b){vAd(a.a,b)} +function GLd(a,b){Uhd(a.e,b)} +function d7d(a){D2d(a.c,a.b)} +function mj(a,b){a.kc().Nb(b)} +function Odb(a){this.a=Tdb(a)} +function Tqb(){this.a=new Lqb} +function gyb(){this.a=new Lqb} +function Wvb(){this.a=new Rkb} +function KFb(){this.a=new Rkb} +function PFb(){this.a=new Rkb} +function FFb(){this.a=new yFb} +function pGb(){this.a=new MFb} +function ZQb(){this.a=new MQb} +function Gxb(){this.a=new Pwb} +function jUb(){this.a=new PTb} +function sDb(){this.a=new oDb} +function zDb(){this.a=new tDb} +function CWb(){this.a=new Rkb} +function HXb(){this.a=new Rkb} +function nYb(){this.a=new Rkb} +function BYb(){this.a=new Rkb} +function fLb(){this.d=new Rkb} +function vYb(){this.a=new Tqb} +function a2b(){this.a=new Lqb} +function wZb(){this.b=new Lqb} +function TCc(){this.b=new Rkb} +function zJc(){this.e=new Rkb} +function uMc(){this.d=new Rkb} +function wdc(){this.a=new xkc} +function vKc(){Rkb.call(this)} +function twb(){Wvb.call(this)} +function oHb(){$Gb.call(this)} +function LXb(){HXb.call(this)} +function L_b(){H_b.call(this)} +function H_b(){A_b.call(this)} +function p0b(){A_b.call(this)} +function s0b(){p0b.call(this)} +function WMc(){VMc.call(this)} +function bNc(){VMc.call(this)} +function EPc(){CPc.call(this)} +function JPc(){CPc.call(this)} +function OPc(){CPc.call(this)} +function w1c(){s1c.call(this)} +function s7c(){Psb.call(this)} +function apd(){Ald.call(this)} +function ppd(){Ald.call(this)} +function lDd(){YCd.call(this)} +function NDd(){YCd.call(this)} +function mFd(){Lqb.call(this)} +function vFd(){Lqb.call(this)} +function GFd(){Lqb.call(this)} +function KPd(){Tqb.call(this)} +function OJd(){hJd.call(this)} +function aQd(){MPd.call(this)} +function SSd(){FId.call(this)} +function rUd(){FId.call(this)} +function oUd(){Lqb.call(this)} +function NYd(){Lqb.call(this)} +function cZd(){Lqb.call(this)} +function R8d(){MGd.call(this)} +function o9d(){MGd.call(this)} +function i9d(){R8d.call(this)} +function hee(){ude.call(this)} +function Dd(a){yd.call(this,a)} +function Hd(a){yd.call(this,a)} +function ph(a){lh.call(this,a)} +function Sh(a){Wc.call(this,a)} +function oi(a){Sh.call(this,a)} +function Ii(a){Wc.call(this,a)} +function Zdd(){this.a=new Psb} +function CPc(){this.a=new Tqb} +function s1c(){this.a=new Lqb} +function QSc(){this.a=new Rkb} +function D2c(){this.j=new Rkb} +function QXc(){this.a=new UXc} +function e_c(){this.a=new d_c} +function YCd(){this.a=new aDd} +function _k(){_k=ccb;$k=new al} +function Lk(){Lk=ccb;Kk=new Mk} +function wb(){wb=ccb;vb=new xb} +function hs(){hs=ccb;gs=new is} +function rs(a){Sh.call(this,a)} +function Gp(a){Sh.call(this,a)} +function xp(a){Lo.call(this,a)} +function Ep(a){Lo.call(this,a)} +function Tp(a){Wn.call(this,a)} +function wx(a){un.call(this,a)} +function ov(a){dv.call(this,a)} +function Mv(a){Br.call(this,a)} +function Ov(a){Br.call(this,a)} +function Lw(a){Br.call(this,a)} +function hz(a){Yy.call(this,a)} +function MB(a){hz.call(this,a)} +function eC(){fC.call(this,{})} +function Ftb(a){Atb();this.a=a} +function zwb(a){a.b=null;a.c=0} +function Vy(a,b){a.e=b;Sy(a,b)} +function LVb(a,b){a.a=b;NVb(a)} +function lIb(a,b,c){a.a[b.g]=c} +function vfd(a,b,c){Dfd(c,a,b)} +function Odc(a,b){rjc(b.i,a.n)} +function Wyc(a,b){Xyc(a).td(b)} +function ERb(a,b){return a*a/b} +function Xr(a,b){return a.g-b.g} +function tC(a){return new TB(a)} +function vC(a){return new yC(a)} +function ocb(a){hz.call(this,a)} +function qcb(a){hz.call(this,a)} +function ucb(a){hz.call(this,a)} +function vcb(a){Yy.call(this,a)} +function fGc(a){LFc();this.a=a} +function c0d(a){kzd();this.a=a} +function bhd(a){Rgd();this.f=a} +function dhd(a){Rgd();this.f=a} +function Cdb(a){hz.call(this,a)} +function Wdb(a){hz.call(this,a)} +function Zdb(a){hz.call(this,a)} +function Feb(a){hz.call(this,a)} +function Heb(a){hz.call(this,a)} +function Ccb(a){return uCb(a),a} +function Edb(a){return uCb(a),a} +function Gdb(a){return uCb(a),a} +function jfb(a){return uCb(a),a} +function tfb(a){return uCb(a),a} +function akb(a){return a.b==a.c} +function Hwb(a){return !!a&&a.b} +function pIb(a){return !!a&&a.k} +function qIb(a){return !!a&&a.j} +function amb(a){uCb(a);this.a=a} +function wVb(a){qVb(a);return a} +function Blb(a){Glb(a,a.length)} +function cgb(a){hz.call(this,a)} +function cqd(a){hz.call(this,a)} +function n8d(a){hz.call(this,a)} +function y2c(a){hz.call(this,a)} +function z2c(a){hz.call(this,a)} +function mde(a){hz.call(this,a)} +function pc(a){qc.call(this,a,0)} +function Ji(){Ki.call(this,12,3)} +function Kz(){Kz=ccb;Jz=new Nz} +function jz(){jz=ccb;iz=new nb} +function KA(){KA=ccb;JA=new MA} +function OB(){OB=ccb;NB=new PB} +function jc(){throw vbb(new bgb)} +function zh(){throw vbb(new bgb)} +function Pi(){throw vbb(new bgb)} +function Pj(){throw vbb(new bgb)} +function Qj(){throw vbb(new bgb)} +function Ym(){throw vbb(new bgb)} +function Gb(){this.a=GD(Qb(She))} +function oy(a){Ql();this.a=Qb(a)} +function Bs(a,b){a.Td(b);b.Sd(a)} +function iw(a,b){a.a.ec().Mc(b)} +function CYb(a,b,c){a.c.lf(b,c)} +function scb(a){qcb.call(this,a)} +function Oeb(a){Wdb.call(this,a)} +function Hfb(){mcb.call(this,'')} +function Ifb(){mcb.call(this,'')} +function Ufb(){mcb.call(this,'')} +function Vfb(){mcb.call(this,'')} +function Xfb(a){qcb.call(this,a)} +function zob(a){lnb.call(this,a)} +function Yob(a){Inb.call(this,a)} +function Gob(a){zob.call(this,a)} +function Mk(){Fk.call(this,null)} +function al(){Fk.call(this,null)} +function Az(){Az=ccb;!!(Rz(),Qz)} +function wrb(){wrb=ccb;vrb=yrb()} +function Mtb(a){return a.a?a.b:0} +function Vtb(a){return a.a?a.b:0} +function Lcb(a,b){return a.a-b.a} +function Wcb(a,b){return a.a-b.a} +function Peb(a,b){return a.a-b.a} +function eCb(a,b){return PC(a,b)} +function GC(a,b){return rdb(a,b)} +function _B(b,a){return a in b.a} +function _Db(a,b){a.f=b;return a} +function ZDb(a,b){a.b=b;return a} +function $Db(a,b){a.c=b;return a} +function aEb(a,b){a.g=b;return a} +function HGb(a,b){a.a=b;return a} +function IGb(a,b){a.f=b;return a} +function JGb(a,b){a.k=b;return a} +function dLb(a,b){a.a=b;return a} +function eLb(a,b){a.e=b;return a} +function zVb(a,b){a.e=b;return a} +function AVb(a,b){a.f=b;return a} +function KOb(a,b){a.b=true;a.d=b} +function DHb(a,b){a.b=new g7c(b)} +function uvb(a,b,c){b.td(a.a[c])} +function zvb(a,b,c){b.we(a.a[c])} +function wJc(a,b){return a.b-b.b} +function kOc(a,b){return a.g-b.g} +function WQc(a,b){return a.s-b.s} +function Lic(a,b){return a?0:b-1} +function SFc(a,b){return a?0:b-1} +function RFc(a,b){return a?b-1:0} +function M2c(a,b){return b.Yf(a)} +function M3c(a,b){a.b=b;return a} +function L3c(a,b){a.a=b;return a} +function N3c(a,b){a.c=b;return a} +function O3c(a,b){a.d=b;return a} +function P3c(a,b){a.e=b;return a} +function Q3c(a,b){a.f=b;return a} +function b4c(a,b){a.a=b;return a} +function c4c(a,b){a.b=b;return a} +function d4c(a,b){a.c=b;return a} +function z5c(a,b){a.c=b;return a} +function y5c(a,b){a.b=b;return a} +function A5c(a,b){a.d=b;return a} +function B5c(a,b){a.e=b;return a} +function C5c(a,b){a.f=b;return a} +function D5c(a,b){a.g=b;return a} +function E5c(a,b){a.a=b;return a} +function F5c(a,b){a.i=b;return a} +function G5c(a,b){a.j=b;return a} +function Vdd(a,b){a.k=b;return a} +function Wdd(a,b){a.j=b;return a} +function ykc(a,b){gkc();F0b(b,a)} +function T$c(a,b,c){R$c(a.a,b,c)} +function RGc(a){cEc.call(this,a)} +function iHc(a){cEc.call(this,a)} +function t7c(a){Qsb.call(this,a)} +function aPb(a){_Ob.call(this,a)} +function Ixd(a){zud.call(this,a)} +function dCd(a){ZBd.call(this,a)} +function fCd(a){ZBd.call(this,a)} +function p_b(){q_b.call(this,'')} +function d7c(){this.a=0;this.b=0} +function aPc(){this.b=0;this.a=0} +function NJd(a,b){a.b=0;DId(a,b)} +function X1d(a,b){a.c=b;a.b=true} +function Oc(a,b){return a.c._b(b)} +function gdb(a){return a.e&&a.e()} +function Vd(a){return !a?null:a.d} +function sn(a,b){return Gv(a.b,b)} +function Fv(a){return !a?null:a.g} +function Kv(a){return !a?null:a.i} +function hdb(a){fdb(a);return a.o} +function Fhd(){Fhd=ccb;Ehd=ond()} +function Hhd(){Hhd=ccb;Ghd=Cod()} +function LFd(){LFd=ccb;KFd=qZd()} +function p8d(){p8d=ccb;o8d=Y9d()} +function r8d(){r8d=ccb;q8d=dae()} +function mvd(){mvd=ccb;lvd=n4c()} +function Srb(){throw vbb(new bgb)} +function enb(){throw vbb(new bgb)} +function fnb(){throw vbb(new bgb)} +function gnb(){throw vbb(new bgb)} +function jnb(){throw vbb(new bgb)} +function Cnb(){throw vbb(new bgb)} +function Uqb(a){this.a=new Mqb(a)} +function tgb(a){lgb();ngb(this,a)} +function Hxb(a){this.a=new Qwb(a)} +function _ub(a,b){while(a.ye(b));} +function Sub(a,b){while(a.sd(b));} +function Bfb(a,b){a.a+=b;return a} +function Cfb(a,b){a.a+=b;return a} +function Ffb(a,b){a.a+=b;return a} +function Lfb(a,b){a.a+=b;return a} +function WAb(a){Tzb(a);return a.a} +function Wsb(a){return a.b!=a.d.c} +function pD(a){return a.l|a.m<<22} +function aIc(a,b){return a.d[b.p]} +function h2c(a,b){return c2c(a,b)} +function cCb(a,b,c){a.splice(b,c)} +function WHb(a){a.c?VHb(a):XHb(a)} +function jVc(a){this.a=0;this.b=a} +function ZUc(){this.a=new L2c(K$)} +function tRc(){this.b=new L2c(h$)} +function Q$c(){this.b=new L2c(J_)} +function d_c(){this.b=new L2c(J_)} +function OCd(){throw vbb(new bgb)} +function PCd(){throw vbb(new bgb)} +function QCd(){throw vbb(new bgb)} +function RCd(){throw vbb(new bgb)} +function SCd(){throw vbb(new bgb)} +function TCd(){throw vbb(new bgb)} +function UCd(){throw vbb(new bgb)} +function VCd(){throw vbb(new bgb)} +function WCd(){throw vbb(new bgb)} +function XCd(){throw vbb(new bgb)} +function ahe(){throw vbb(new utb)} +function bhe(){throw vbb(new utb)} +function Rge(a){this.a=new ege(a)} +function ege(a){dge(this,a,Vee())} +function Fhe(a){return !a||Ehe(a)} +function dde(a){return $ce[a]!=-1} +function Iz(){xz!=0&&(xz=0);zz=-1} +function Ybb(){Wbb==null&&(Wbb=[])} +function ONd(a,b){Rxd(ZKd(a.a),b)} +function TNd(a,b){Rxd(ZKd(a.a),b)} +function Yf(a,b){zf.call(this,a,b)} +function $f(a,b){Yf.call(this,a,b)} +function Hf(a,b){this.b=a;this.c=b} +function rk(a,b){this.b=a;this.a=b} +function ek(a,b){this.a=a;this.b=b} +function gk(a,b){this.a=a;this.b=b} +function pk(a,b){this.a=a;this.b=b} +function yk(a,b){this.a=a;this.b=b} +function Ak(a,b){this.a=a;this.b=b} +function Fj(a,b){this.a=a;this.b=b} +function _j(a,b){this.a=a;this.b=b} +function dr(a,b){this.a=a;this.b=b} +function zr(a,b){this.b=a;this.a=b} +function So(a,b){this.b=a;this.a=b} +function qp(a,b){this.b=a;this.a=b} +function $q(a,b){this.b=a;this.a=b} +function $r(a,b){this.f=a;this.g=b} +function ne(a,b){this.e=a;this.d=b} +function Wo(a,b){this.g=a;this.i=b} +function bu(a,b){this.a=a;this.b=b} +function qu(a,b){this.a=a;this.f=b} +function qv(a,b){this.b=a;this.c=b} +function ox(a,b){this.a=a;this.b=b} +function Px(a,b){this.a=a;this.b=b} +function mC(a,b){this.a=a;this.b=b} +function Wc(a){Lb(a.dc());this.c=a} +function rf(a){this.b=BD(Qb(a),83)} +function Zv(a){this.a=BD(Qb(a),83)} +function dv(a){this.a=BD(Qb(a),15)} +function $u(a){this.a=BD(Qb(a),15)} +function Br(a){this.b=BD(Qb(a),47)} +function eB(){this.q=new $wnd.Date} +function Zfb(){Zfb=ccb;Yfb=new jcb} +function Emb(){Emb=ccb;Dmb=new Fmb} +function Vhb(a){return a.f.c+a.g.c} +function hnb(a,b){return a.b.Hc(b)} +function inb(a,b){return a.b.Ic(b)} +function knb(a,b){return a.b.Qc(b)} +function Dob(a,b){return a.b.Hc(b)} +function dob(a,b){return a.c.uc(b)} +function Rqb(a,b){return a.a._b(b)} +function fob(a,b){return pb(a.c,b)} +function jt(a,b){return Mhb(a.b,b)} +function Lp(a,b){return a>b&&b0} +function Gbb(a,b){return ybb(a,b)<0} +function Crb(a,b){return a.a.get(b)} +function icb(b,a){return a.split(b)} +function Vrb(a,b){return Mhb(a.e,b)} +function Nvb(a){return uCb(a),false} +function Rub(a){Kub.call(this,a,21)} +function wcb(a,b){Zy.call(this,a,b)} +function mxb(a,b){$r.call(this,a,b)} +function Gyb(a,b){$r.call(this,a,b)} +function zx(a){yx();Wn.call(this,a)} +function zlb(a,b){Dlb(a,a.length,b)} +function Alb(a,b){Flb(a,a.length,b)} +function ABb(a,b,c){b.ud(a.a.Ge(c))} +function uBb(a,b,c){b.we(a.a.Fe(c))} +function GBb(a,b,c){b.td(a.a.Kb(c))} +function Zq(a,b,c){a.Mb(c)&&b.td(c)} +function aCb(a,b,c){a.splice(b,0,c)} +function lDb(a,b){return uqb(a.e,b)} +function pjb(a,b){this.d=a;this.e=b} +function kqb(a,b){this.b=a;this.a=b} +function VBb(a,b){this.b=a;this.a=b} +function BEb(a,b){this.b=a;this.a=b} +function sBb(a,b){this.a=a;this.b=b} +function yBb(a,b){this.a=a;this.b=b} +function EBb(a,b){this.a=a;this.b=b} +function KBb(a,b){this.a=a;this.b=b} +function aDb(a,b){this.a=a;this.b=b} +function tMb(a,b){this.b=a;this.a=b} +function oOb(a,b){this.b=a;this.a=b} +function SOb(a,b){$r.call(this,a,b)} +function SMb(a,b){$r.call(this,a,b)} +function NEb(a,b){$r.call(this,a,b)} +function VEb(a,b){$r.call(this,a,b)} +function sFb(a,b){$r.call(this,a,b)} +function hHb(a,b){$r.call(this,a,b)} +function OHb(a,b){$r.call(this,a,b)} +function FIb(a,b){$r.call(this,a,b)} +function wLb(a,b){$r.call(this,a,b)} +function YRb(a,b){$r.call(this,a,b)} +function zTb(a,b){$r.call(this,a,b)} +function rUb(a,b){$r.call(this,a,b)} +function oWb(a,b){$r.call(this,a,b)} +function SXb(a,b){$r.call(this,a,b)} +function k0b(a,b){$r.call(this,a,b)} +function z5b(a,b){$r.call(this,a,b)} +function T8b(a,b){$r.call(this,a,b)} +function ibc(a,b){$r.call(this,a,b)} +function Cec(a,b){this.a=a;this.b=b} +function rfc(a,b){this.a=a;this.b=b} +function Rfc(a,b){this.a=a;this.b=b} +function Tfc(a,b){this.a=a;this.b=b} +function bgc(a,b){this.a=a;this.b=b} +function ngc(a,b){this.a=a;this.b=b} +function Qhc(a,b){this.a=a;this.b=b} +function $hc(a,b){this.a=a;this.b=b} +function Z0b(a,b){this.a=a;this.b=b} +function ZVb(a,b){this.b=a;this.a=b} +function Dfc(a,b){this.b=a;this.a=b} +function dgc(a,b){this.b=a;this.a=b} +function Bmc(a,b){this.b=a;this.a=b} +function cWb(a,b){this.c=a;this.d=b} +function I$b(a,b){this.e=a;this.d=b} +function Unc(a,b){this.a=a;this.b=b} +function Oic(a,b){this.b=b;this.c=a} +function Bjc(a,b){$r.call(this,a,b)} +function Yjc(a,b){$r.call(this,a,b)} +function Gkc(a,b){$r.call(this,a,b)} +function Bpc(a,b){$r.call(this,a,b)} +function Jpc(a,b){$r.call(this,a,b)} +function Tpc(a,b){$r.call(this,a,b)} +function cqc(a,b){$r.call(this,a,b)} +function oqc(a,b){$r.call(this,a,b)} +function yqc(a,b){$r.call(this,a,b)} +function Hqc(a,b){$r.call(this,a,b)} +function Uqc(a,b){$r.call(this,a,b)} +function arc(a,b){$r.call(this,a,b)} +function mrc(a,b){$r.call(this,a,b)} +function zrc(a,b){$r.call(this,a,b)} +function Prc(a,b){$r.call(this,a,b)} +function Yrc(a,b){$r.call(this,a,b)} +function fsc(a,b){$r.call(this,a,b)} +function nsc(a,b){$r.call(this,a,b)} +function nzc(a,b){$r.call(this,a,b)} +function zzc(a,b){$r.call(this,a,b)} +function Kzc(a,b){$r.call(this,a,b)} +function Xzc(a,b){$r.call(this,a,b)} +function Dtc(a,b){$r.call(this,a,b)} +function lAc(a,b){$r.call(this,a,b)} +function uAc(a,b){$r.call(this,a,b)} +function CAc(a,b){$r.call(this,a,b)} +function LAc(a,b){$r.call(this,a,b)} +function UAc(a,b){$r.call(this,a,b)} +function aBc(a,b){$r.call(this,a,b)} +function uBc(a,b){$r.call(this,a,b)} +function DBc(a,b){$r.call(this,a,b)} +function MBc(a,b){$r.call(this,a,b)} +function sGc(a,b){$r.call(this,a,b)} +function VIc(a,b){$r.call(this,a,b)} +function EIc(a,b){this.b=a;this.a=b} +function qKc(a,b){this.a=a;this.b=b} +function GKc(a,b){this.a=a;this.b=b} +function lLc(a,b){this.a=a;this.b=b} +function mMc(a,b){this.a=a;this.b=b} +function fMc(a,b){$r.call(this,a,b)} +function ZLc(a,b){$r.call(this,a,b)} +function ZMc(a,b){this.b=a;this.d=b} +function IOc(a,b){$r.call(this,a,b)} +function GQc(a,b){$r.call(this,a,b)} +function PQc(a,b){this.a=a;this.b=b} +function RQc(a,b){this.a=a;this.b=b} +function ARc(a,b){$r.call(this,a,b)} +function rSc(a,b){$r.call(this,a,b)} +function TTc(a,b){$r.call(this,a,b)} +function _Tc(a,b){$r.call(this,a,b)} +function RUc(a,b){$r.call(this,a,b)} +function uVc(a,b){$r.call(this,a,b)} +function hWc(a,b){$r.call(this,a,b)} +function rWc(a,b){$r.call(this,a,b)} +function kXc(a,b){$r.call(this,a,b)} +function uXc(a,b){$r.call(this,a,b)} +function AYc(a,b){$r.call(this,a,b)} +function l$c(a,b){$r.call(this,a,b)} +function Z$c(a,b){$r.call(this,a,b)} +function D_c(a,b){$r.call(this,a,b)} +function O_c(a,b){$r.call(this,a,b)} +function c1c(a,b){$r.call(this,a,b)} +function cVb(a,b){return uqb(a.c,b)} +function nnc(a,b){return uqb(b.b,a)} +function x1c(a,b){return -a.b.Je(b)} +function D3c(a,b){return uqb(a.g,b)} +function O5c(a,b){$r.call(this,a,b)} +function a6c(a,b){$r.call(this,a,b)} +function m2c(a,b){this.a=a;this.b=b} +function W2c(a,b){this.a=a;this.b=b} +function f7c(a,b){this.a=a;this.b=b} +function G7c(a,b){$r.call(this,a,b)} +function j8c(a,b){$r.call(this,a,b)} +function iad(a,b){$r.call(this,a,b)} +function rad(a,b){$r.call(this,a,b)} +function Bad(a,b){$r.call(this,a,b)} +function Nad(a,b){$r.call(this,a,b)} +function ibd(a,b){$r.call(this,a,b)} +function tbd(a,b){$r.call(this,a,b)} +function Ibd(a,b){$r.call(this,a,b)} +function Ubd(a,b){$r.call(this,a,b)} +function gcd(a,b){$r.call(this,a,b)} +function scd(a,b){$r.call(this,a,b)} +function Ycd(a,b){$r.call(this,a,b)} +function udd(a,b){$r.call(this,a,b)} +function Jdd(a,b){$r.call(this,a,b)} +function Eed(a,b){$r.call(this,a,b)} +function bfd(a,b){this.a=a;this.b=b} +function dfd(a,b){this.a=a;this.b=b} +function ffd(a,b){this.a=a;this.b=b} +function Kfd(a,b){this.a=a;this.b=b} +function Mfd(a,b){this.a=a;this.b=b} +function Ofd(a,b){this.a=a;this.b=b} +function vgd(a,b){this.a=a;this.b=b} +function qgd(a,b){$r.call(this,a,b)} +function jrd(a,b){this.a=a;this.b=b} +function krd(a,b){this.a=a;this.b=b} +function mrd(a,b){this.a=a;this.b=b} +function nrd(a,b){this.a=a;this.b=b} +function qrd(a,b){this.a=a;this.b=b} +function rrd(a,b){this.a=a;this.b=b} +function srd(a,b){this.b=a;this.a=b} +function trd(a,b){this.b=a;this.a=b} +function Drd(a,b){this.b=a;this.a=b} +function Frd(a,b){this.b=a;this.a=b} +function Hrd(a,b){this.a=a;this.b=b} +function Jrd(a,b){this.a=a;this.b=b} +function Ord(a,b){Xqd(a.a,BD(b,56))} +function BIc(a,b){gIc(a.a,BD(b,11))} +function fIc(a,b){FHc();return b!=a} +function Arb(){wrb();return new vrb} +function CMc(){wMc();this.b=new Tqb} +function NNc(){FNc();this.a=new Tqb} +function eCc(){ZBc();aCc.call(this)} +function Dsd(a,b){$r.call(this,a,b)} +function Urd(a,b){this.a=a;this.b=b} +function Wrd(a,b){this.a=a;this.b=b} +function kGd(a,b){this.a=a;this.b=b} +function nGd(a,b){this.a=a;this.b=b} +function bUd(a,b){this.a=a;this.b=b} +function zVd(a,b){this.a=a;this.b=b} +function C1d(a,b){this.d=a;this.b=b} +function MLd(a,b){this.d=a;this.e=b} +function Wud(a,b){this.f=a;this.c=b} +function f7d(a,b){this.b=a;this.c=b} +function _zd(a,b){this.i=a;this.g=b} +function Y1d(a,b){this.e=a;this.a=b} +function c8d(a,b){this.a=a;this.b=b} +function $Id(a,b){a.i=null;_Id(a,b)} +function ivd(a,b){!!a&&Rhb(cvd,a,b)} +function hCd(a,b){return qAd(a.a,b)} +function e7d(a){return R2d(a.c,a.b)} +function Wd(a){return !a?null:a.dd()} +function PD(a){return a==null?null:a} +function KD(a){return typeof a===Khe} +function LD(a){return typeof a===Lhe} +function ND(a){return typeof a===Mhe} +function Em(a,b){return a.Hd().Xb(b)} +function Kq(a,b){return hr(a.Kc(),b)} +function Bbb(a,b){return ybb(a,b)==0} +function Ebb(a,b){return ybb(a,b)>=0} +function Kbb(a,b){return ybb(a,b)!=0} +function Jdb(a){return ''+(uCb(a),a)} +function pfb(a,b){return a.substr(b)} +function cg(a){ag(a);return a.d.gc()} +function oVb(a){pVb(a,a.c);return a} +function RD(a){CCb(a==null);return a} +function Dfb(a,b){a.a+=''+b;return a} +function Efb(a,b){a.a+=''+b;return a} +function Nfb(a,b){a.a+=''+b;return a} +function Pfb(a,b){a.a+=''+b;return a} +function Qfb(a,b){a.a+=''+b;return a} +function Mfb(a,b){return a.a+=''+b,a} +function Esb(a,b){Gsb(a,b,a.a,a.a.a)} +function Fsb(a,b){Gsb(a,b,a.c.b,a.c)} +function Mqd(a,b,c){Rpd(b,kqd(a,c))} +function Nqd(a,b,c){Rpd(b,kqd(a,c))} +function Dhe(a,b){Hhe(new Fyd(a),b)} +function cB(a,b){a.q.setTime(Sbb(b))} +function fvb(a,b){bvb.call(this,a,b)} +function jvb(a,b){bvb.call(this,a,b)} +function nvb(a,b){bvb.call(this,a,b)} +function Nqb(a){Uhb(this);Ld(this,a)} +function wmb(a){tCb(a,0);return null} +function X6c(a){a.a=0;a.b=0;return a} +function f3c(a,b){a.a=b.g+1;return a} +function PJc(a,b){return a.j[b.p]==2} +function _Pb(a){return VPb(BD(a,79))} +function yJb(){yJb=ccb;xJb=as(wJb())} +function Y8b(){Y8b=ccb;X8b=as(W8b())} +function mt(){this.b=new Mqb(Cv(12))} +function Otb(){this.b=0;this.a=false} +function Wtb(){this.b=0;this.a=false} +function sl(a){this.a=a;ol.call(this)} +function vl(a){this.a=a;ol.call(this)} +function Nsd(a,b){Msd.call(this,a,b)} +function $zd(a,b){Cyd.call(this,a,b)} +function nNd(a,b){_zd.call(this,a,b)} +function s4d(a,b){p4d.call(this,a,b)} +function w4d(a,b){qRd.call(this,a,b)} +function rEd(a,b){pEd();Rhb(oEd,a,b)} +function lcb(a,b){return qfb(a.a,0,b)} +function ww(a,b){return a.a.a.a.cc(b)} +function mb(a,b){return PD(a)===PD(b)} +function Mdb(a,b){return Kdb(a.a,b.a)} +function $db(a,b){return beb(a.a,b.a)} +function seb(a,b){return ueb(a.a,b.a)} +function hfb(a,b){return a.indexOf(b)} +function Ny(a,b){return a==b?0:a?1:-1} +function kB(a){return a<10?'0'+a:''+a} +function Mq(a){return Qb(a),new sl(a)} +function SC(a){return TC(a.l,a.m,a.h)} +function Hdb(a){return QD((uCb(a),a))} +function Idb(a){return QD((uCb(a),a))} +function NIb(a,b){return beb(a.g,b.g)} +function Fbb(a){return typeof a===Lhe} +function mWb(a){return a==hWb||a==kWb} +function nWb(a){return a==hWb||a==iWb} +function G1b(a){return Jkb(a.b.b,a,0)} +function lrb(a){this.a=Arb();this.b=a} +function Frb(a){this.a=Arb();this.b=a} +function swb(a,b){Ekb(a.a,b);return b} +function Z1c(a,b){Ekb(a.c,b);return a} +function E2c(a,b){d3c(a.a,b);return a} +function _gc(a,b){Hgc();return b.a+=a} +function bhc(a,b){Hgc();return b.a+=a} +function ahc(a,b){Hgc();return b.c+=a} +function Nlb(a,b){Klb(a,0,a.length,b)} +function zsb(){Wqb.call(this,new $rb)} +function I_b(){B_b.call(this,0,0,0,0)} +function I6c(){J6c.call(this,0,0,0,0)} +function g7c(a){this.a=a.a;this.b=a.b} +function fad(a){return a==aad||a==bad} +function gad(a){return a==dad||a==_9c} +function Jzc(a){return a==Fzc||a==Ezc} +function fcd(a){return a!=bcd&&a!=ccd} +function oid(a){return a.Lg()&&a.Mg()} +function Gfd(a){return Kkd(BD(a,118))} +function k3c(a){return d3c(new j3c,a)} +function y2d(a,b){return new p4d(b,a)} +function z2d(a,b){return new p4d(b,a)} +function ukd(a,b,c){vkd(a,b);wkd(a,c)} +function _kd(a,b,c){cld(a,b);ald(a,c)} +function bld(a,b,c){dld(a,b);eld(a,c)} +function gmd(a,b,c){hmd(a,b);imd(a,c)} +function nmd(a,b,c){omd(a,b);pmd(a,c)} +function iKd(a,b){$Jd(a,b);_Jd(a,a.D)} +function _ud(a){Wud.call(this,a,true)} +function Xg(a,b,c){Vg.call(this,a,b,c)} +function Ygb(a){Hgb();Zgb.call(this,a)} +function rxb(){mxb.call(this,'Head',1)} +function wxb(){mxb.call(this,'Tail',3)} +function Ckb(a){a.c=KC(SI,Uhe,1,0,5,1)} +function Vjb(a){a.a=KC(SI,Uhe,1,8,5,1)} +function MGb(a){Hkb(a.xf(),new QGb(a))} +function xtb(a){return a!=null?tb(a):0} +function b2b(a,b){return ntd(b,mpd(a))} +function c2b(a,b){return ntd(b,mpd(a))} +function dAb(a,b){return a[a.length]=b} +function gAb(a,b){return a[a.length]=b} +function Vq(a){return lr(a.b.Kc(),a.a)} +function dqd(a,b){return _o(qo(a.d),b)} +function eqd(a,b){return _o(qo(a.g),b)} +function fqd(a,b){return _o(qo(a.j),b)} +function Osd(a,b){Msd.call(this,a.b,b)} +function q0b(a){B_b.call(this,a,a,a,a)} +function HOb(a){a.b&&LOb(a);return a.a} +function IOb(a){a.b&&LOb(a);return a.c} +function uyb(a,b){if(lyb){return}a.b=b} +function lzd(a,b,c){NC(a,b,c);return c} +function mBc(a,b,c){NC(a.c[b.g],b.g,c)} +function _Hd(a,b,c){BD(a.c,69).Xh(b,c)} +function wfd(a,b,c){bld(c,c.i+a,c.j+b)} +function UOd(a,b){wtd(VKd(a.a),XOd(b))} +function bTd(a,b){wtd(QSd(a.a),eTd(b))} +function Lge(a){wfe();xfe.call(this,a)} +function CAd(a){return a==null?0:tb(a)} +function fNc(){fNc=ccb;eNc=new Rpb(v1)} +function h0d(){h0d=ccb;new i0d;new Rkb} +function i0d(){new Lqb;new Lqb;new Lqb} +function GA(){GA=ccb;fA();FA=new Lqb} +function Iy(){Iy=ccb;$wnd.Math.log(2)} +function UVd(){UVd=ccb;TVd=(AFd(),zFd)} +function _ge(){throw vbb(new cgb(Cxe))} +function ohe(){throw vbb(new cgb(Cxe))} +function che(){throw vbb(new cgb(Dxe))} +function rhe(){throw vbb(new cgb(Dxe))} +function Mg(a){this.a=a;Gg.call(this,a)} +function up(a){this.a=a;rf.call(this,a)} +function Bp(a){this.a=a;rf.call(this,a)} +function Okb(a,b){Mlb(a.c,a.c.length,b)} +function llb(a){return a.ab?1:0} +function Deb(a,b){return ybb(a,b)>0?a:b} +function TC(a,b,c){return {l:a,m:b,h:c}} +function Ctb(a,b){a.a!=null&&BIc(b,a.a)} +function Csb(a){a.a=new jtb;a.c=new jtb} +function hDb(a){this.b=a;this.a=new Rkb} +function dOb(a){this.b=new pOb;this.a=a} +function q_b(a){n_b.call(this);this.a=a} +function txb(){mxb.call(this,'Range',2)} +function bUb(){ZTb();this.a=new L2c(zP)} +function Bh(a,b){Qb(b);Ah(a).Jc(new Vw)} +function fKc(a,b){FJc();return b.n.b+=a} +function Tgc(a,b,c){return Rhb(a.g,c,b)} +function LJc(a,b,c){return Rhb(a.k,c,b)} +function r1c(a,b){return Rhb(a.a,b.a,b)} +function jBc(a,b,c){return hBc(b,c,a.c)} +function E6c(a){return new f7c(a.c,a.d)} +function F6c(a){return new f7c(a.c,a.d)} +function R6c(a){return new f7c(a.a,a.b)} +function CQd(a,b){return hA(a.a,b,null)} +function fec(a){QZb(a,null);RZb(a,null)} +function AOc(a){BOc(a,null);COc(a,null)} +function u4d(){qRd.call(this,null,null)} +function y4d(){RRd.call(this,null,null)} +function a7d(a){this.a=a;Lqb.call(this)} +function Pp(a){this.b=(mmb(),new iob(a))} +function Py(a){a.j=KC(VI,nie,310,0,0,1)} +function oAd(a,b,c){a.c.Vc(b,BD(c,133))} +function GAd(a,b,c){a.c.ji(b,BD(c,133))} +function JLd(a,b){Uxd(a);a.Gc(BD(b,15))} +function b7d(a,b){return t2d(a.c,a.b,b)} +function Bv(a,b){return new Qv(a.Kc(),b)} +function Lq(a,b){return rr(a.Kc(),b)!=-1} +function Sqb(a,b){return a.a.Bc(b)!=null} +function pr(a){return a.Ob()?a.Pb():null} +function yfb(a){return zfb(a,0,a.length)} +function JD(a,b){return a!=null&&AD(a,b)} +function $A(a,b){a.q.setHours(b);YA(a,b)} +function Yrb(a,b){if(a.c){jsb(b);isb(b)}} +function nk(a,b,c){BD(a.Kb(c),164).Nb(b)} +function RJc(a,b,c){SJc(a,b,c);return c} +function Eub(a,b,c){a.a=b^1502;a.b=c^kke} +function xHb(a,b,c){return a.a[b.g][c.g]} +function REc(a,b){return a.a[b.c.p][b.p]} +function aEc(a,b){return a.e[b.c.p][b.p]} +function tEc(a,b){return a.c[b.c.p][b.p]} +function OJc(a,b){return a.j[b.p]=aKc(b)} +function k5c(a,b){return cfb(a.f,b.tg())} +function Isd(a,b){return cfb(a.b,b.tg())} +function Sfd(a,b){return a.a0?b*b/a:b*b*100} +function CRb(a,b){return a>0?b/(a*a):b*100} +function G2c(a,b,c){return Ekb(b,I2c(a,c))} +function t3c(a,b,c){p3c();a.Xe(b)&&c.td(a)} +function St(a,b,c){var d;d=a.Zc(b);d.Rb(c)} +function O6c(a,b,c){a.a+=b;a.b+=c;return a} +function Z6c(a,b,c){a.a*=b;a.b*=c;return a} +function b7c(a,b,c){a.a-=b;a.b-=c;return a} +function a7c(a,b){a.a=b.a;a.b=b.b;return a} +function V6c(a){a.a=-a.a;a.b=-a.b;return a} +function Dic(a){this.c=a;this.a=1;this.b=1} +function xed(a){this.c=a;dld(a,0);eld(a,0)} +function u7c(a){Psb.call(this);n7c(this,a)} +function AXb(a){xXb();yXb(this);this.mf(a)} +function GRd(a,b){nRd();qRd.call(this,a,b)} +function dSd(a,b){LRd();RRd.call(this,a,b)} +function hSd(a,b){LRd();RRd.call(this,a,b)} +function fSd(a,b){LRd();dSd.call(this,a,b)} +function sId(a,b,c){dId.call(this,a,b,c,2)} +function zXd(a,b){UVd();nXd.call(this,a,b)} +function BXd(a,b){UVd();zXd.call(this,a,b)} +function DXd(a,b){UVd();zXd.call(this,a,b)} +function FXd(a,b){UVd();DXd.call(this,a,b)} +function PXd(a,b){UVd();nXd.call(this,a,b)} +function RXd(a,b){UVd();PXd.call(this,a,b)} +function XXd(a,b){UVd();nXd.call(this,a,b)} +function pAd(a,b){return a.c.Fc(BD(b,133))} +function w1d(a,b,c){return V1d(p1d(a,b),c)} +function N2d(a,b,c){return b.Qk(a.e,a.c,c)} +function P2d(a,b,c){return b.Rk(a.e,a.c,c)} +function a3d(a,b){return xid(a.e,BD(b,49))} +function aTd(a,b,c){vtd(QSd(a.a),b,eTd(c))} +function TOd(a,b,c){vtd(VKd(a.a),b,XOd(c))} +function ypb(a,b){b.$modCount=a.$modCount} +function MUc(){MUc=ccb;LUc=new Lsd('root')} +function LCd(){LCd=ccb;KCd=new lDd;new NDd} +function KVc(){this.a=new Hp;this.b=new Hp} +function FUd(){hJd.call(this);this.Bb|=Tje} +function t_c(){$r.call(this,'GROW_TREE',0)} +function C9d(a){return a==null?null:cde(a)} +function G9d(a){return a==null?null:jde(a)} +function J9d(a){return a==null?null:fcb(a)} +function K9d(a){return a==null?null:fcb(a)} +function fdb(a){if(a.o!=null){return}vdb(a)} +function DD(a){CCb(a==null||KD(a));return a} +function ED(a){CCb(a==null||LD(a));return a} +function GD(a){CCb(a==null||ND(a));return a} +function gB(a){this.q=new $wnd.Date(Sbb(a))} +function Mf(a,b){this.c=a;ne.call(this,a,b)} +function Sf(a,b){this.a=a;Mf.call(this,a,b)} +function Hg(a,b){this.d=a;Dg(this);this.b=b} +function bAb(a,b){Vzb.call(this,a);this.a=b} +function vAb(a,b){Vzb.call(this,a);this.a=b} +function sNb(a){pNb.call(this,0,0);this.f=a} +function Vg(a,b,c){dg.call(this,a,b,c,null)} +function Yg(a,b,c){dg.call(this,a,b,c,null)} +function Pxb(a,b,c){return a.ue(b,c)<=0?c:b} +function Qxb(a,b,c){return a.ue(b,c)<=0?b:c} +function g4c(a,b){return BD(Wrb(a.b,b),149)} +function i4c(a,b){return BD(Wrb(a.c,b),229)} +function wic(a){return BD(Ikb(a.a,a.b),287)} +function B6c(a){return new f7c(a.c,a.d+a.a)} +function eLc(a){return FJc(),Jzc(BD(a,197))} +function $Jb(){$Jb=ccb;ZJb=pqb((tdd(),sdd))} +function fOb(a,b){b.a?gOb(a,b):Fxb(a.a,b.b)} +function qyb(a,b){if(lyb){return}Ekb(a.a,b)} +function F2b(a,b){x2b();return f_b(b.d.i,a)} +function _9b(a,b){I9b();return new gac(b,a)} +function _Hb(a,b){ytb(b,lle);a.f=b;return a} +function Kld(a,b,c){c=_hd(a,b,3,c);return c} +function bmd(a,b,c){c=_hd(a,b,6,c);return c} +function kpd(a,b,c){c=_hd(a,b,9,c);return c} +function Cvd(a,b,c){++a.j;a.Ki();Atd(a,b,c)} +function Avd(a,b,c){++a.j;a.Hi(b,a.oi(b,c))} +function bRd(a,b,c){var d;d=a.Zc(b);d.Rb(c)} +function c7d(a,b,c){return C2d(a.c,a.b,b,c)} +function DAd(a,b){return (b&Ohe)%a.d.length} +function Msd(a,b){Lsd.call(this,a);this.a=b} +function uVd(a,b){lVd.call(this,a);this.a=b} +function sYd(a,b){lVd.call(this,a);this.a=b} +function zyd(a,b){this.c=a;zud.call(this,b)} +function YOd(a,b){this.a=a;qOd.call(this,b)} +function fTd(a,b){this.a=a;qOd.call(this,b)} +function Xp(a){this.a=(Xj(a,Jie),new Skb(a))} +function cq(a){this.a=(Xj(a,Jie),new Skb(a))} +function LA(a){!a.a&&(a.a=new VA);return a.a} +function XMb(a){if(a>8){return 0}return a+1} +function Ecb(a,b){Bcb();return a==b?0:a?1:-1} +function Opb(a,b,c){return Npb(a,BD(b,22),c)} +function Bz(a,b,c){return a.apply(b,c);var d} +function Sfb(a,b,c){a.a+=zfb(b,0,c);return a} +function ijb(a,b){var c;c=a.e;a.e=b;return c} +function trb(a,b){var c;c=a[hke];c.call(a,b)} +function urb(a,b){var c;c=a[hke];c.call(a,b)} +function Aib(a,b){a.a.Vc(a.b,b);++a.b;a.c=-1} +function Urb(a){Uhb(a.e);a.d.b=a.d;a.d.a=a.d} +function _f(a){a.b?_f(a.b):a.f.c.zc(a.e,a.d)} +function _Ab(a,b,c){EAb();MBb(a,b.Ce(a.a,c))} +function Bxb(a,b){return Vd(Cwb(a.a,b,true))} +function Cxb(a,b){return Vd(Dwb(a.a,b,true))} +function _Bb(a,b){return eCb(new Array(b),a)} +function HD(a){return String.fromCharCode(a)} +function mz(a){return a==null?null:a.message} +function gRb(){this.a=new Rkb;this.b=new Rkb} +function iTb(){this.a=new MQb;this.b=new tTb} +function tDb(){this.b=new d7c;this.c=new Rkb} +function _Qb(){this.d=new d7c;this.e=new d7c} +function n_b(){this.n=new d7c;this.o=new d7c} +function $Gb(){this.n=new p0b;this.i=new I6c} +function sec(){this.a=new Umc;this.b=new mnc} +function NIc(){this.a=new Rkb;this.d=new Rkb} +function LDc(){this.b=new Tqb;this.a=new Tqb} +function hSc(){this.b=new Lqb;this.a=new Lqb} +function HRc(){this.b=new tRc;this.a=new hRc} +function aHb(){$Gb.call(this);this.a=new d7c} +function Ywb(a){Zwb.call(this,a,(lxb(),hxb))} +function J_b(a,b,c,d){B_b.call(this,a,b,c,d)} +function sqd(a,b,c){c!=null&&kmd(b,Wqd(a,c))} +function tqd(a,b,c){c!=null&&lmd(b,Wqd(a,c))} +function Tod(a,b,c){c=_hd(a,b,11,c);return c} +function P6c(a,b){a.a+=b.a;a.b+=b.b;return a} +function c7c(a,b){a.a-=b.a;a.b-=b.b;return a} +function u7b(a,b){return a.n.a=(uCb(b),b)+10} +function v7b(a,b){return a.n.a=(uCb(b),b)+10} +function dLd(a,b){return b==a||pud(UKd(b),a)} +function PYd(a,b){return Rhb(a.a,b,'')==null} +function E2b(a,b){x2b();return !f_b(b.d.i,a)} +function rjc(a,b){fad(a.f)?sjc(a,b):tjc(a,b)} +function h1d(a,b){var c;c=b.Hh(a.a);return c} +function Cyd(a,b){qcb.call(this,gve+a+mue+b)} +function gUd(a,b,c,d){cUd.call(this,a,b,c,d)} +function Q4d(a,b,c,d){cUd.call(this,a,b,c,d)} +function U4d(a,b,c,d){Q4d.call(this,a,b,c,d)} +function n5d(a,b,c,d){i5d.call(this,a,b,c,d)} +function p5d(a,b,c,d){i5d.call(this,a,b,c,d)} +function v5d(a,b,c,d){i5d.call(this,a,b,c,d)} +function t5d(a,b,c,d){p5d.call(this,a,b,c,d)} +function A5d(a,b,c,d){p5d.call(this,a,b,c,d)} +function y5d(a,b,c,d){v5d.call(this,a,b,c,d)} +function D5d(a,b,c,d){A5d.call(this,a,b,c,d)} +function d6d(a,b,c,d){Y5d.call(this,a,b,c,d)} +function Vp(a,b,c){this.a=a;qc.call(this,b,c)} +function tk(a,b,c){this.c=b;this.b=c;this.a=a} +function ik(a,b,c){return a.d=BD(b.Kb(c),164)} +function j6d(a,b){return a.Aj().Nh().Kh(a,b)} +function h6d(a,b){return a.Aj().Nh().Ih(a,b)} +function Fdb(a,b){return uCb(a),PD(a)===PD(b)} +function dfb(a,b){return uCb(a),PD(a)===PD(b)} +function Dxb(a,b){return Vd(Cwb(a.a,b,false))} +function Exb(a,b){return Vd(Dwb(a.a,b,false))} +function vBb(a,b){return a.b.sd(new yBb(a,b))} +function BBb(a,b){return a.b.sd(new EBb(a,b))} +function HBb(a,b){return a.b.sd(new KBb(a,b))} +function lfb(a,b,c){return a.lastIndexOf(b,c)} +function uTb(a,b,c){return Kdb(a[b.b],a[c.b])} +function RTb(a,b){return yNb(b,(Nyc(),Cwc),a)} +function fmc(a,b){return beb(b.a.d.p,a.a.d.p)} +function emc(a,b){return beb(a.a.d.p,b.a.d.p)} +function _Oc(a,b){return Kdb(a.c-a.s,b.c-b.s)} +function S_b(a){return !a.c?-1:Jkb(a.c.a,a,0)} +function Vxd(a){return a<100?null:new Ixd(a)} +function ecd(a){return a==Zbd||a==_bd||a==$bd} +function zAd(a,b){return JD(b,15)&&Btd(a.c,b)} +function vyb(a,b){if(lyb){return}!!b&&(a.d=b)} +function ujb(a,b){var c;c=b;return !!Awb(a,c)} +function czd(a,b){this.c=a;Pyd.call(this,a,b)} +function fBb(a){this.c=a;nvb.call(this,rie,0)} +function Avb(a,b){Bvb.call(this,a,a.length,b)} +function aId(a,b,c){return BD(a.c,69).lk(b,c)} +function bId(a,b,c){return BD(a.c,69).mk(b,c)} +function O2d(a,b,c){return N2d(a,BD(b,332),c)} +function Q2d(a,b,c){return P2d(a,BD(b,332),c)} +function i3d(a,b,c){return h3d(a,BD(b,332),c)} +function k3d(a,b,c){return j3d(a,BD(b,332),c)} +function tn(a,b){return b==null?null:Hv(a.b,b)} +function Kcb(a){return LD(a)?(uCb(a),a):a.ke()} +function Ldb(a){return !isNaN(a)&&!isFinite(a)} +function Wn(a){Ql();this.a=(mmb(),new zob(a))} +function dIc(a){FHc();this.d=a;this.a=new jkb} +function xqb(a,b,c){this.a=a;this.b=b;this.c=c} +function Nrb(a,b,c){this.a=a;this.b=b;this.c=c} +function $sb(a,b,c){this.d=a;this.b=c;this.a=b} +function Qsb(a){Csb(this);Osb(this);ye(this,a)} +function Tkb(a){Ckb(this);bCb(this.c,0,a.Pc())} +function Xwb(a){uib(a.a);Kwb(a.c,a.b);a.b=null} +function iyb(a){this.a=a;Zfb();Cbb(Date.now())} +function JCb(){JCb=ccb;GCb=new nb;ICb=new nb} +function ntb(){ntb=ccb;ltb=new otb;mtb=new qtb} +function kzd(){kzd=ccb;jzd=KC(SI,Uhe,1,0,5,1)} +function tGd(){tGd=ccb;sGd=KC(SI,Uhe,1,0,5,1)} +function $Gd(){$Gd=ccb;ZGd=KC(SI,Uhe,1,0,5,1)} +function Ql(){Ql=ccb;new Zl((mmb(),mmb(),jmb))} +function pxb(a){lxb();return es((zxb(),yxb),a)} +function Hyb(a){Fyb();return es((Kyb(),Jyb),a)} +function OEb(a){MEb();return es((REb(),QEb),a)} +function WEb(a){UEb();return es((ZEb(),YEb),a)} +function tFb(a){rFb();return es((wFb(),vFb),a)} +function iHb(a){gHb();return es((lHb(),kHb),a)} +function PHb(a){NHb();return es((SHb(),RHb),a)} +function GIb(a){EIb();return es((JIb(),IIb),a)} +function vJb(a){qJb();return es((yJb(),xJb),a)} +function xLb(a){vLb();return es((ALb(),zLb),a)} +function TMb(a){RMb();return es((WMb(),VMb),a)} +function TOb(a){ROb();return es((WOb(),VOb),a)} +function ePb(a){cPb();return es((hPb(),gPb),a)} +function ZRb(a){XRb();return es((aSb(),_Rb),a)} +function ATb(a){yTb();return es((DTb(),CTb),a)} +function sUb(a){qUb();return es((vUb(),uUb),a)} +function rWb(a){lWb();return es((uWb(),tWb),a)} +function TXb(a){RXb();return es((WXb(),VXb),a)} +function Mb(a,b){if(!a){throw vbb(new Wdb(b))}} +function l0b(a){j0b();return es((o0b(),n0b),a)} +function r0b(a){B_b.call(this,a.d,a.c,a.a,a.b)} +function K_b(a){B_b.call(this,a.d,a.c,a.a,a.b)} +function mKb(a,b,c){this.b=a;this.c=b;this.a=c} +function BZb(a,b,c){this.b=a;this.a=b;this.c=c} +function TNb(a,b,c){this.a=a;this.b=b;this.c=c} +function uOb(a,b,c){this.a=a;this.b=b;this.c=c} +function S3b(a,b,c){this.a=a;this.b=b;this.c=c} +function Z6b(a,b,c){this.a=a;this.b=b;this.c=c} +function n9b(a,b,c){this.b=a;this.a=b;this.c=c} +function x$b(a,b,c){this.e=b;this.b=a;this.d=c} +function $Ab(a,b,c){EAb();a.a.Od(b,c);return b} +function LGb(a){var b;b=new KGb;b.e=a;return b} +function iLb(a){var b;b=new fLb;b.b=a;return b} +function D6b(){D6b=ccb;B6b=new M6b;C6b=new P6b} +function Hgc(){Hgc=ccb;Fgc=new ghc;Ggc=new ihc} +function jbc(a){gbc();return es((mbc(),lbc),a)} +function Cjc(a){Ajc();return es((Fjc(),Ejc),a)} +function Clc(a){Alc();return es((Flc(),Elc),a)} +function Cpc(a){Apc();return es((Fpc(),Epc),a)} +function Kpc(a){Ipc();return es((Npc(),Mpc),a)} +function Wpc(a){Rpc();return es((Zpc(),Ypc),a)} +function $jc(a){Xjc();return es((bkc(),akc),a)} +function Hkc(a){Fkc();return es((Kkc(),Jkc),a)} +function dqc(a){bqc();return es((gqc(),fqc),a)} +function rqc(a){mqc();return es((uqc(),tqc),a)} +function zqc(a){xqc();return es((Cqc(),Bqc),a)} +function Iqc(a){Gqc();return es((Lqc(),Kqc),a)} +function Vqc(a){Sqc();return es((Yqc(),Xqc),a)} +function brc(a){_qc();return es((erc(),drc),a)} +function nrc(a){lrc();return es((qrc(),prc),a)} +function Arc(a){yrc();return es((Drc(),Crc),a)} +function Qrc(a){Orc();return es((Trc(),Src),a)} +function Zrc(a){Xrc();return es((asc(),_rc),a)} +function gsc(a){esc();return es((jsc(),isc),a)} +function osc(a){msc();return es((rsc(),qsc),a)} +function Etc(a){Ctc();return es((Htc(),Gtc),a)} +function qzc(a){lzc();return es((tzc(),szc),a)} +function Azc(a){xzc();return es((Dzc(),Czc),a)} +function Mzc(a){Izc();return es((Pzc(),Ozc),a)} +function MAc(a){KAc();return es((PAc(),OAc),a)} +function mAc(a){kAc();return es((pAc(),oAc),a)} +function vAc(a){tAc();return es((yAc(),xAc),a)} +function DAc(a){BAc();return es((GAc(),FAc),a)} +function VAc(a){TAc();return es((YAc(),XAc),a)} +function $zc(a){Vzc();return es((bAc(),aAc),a)} +function bBc(a){_Ac();return es((eBc(),dBc),a)} +function vBc(a){tBc();return es((yBc(),xBc),a)} +function EBc(a){CBc();return es((HBc(),GBc),a)} +function NBc(a){LBc();return es((QBc(),PBc),a)} +function tGc(a){rGc();return es((wGc(),vGc),a)} +function WIc(a){UIc();return es((ZIc(),YIc),a)} +function $Lc(a){YLc();return es((bMc(),aMc),a)} +function gMc(a){eMc();return es((jMc(),iMc),a)} +function JOc(a){HOc();return es((MOc(),LOc),a)} +function HQc(a){FQc();return es((KQc(),JQc),a)} +function DRc(a){yRc();return es((GRc(),FRc),a)} +function tSc(a){qSc();return es((wSc(),vSc),a)} +function UTc(a){STc();return es((XTc(),WTc),a)} +function UUc(a){PUc();return es((XUc(),WUc),a)} +function aUc(a){$Tc();return es((dUc(),cUc),a)} +function wVc(a){tVc();return es((zVc(),yVc),a)} +function iWc(a){fWc();return es((lWc(),kWc),a)} +function sWc(a){pWc();return es((vWc(),uWc),a)} +function lXc(a){iXc();return es((oXc(),nXc),a)} +function vXc(a){sXc();return es((yXc(),xXc),a)} +function BYc(a){zYc();return es((EYc(),DYc),a)} +function m$c(a){k$c();return es((p$c(),o$c),a)} +function $$c(a){Y$c();return es((b_c(),a_c),a)} +function n_c(a){i_c();return es((q_c(),p_c),a)} +function w_c(a){s_c();return es((z_c(),y_c),a)} +function E_c(a){C_c();return es((H_c(),G_c),a)} +function P_c(a){N_c();return es((S_c(),R_c),a)} +function W0c(a){R0c();return es((Z0c(),Y0c),a)} +function f1c(a){a1c();return es((i1c(),h1c),a)} +function P5c(a){N5c();return es((S5c(),R5c),a)} +function b6c(a){_5c();return es((e6c(),d6c),a)} +function H7c(a){F7c();return es((K7c(),J7c),a)} +function k8c(a){i8c();return es((n8c(),m8c),a)} +function V8b(a){S8b();return es((Y8b(),X8b),a)} +function A5b(a){y5b();return es((D5b(),C5b),a)} +function jad(a){ead();return es((mad(),lad),a)} +function sad(a){qad();return es((vad(),uad),a)} +function Cad(a){Aad();return es((Fad(),Ead),a)} +function Oad(a){Mad();return es((Rad(),Qad),a)} +function jbd(a){hbd();return es((mbd(),lbd),a)} +function ubd(a){rbd();return es((xbd(),wbd),a)} +function Kbd(a){Hbd();return es((Nbd(),Mbd),a)} +function Vbd(a){Tbd();return es((Ybd(),Xbd),a)} +function hcd(a){dcd();return es((kcd(),jcd),a)} +function vcd(a){rcd();return es((ycd(),xcd),a)} +function vdd(a){tdd();return es((ydd(),xdd),a)} +function Kdd(a){Idd();return es((Ndd(),Mdd),a)} +function $cd(a){Ucd();return es((cdd(),bdd),a)} +function Fed(a){Ded();return es((Ied(),Hed),a)} +function rgd(a){pgd();return es((ugd(),tgd),a)} +function Esd(a){Csd();return es((Hsd(),Gsd),a)} +function Yoc(a,b){return (uCb(a),a)+(uCb(b),b)} +function NNd(a,b){Zfb();return wtd(ZKd(a.a),b)} +function SNd(a,b){Zfb();return wtd(ZKd(a.a),b)} +function bPc(a,b){this.c=a;this.a=b;this.b=b-a} +function nYc(a,b,c){this.a=a;this.b=b;this.c=c} +function L1c(a,b,c){this.a=a;this.b=b;this.c=c} +function T1c(a,b,c){this.a=a;this.b=b;this.c=c} +function Rrd(a,b,c){this.a=a;this.b=b;this.c=c} +function zCd(a,b,c){this.a=a;this.b=b;this.c=c} +function IVd(a,b,c){this.e=a;this.a=b;this.c=c} +function kWd(a,b,c){UVd();cWd.call(this,a,b,c)} +function HXd(a,b,c){UVd();oXd.call(this,a,b,c)} +function TXd(a,b,c){UVd();oXd.call(this,a,b,c)} +function ZXd(a,b,c){UVd();oXd.call(this,a,b,c)} +function JXd(a,b,c){UVd();HXd.call(this,a,b,c)} +function LXd(a,b,c){UVd();HXd.call(this,a,b,c)} +function NXd(a,b,c){UVd();LXd.call(this,a,b,c)} +function VXd(a,b,c){UVd();TXd.call(this,a,b,c)} +function _Xd(a,b,c){UVd();ZXd.call(this,a,b,c)} +function $j(a,b){Qb(a);Qb(b);return new _j(a,b)} +function Nq(a,b){Qb(a);Qb(b);return new Wq(a,b)} +function Rq(a,b){Qb(a);Qb(b);return new ar(a,b)} +function lr(a,b){Qb(a);Qb(b);return new zr(a,b)} +function BD(a,b){CCb(a==null||AD(a,b));return a} +function Nu(a){var b;b=new Rkb;fr(b,a);return b} +function Ex(a){var b;b=new Tqb;fr(b,a);return b} +function Hx(a){var b;b=new Gxb;Jq(b,a);return b} +function Ru(a){var b;b=new Psb;Jq(b,a);return b} +function YEc(a){!a.e&&(a.e=new Rkb);return a.e} +function SMd(a){!a.c&&(a.c=new xYd);return a.c} +function Ekb(a,b){a.c[a.c.length]=b;return true} +function WA(a,b){this.c=a;this.b=b;this.a=false} +function Gg(a){this.d=a;Dg(this);this.b=ed(a.d)} +function pzb(){this.a=';,;';this.b='';this.c=''} +function Bvb(a,b,c){qvb.call(this,b,c);this.a=a} +function fAb(a,b,c){this.b=a;fvb.call(this,b,c)} +function lsb(a,b,c){this.c=a;pjb.call(this,b,c)} +function bCb(a,b,c){$Bb(c,0,a,b,c.length,false)} +function HVb(a,b,c,d,e){a.b=b;a.c=c;a.d=d;a.a=e} +function eBb(a,b){if(b){a.b=b;a.a=(Tzb(b),b.a)}} +function v_b(a,b,c,d,e){a.d=b;a.c=c;a.a=d;a.b=e} +function h5b(a){var b,c;b=a.b;c=a.c;a.b=c;a.c=b} +function k5b(a){var b,c;c=a.d;b=a.a;a.d=b;a.a=c} +function Lbb(a){return zbb(iD(Fbb(a)?Rbb(a):a))} +function rlc(a,b){return beb(D0b(a.d),D0b(b.d))} +function uic(a,b){return b==(Ucd(),Tcd)?a.c:a.d} +function FHc(){FHc=ccb;DHc=(Ucd(),Tcd);EHc=zcd} +function DRb(){this.b=Edb(ED(Ksd((wSb(),vSb))))} +function aBb(a){return EAb(),KC(SI,Uhe,1,a,5,1)} +function C6c(a){return new f7c(a.c+a.b,a.d+a.a)} +function Vmc(a,b){Imc();return beb(a.d.p,b.d.p)} +function Lsb(a){sCb(a.b!=0);return Nsb(a,a.a.a)} +function Msb(a){sCb(a.b!=0);return Nsb(a,a.c.b)} +function rCb(a,b){if(!a){throw vbb(new ucb(b))}} +function mCb(a,b){if(!a){throw vbb(new Wdb(b))}} +function dWb(a,b,c){cWb.call(this,a,b);this.b=c} +function pMd(a,b,c){MLd.call(this,a,b);this.c=c} +function Dnc(a,b,c){Cnc.call(this,b,c);this.d=a} +function _Gd(a){$Gd();MGd.call(this);this.th(a)} +function PNd(a,b,c){this.a=a;nNd.call(this,b,c)} +function UNd(a,b,c){this.a=a;nNd.call(this,b,c)} +function k2d(a,b,c){MLd.call(this,a,b);this.c=c} +function y1d(){T0d();z1d.call(this,(yFd(),xFd))} +function gFd(a){return a!=null&&!OEd(a,CEd,DEd)} +function dFd(a,b){return (jFd(a)<<4|jFd(b))&aje} +function ln(a,b){return Vm(),Wj(a,b),new iy(a,b)} +function Sdd(a,b){var c;if(a.n){c=b;Ekb(a.f,c)}} +function Upd(a,b,c){var d;d=new yC(c);cC(a,b,d)} +function WUd(a,b){var c;c=a.c;VUd(a,b);return c} +function Ydd(a,b){b<0?(a.g=-1):(a.g=b);return a} +function $6c(a,b){W6c(a);a.a*=b;a.b*=b;return a} +function G6c(a,b,c,d,e){a.c=b;a.d=c;a.b=d;a.a=e} +function Dsb(a,b){Gsb(a,b,a.c.b,a.c);return true} +function jsb(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null} +function Aq(a){this.b=a;this.a=Wm(this.b.a).Ed()} +function Wq(a,b){this.b=a;this.a=b;ol.call(this)} +function ar(a,b){this.a=a;this.b=b;ol.call(this)} +function vvb(a,b){qvb.call(this,b,1040);this.a=a} +function Eeb(a){return a==0||isNaN(a)?a:a<0?-1:1} +function WPb(a){QPb();return jtd(a)==Xod(ltd(a))} +function XPb(a){QPb();return ltd(a)==Xod(jtd(a))} +function iYb(a,b){return hYb(a,new cWb(b.a,b.b))} +function NZb(a){return !OZb(a)&&a.c.i.c==a.d.i.c} +function _Gb(a){var b;b=a.n;return a.a.b+b.d+b.a} +function YHb(a){var b;b=a.n;return a.e.b+b.d+b.a} +function ZHb(a){var b;b=a.n;return a.e.a+b.b+b.c} +function zfe(a){wfe();++vfe;return new ige(0,a)} +function o_b(a){if(a.a){return a.a}return JZb(a)} +function CCb(a){if(!a){throw vbb(new Cdb(null))}} +function X6d(){X6d=ccb;W6d=(mmb(),new anb(Fwe))} +function ex(){ex=ccb;new gx((_k(),$k),(Lk(),Kk))} +function oeb(){oeb=ccb;neb=KC(JI,nie,19,256,0,1)} +function d$c(a,b,c,d){e$c.call(this,a,b,c,d,0,0)} +function sQc(a,b,c){return Rhb(a.b,BD(c.b,17),b)} +function tQc(a,b,c){return Rhb(a.b,BD(c.b,17),b)} +function xfd(a,b){return Ekb(a,new f7c(b.a,b.b))} +function Bic(a,b){return a.c=b){throw vbb(new rcb)}} +function Pyb(a,b,c){NC(b,0,Bzb(b[0],c[0]));return b} +function _yc(a,b,c){b.Ye(c,Edb(ED(Ohb(a.b,c)))*a.a)} +function n6c(a,b,c){i6c();return m6c(a,b)&&m6c(a,c)} +function tcd(a){rcd();return !a.Hc(ncd)&&!a.Hc(pcd)} +function D6c(a){return new f7c(a.c+a.b/2,a.d+a.a/2)} +function oOd(a,b){return b.kh()?xid(a.b,BD(b,49)):b} +function bvb(a,b){this.e=a;this.d=(b&64)!=0?b|oie:b} +function qvb(a,b){this.c=0;this.d=a;this.b=b|64|oie} +function gub(a){this.b=new Skb(11);this.a=(ipb(),a)} +function Qwb(a){this.b=null;this.a=(ipb(),!a?fpb:a)} +function nHc(a){this.a=lHc(a.a);this.b=new Tkb(a.b)} +function Pzd(a){this.b=a;Oyd.call(this,a);Ozd(this)} +function Xzd(a){this.b=a;bzd.call(this,a);Wzd(this)} +function jUd(a,b,c){this.a=a;gUd.call(this,b,c,5,6)} +function Y5d(a,b,c,d){this.b=a;xMd.call(this,b,c,d)} +function nSd(a,b,c,d,e){oSd.call(this,a,b,c,d,e,-1)} +function DSd(a,b,c,d,e){ESd.call(this,a,b,c,d,e,-1)} +function cUd(a,b,c,d){xMd.call(this,a,b,c);this.b=d} +function i5d(a,b,c,d){pMd.call(this,a,b,c);this.b=d} +function x0d(a){Wud.call(this,a,false);this.a=false} +function Lj(a,b){this.b=a;sj.call(this,a.b);this.a=b} +function px(a,b){im();ox.call(this,a,Dm(new amb(b)))} +function Cfe(a,b){wfe();++vfe;return new Dge(a,b,0)} +function Efe(a,b){wfe();++vfe;return new Dge(6,a,b)} +function nfb(a,b){return dfb(a.substr(0,b.length),b)} +function Mhb(a,b){return ND(b)?Qhb(a,b):!!irb(a.f,b)} +function Rrb(a,b){uCb(b);while(a.Ob()){b.td(a.Pb())}} +function Vgb(a,b,c){Hgb();this.e=a;this.d=b;this.a=c} +function amc(a,b,c,d){var e;e=a.i;e.i=b;e.a=c;e.b=d} +function xJc(a){var b;b=a;while(b.f){b=b.f}return b} +function fkb(a){var b;b=bkb(a);sCb(b!=null);return b} +function gkb(a){var b;b=ckb(a);sCb(b!=null);return b} +function cv(a,b){var c;c=a.a.gc();Sb(b,c);return c-b} +function Glb(a,b){var c;for(c=0;c0?$wnd.Math.log(a/b):-100} +function ueb(a,b){return ybb(a,b)<0?-1:ybb(a,b)>0?1:0} +function HMb(a,b,c){return IMb(a,BD(b,46),BD(c,167))} +function iq(a,b){return BD(Rl(Wm(a.a)).Xb(b),42).cd()} +function Olb(a,b){return avb(b,a.length),new vvb(a,b)} +function Pyd(a,b){this.d=a;Fyd.call(this,a);this.e=b} +function Lub(a){this.d=(uCb(a),a);this.a=0;this.c=rie} +function rge(a,b){xfe.call(this,1);this.a=a;this.b=b} +function Rzb(a,b){!a.c?Ekb(a.b,b):Rzb(a.c,b);return a} +function uB(a,b,c){var d;d=tB(a,b);vB(a,b,c);return d} +function ZBb(a,b){var c;c=a.slice(0,b);return PC(c,a)} +function Flb(a,b,c){var d;for(d=0;d=a.g} +function NHc(a,b,c){var d;d=THc(a,b,c);return MHc(a,d)} +function Qpd(a,b){var c;c=a.a.length;tB(a,c);vB(a,c,b)} +function gCb(a,b){var c;c=console[a];c.call(console,b)} +function Bvd(a,b){var c;++a.j;c=a.Vi();a.Ii(a.oi(c,b))} +function E1c(a,b,c){BD(b.b,65);Hkb(b.a,new L1c(a,c,b))} +function oXd(a,b,c){VVd.call(this,b);this.a=a;this.b=c} +function Dge(a,b,c){xfe.call(this,a);this.a=b;this.b=c} +function dYd(a,b,c){this.a=a;lVd.call(this,b);this.b=c} +function f0d(a,b,c){this.a=a;mxd.call(this,8,b,null,c)} +function z1d(a){this.a=(uCb(Rve),Rve);this.b=a;new oUd} +function ct(a){this.c=a;this.b=this.c.a;this.a=this.c.e} +function usb(a){this.c=a;this.b=a.a.d.a;ypb(a.a.e,this)} +function uib(a){yCb(a.c!=-1);a.d.$c(a.c);a.b=a.c;a.c=-1} +function U6c(a){return $wnd.Math.sqrt(a.a*a.a+a.b*a.b)} +function Uvb(a,b){return _vb(b,a.a.c.length),Ikb(a.a,b)} +function Hb(a,b){return PD(a)===PD(b)||a!=null&&pb(a,b)} +function oAb(a){if(0>=a){return new yAb}return pAb(a-1)} +function Nfe(a){if(!bfe)return false;return Qhb(bfe,a)} +function Ehe(a){if(a)return a.dc();return !a.Kc().Ob()} +function Q_b(a){if(!a.a&&!!a.c){return a.c.b}return a.a} +function LHd(a){!a.a&&(a.a=new xMd(m5,a,4));return a.a} +function LQd(a){!a.d&&(a.d=new xMd(j5,a,1));return a.d} +function uCb(a){if(a==null){throw vbb(new Geb)}return a} +function Qzb(a){if(!a.c){a.d=true;Szb(a)}else{a.c.He()}} +function Tzb(a){if(!a.c){Uzb(a);a.d=true}else{Tzb(a.c)}} +function Kpb(a){Ae(a.a);a.b=KC(SI,Uhe,1,a.b.length,5,1)} +function qlc(a,b){return beb(b.j.c.length,a.j.c.length)} +function igd(a,b){a.c<0||a.b.b=0?a.Bh(c):vid(a,b)} +function WHc(a){var b,c;b=a.c.i.c;c=a.d.i.c;return b==c} +function Wwd(a){if(a.p!=4)throw vbb(new Ydb);return a.e} +function Vwd(a){if(a.p!=3)throw vbb(new Ydb);return a.e} +function Ywd(a){if(a.p!=6)throw vbb(new Ydb);return a.f} +function fxd(a){if(a.p!=6)throw vbb(new Ydb);return a.k} +function cxd(a){if(a.p!=3)throw vbb(new Ydb);return a.j} +function dxd(a){if(a.p!=4)throw vbb(new Ydb);return a.j} +function AYd(a){!a.b&&(a.b=new RYd(new NYd));return a.b} +function $1d(a){a.c==-2&&e2d(a,X0d(a.g,a.b));return a.c} +function pdb(a,b){var c;c=ldb('',a);c.n=b;c.i=1;return c} +function MNb(a,b){$Nb(BD(b.b,65),a);Hkb(b.a,new RNb(a))} +function Cnd(a,b){wtd((!a.a&&(a.a=new fTd(a,a)),a.a),b)} +function Qzd(a,b){this.b=a;Pyd.call(this,a,b);Ozd(this)} +function Yzd(a,b){this.b=a;czd.call(this,a,b);Wzd(this)} +function Ms(a,b,c,d){Wo.call(this,a,b);this.d=c;this.a=d} +function $o(a,b,c,d){Wo.call(this,a,c);this.a=b;this.f=d} +function iy(a,b){Pp.call(this,umb(Qb(a),Qb(b)));this.a=b} +function cae(){fod.call(this,Ewe,(p8d(),o8d));$9d(this)} +function AZd(){fod.call(this,_ve,(LFd(),KFd));uZd(this)} +function T0c(){$r.call(this,'DELAUNAY_TRIANGULATION',0)} +function vfb(a){return String.fromCharCode.apply(null,a)} +function Rhb(a,b,c){return ND(b)?Shb(a,b,c):jrb(a.f,b,c)} +function tmb(a){mmb();return !a?(ipb(),ipb(),hpb):a.ve()} +function d2c(a,b,c){Y1c();return c.pg(a,BD(b.cd(),146))} +function ix(a,b){ex();return new gx(new il(a),new Uk(b))} +function Iu(a){Xj(a,Mie);return Oy(wbb(wbb(5,a),a/10|0))} +function Vm(){Vm=ccb;Um=new wx(OC(GC(CK,1),zie,42,0,[]))} +function hob(a){!a.d&&(a.d=new lnb(a.c.Cc()));return a.d} +function eob(a){!a.a&&(a.a=new Gob(a.c.vc()));return a.a} +function gob(a){!a.b&&(a.b=new zob(a.c.ec()));return a.b} +function keb(a,b){while(b-->0){a=a<<1|(a<0?1:0)}return a} +function wtb(a,b){return PD(a)===PD(b)||a!=null&&pb(a,b)} +function Gbc(a,b){return Bcb(),BD(b.b,19).ad&&++d;return d} +function Nnd(a){var b,c;c=(b=new UQd,b);NQd(c,a);return c} +function Ond(a){var b,c;c=(b=new UQd,b);RQd(c,a);return c} +function hqd(a,b){var c;c=Ohb(a.f,b);Yqd(b,c);return null} +function JZb(a){var b;b=P2b(a);if(b){return b}return null} +function Wod(a){!a.b&&(a.b=new cUd(B2,a,12,3));return a.b} +function YEd(a){return a!=null&&hnb(GEd,a.toLowerCase())} +function ied(a,b){return Kdb(red(a)*qed(a),red(b)*qed(b))} +function jed(a,b){return Kdb(red(a)*qed(a),red(b)*qed(b))} +function wEb(a,b){return Kdb(a.d.c+a.d.b/2,b.d.c+b.d.b/2)} +function UVb(a,b){return Kdb(a.g.c+a.g.b/2,b.g.c+b.g.b/2)} +function pQb(a,b,c){c.a?eld(a,b.b-a.f/2):dld(a,b.a-a.g/2)} +function prd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function ord(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function JVd(a,b,c,d){this.e=a;this.a=b;this.c=c;this.d=d} +function ZVd(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} +function cXd(a,b,c,d){UVd();mWd.call(this,b,c,d);this.a=a} +function jXd(a,b,c,d){UVd();mWd.call(this,b,c,d);this.a=a} +function Ng(a,b){this.a=a;Hg.call(this,a,BD(a.d,15).Zc(b))} +function ZBd(a){this.f=a;this.c=this.f.e;a.f>0&&YBd(this)} +function lBb(a,b,c,d){this.b=a;this.c=d;nvb.call(this,b,c)} +function tib(a){sCb(a.b=0&&dfb(a.substr(c,b.length),b)} +function H2d(a,b,c,d,e,f,g){return new O7d(a.e,b,c,d,e,f,g)} +function Cxd(a,b,c,d,e,f){this.a=a;nxd.call(this,b,c,d,e,f)} +function vyd(a,b,c,d,e,f){this.a=a;nxd.call(this,b,c,d,e,f)} +function $Ec(a,b){this.g=a;this.d=OC(GC(OQ,1),kne,10,0,[b])} +function KVd(a,b){this.e=a;this.a=SI;this.b=R5d(b);this.c=b} +function cIb(a,b){$Gb.call(this);THb(this);this.a=a;this.c=b} +function kBc(a,b,c,d){NC(a.c[b.g],c.g,d);NC(a.c[c.g],b.g,d)} +function nBc(a,b,c,d){NC(a.c[b.g],b.g,c);NC(a.b[b.g],b.g,d)} +function cBc(){_Ac();return OC(GC(fX,1),Kie,376,0,[$Ac,ZAc])} +function crc(){_qc();return OC(GC(MW,1),Kie,479,0,[$qc,Zqc])} +function Aqc(){xqc();return OC(GC(JW,1),Kie,419,0,[vqc,wqc])} +function Lpc(){Ipc();return OC(GC(FW,1),Kie,422,0,[Gpc,Hpc])} +function psc(){msc();return OC(GC(SW,1),Kie,420,0,[ksc,lsc])} +function EAc(){BAc();return OC(GC(cX,1),Kie,421,0,[zAc,AAc])} +function XIc(){UIc();return OC(GC(mY,1),Kie,523,0,[TIc,SIc])} +function KOc(){HOc();return OC(GC(DZ,1),Kie,520,0,[GOc,FOc])} +function _Lc(){YLc();return OC(GC(fZ,1),Kie,516,0,[XLc,WLc])} +function hMc(){eMc();return OC(GC(gZ,1),Kie,515,0,[cMc,dMc])} +function IQc(){FQc();return OC(GC(YZ,1),Kie,455,0,[DQc,EQc])} +function bUc(){$Tc();return OC(GC(F$,1),Kie,425,0,[ZTc,YTc])} +function VTc(){STc();return OC(GC(E$,1),Kie,480,0,[QTc,RTc])} +function VUc(){PUc();return OC(GC(K$,1),Kie,495,0,[NUc,OUc])} +function jWc(){fWc();return OC(GC(X$,1),Kie,426,0,[dWc,eWc])} +function g1c(){a1c();return OC(GC(X_,1),Kie,429,0,[_0c,$0c])} +function F_c(){C_c();return OC(GC(P_,1),Kie,430,0,[B_c,A_c])} +function PEb(){MEb();return OC(GC(aN,1),Kie,428,0,[LEb,KEb])} +function XEb(){UEb();return OC(GC(bN,1),Kie,427,0,[SEb,TEb])} +function $Rb(){XRb();return OC(GC(gP,1),Kie,424,0,[VRb,WRb])} +function B5b(){y5b();return OC(GC(ZR,1),Kie,511,0,[x5b,w5b])} +function lid(a,b,c,d){return c>=0?a.jh(b,c,d):a.Sg(null,c,d)} +function hgd(a){if(a.b.b==0){return a.a.$e()}return Lsb(a.b)} +function Xwd(a){if(a.p!=5)throw vbb(new Ydb);return Tbb(a.f)} +function exd(a){if(a.p!=5)throw vbb(new Ydb);return Tbb(a.k)} +function pNd(a){PD(a.a)===PD((NKd(),MKd))&&qNd(a);return a.a} +function by(a){this.a=BD(Qb(a),271);this.b=(mmb(),new Zob(a))} +function bQc(a,b){$Pc(this,new f7c(a.a,a.b));_Pc(this,Ru(b))} +function FQc(){FQc=ccb;DQc=new GQc(jle,0);EQc=new GQc(kle,1)} +function YLc(){YLc=ccb;XLc=new ZLc(kle,0);WLc=new ZLc(jle,1)} +function Hp(){Gp.call(this,new Mqb(Cv(12)));Lb(true);this.a=2} +function Hge(a,b,c){wfe();xfe.call(this,a);this.b=b;this.a=c} +function cWd(a,b,c){UVd();VVd.call(this,b);this.a=a;this.b=c} +function aIb(a){$Gb.call(this);THb(this);this.a=a;this.c=true} +function isb(a){var b;b=a.c.d.b;a.b=b;a.a=a.c.d;b.a=a.c.d.b=a} +function $Cb(a){var b;NGb(a.a);MGb(a.a);b=new YGb(a.a);UGb(b)} +function iKb(a,b){hKb(a,true);Hkb(a.e.wf(),new mKb(a,true,b))} +function tlb(a,b){pCb(b);return vlb(a,KC(WD,oje,25,b,15,1),b)} +function YPb(a,b){QPb();return a==Xod(jtd(b))||a==Xod(ltd(b))} +function Phb(a,b){return b==null?Wd(irb(a.f,null)):Crb(a.g,b)} +function Ksb(a){return a.b==0?null:(sCb(a.b!=0),Nsb(a,a.a.a))} +function QD(a){return Math.max(Math.min(a,Ohe),-2147483648)|0} +function uz(a,b){var c=tz[a.charCodeAt(0)];return c==null?a:c} +function Cx(a,b){Rb(a,'set1');Rb(b,'set2');return new Px(a,b)} +function QUb(a,b){var c;c=zUb(a.f,b);return P6c(V6c(c),a.f.d)} +function Jwb(a,b){var c,d;c=b;d=new fxb;Lwb(a,c,d);return d.d} +function NJb(a,b,c,d){var e;e=new aHb;b.a[c.g]=e;Npb(a.b,d,e)} +function zid(a,b,c){var d;d=a.Yg(b);d>=0?a.sh(d,c):uid(a,b,c)} +function hvd(a,b,c){evd();!!a&&Rhb(dvd,a,b);!!a&&Rhb(cvd,a,c)} +function g_c(a,b,c){this.i=new Rkb;this.b=a;this.g=b;this.a=c} +function VZc(a,b,c){this.c=new Rkb;this.e=a;this.f=b;this.b=c} +function b$c(a,b,c){this.a=new Rkb;this.e=a;this.f=b;this.c=c} +function Zy(a,b){Py(this);this.f=b;this.g=a;Ry(this);this._d()} +function ZA(a,b){var c;c=a.q.getHours();a.q.setDate(b);YA(a,c)} +function no(a,b){var c;Qb(b);for(c=a.a;c;c=c.c){b.Od(c.g,c.i)}} +function Fx(a){var b;b=new Uqb(Cv(a.length));nmb(b,a);return b} +function ecb(a){function b(){} +;b.prototype=a||{};return new b} +function dkb(a,b){if(Zjb(a,b)){wkb(a);return true}return false} +function aC(a,b){if(b==null){throw vbb(new Geb)}return bC(a,b)} +function tdb(a){if(a.qe()){return null}var b=a.n;return _bb[b]} +function Mld(a){if(a.Db>>16!=3)return null;return BD(a.Cb,33)} +function mpd(a){if(a.Db>>16!=9)return null;return BD(a.Cb,33)} +function fmd(a){if(a.Db>>16!=6)return null;return BD(a.Cb,79)} +function Ind(a){if(a.Db>>16!=7)return null;return BD(a.Cb,235)} +function Fod(a){if(a.Db>>16!=7)return null;return BD(a.Cb,160)} +function Xod(a){if(a.Db>>16!=11)return null;return BD(a.Cb,33)} +function nid(a,b){var c;c=a.Yg(b);return c>=0?a.lh(c):tid(a,b)} +function Dtd(a,b){var c;c=new Bsb(b);Ve(c,a);return new Tkb(c)} +function Uud(a){var b;b=a.d;b=a.si(a.f);wtd(a,b);return b.Ob()} +function t_b(a,b){a.b+=b.b;a.c+=b.c;a.d+=b.d;a.a+=b.a;return a} +function A4b(a,b){return $wnd.Math.abs(a)<$wnd.Math.abs(b)?a:b} +function Zod(a){return !a.a&&(a.a=new cUd(E2,a,10,11)),a.a.i>0} +function oDb(){this.a=new zsb;this.e=new Tqb;this.g=0;this.i=0} +function BGc(a){this.a=a;this.b=KC(SX,nie,1944,a.e.length,0,2)} +function RHc(a,b,c){var d;d=SHc(a,b,c);a.b=new BHc(d.c.length)} +function eMc(){eMc=ccb;cMc=new fMc(vle,0);dMc=new fMc('UP',1)} +function STc(){STc=ccb;QTc=new TTc(Yqe,0);RTc=new TTc('FAN',1)} +function evd(){evd=ccb;dvd=new Lqb;cvd=new Lqb;ivd(hK,new jvd)} +function Swd(a){if(a.p!=0)throw vbb(new Ydb);return Kbb(a.f,0)} +function _wd(a){if(a.p!=0)throw vbb(new Ydb);return Kbb(a.k,0)} +function MHd(a){if(a.Db>>16!=3)return null;return BD(a.Cb,147)} +function ZJd(a){if(a.Db>>16!=6)return null;return BD(a.Cb,235)} +function WId(a){if(a.Db>>16!=17)return null;return BD(a.Cb,26)} +function rdb(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.le(b))} +function hrb(a,b){var c;c=a.a.get(b);return c==null?new Array:c} +function aB(a,b){var c;c=a.q.getHours();a.q.setMonth(b);YA(a,c)} +function Shb(a,b,c){return b==null?jrb(a.f,null,c):Drb(a.g,b,c)} +function FLd(a,b,c,d,e,f){return new pSd(a.e,b,a.aj(),c,d,e,f)} +function Tfb(a,b,c){a.a=qfb(a.a,0,b)+(''+c)+pfb(a.a,b);return a} +function bq(a,b,c){Ekb(a.a,(Vm(),Wj(b,c),new Wo(b,c)));return a} +function uu(a){ot(a.c);a.e=a.a=a.c;a.c=a.c.c;++a.d;return a.a.f} +function vu(a){ot(a.e);a.c=a.a=a.e;a.e=a.e.e;--a.d;return a.a.f} +function RZb(a,b){!!a.d&&Lkb(a.d.e,a);a.d=b;!!a.d&&Ekb(a.d.e,a)} +function QZb(a,b){!!a.c&&Lkb(a.c.g,a);a.c=b;!!a.c&&Ekb(a.c.g,a)} +function $_b(a,b){!!a.c&&Lkb(a.c.a,a);a.c=b;!!a.c&&Ekb(a.c.a,a)} +function F0b(a,b){!!a.i&&Lkb(a.i.j,a);a.i=b;!!a.i&&Ekb(a.i.j,a)} +function jDb(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new Tkb(c))} +function qXb(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new Tkb(c))} +function aOb(a,b){this.a=a;this.c=R6c(this.a);this.b=new K6c(b)} +function IAb(a){var b;Uzb(a);b=new Tqb;return JAb(a,new jBb(b))} +function wCb(a,b){if(a<0||a>b){throw vbb(new qcb(Ake+a+Bke+b))}} +function Ppb(a,b){return vqb(a.a,b)?Qpb(a,BD(b,22).g,null):null} +function WUb(a){LUb();return Bcb(),BD(a.a,81).d.e!=0?true:false} +function qs(){qs=ccb;ps=as((hs(),OC(GC(yG,1),Kie,538,0,[gs])))} +function SBc(){SBc=ccb;RBc=c3c(new j3c,(qUb(),pUb),(S8b(),J8b))} +function ZBc(){ZBc=ccb;YBc=c3c(new j3c,(qUb(),pUb),(S8b(),J8b))} +function oCc(){oCc=ccb;nCc=c3c(new j3c,(qUb(),pUb),(S8b(),J8b))} +function aJc(){aJc=ccb;_Ic=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function FJc(){FJc=ccb;EJc=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function ILc(){ILc=ccb;HLc=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function wMc(){wMc=ccb;vMc=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function fUc(){fUc=ccb;eUc=c3c(new j3c,(yRc(),xRc),(qSc(),kSc))} +function DOc(a,b,c,d){this.c=a;this.d=d;BOc(this,b);COc(this,c)} +function W3c(a){this.c=new Psb;this.b=a.b;this.d=a.c;this.a=a.a} +function e7c(a){this.a=$wnd.Math.cos(a);this.b=$wnd.Math.sin(a)} +function BOc(a,b){!!a.a&&Lkb(a.a.k,a);a.a=b;!!a.a&&Ekb(a.a.k,a)} +function COc(a,b){!!a.b&&Lkb(a.b.f,a);a.b=b;!!a.b&&Ekb(a.b.f,a)} +function D1c(a,b){E1c(a,a.b,a.c);BD(a.b.b,65);!!b&&BD(b.b,65).b} +function BUd(a,b){CUd(a,b);JD(a.Cb,88)&&XMd($Kd(BD(a.Cb,88)),2)} +function cJd(a,b){JD(a.Cb,88)&&XMd($Kd(BD(a.Cb,88)),4);pnd(a,b)} +function lKd(a,b){JD(a.Cb,179)&&(BD(a.Cb,179).tb=null);pnd(a,b)} +function T2d(a,b){return Q6d(),YId(b)?new R7d(b,a):new f7d(b,a)} +function jsd(a,b){var c,d;c=b.c;d=c!=null;d&&Qpd(a,new yC(b.c))} +function XOd(a){var b,c;c=(LFd(),b=new UQd,b);NQd(c,a);return c} +function eTd(a){var b,c;c=(LFd(),b=new UQd,b);NQd(c,a);return c} +function yCc(a,b){var c;c=new H1b(a);b.c[b.c.length]=c;return c} +function Aw(a,b){var c;c=BD(Hv(nd(a.a),b),14);return !c?0:c.gc()} +function UAb(a){var b;Uzb(a);b=(ipb(),ipb(),gpb);return VAb(a,b)} +function nr(a){var b;while(true){b=a.Pb();if(!a.Ob()){return b}}} +function Ki(a,b){Ii.call(this,new Mqb(Cv(a)));Xj(b,mie);this.a=b} +function Jib(a,b,c){xCb(b,c,a.gc());this.c=a;this.a=b;this.b=c-b} +function Mkb(a,b,c){var d;xCb(b,c,a.c.length);d=c-b;cCb(a.c,b,d)} +function Fub(a,b){Eub(a,Tbb(xbb(Obb(b,24),nke)),Tbb(xbb(b,nke)))} +function tCb(a,b){if(a<0||a>=b){throw vbb(new qcb(Ake+a+Bke+b))}} +function BCb(a,b){if(a<0||a>=b){throw vbb(new Xfb(Ake+a+Bke+b))}} +function Kub(a,b){this.b=(uCb(a),a);this.a=(b&Rje)==0?b|64|oie:b} +function kkb(a){Vjb(this);dCb(this.a,geb($wnd.Math.max(8,a))<<1)} +function A0b(a){return l7c(OC(GC(m1,1),nie,8,0,[a.i.n,a.n,a.a]))} +function Iyb(){Fyb();return OC(GC(xL,1),Kie,132,0,[Cyb,Dyb,Eyb])} +function jHb(){gHb();return OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])} +function QHb(){NHb();return OC(GC(sN,1),Kie,461,0,[LHb,KHb,MHb])} +function HIb(){EIb();return OC(GC(zN,1),Kie,462,0,[DIb,CIb,BIb])} +function UXb(){RXb();return OC(GC(hQ,1),Kie,423,0,[QXb,PXb,OXb])} +function BTb(){yTb();return OC(GC(oP,1),Kie,379,0,[wTb,vTb,xTb])} +function Bzc(){xzc();return OC(GC(ZW,1),Kie,378,0,[uzc,vzc,wzc])} +function Xpc(){Rpc();return OC(GC(GW,1),Kie,314,0,[Ppc,Opc,Qpc])} +function eqc(){bqc();return OC(GC(HW,1),Kie,337,0,[$pc,aqc,_pc])} +function Jqc(){Gqc();return OC(GC(KW,1),Kie,450,0,[Eqc,Dqc,Fqc])} +function Ikc(){Fkc();return OC(GC(vV,1),Kie,361,0,[Ekc,Dkc,Ckc])} +function hsc(){esc();return OC(GC(RW,1),Kie,303,0,[csc,dsc,bsc])} +function $rc(){Xrc();return OC(GC(QW,1),Kie,292,0,[Vrc,Wrc,Urc])} +function NAc(){KAc();return OC(GC(dX,1),Kie,452,0,[JAc,HAc,IAc])} +function wAc(){tAc();return OC(GC(bX,1),Kie,339,0,[rAc,qAc,sAc])} +function WAc(){TAc();return OC(GC(eX,1),Kie,375,0,[QAc,RAc,SAc])} +function OBc(){LBc();return OC(GC(jX,1),Kie,377,0,[JBc,KBc,IBc])} +function wBc(){tBc();return OC(GC(hX,1),Kie,336,0,[qBc,rBc,sBc])} +function FBc(){CBc();return OC(GC(iX,1),Kie,338,0,[BBc,zBc,ABc])} +function uGc(){rGc();return OC(GC(PX,1),Kie,454,0,[oGc,pGc,qGc])} +function xVc(){tVc();return OC(GC(O$,1),Kie,442,0,[sVc,qVc,rVc])} +function tWc(){pWc();return OC(GC(Y$,1),Kie,380,0,[mWc,nWc,oWc])} +function CYc(){zYc();return OC(GC(q_,1),Kie,381,0,[xYc,yYc,wYc])} +function wXc(){sXc();return OC(GC(b_,1),Kie,293,0,[qXc,rXc,pXc])} +function _$c(){Y$c();return OC(GC(J_,1),Kie,437,0,[V$c,W$c,X$c])} +function kbd(){hbd();return OC(GC(z1,1),Kie,334,0,[fbd,ebd,gbd])} +function tad(){qad();return OC(GC(u1,1),Kie,272,0,[nad,oad,pad])} +function o3d(a,b){return p3d(a,b,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function LZc(a,b,c){var d;d=MZc(a,b,false);return d.b<=b&&d.a<=c} +function tMc(a,b,c){var d;d=new sMc;d.b=b;d.a=c;++b.b;Ekb(a.d,d)} +function fs(a,b){var c;c=(uCb(a),a).g;lCb(!!c);uCb(b);return c(b)} +function av(a,b){var c,d;d=cv(a,b);c=a.a.Zc(d);return new qv(a,c)} +function cKd(a){if(a.Db>>16!=6)return null;return BD(aid(a),235)} +function Uwd(a){if(a.p!=2)throw vbb(new Ydb);return Tbb(a.f)&aje} +function bxd(a){if(a.p!=2)throw vbb(new Ydb);return Tbb(a.k)&aje} +function Z1d(a){a.a==(T0d(),S0d)&&d2d(a,U0d(a.g,a.b));return a.a} +function _1d(a){a.d==(T0d(),S0d)&&f2d(a,Y0d(a.g,a.b));return a.d} +function mlb(a){sCb(a.ad?1:0} +function bjc(a,b){var c,d;c=ajc(b);d=c;return BD(Ohb(a.c,d),19).a} +function iSc(a,b){var c;c=a+'';while(c.length0&&a.a[--a.d]==0);a.a[a.d++]==0&&(a.e=0)} +function wwb(a){return !a.a?a.c:a.e.length==0?a.a.a:a.a.a+(''+a.e)} +function RSd(a){return !!a.a&&QSd(a.a.a).i!=0&&!(!!a.b&&QTd(a.b))} +function cLd(a){return !!a.u&&VKd(a.u.a).i!=0&&!(!!a.n&&FMd(a.n))} +function $i(a){return Zj(a.e.Hd().gc()*a.c.Hd().gc(),16,new ij(a))} +function XA(a,b){return ueb(Cbb(a.q.getTime()),Cbb(b.q.getTime()))} +function k_b(a){return BD(Qkb(a,KC(AQ,jne,17,a.c.length,0,1)),474)} +function l_b(a){return BD(Qkb(a,KC(OQ,kne,10,a.c.length,0,1)),193)} +function cKc(a){FJc();return !OZb(a)&&!(!OZb(a)&&a.c.i.c==a.d.i.c)} +function kDb(a,b,c){var d;d=(Qb(a),new Tkb(a));iDb(new jDb(d,b,c))} +function rXb(a,b,c){var d;d=(Qb(a),new Tkb(a));pXb(new qXb(d,b,c))} +function Nwb(a,b){var c;c=1-b;a.a[c]=Owb(a.a[c],c);return Owb(a,b)} +function YXc(a,b){var c;a.e=new QXc;c=gVc(b);Okb(c,a.c);ZXc(a,c,0)} +function o4c(a,b,c,d){var e;e=new w4c;e.a=b;e.b=c;e.c=d;Dsb(a.a,e)} +function p4c(a,b,c,d){var e;e=new w4c;e.a=b;e.b=c;e.c=d;Dsb(a.b,e)} +function i6d(a){var b,c,d;b=new A6d;c=s6d(b,a);z6d(b);d=c;return d} +function vZd(){var a,b,c;b=(c=(a=new UQd,a),c);Ekb(rZd,b);return b} +function H2c(a){a.j.c=KC(SI,Uhe,1,0,5,1);Ae(a.c);h3c(a.a);return a} +function tgc(a){qgc();if(JD(a.g,10)){return BD(a.g,10)}return null} +function Zw(a){if(Ah(a).dc()){return false}Bh(a,new bx);return true} +function _y(b){if(!('stack' in b)){try{throw b}catch(a){}}return b} +function Pb(a,b){if(a<0||a>=b){throw vbb(new qcb(Ib(a,b)))}return a} +function Tb(a,b,c){if(a<0||bc){throw vbb(new qcb(Kb(a,b,c)))}} +function eVb(a,b){Qqb(a.a,b);if(b.d){throw vbb(new hz(Hke))}b.d=a} +function xpb(a,b){if(b.$modCount!=a.$modCount){throw vbb(new Apb)}} +function $pb(a,b){if(JD(b,42)){return Jd(a.a,BD(b,42))}return false} +function dib(a,b){if(JD(b,42)){return Jd(a.a,BD(b,42))}return false} +function msb(a,b){if(JD(b,42)){return Jd(a.a,BD(b,42))}return false} +function qAb(a,b){if(a.a<=a.b){b.ud(a.a++);return true}return false} +function Sbb(a){var b;if(Fbb(a)){b=a;return b==-0.?0:b}return oD(a)} +function tAb(a){var b;Tzb(a);b=new drb;_ub(a.a,new BAb(b));return b} +function Yzb(a){var b;Tzb(a);b=new Gpb;_ub(a.a,new mAb(b));return b} +function Bib(a,b){this.a=a;vib.call(this,a);wCb(b,a.gc());this.b=b} +function orb(a){this.e=a;this.b=this.e.a.entries();this.a=new Array} +function Oi(a){return Zj(a.e.Hd().gc()*a.c.Hd().gc(),273,new cj(a))} +function Qu(a){return new Skb((Xj(a,Mie),Oy(wbb(wbb(5,a),a/10|0))))} +function m_b(a){return BD(Qkb(a,KC(aR,lne,11,a.c.length,0,1)),1943)} +function sMb(a,b,c){return c.f.c.length>0?HMb(a.a,b,c):HMb(a.b,b,c)} +function SZb(a,b,c){!!a.d&&Lkb(a.d.e,a);a.d=b;!!a.d&&Dkb(a.d.e,c,a)} +function a5b(a,b){i5b(b,a);k5b(a.d);k5b(BD(vNb(a,(Nyc(),wxc)),207))} +function _4b(a,b){f5b(b,a);h5b(a.d);h5b(BD(vNb(a,(Nyc(),wxc)),207))} +function Ypd(a,b){var c,d;c=aC(a,b);d=null;!!c&&(d=c.fe());return d} +function Zpd(a,b){var c,d;c=tB(a,b);d=null;!!c&&(d=c.ie());return d} +function $pd(a,b){var c,d;c=aC(a,b);d=null;!!c&&(d=c.ie());return d} +function _pd(a,b){var c,d;c=aC(a,b);d=null;!!c&&(d=aqd(c));return d} +function Tqd(a,b,c){var d;d=Wpd(c);ro(a.g,d,b);ro(a.i,b,c);return b} +function Ez(a,b,c){var d;d=Cz();try{return Bz(a,b,c)}finally{Fz(d)}} +function C6d(a){var b;b=a.Wg();this.a=JD(b,69)?BD(b,69).Zh():b.Kc()} +function j3c(){D2c.call(this);this.j.c=KC(SI,Uhe,1,0,5,1);this.a=-1} +function mxd(a,b,c,d){this.d=a;this.n=b;this.g=c;this.o=d;this.p=-1} +function jk(a,b,c,d){this.e=d;this.d=null;this.c=a;this.a=b;this.b=c} +function uEc(a,b,c){this.d=new HEc(this);this.e=a;this.i=b;this.f=c} +function msc(){msc=ccb;ksc=new nsc(gle,0);lsc=new nsc('TOP_LEFT',1)} +function cDc(){cDc=ccb;bDc=ix(meb(1),meb(4));aDc=ix(meb(1),meb(2))} +function z_c(){z_c=ccb;y_c=as((s_c(),OC(GC(O_,1),Kie,551,0,[r_c])))} +function q_c(){q_c=ccb;p_c=as((i_c(),OC(GC(N_,1),Kie,482,0,[h_c])))} +function Z0c(){Z0c=ccb;Y0c=as((R0c(),OC(GC(W_,1),Kie,530,0,[Q0c])))} +function hPb(){hPb=ccb;gPb=as((cPb(),OC(GC(GO,1),Kie,481,0,[bPb])))} +function yLb(){vLb();return OC(GC(PN,1),Kie,406,0,[uLb,rLb,sLb,tLb])} +function qxb(){lxb();return OC(GC(iL,1),Kie,297,0,[hxb,ixb,jxb,kxb])} +function UOb(){ROb();return OC(GC(CO,1),Kie,394,0,[OOb,NOb,POb,QOb])} +function UMb(){RMb();return OC(GC(jO,1),Kie,323,0,[OMb,NMb,PMb,QMb])} +function sWb(){lWb();return OC(GC(SP,1),Kie,405,0,[hWb,kWb,iWb,jWb])} +function kbc(){gbc();return OC(GC(VS,1),Kie,360,0,[fbc,dbc,ebc,cbc])} +function Vc(a,b,c,d){return JD(c,54)?new Cg(a,b,c,d):new qg(a,b,c,d)} +function Djc(){Ajc();return OC(GC(mV,1),Kie,411,0,[wjc,xjc,yjc,zjc])} +function okc(a){var b;return a.j==(Ucd(),Rcd)&&(b=pkc(a),uqb(b,zcd))} +function Mdc(a,b){var c;c=b.a;QZb(c,b.c.d);RZb(c,b.d.d);q7c(c.a,a.n)} +function Smc(a,b){return BD(Btb(QAb(BD(Qc(a.k,b),15).Oc(),Hmc)),113)} +function Tmc(a,b){return BD(Btb(RAb(BD(Qc(a.k,b),15).Oc(),Hmc)),113)} +function _w(a){return new Kub(rmb(BD(a.a.dd(),14).gc(),a.a.cd()),16)} +function Qq(a){if(JD(a,14)){return BD(a,14).dc()}return !a.Kc().Ob()} +function ugc(a){qgc();if(JD(a.g,145)){return BD(a.g,145)}return null} +function Ko(a){if(a.e.g!=a.b){throw vbb(new Apb)}return !!a.c&&a.d>0} +function Xsb(a){sCb(a.b!=a.d.c);a.c=a.b;a.b=a.b.a;++a.a;return a.c.c} +function Xjb(a,b){uCb(b);NC(a.a,a.c,b);a.c=a.c+1&a.a.length-1;_jb(a)} +function Wjb(a,b){uCb(b);a.b=a.b-1&a.a.length-1;NC(a.a,a.b,b);_jb(a)} +function A2c(a,b){var c;for(c=a.j.c.length;c0&&$fb(a.g,0,b,0,a.i);return b} +function qEd(a,b){pEd();var c;c=BD(Ohb(oEd,a),55);return !c||c.wj(b)} +function Twd(a){if(a.p!=1)throw vbb(new Ydb);return Tbb(a.f)<<24>>24} +function axd(a){if(a.p!=1)throw vbb(new Ydb);return Tbb(a.k)<<24>>24} +function gxd(a){if(a.p!=7)throw vbb(new Ydb);return Tbb(a.k)<<16>>16} +function Zwd(a){if(a.p!=7)throw vbb(new Ydb);return Tbb(a.f)<<16>>16} +function sr(a){var b;b=0;while(a.Ob()){a.Pb();b=wbb(b,1)}return Oy(b)} +function nx(a,b){var c;c=new Vfb;a.xd(c);c.a+='..';b.yd(c);return c.a} +function Sgc(a,b,c){var d;d=BD(Ohb(a.g,c),57);Ekb(a.a.c,new vgd(b,d))} +function VCb(a,b,c){return Ddb(ED(Wd(irb(a.f,b))),ED(Wd(irb(a.f,c))))} +function E2d(a,b,c){return F2d(a,b,c,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function L2d(a,b,c){return M2d(a,b,c,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function q3d(a,b,c){return r3d(a,b,c,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function JJc(a,b){return a==(j0b(),h0b)&&b==h0b?4:a==h0b||b==h0b?8:32} +function Nd(a,b){return PD(b)===PD(a)?'(this Map)':b==null?Xhe:fcb(b)} +function kFd(a,b){return BD(b==null?Wd(irb(a.f,null)):Crb(a.g,b),281)} +function Rqd(a,b,c){var d;d=Wpd(c);Rhb(a.b,d,b);Rhb(a.c,b,c);return b} +function Bfd(a,b){var c;c=b;while(c){O6c(a,c.i,c.j);c=Xod(c)}return a} +function kt(a,b){var c;c=vmb(Nu(new wu(a,b)));ir(new wu(a,b));return c} +function R6d(a,b){Q6d();var c;c=BD(a,66).Mj();kVd(c,b);return c.Ok(b)} +function TOc(a,b,c,d,e){var f;f=OOc(e,c,d);Ekb(b,tOc(e,f));XOc(a,e,b)} +function mic(a,b,c){a.i=0;a.e=0;if(b==c){return}lic(a,b,c);kic(a,b,c)} +function dB(a,b){var c;c=a.q.getHours();a.q.setFullYear(b+nje);YA(a,c)} +function dC(d,a,b){if(b){var c=b.ee();d.a[a]=c(b)}else{delete d.a[a]}} +function vB(d,a,b){if(b){var c=b.ee();b=c(b)}else{b=undefined}d.a[a]=b} +function pCb(a){if(a<0){throw vbb(new Feb('Negative array size: '+a))}} +function VKd(a){if(!a.n){$Kd(a);a.n=new JMd(a,j5,a);_Kd(a)}return a.n} +function Fqb(a){sCb(a.a=0&&a.a[c]===b[c];c--);return c<0} +function Ucc(a,b){Occ();var c;c=a.j.g-b.j.g;if(c!=0){return c}return 0} +function Dtb(a,b){uCb(b);if(a.a!=null){return Itb(b.Kb(a.a))}return ztb} +function Gx(a){var b;if(a){return new Bsb(a)}b=new zsb;Jq(b,a);return b} +function GAb(a,b){var c;return b.b.Kb(SAb(a,b.c.Ee(),(c=new TBb(b),c)))} +function Hub(a){zub();Eub(this,Tbb(xbb(Obb(a,24),nke)),Tbb(xbb(a,nke)))} +function REb(){REb=ccb;QEb=as((MEb(),OC(GC(aN,1),Kie,428,0,[LEb,KEb])))} +function ZEb(){ZEb=ccb;YEb=as((UEb(),OC(GC(bN,1),Kie,427,0,[SEb,TEb])))} +function aSb(){aSb=ccb;_Rb=as((XRb(),OC(GC(gP,1),Kie,424,0,[VRb,WRb])))} +function D5b(){D5b=ccb;C5b=as((y5b(),OC(GC(ZR,1),Kie,511,0,[x5b,w5b])))} +function Cqc(){Cqc=ccb;Bqc=as((xqc(),OC(GC(JW,1),Kie,419,0,[vqc,wqc])))} +function erc(){erc=ccb;drc=as((_qc(),OC(GC(MW,1),Kie,479,0,[$qc,Zqc])))} +function eBc(){eBc=ccb;dBc=as((_Ac(),OC(GC(fX,1),Kie,376,0,[$Ac,ZAc])))} +function GAc(){GAc=ccb;FAc=as((BAc(),OC(GC(cX,1),Kie,421,0,[zAc,AAc])))} +function Npc(){Npc=ccb;Mpc=as((Ipc(),OC(GC(FW,1),Kie,422,0,[Gpc,Hpc])))} +function rsc(){rsc=ccb;qsc=as((msc(),OC(GC(SW,1),Kie,420,0,[ksc,lsc])))} +function MOc(){MOc=ccb;LOc=as((HOc(),OC(GC(DZ,1),Kie,520,0,[GOc,FOc])))} +function ZIc(){ZIc=ccb;YIc=as((UIc(),OC(GC(mY,1),Kie,523,0,[TIc,SIc])))} +function bMc(){bMc=ccb;aMc=as((YLc(),OC(GC(fZ,1),Kie,516,0,[XLc,WLc])))} +function jMc(){jMc=ccb;iMc=as((eMc(),OC(GC(gZ,1),Kie,515,0,[cMc,dMc])))} +function KQc(){KQc=ccb;JQc=as((FQc(),OC(GC(YZ,1),Kie,455,0,[DQc,EQc])))} +function dUc(){dUc=ccb;cUc=as(($Tc(),OC(GC(F$,1),Kie,425,0,[ZTc,YTc])))} +function XUc(){XUc=ccb;WUc=as((PUc(),OC(GC(K$,1),Kie,495,0,[NUc,OUc])))} +function XTc(){XTc=ccb;WTc=as((STc(),OC(GC(E$,1),Kie,480,0,[QTc,RTc])))} +function lWc(){lWc=ccb;kWc=as((fWc(),OC(GC(X$,1),Kie,426,0,[dWc,eWc])))} +function i1c(){i1c=ccb;h1c=as((a1c(),OC(GC(X_,1),Kie,429,0,[_0c,$0c])))} +function H_c(){H_c=ccb;G_c=as((C_c(),OC(GC(P_,1),Kie,430,0,[B_c,A_c])))} +function UIc(){UIc=ccb;TIc=new VIc('UPPER',0);SIc=new VIc('LOWER',1)} +function Lqd(a,b){var c;c=new eC;Spd(c,'x',b.a);Spd(c,'y',b.b);Qpd(a,c)} +function Oqd(a,b){var c;c=new eC;Spd(c,'x',b.a);Spd(c,'y',b.b);Qpd(a,c)} +function Jic(a,b){var c,d;d=false;do{c=Mic(a,b);d=d|c}while(c);return d} +function zHc(a,b){var c,d;c=b;d=0;while(c>0){d+=a.a[c];c-=c&-c}return d} +function Cfd(a,b){var c;c=b;while(c){O6c(a,-c.i,-c.j);c=Xod(c)}return a} +function reb(a,b){var c,d;uCb(b);for(d=a.Kc();d.Ob();){c=d.Pb();b.td(c)}} +function me(a,b){var c;c=b.cd();return new Wo(c,a.e.pc(c,BD(b.dd(),14)))} +function Gsb(a,b,c,d){var e;e=new jtb;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b} +function Nkb(a,b,c){var d;d=(tCb(b,a.c.length),a.c[b]);a.c[b]=c;return d} +function lFd(a,b,c){return BD(b==null?jrb(a.f,null,c):Drb(a.g,b,c),281)} +function fRb(a){return !!a.c&&!!a.d?oRb(a.c)+'->'+oRb(a.d):'e_'+FCb(a)} +function FAb(a,b){return (Uzb(a),WAb(new YAb(a,new qBb(b,a.a)))).sd(DAb)} +function tUb(){qUb();return OC(GC(zP,1),Kie,356,0,[lUb,mUb,nUb,oUb,pUb])} +function _cd(){Ucd();return OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])} +function Dz(b){Az();return function(){return Ez(b,this,arguments);var a}} +function sz(){if(Date.now){return Date.now()}return (new Date).getTime()} +function OZb(a){if(!a.c||!a.d){return false}return !!a.c.i&&a.c.i==a.d.i} +function pv(a){if(!a.c.Sb()){throw vbb(new utb)}a.a=true;return a.c.Ub()} +function ko(a){a.i=0;Alb(a.b,null);Alb(a.c,null);a.a=null;a.e=null;++a.g} +function ycb(a){wcb.call(this,a==null?Xhe:fcb(a),JD(a,78)?BD(a,78):null)} +function PYb(a){MYb();yXb(this);this.a=new Psb;NYb(this,a);Dsb(this.a,a)} +function jYb(){Ckb(this);this.b=new f7c(Pje,Pje);this.a=new f7c(Qje,Qje)} +function rAb(a,b){this.c=0;this.b=b;jvb.call(this,a,17493);this.a=this.c} +function wyb(a){oyb();if(lyb){return}this.c=a;this.e=true;this.a=new Rkb} +function oyb(){oyb=ccb;lyb=true;jyb=false;kyb=false;nyb=false;myb=false} +function C3c(a,b){if(JD(b,149)){return dfb(a.c,BD(b,149).c)}return false} +function zUc(a,b){var c;c=0;!!a&&(c+=a.f.a/2);!!b&&(c+=b.f.a/2);return c} +function j4c(a,b){var c;c=BD(Wrb(a.d,b),23);return c?c:BD(Wrb(a.e,b),23)} +function Lzd(a){this.b=a;Fyd.call(this,a);this.a=BD(Ajd(this.b.a,4),126)} +function Uzd(a){this.b=a;$yd.call(this,a);this.a=BD(Ajd(this.b.a,4),126)} +function $Kd(a){if(!a.t){a.t=new YMd(a);vtd(new c0d(a),0,a.t)}return a.t} +function kad(){ead();return OC(GC(t1,1),Kie,103,0,[cad,bad,aad,_9c,dad])} +function Wbd(){Tbd();return OC(GC(C1,1),Kie,249,0,[Qbd,Sbd,Obd,Pbd,Rbd])} +function Q5c(){N5c();return OC(GC(e1,1),Kie,175,0,[L5c,K5c,I5c,M5c,J5c])} +function Q_c(){N_c();return OC(GC(Q_,1),Kie,316,0,[I_c,J_c,M_c,K_c,L_c])} +function _zc(){Vzc();return OC(GC(_W,1),Kie,315,0,[Uzc,Rzc,Szc,Qzc,Tzc])} +function sqc(){mqc();return OC(GC(IW,1),Kie,335,0,[iqc,hqc,kqc,lqc,jqc])} +function n$c(){k$c();return OC(GC(y_,1),Kie,355,0,[g$c,f$c,i$c,h$c,j$c])} +function _jc(){Xjc();return OC(GC(uV,1),Kie,363,0,[Tjc,Vjc,Wjc,Ujc,Sjc])} +function Ftc(){Ctc();return OC(GC(TW,1),Kie,163,0,[Btc,xtc,ytc,ztc,Atc])} +function T0d(){T0d=ccb;var a,b;R0d=(LFd(),b=new MPd,b);S0d=(a=new OJd,a)} +function yUd(a){var b;if(!a.c){b=a.r;JD(b,88)&&(a.c=BD(b,26))}return a.c} +function zc(a){a.e=3;a.d=a.Yb();if(a.e!=2){a.e=0;return true}return false} +function RC(a){var b,c,d;b=a&Eje;c=a>>22&Eje;d=a<0?Fje:0;return TC(b,c,d)} +function uy(a){var b,c,d,e;for(c=a,d=0,e=c.length;d0?ihb(a,b):lhb(a,-b)} +function Rgb(a,b){if(b==0||a.e==0){return a}return b>0?lhb(a,b):ihb(a,-b)} +function Rr(a){if(Qr(a)){a.c=a.a;return a.a.Pb()}else{throw vbb(new utb)}} +function Yac(a){var b,c;b=a.c.i;c=a.d.i;return b.k==(j0b(),e0b)&&c.k==e0b} +function kZb(a){var b;b=new UZb;tNb(b,a);yNb(b,(Nyc(),jxc),null);return b} +function hid(a,b,c){var d;return d=a.Yg(b),d>=0?a._g(d,c,true):sid(a,b,c)} +function uHb(a,b,c,d){var e;for(e=0;eb){throw vbb(new qcb(Jb(a,b,'index')))}return a} +function zhb(a,b,c,d){var e;e=KC(WD,oje,25,b,15,1);Ahb(e,a,b,c,d);return e} +function _A(a,b){var c;c=a.q.getHours()+(b/60|0);a.q.setMinutes(b);YA(a,c)} +function A$c(a,b){return $wnd.Math.min(S6c(b.a,a.d.d.c),S6c(b.b,a.d.d.c))} +function Thb(a,b){return ND(b)?b==null?krb(a.f,null):Erb(a.g,b):krb(a.f,b)} +function b1b(a){this.c=a;this.a=new olb(this.c.a);this.b=new olb(this.c.b)} +function kRb(){this.e=new Rkb;this.c=new Rkb;this.d=new Rkb;this.b=new Rkb} +function MFb(){this.g=new PFb;this.b=new PFb;this.a=new Rkb;this.k=new Rkb} +function Gjc(a,b,c){this.a=a;this.c=b;this.d=c;Ekb(b.e,this);Ekb(c.b,this)} +function wBb(a,b){fvb.call(this,b.rd(),b.qd()&-6);uCb(a);this.a=a;this.b=b} +function CBb(a,b){jvb.call(this,b.rd(),b.qd()&-6);uCb(a);this.a=a;this.b=b} +function IBb(a,b){nvb.call(this,b.rd(),b.qd()&-6);uCb(a);this.a=a;this.b=b} +function BQc(a,b,c){this.a=a;this.b=b;this.c=c;Ekb(a.t,this);Ekb(b.i,this)} +function SRc(){this.b=new Psb;this.a=new Psb;this.b=new Psb;this.a=new Psb} +function g6c(){g6c=ccb;f6c=new Lsd('org.eclipse.elk.labels.labelManager')} +function Vac(){Vac=ccb;Uac=new Msd('separateLayerConnections',(gbc(),fbc))} +function HOc(){HOc=ccb;GOc=new IOc('REGULAR',0);FOc=new IOc('CRITICAL',1)} +function _Ac(){_Ac=ccb;$Ac=new aBc('STACKED',0);ZAc=new aBc('SEQUENCED',1)} +function C_c(){C_c=ccb;B_c=new D_c('FIXED',0);A_c=new D_c('CENTER_NODE',1)} +function PHc(a,b){var c;c=VHc(a,b);a.b=new BHc(c.c.length);return OHc(a,c)} +function KAd(a,b,c){var d;++a.e;--a.f;d=BD(a.d[b].$c(c),133);return d.dd()} +function JJd(a){var b;if(!a.a){b=a.r;JD(b,148)&&(a.a=BD(b,148))}return a.a} +function poc(a){if(a.a){if(a.e){return poc(a.e)}}else{return a}return null} +function ODc(a,b){if(a.pb.p){return -1}return 0} +function pvb(a,b){uCb(b);if(a.c=0,'Initial capacity must not be negative')} +function lHb(){lHb=ccb;kHb=as((gHb(),OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])))} +function SHb(){SHb=ccb;RHb=as((NHb(),OC(GC(sN,1),Kie,461,0,[LHb,KHb,MHb])))} +function JIb(){JIb=ccb;IIb=as((EIb(),OC(GC(zN,1),Kie,462,0,[DIb,CIb,BIb])))} +function Kyb(){Kyb=ccb;Jyb=as((Fyb(),OC(GC(xL,1),Kie,132,0,[Cyb,Dyb,Eyb])))} +function DTb(){DTb=ccb;CTb=as((yTb(),OC(GC(oP,1),Kie,379,0,[wTb,vTb,xTb])))} +function WXb(){WXb=ccb;VXb=as((RXb(),OC(GC(hQ,1),Kie,423,0,[QXb,PXb,OXb])))} +function Zpc(){Zpc=ccb;Ypc=as((Rpc(),OC(GC(GW,1),Kie,314,0,[Ppc,Opc,Qpc])))} +function gqc(){gqc=ccb;fqc=as((bqc(),OC(GC(HW,1),Kie,337,0,[$pc,aqc,_pc])))} +function Lqc(){Lqc=ccb;Kqc=as((Gqc(),OC(GC(KW,1),Kie,450,0,[Eqc,Dqc,Fqc])))} +function Kkc(){Kkc=ccb;Jkc=as((Fkc(),OC(GC(vV,1),Kie,361,0,[Ekc,Dkc,Ckc])))} +function jsc(){jsc=ccb;isc=as((esc(),OC(GC(RW,1),Kie,303,0,[csc,dsc,bsc])))} +function asc(){asc=ccb;_rc=as((Xrc(),OC(GC(QW,1),Kie,292,0,[Vrc,Wrc,Urc])))} +function Dzc(){Dzc=ccb;Czc=as((xzc(),OC(GC(ZW,1),Kie,378,0,[uzc,vzc,wzc])))} +function YAc(){YAc=ccb;XAc=as((TAc(),OC(GC(eX,1),Kie,375,0,[QAc,RAc,SAc])))} +function yAc(){yAc=ccb;xAc=as((tAc(),OC(GC(bX,1),Kie,339,0,[rAc,qAc,sAc])))} +function PAc(){PAc=ccb;OAc=as((KAc(),OC(GC(dX,1),Kie,452,0,[JAc,HAc,IAc])))} +function QBc(){QBc=ccb;PBc=as((LBc(),OC(GC(jX,1),Kie,377,0,[JBc,KBc,IBc])))} +function yBc(){yBc=ccb;xBc=as((tBc(),OC(GC(hX,1),Kie,336,0,[qBc,rBc,sBc])))} +function HBc(){HBc=ccb;GBc=as((CBc(),OC(GC(iX,1),Kie,338,0,[BBc,zBc,ABc])))} +function wGc(){wGc=ccb;vGc=as((rGc(),OC(GC(PX,1),Kie,454,0,[oGc,pGc,qGc])))} +function zVc(){zVc=ccb;yVc=as((tVc(),OC(GC(O$,1),Kie,442,0,[sVc,qVc,rVc])))} +function vWc(){vWc=ccb;uWc=as((pWc(),OC(GC(Y$,1),Kie,380,0,[mWc,nWc,oWc])))} +function EYc(){EYc=ccb;DYc=as((zYc(),OC(GC(q_,1),Kie,381,0,[xYc,yYc,wYc])))} +function yXc(){yXc=ccb;xXc=as((sXc(),OC(GC(b_,1),Kie,293,0,[qXc,rXc,pXc])))} +function b_c(){b_c=ccb;a_c=as((Y$c(),OC(GC(J_,1),Kie,437,0,[V$c,W$c,X$c])))} +function mbd(){mbd=ccb;lbd=as((hbd(),OC(GC(z1,1),Kie,334,0,[fbd,ebd,gbd])))} +function vad(){vad=ccb;uad=as((qad(),OC(GC(u1,1),Kie,272,0,[nad,oad,pad])))} +function icd(){dcd();return OC(GC(D1,1),Kie,98,0,[ccd,bcd,acd,Zbd,_bd,$bd])} +function ikd(a,b){return !a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),qAd(a.o,b)} +function NAd(a){!a.g&&(a.g=new JCd);!a.g.d&&(a.g.d=new MBd(a));return a.g.d} +function yAd(a){!a.g&&(a.g=new JCd);!a.g.a&&(a.g.a=new SBd(a));return a.g.a} +function EAd(a){!a.g&&(a.g=new JCd);!a.g.b&&(a.g.b=new GBd(a));return a.g.b} +function FAd(a){!a.g&&(a.g=new JCd);!a.g.c&&(a.g.c=new iCd(a));return a.g.c} +function A2d(a,b,c){var d,e;e=new p4d(b,a);for(d=0;dc||b=0?a._g(c,true,true):sid(a,b,true)} +function s6b(a,b){return Kdb(Edb(ED(vNb(a,(wtc(),htc)))),Edb(ED(vNb(b,htc))))} +function pUc(){pUc=ccb;oUc=b3c(b3c(g3c(new j3c,(yRc(),vRc)),(qSc(),pSc)),lSc)} +function IHc(a,b,c){var d;d=SHc(a,b,c);a.b=new BHc(d.c.length);return KHc(a,d)} +function qhe(a){if(a.b<=0)throw vbb(new utb);--a.b;a.a-=a.c.c;return meb(a.a)} +function ptd(a){var b;if(!a.a){throw vbb(new vtb)}b=a.a;a.a=Xod(a.a);return b} +function dBb(a){while(!a.a){if(!HBb(a.c,new hBb(a))){return false}}return true} +function vr(a){var b;Qb(a);if(JD(a,198)){b=BD(a,198);return b}return new wr(a)} +function r3c(a){p3c();BD(a.We((Y9c(),x9c)),174).Fc((rcd(),ocd));a.Ye(w9c,null)} +function p3c(){p3c=ccb;m3c=new v3c;o3c=new x3c;n3c=mn((Y9c(),w9c),m3c,b9c,o3c)} +function fWc(){fWc=ccb;dWc=new hWc('LEAF_NUMBER',0);eWc=new hWc('NODE_SIZE',1)} +function UMc(a,b,c){a.a=b;a.c=c;a.b.a.$b();Osb(a.d);a.e.a.c=KC(SI,Uhe,1,0,5,1)} +function yHc(a){a.a=KC(WD,oje,25,a.b+1,15,1);a.c=KC(WD,oje,25,a.b,15,1);a.d=0} +function MWb(a,b){if(a.a.ue(b.d,a.b)>0){Ekb(a.c,new dWb(b.c,b.d,a.d));a.b=b.d}} +function nud(a,b){if(a.g==null||b>=a.i)throw vbb(new $zd(b,a.i));return a.g[b]} +function pOd(a,b,c){Itd(a,c);if(c!=null&&!a.wj(c)){throw vbb(new tcb)}return c} +function KLd(a){var b;if(a.Ek()){for(b=a.i-1;b>=0;--b){qud(a,b)}}return wud(a)} +function Bwb(a){var b,c;if(!a.b){return null}c=a.b;while(b=c.a[0]){c=b}return c} +function ulb(a,b){var c,d;pCb(b);return c=(d=a.slice(0,b),PC(d,a)),c.length=b,c} +function Klb(a,b,c,d){var e;d=(ipb(),!d?fpb:d);e=a.slice(b,c);Llb(e,a,b,c,-b,d)} +function bid(a,b,c,d,e){return b<0?sid(a,c,d):BD(c,66).Nj().Pj(a,a.yh(),b,d,e)} +function hZd(a){if(JD(a,172)){return ''+BD(a,172).a}return a==null?null:fcb(a)} +function iZd(a){if(JD(a,172)){return ''+BD(a,172).a}return a==null?null:fcb(a)} +function nDb(a,b){if(b.a){throw vbb(new hz(Hke))}Qqb(a.a,b);b.a=a;!a.j&&(a.j=b)} +function qBb(a,b){nvb.call(this,b.rd(),b.qd()&-16449);uCb(a);this.a=a;this.c=b} +function Ti(a,b){var c,d;d=b/a.c.Hd().gc()|0;c=b%a.c.Hd().gc();return Mi(a,d,c)} +function NHb(){NHb=ccb;LHb=new OHb(jle,0);KHb=new OHb(gle,1);MHb=new OHb(kle,2)} +function lxb(){lxb=ccb;hxb=new mxb('All',0);ixb=new rxb;jxb=new txb;kxb=new wxb} +function zxb(){zxb=ccb;yxb=as((lxb(),OC(GC(iL,1),Kie,297,0,[hxb,ixb,jxb,kxb])))} +function uWb(){uWb=ccb;tWb=as((lWb(),OC(GC(SP,1),Kie,405,0,[hWb,kWb,iWb,jWb])))} +function ALb(){ALb=ccb;zLb=as((vLb(),OC(GC(PN,1),Kie,406,0,[uLb,rLb,sLb,tLb])))} +function WMb(){WMb=ccb;VMb=as((RMb(),OC(GC(jO,1),Kie,323,0,[OMb,NMb,PMb,QMb])))} +function WOb(){WOb=ccb;VOb=as((ROb(),OC(GC(CO,1),Kie,394,0,[OOb,NOb,POb,QOb])))} +function GRc(){GRc=ccb;FRc=as((yRc(),OC(GC(h$,1),Kie,393,0,[uRc,vRc,wRc,xRc])))} +function mbc(){mbc=ccb;lbc=as((gbc(),OC(GC(VS,1),Kie,360,0,[fbc,dbc,ebc,cbc])))} +function oXc(){oXc=ccb;nXc=as((iXc(),OC(GC(a_,1),Kie,340,0,[hXc,fXc,gXc,eXc])))} +function Fjc(){Fjc=ccb;Ejc=as((Ajc(),OC(GC(mV,1),Kie,411,0,[wjc,xjc,yjc,zjc])))} +function Pzc(){Pzc=ccb;Ozc=as((Izc(),OC(GC($W,1),Kie,197,0,[Gzc,Hzc,Fzc,Ezc])))} +function ugd(){ugd=ccb;tgd=as((pgd(),OC(GC(k2,1),Kie,396,0,[mgd,ngd,lgd,ogd])))} +function xbd(){xbd=ccb;wbd=as((rbd(),OC(GC(A1,1),Kie,285,0,[qbd,nbd,obd,pbd])))} +function Fad(){Fad=ccb;Ead=as((Aad(),OC(GC(v1,1),Kie,218,0,[zad,xad,wad,yad])))} +function Ied(){Ied=ccb;Hed=as((Ded(),OC(GC(O1,1),Kie,311,0,[Ced,zed,Bed,Aed])))} +function ydd(){ydd=ccb;xdd=as((tdd(),OC(GC(I1,1),Kie,374,0,[rdd,sdd,qdd,pdd])))} +function A9d(){A9d=ccb;Smd();x9d=Pje;w9d=Qje;z9d=new Ndb(Pje);y9d=new Ndb(Qje)} +function _qc(){_qc=ccb;$qc=new arc(ane,0);Zqc=new arc('IMPROVE_STRAIGHTNESS',1)} +function eIc(a,b){FHc();return Ekb(a,new vgd(b,meb(b.e.c.length+b.g.c.length)))} +function gIc(a,b){FHc();return Ekb(a,new vgd(b,meb(b.e.c.length+b.g.c.length)))} +function PC(a,b){HC(b)!=10&&OC(rb(b),b.hm,b.__elementTypeId$,HC(b),a);return a} +function Lkb(a,b){var c;c=Jkb(a,b,0);if(c==-1){return false}Kkb(a,c);return true} +function Zrb(a,b){var c;c=BD(Thb(a.e,b),387);if(c){jsb(c);return c.e}return null} +function Jbb(a){var b;if(Fbb(a)){b=0-a;if(!isNaN(b)){return b}}return zbb(hD(a))} +function Jkb(a,b,c){for(;c=0?fid(a,c,true,true):sid(a,b,true)} +function vgc(a,b){qgc();var c,d;c=ugc(a);d=ugc(b);return !!c&&!!d&&!omb(c.k,d.k)} +function Gqd(a,b){dld(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function Hqd(a,b){eld(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function Iqd(a,b){cld(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function Jqd(a,b){ald(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function agd(a){(!this.q?(mmb(),mmb(),kmb):this.q).Ac(!a.q?(mmb(),mmb(),kmb):a.q)} +function S2d(a,b){return JD(b,99)&&(BD(b,18).Bb&Tje)!=0?new s4d(b,a):new p4d(b,a)} +function U2d(a,b){return JD(b,99)&&(BD(b,18).Bb&Tje)!=0?new s4d(b,a):new p4d(b,a)} +function INb(a,b){HNb=new tOb;FNb=b;GNb=a;BD(GNb.b,65);KNb(GNb,HNb,null);JNb(GNb)} +function uud(a,b,c){var d;d=a.g[b];mud(a,b,a.oi(b,c));a.gi(b,c,d);a.ci();return d} +function Ftd(a,b){var c;c=a.Xc(b);if(c>=0){a.$c(c);return true}else{return false}} +function YId(a){var b;if(a.d!=a.r){b=wId(a);a.e=!!b&&b.Cj()==Bve;a.d=b}return a.e} +function fr(a,b){var c;Qb(a);Qb(b);c=false;while(b.Ob()){c=c|a.Fc(b.Pb())}return c} +function Wrb(a,b){var c;c=BD(Ohb(a.e,b),387);if(c){Yrb(a,c);return c.e}return null} +function UA(a){var b,c;b=a/60|0;c=a%60;if(c==0){return ''+b}return ''+b+':'+(''+c)} +function LAb(a,b){var c,d;Uzb(a);d=new IBb(b,a.a);c=new fBb(d);return new YAb(a,c)} +function tB(d,a){var b=d.a[a];var c=(rC(),qC)[typeof b];return c?c(b):xC(typeof b)} +function yzc(a){switch(a.g){case 0:return Ohe;case 1:return -1;default:return 0;}} +function oD(a){if(eD(a,(wD(),vD))<0){return -aD(hD(a))}return a.l+a.m*Hje+a.h*Ije} +function HC(a){return a.__elementTypeCategory$==null?10:a.__elementTypeCategory$} +function dub(a){var b;b=a.b.c.length==0?null:Ikb(a.b,0);b!=null&&fub(a,0);return b} +function uA(a,b){while(b[0]=0){++b[0]}} +function sgb(a,b){this.e=b;this.a=vgb(a);this.a<54?(this.f=Sbb(a)):(this.c=ghb(a))} +function vge(a,b,c,d){wfe();xfe.call(this,26);this.c=a;this.a=b;this.d=c;this.b=d} +function EA(a,b,c){var d,e;d=10;for(e=0;ea.a[d]&&(d=c)}return d} +function fic(a,b){var c;c=Jy(a.e.c,b.e.c);if(c==0){return Kdb(a.e.d,b.e.d)}return c} +function Ogb(a,b){if(b.e==0){return Ggb}if(a.e==0){return Ggb}return Dhb(),Ehb(a,b)} +function nCb(a,b){if(!a){throw vbb(new Wdb(DCb('Enum constant undefined: %s',b)))}} +function AWb(){AWb=ccb;xWb=new XWb;yWb=new _Wb;vWb=new dXb;wWb=new hXb;zWb=new lXb} +function UEb(){UEb=ccb;SEb=new VEb('BY_SIZE',0);TEb=new VEb('BY_SIZE_AND_SHAPE',1)} +function XRb(){XRb=ccb;VRb=new YRb('EADES',0);WRb=new YRb('FRUCHTERMAN_REINGOLD',1)} +function xqc(){xqc=ccb;vqc=new yqc('READING_DIRECTION',0);wqc=new yqc('ROTATION',1)} +function uqc(){uqc=ccb;tqc=as((mqc(),OC(GC(IW,1),Kie,335,0,[iqc,hqc,kqc,lqc,jqc])))} +function bAc(){bAc=ccb;aAc=as((Vzc(),OC(GC(_W,1),Kie,315,0,[Uzc,Rzc,Szc,Qzc,Tzc])))} +function bkc(){bkc=ccb;akc=as((Xjc(),OC(GC(uV,1),Kie,363,0,[Tjc,Vjc,Wjc,Ujc,Sjc])))} +function Htc(){Htc=ccb;Gtc=as((Ctc(),OC(GC(TW,1),Kie,163,0,[Btc,xtc,ytc,ztc,Atc])))} +function S_c(){S_c=ccb;R_c=as((N_c(),OC(GC(Q_,1),Kie,316,0,[I_c,J_c,M_c,K_c,L_c])))} +function S5c(){S5c=ccb;R5c=as((N5c(),OC(GC(e1,1),Kie,175,0,[L5c,K5c,I5c,M5c,J5c])))} +function p$c(){p$c=ccb;o$c=as((k$c(),OC(GC(y_,1),Kie,355,0,[g$c,f$c,i$c,h$c,j$c])))} +function vUb(){vUb=ccb;uUb=as((qUb(),OC(GC(zP,1),Kie,356,0,[lUb,mUb,nUb,oUb,pUb])))} +function mad(){mad=ccb;lad=as((ead(),OC(GC(t1,1),Kie,103,0,[cad,bad,aad,_9c,dad])))} +function Ybd(){Ybd=ccb;Xbd=as((Tbd(),OC(GC(C1,1),Kie,249,0,[Qbd,Sbd,Obd,Pbd,Rbd])))} +function cdd(){cdd=ccb;bdd=as((Ucd(),OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])))} +function _1c(a,b){var c;c=BD(Ohb(a.a,b),134);if(!c){c=new zNb;Rhb(a.a,b,c)}return c} +function hoc(a){var b;b=BD(vNb(a,(wtc(),usc)),305);if(b){return b.a==a}return false} +function ioc(a){var b;b=BD(vNb(a,(wtc(),usc)),305);if(b){return b.i==a}return false} +function Jub(a,b){uCb(b);Iub(a);if(a.d.Ob()){b.td(a.d.Pb());return true}return false} +function Oy(a){if(ybb(a,Ohe)>0){return Ohe}if(ybb(a,Rie)<0){return Rie}return Tbb(a)} +function Cv(a){if(a<3){Xj(a,Hie);return a+1}if(a=0&&b=-0.01&&a.a<=ple&&(a.a=0);a.b>=-0.01&&a.b<=ple&&(a.b=0);return a} +function sfb(a,b){return b==(ntb(),ntb(),mtb)?a.toLocaleLowerCase():a.toLowerCase()} +function idb(a){return ((a.i&2)!=0?'interface ':(a.i&1)!=0?'':'class ')+(fdb(a),a.o)} +function Pnd(a){var b,c;c=(b=new SSd,b);wtd((!a.q&&(a.q=new cUd(n5,a,11,10)),a.q),c)} +function Pdd(a,b){var c;c=b>0?b-1:b;return Vdd(Wdd(Xdd(Ydd(new Zdd,c),a.n),a.j),a.k)} +function u2d(a,b,c,d){var e;a.j=-1;Qxd(a,I2d(a,b,c),(Q6d(),e=BD(b,66).Mj(),e.Ok(d)))} +function VWb(a){this.g=a;this.f=new Rkb;this.a=$wnd.Math.min(this.g.c.c,this.g.d.c)} +function mDb(a){this.b=new Rkb;this.a=new Rkb;this.c=new Rkb;this.d=new Rkb;this.e=a} +function Cnc(a,b){this.a=new Lqb;this.e=new Lqb;this.b=(xzc(),wzc);this.c=a;this.b=b} +function bIb(a,b,c){$Gb.call(this);THb(this);this.a=a;this.c=c;this.b=b.d;this.f=b.e} +function yd(a){this.d=a;this.c=a.c.vc().Kc();this.b=null;this.a=null;this.e=(hs(),gs)} +function zud(a){if(a<0){throw vbb(new Wdb('Illegal Capacity: '+a))}this.g=this.ri(a)} +function avb(a,b){if(0>a||a>b){throw vbb(new scb('fromIndex: 0, toIndex: '+a+oke+b))}} +function Gs(a){var b;if(a.a==a.b.a){throw vbb(new utb)}b=a.a;a.c=b;a.a=a.a.e;return b} +function Zsb(a){var b;yCb(!!a.c);b=a.c.a;Nsb(a.d,a.c);a.b==a.c?(a.b=b):--a.a;a.c=null} +function VAb(a,b){var c;Uzb(a);c=new lBb(a,a.a.rd(),a.a.qd()|4,b);return new YAb(a,c)} +function ke(a,b){var c,d;c=BD(Hv(a.d,b),14);if(!c){return null}d=b;return a.e.pc(d,c)} +function xac(a,b){var c,d;for(d=a.Kc();d.Ob();){c=BD(d.Pb(),70);yNb(c,(wtc(),Ssc),b)}} +function t9b(a){var b;b=Edb(ED(vNb(a,(Nyc(),Zwc))));if(b<0){b=0;yNb(a,Zwc,b)}return b} +function ifc(a,b,c){var d;d=$wnd.Math.max(0,a.b/2-0.5);cfc(c,d,1);Ekb(b,new rfc(c,d))} +function NMc(a,b,c){var d;d=a.a.e[BD(b.a,10).p]-a.a.e[BD(c.a,10).p];return QD(Eeb(d))} +function iZb(a,b,c,d,e,f){var g;g=kZb(d);QZb(g,e);RZb(g,f);Rc(a.a,d,new BZb(g,b,c.f))} +function Bid(a,b){var c;c=YKd(a.Tg(),b);if(!c){throw vbb(new Wdb(ite+b+lte))}return c} +function ntd(a,b){var c;c=a;while(Xod(c)){c=Xod(c);if(c==b){return true}}return false} +function Uw(a,b){var c,d,e;d=b.a.cd();c=BD(b.a.dd(),14).gc();for(e=0;e0){a.a/=b;a.b/=b}return a} +function bKd(a){var b;if(a.w){return a.w}else{b=cKd(a);!!b&&!b.kh()&&(a.w=b);return b}} +function gZd(a){var b;if(a==null){return null}else{b=BD(a,190);return Umd(b,b.length)}} +function qud(a,b){if(a.g==null||b>=a.i)throw vbb(new $zd(b,a.i));return a.li(b,a.g[b])} +function Mmc(a){var b,c;b=a.a.d.j;c=a.c.d.j;while(b!=c){rqb(a.b,b);b=Xcd(b)}rqb(a.b,b)} +function Jmc(a){var b;for(b=0;b=14&&b<=16)));return a} +function dcb(a,b,c){var d=function(){return a.apply(d,arguments)};b.apply(d,c);return d} +function TLc(a,b,c){var d,e;d=b;do{e=Edb(a.p[d.p])+c;a.p[d.p]=e;d=a.a[d.p]}while(d!=b)} +function NQd(a,b){var c,d;d=a.a;c=OQd(a,b,null);d!=b&&!a.e&&(c=QQd(a,b,c));!!c&&c.Fi()} +function ADb(a,b){return Iy(),My(Qie),$wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)} +function Ky(a,b){Iy();My(Qie);return $wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)} +function Akc(a,b){gkc();return beb(a.b.c.length-a.e.c.length,b.b.c.length-b.e.c.length)} +function oo(a,b){return Kv(uo(a,b,Tbb(Ibb(Eie,keb(Tbb(Ibb(b==null?0:tb(b),Fie)),15)))))} +function o0b(){o0b=ccb;n0b=as((j0b(),OC(GC(NQ,1),Kie,267,0,[h0b,g0b,e0b,i0b,f0b,d0b])))} +function n8c(){n8c=ccb;m8c=as((i8c(),OC(GC(r1,1),Kie,291,0,[h8c,g8c,f8c,d8c,c8c,e8c])))} +function K7c(){K7c=ccb;J7c=as((F7c(),OC(GC(o1,1),Kie,248,0,[z7c,C7c,D7c,E7c,A7c,B7c])))} +function Fpc(){Fpc=ccb;Epc=as((Apc(),OC(GC(EW,1),Kie,227,0,[wpc,ypc,vpc,xpc,zpc,upc])))} +function Drc(){Drc=ccb;Crc=as((yrc(),OC(GC(OW,1),Kie,275,0,[wrc,trc,xrc,vrc,urc,rrc])))} +function qrc(){qrc=ccb;prc=as((lrc(),OC(GC(NW,1),Kie,274,0,[irc,hrc,krc,grc,jrc,frc])))} +function tzc(){tzc=ccb;szc=as((lzc(),OC(GC(YW,1),Kie,313,0,[jzc,hzc,fzc,gzc,kzc,izc])))} +function Yqc(){Yqc=ccb;Xqc=as((Sqc(),OC(GC(LW,1),Kie,276,0,[Nqc,Mqc,Pqc,Oqc,Rqc,Qqc])))} +function wSc(){wSc=ccb;vSc=as((qSc(),OC(GC(t$,1),Kie,327,0,[pSc,lSc,nSc,mSc,oSc,kSc])))} +function ycd(){ycd=ccb;xcd=as((rcd(),OC(GC(E1,1),Kie,273,0,[pcd,ncd,ocd,mcd,lcd,qcd])))} +function Rad(){Rad=ccb;Qad=as((Mad(),OC(GC(w1,1),Kie,312,0,[Kad,Iad,Lad,Gad,Jad,Had])))} +function Lbd(){Hbd();return OC(GC(B1,1),Kie,93,0,[zbd,ybd,Bbd,Gbd,Fbd,Ebd,Cbd,Dbd,Abd])} +function vkd(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,0,c,a.a))} +function wkd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,1,c,a.b))} +function hmd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,3,c,a.b))} +function ald(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,3,c,a.f))} +function cld(a,b){var c;c=a.g;a.g=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,4,c,a.g))} +function dld(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,5,c,a.i))} +function eld(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,6,c,a.j))} +function omd(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,1,c,a.j))} +function imd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,4,c,a.c))} +function pmd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,2,c,a.k))} +function qQd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new mSd(a,2,c,a.d))} +function AId(a,b){var c;c=a.s;a.s=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new mSd(a,4,c,a.s))} +function DId(a,b){var c;c=a.t;a.t=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new mSd(a,5,c,a.t))} +function _Jd(a,b){var c;c=a.F;a.F=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,5,c,b))} +function izd(a,b){var c;c=BD(Ohb((pEd(),oEd),a),55);return c?c.xj(b):KC(SI,Uhe,1,b,5,1)} +function Xpd(a,b){var c,d;c=b in a.a;if(c){d=aC(a,b).he();if(d){return d.a}}return null} +function ftd(a,b){var c,d,e;c=(d=(Fhd(),e=new Jod,e),!!b&&God(d,b),d);Hod(c,a);return c} +function LLd(a,b,c){Itd(a,c);if(!a.Bk()&&c!=null&&!a.wj(c)){throw vbb(new tcb)}return c} +function Xdd(a,b){a.n=b;if(a.n){a.f=new Rkb;a.e=new Rkb}else{a.f=null;a.e=null}return a} +function ndb(a,b,c,d,e,f){var g;g=ldb(a,b);zdb(c,g);g.i=e?8:0;g.f=d;g.e=e;g.g=f;return g} +function rSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=1;this.c=a;this.a=c} +function tSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=2;this.c=a;this.a=c} +function BSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=6;this.c=a;this.a=c} +function GSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=7;this.c=a;this.a=c} +function xSd(a,b,c,d,e){this.d=b;this.j=d;this.e=e;this.o=-1;this.p=4;this.c=a;this.a=c} +function rDb(a,b){var c,d,e,f;for(d=b,e=0,f=d.length;e=0);if(ekb(a.d,a.c)<0){a.a=a.a-1&a.d.a.length-1;a.b=a.d.c}a.c=-1} +function pgb(a){if(a.a<54){return a.f<0?-1:a.f>0?1:0}return (!a.c&&(a.c=fhb(a.f)),a.c).e} +function My(a){if(!(a>=0)){throw vbb(new Wdb('tolerance ('+a+') must be >= 0'))}return a} +function n4c(){if(!f4c){f4c=new m4c;l4c(f4c,OC(GC(C0,1),Uhe,130,0,[new Z9c]))}return f4c} +function KAc(){KAc=ccb;JAc=new LAc(ole,0);HAc=new LAc('INPUT',1);IAc=new LAc('OUTPUT',2)} +function bqc(){bqc=ccb;$pc=new cqc('ARD',0);aqc=new cqc('MSD',1);_pc=new cqc('MANUAL',2)} +function rGc(){rGc=ccb;oGc=new sGc('BARYCENTER',0);pGc=new sGc(Bne,1);qGc=new sGc(Cne,2)} +function ztd(a,b){var c;c=a.gc();if(b<0||b>c)throw vbb(new Cyd(b,c));return new czd(a,b)} +function JAd(a,b){var c;if(JD(b,42)){return a.c.Mc(b)}else{c=qAd(a,b);LAd(a,b);return c}} +function $nd(a,b,c){yId(a,b);pnd(a,c);AId(a,0);DId(a,1);CId(a,true);BId(a,true);return a} +function Xj(a,b){if(a<0){throw vbb(new Wdb(b+' cannot be negative but was: '+a))}return a} +function Bt(a,b){var c,d;for(c=0,d=a.gc();c0){return BD(Ikb(c.a,d-1),10)}return null} +function Lkd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,2,c,a.k))} +function kmd(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,8,c,a.f))} +function lmd(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,7,c,a.i))} +function Hod(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,8,c,a.a))} +function zpd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,0,c,a.b))} +function UUd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,0,c,a.b))} +function VUd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,1,c,a.c))} +function Apd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,1,c,a.c))} +function pQd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,4,c,a.c))} +function PHd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,1,c,a.d))} +function jKd(a,b){var c;c=a.D;a.D=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,2,c,a.D))} +function Rdd(a,b){if(a.r>0&&a.c0&&a.g!=0&&Rdd(a.i,b/a.r*a.i.d)}} +function dge(a,b,c){var d;a.b=b;a.a=c;d=(a.a&512)==512?new hee:new ude;a.c=ode(d,a.b,a.a)} +function g3d(a,b){return T6d(a.e,b)?(Q6d(),YId(b)?new R7d(b,a):new f7d(b,a)):new c8d(b,a)} +function _o(a,b){return Fv(vo(a.a,b,Tbb(Ibb(Eie,keb(Tbb(Ibb(b==null?0:tb(b),Fie)),15)))))} +function Nyb(a,b,c){return Ayb(a,new Kzb(b),new Mzb,new Ozb(c),OC(GC(xL,1),Kie,132,0,[]))} +function pAb(a){var b,c;if(0>a){return new yAb}b=a+1;c=new rAb(b,a);return new vAb(null,c)} +function umb(a,b){mmb();var c;c=new Mqb(1);ND(a)?Shb(c,a,b):jrb(c.f,a,b);return new iob(c)} +function aMb(a,b){var c,d;c=a.o+a.p;d=b.o+b.p;if(cb){b<<=1;return b>0?b:Iie}return b} +function xc(a){Ub(a.e!=3);switch(a.e){case 2:return false;case 0:return true;}return zc(a)} +function T6c(a,b){var c;if(JD(b,8)){c=BD(b,8);return a.a==c.a&&a.b==c.b}else{return false}} +function _Mb(a,b,c){var d,e,f;f=b>>5;e=b&31;d=xbb(Pbb(a.n[c][f],Tbb(Nbb(e,1))),3);return d} +function IAd(a,b){var c,d;for(d=b.vc().Kc();d.Ob();){c=BD(d.Pb(),42);HAd(a,c.cd(),c.dd())}} +function N1c(a,b){var c;c=new tOb;BD(b.b,65);BD(b.b,65);BD(b.b,65);Hkb(b.a,new T1c(a,c,b))} +function DUd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,21,c,a.b))} +function jmd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,11,c,a.d))} +function _Id(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,13,c,a.j))} +function $jb(a,b,c){var d,e,f;f=a.a.length-1;for(e=a.b,d=0;d>>31}d!=0&&(a[c]=d)} +function rmb(a,b){mmb();var c,d;d=new Rkb;for(c=0;c0){this.g=this.ri(this.i+(this.i/8|0)+1);a.Qc(this.g)}} +function u3d(a,b){k2d.call(this,D9,a,b);this.b=this;this.a=S6d(a.Tg(),XKd(this.e.Tg(),this.c))} +function Ld(a,b){var c,d;uCb(b);for(d=b.vc().Kc();d.Ob();){c=BD(d.Pb(),42);a.zc(c.cd(),c.dd())}} +function G2d(a,b,c){var d;for(d=c.Kc();d.Ob();){if(!E2d(a,b,d.Pb())){return false}}return true} +function sVd(a,b,c,d,e){var f;if(c){f=bLd(b.Tg(),a.c);e=c.gh(b,-1-(f==-1?d:f),null,e)}return e} +function tVd(a,b,c,d,e){var f;if(c){f=bLd(b.Tg(),a.c);e=c.ih(b,-1-(f==-1?d:f),null,e)}return e} +function Mgb(a){var b;if(a.b==-2){if(a.e==0){b=-1}else{for(b=0;a.a[b]==0;b++);}a.b=b}return a.b} +function Z4b(a){switch(a.g){case 2:return Ucd(),Tcd;case 4:return Ucd(),zcd;default:return a;}} +function $4b(a){switch(a.g){case 1:return Ucd(),Rcd;case 3:return Ucd(),Acd;default:return a;}} +function nkc(a){var b,c,d;return a.j==(Ucd(),Acd)&&(b=pkc(a),c=uqb(b,zcd),d=uqb(b,Tcd),d||d&&c)} +function oqb(a){var b,c;b=BD(a.e&&a.e(),9);c=BD(ZBb(b,b.length),9);return new xqb(b,c,b.length)} +function l7b(a,b){Odd(b,zne,1);UGb(TGb(new YGb((a$b(),new l$b(a,false,false,new T$b)))));Qdd(b)} +function Fcb(a,b){Bcb();return ND(a)?cfb(a,GD(b)):LD(a)?Ddb(a,ED(b)):KD(a)?Dcb(a,DD(b)):a.wd(b)} +function WZc(a,b){b.q=a;a.d=$wnd.Math.max(a.d,b.r);a.b+=b.d+(a.a.c.length==0?0:a.c);Ekb(a.a,b)} +function m6c(a,b){var c,d,e,f;e=a.c;c=a.c+a.b;f=a.d;d=a.d+a.a;return b.a>e&&b.af&&b.b1||a.Ob()){++a.a;a.g=0;b=a.i;a.Ob();return b}else{throw vbb(new utb)}} +function kNc(a){fNc();var b;if(!Lpb(eNc,a)){b=new hNc;b.a=a;Opb(eNc,a,b)}return BD(Mpb(eNc,a),635)} +function Rbb(a){var b,c,d,e;e=a;d=0;if(e<0){e+=Ije;d=Fje}c=QD(e/Hje);b=QD(e-c*Hje);return TC(b,c,d)} +function Ox(a){var b,c,d;d=0;for(c=new Gqb(a.a);c.a>22);e=a.h+b.h+(d>>22);return TC(c&Eje,d&Eje,e&Fje)} +function nD(a,b){var c,d,e;c=a.l-b.l;d=a.m-b.m+(c>>22);e=a.h-b.h+(d>>22);return TC(c&Eje,d&Eje,e&Fje)} +function bdb(a){var b;if(a<128){b=(ddb(),cdb)[a];!b&&(b=cdb[a]=new Xcb(a));return b}return new Xcb(a)} +function ubb(a){var b;if(JD(a,78)){return a}b=a&&a.__java$exception;if(!b){b=new lz(a);Sz(b)}return b} +function btd(a){if(JD(a,186)){return BD(a,118)}else if(!a){throw vbb(new Heb(gue))}else{return null}} +function Zjb(a,b){if(b==null){return false}while(a.a!=a.b){if(pb(b,vkb(a))){return true}}return false} +function kib(a){if(a.a.Ob()){return true}if(a.a!=a.d){return false}a.a=new orb(a.e.f);return a.a.Ob()} +function Gkb(a,b){var c,d;c=b.Pc();d=c.length;if(d==0){return false}bCb(a.c,a.c.length,c);return true} +function Vyb(a,b,c){var d,e;for(e=b.vc().Kc();e.Ob();){d=BD(e.Pb(),42);a.yc(d.cd(),d.dd(),c)}return a} +function yac(a,b){var c,d;for(d=new olb(a.b);d.a=0,'Negative initial capacity');mCb(b>=0,'Non-positive load factor');Uhb(this)} +function _Ed(a,b,c){if(a>=128)return false;return a<64?Kbb(xbb(Nbb(1,a),c),0):Kbb(xbb(Nbb(1,a-64),b),0)} +function bOb(a,b){if(!a||!b||a==b){return false}return Jy(a.b.c,b.b.c+b.b.b)<0&&Jy(b.b.c,a.b.c+a.b.b)<0} +function I4b(a){var b,c,d;c=a.n;d=a.o;b=a.d;return new J6c(c.a-b.b,c.b-b.d,d.a+(b.b+b.c),d.b+(b.d+b.a))} +function $ic(a){var b,c,d,e;for(c=a.a,d=0,e=c.length;dd)throw vbb(new Cyd(b,d));a.hi()&&(c=Dtd(a,c));return a.Vh(b,c)} +function xNb(a,b,c){return c==null?(!a.q&&(a.q=new Lqb),Thb(a.q,b)):(!a.q&&(a.q=new Lqb),Rhb(a.q,b,c)),a} +function yNb(a,b,c){c==null?(!a.q&&(a.q=new Lqb),Thb(a.q,b)):(!a.q&&(a.q=new Lqb),Rhb(a.q,b,c));return a} +function TQb(a){var b,c;c=new kRb;tNb(c,a);yNb(c,(HSb(),FSb),a);b=new Lqb;VQb(a,c,b);UQb(a,c,b);return c} +function j6c(a){i6c();var b,c,d;c=KC(m1,nie,8,2,0,1);d=0;for(b=0;b<2;b++){d+=0.5;c[b]=r6c(d,a)}return c} +function Mic(a,b){var c,d,e,f;c=false;d=a.a[b].length;for(f=0;f>=1);return b}} +function $C(a){var b,c;c=heb(a.h);if(c==32){b=heb(a.m);return b==32?heb(a.l)+32:b+20-10}else{return c-12}} +function bkb(a){var b;b=a.a[a.b];if(b==null){return null}NC(a.a,a.b,null);a.b=a.b+1&a.a.length-1;return b} +function EDc(a){var b,c;b=a.t-a.k[a.o.p]*a.d+a.j[a.o.p]>a.f;c=a.u+a.e[a.o.p]*a.d>a.f*a.s*a.d;return b||c} +function Iwb(a,b,c){var d,e;d=new exb(b,c);e=new fxb;a.b=Gwb(a,a.b,d,e);e.b||++a.c;a.b.b=false;return e.d} +function djc(a,b,c){var d,e,f,g;g=CHc(b,c);f=0;for(e=g.Kc();e.Ob();){d=BD(e.Pb(),11);Rhb(a.c,d,meb(f++))}} +function xVb(a){var b,c;for(c=new olb(a.a.b);c.ac&&(c=a[b])}return c} +function SHc(a,b,c){var d;d=new Rkb;UHc(a,b,d,(Ucd(),zcd),true,false);UHc(a,c,d,Tcd,false,false);return d} +function crd(a,b,c){var d,e,f,g;f=null;g=b;e=Ypd(g,'labels');d=new Hrd(a,c);f=(Dqd(d.a,d.b,e),e);return f} +function j1d(a,b,c,d){var e;e=r1d(a,b,c,d);if(!e){e=i1d(a,c,d);if(!!e&&!e1d(a,b,e)){return null}}return e} +function m1d(a,b,c,d){var e;e=s1d(a,b,c,d);if(!e){e=l1d(a,c,d);if(!!e&&!e1d(a,b,e)){return null}}return e} +function Xb(a,b){var c;for(c=0;c1||b>=0&&a.b<3} +function w7c(a){var b,c,d;b=new s7c;for(d=Jsb(a,0);d.b!=d.d.c;){c=BD(Xsb(d),8);St(b,0,new g7c(c))}return b} +function qVb(a){var b,c;for(c=new olb(a.a.b);c.ad?1:0} +function NYb(a,b){if(OYb(a,b)){Rc(a.b,BD(vNb(b,(wtc(),Esc)),21),b);Dsb(a.a,b);return true}else{return false}} +function d3b(a){var b,c;b=BD(vNb(a,(wtc(),gtc)),10);if(b){c=b.c;Lkb(c.a,b);c.a.c.length==0&&Lkb(Q_b(b).b,c)}} +function syb(a){if(lyb){return KC(qL,tke,572,0,0,1)}return BD(Qkb(a.a,KC(qL,tke,572,a.a.c.length,0,1)),842)} +function mn(a,b,c,d){Vm();return new wx(OC(GC(CK,1),zie,42,0,[(Wj(a,b),new Wo(a,b)),(Wj(c,d),new Wo(c,d))]))} +function Dnd(a,b,c){var d,e;e=(d=new SSd,d);$nd(e,b,c);wtd((!a.q&&(a.q=new cUd(n5,a,11,10)),a.q),e);return e} +function Zmd(a){var b,c,d,e;e=icb(Rmd,a);c=e.length;d=KC(ZI,nie,2,c,6,1);for(b=0;b=a.b.c.length){return}aub(a,2*b+1);c=2*b+2;c=0&&a[d]===b[d];d--);return d<0?0:Gbb(xbb(a[d],Yje),xbb(b[d],Yje))?-1:1} +function UFc(a,b){var c,d;for(d=Jsb(a,0);d.b!=d.d.c;){c=BD(Xsb(d),214);if(c.e.length>0){b.td(c);c.i&&_Fc(c)}}} +function nzd(a,b){var c,d;d=BD(Ajd(a.a,4),126);c=KC($3,hve,415,b,0,1);d!=null&&$fb(d,0,c,0,d.length);return c} +function JEd(a,b){var c;c=new NEd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,b);a.e!=null||(c.c=a);return c} +function Dc(a,b){var c,d;for(d=a.Zb().Cc().Kc();d.Ob();){c=BD(d.Pb(),14);if(c.Hc(b)){return true}}return false} +function oNb(a,b,c,d,e){var f,g;for(g=c;g<=e;g++){for(f=b;f<=d;f++){if(YMb(a,f,g)){return true}}}return false} +function Tt(a,b,c){var d,e,f,g;uCb(c);g=false;f=a.Zc(b);for(e=c.Kc();e.Ob();){d=e.Pb();f.Rb(d);g=true}return g} +function Dv(a,b){var c;if(a===b){return true}else if(JD(b,83)){c=BD(b,83);return Ax(Wm(a),c.vc())}return false} +function Nhb(a,b,c){var d,e;for(e=c.Kc();e.Ob();){d=BD(e.Pb(),42);if(a.re(b,d.dd())){return true}}return false} +function Hic(a,b,c){if(!a.d[b.p][c.p]){Gic(a,b,c);a.d[b.p][c.p]=true;a.d[c.p][b.p]=true}return a.a[b.p][c.p]} +function Itd(a,b){if(!a.ai()&&b==null){throw vbb(new Wdb("The 'no null' constraint is violated"))}return b} +function $Jd(a,b){if(a.D==null&&a.B!=null){a.D=a.B;a.B=null}jKd(a,b==null?null:(uCb(b),b));!!a.C&&a.yk(null)} +function XHc(a,b){var c;if(!a||a==b||!wNb(b,(wtc(),Psc))){return false}c=BD(vNb(b,(wtc(),Psc)),10);return c!=a} +function b4d(a){switch(a.i){case 2:{return true}case 1:{return false}case -1:{++a.c}default:{return a.pl()}}} +function c4d(a){switch(a.i){case -2:{return true}case -1:{return false}case 1:{--a.c}default:{return a.ql()}}} +function Xdb(a){Zy.call(this,'The given string does not match the expected format for individual spacings.',a)} +function pgd(){pgd=ccb;mgd=new qgd('ELK',0);ngd=new qgd('JSON',1);lgd=new qgd('DOT',2);ogd=new qgd('SVG',3)} +function pWc(){pWc=ccb;mWc=new rWc(ane,0);nWc=new rWc('RADIAL_COMPACTION',1);oWc=new rWc('WEDGE_COMPACTION',2)} +function Fyb(){Fyb=ccb;Cyb=new Gyb('CONCURRENT',0);Dyb=new Gyb('IDENTITY_FINISH',1);Eyb=new Gyb('UNORDERED',2)} +function nPb(){nPb=ccb;kPb=(cPb(),bPb);jPb=new Nsd(Tle,kPb);iPb=new Lsd(Ule);lPb=new Lsd(Vle);mPb=new Lsd(Wle)} +function Occ(){Occ=ccb;Mcc=new Zcc;Ncc=new _cc;Lcc=new bdc;Kcc=new fdc;Jcc=new jdc;Icc=(uCb(Jcc),new bpb)} +function tBc(){tBc=ccb;qBc=new uBc('CONSERVATIVE',0);rBc=new uBc('CONSERVATIVE_SOFT',1);sBc=new uBc('SLOPPY',2)} +function Zad(){Zad=ccb;Xad=new q0b(15);Wad=new Osd((Y9c(),f9c),Xad);Yad=C9c;Sad=s8c;Tad=Y8c;Vad=_8c;Uad=$8c} +function o7c(a,b,c){var d,e,f;d=new Psb;for(f=Jsb(c,0);f.b!=f.d.c;){e=BD(Xsb(f),8);Dsb(d,new g7c(e))}Tt(a,b,d)} +function r7c(a){var b,c,d;b=0;d=KC(m1,nie,8,a.b,0,1);c=Jsb(a,0);while(c.b!=c.d.c){d[b++]=BD(Xsb(c),8)}return d} +function $Pd(a){var b;b=(!a.a&&(a.a=new cUd(g5,a,9,5)),a.a);if(b.i!=0){return nQd(BD(qud(b,0),678))}return null} +function Ly(a,b){var c;c=wbb(a,b);if(Gbb(Vbb(a,b),0)|Ebb(Vbb(a,c),0)){return c}return wbb(rie,Vbb(Pbb(c,63),1))} +function Yyc(a,b){var c;c=Ksd((dzc(),bzc))!=null&&b.wg()!=null?Edb(ED(b.wg()))/Edb(ED(Ksd(bzc))):1;Rhb(a.b,b,c)} +function le(a,b){var c,d;c=BD(a.d.Bc(b),14);if(!c){return null}d=a.e.hc();d.Gc(c);a.e.d-=c.gc();c.$b();return d} +function AHc(a,b){var c,d;d=a.c[b];if(d==0){return}a.c[b]=0;a.d-=d;c=b+1;while(c0){return _vb(b-1,a.a.c.length),Kkb(a.a,b-1)}else{throw vbb(new Jpb)}} +function C2c(a,b,c){if(b<0){throw vbb(new qcb(ese+b))}if(bb){throw vbb(new Wdb(xke+a+yke+b))}if(a<0||b>c){throw vbb(new scb(xke+a+zke+b+oke+c))}} +function j5c(a){if(!a.a||(a.a.i&8)==0){throw vbb(new Zdb('Enumeration class expected for layout option '+a.f))}} +function vud(a){var b;++a.j;if(a.i==0){a.g=null}else if(a.iRqe?a-c>Rqe:c-a>Rqe} +function pHb(a,b){if(!a){return 0}if(b&&!a.j){return 0}if(JD(a,124)){if(BD(a,124).a.b==0){return 0}}return a.Re()} +function qHb(a,b){if(!a){return 0}if(b&&!a.k){return 0}if(JD(a,124)){if(BD(a,124).a.a==0){return 0}}return a.Se()} +function fhb(a){Hgb();if(a<0){if(a!=-1){return new Tgb(-1,-a)}return Bgb}else return a<=10?Dgb[QD(a)]:new Tgb(1,a)} +function xC(a){rC();throw vbb(new MB("Unexpected typeof result '"+a+"'; please report this bug to the GWT team"))} +function lz(a){jz();Py(this);Ry(this);this.e=a;Sy(this,a);this.g=a==null?Xhe:fcb(a);this.a='';this.b=a;this.a=''} +function F$c(){this.a=new G$c;this.f=new I$c(this);this.b=new K$c(this);this.i=new M$c(this);this.e=new O$c(this)} +function ss(){rs.call(this,new _rb(Cv(16)));Xj(2,mie);this.b=2;this.a=new Ms(null,null,0,null);As(this.a,this.a)} +function xzc(){xzc=ccb;uzc=new zzc('DUMMY_NODE_OVER',0);vzc=new zzc('DUMMY_NODE_UNDER',1);wzc=new zzc('EQUAL',2)} +function LUb(){LUb=ccb;JUb=Fx(OC(GC(t1,1),Kie,103,0,[(ead(),aad),bad]));KUb=Fx(OC(GC(t1,1),Kie,103,0,[dad,_9c]))} +function VQc(a){return (Ucd(),Lcd).Hc(a.j)?Edb(ED(vNb(a,(wtc(),qtc)))):l7c(OC(GC(m1,1),nie,8,0,[a.i.n,a.n,a.a])).b} +function DOb(a){var b,c,d,e;d=a.b.a;for(c=d.a.ec().Kc();c.Ob();){b=BD(c.Pb(),561);e=new MPb(b,a.e,a.f);Ekb(a.g,e)}} +function yId(a,b){var c,d,e;d=a.nk(b,null);e=null;if(b){e=(LFd(),c=new UQd,c);NQd(e,a.r)}d=xId(a,e,d);!!d&&d.Fi()} +function VFc(a,b){var c,d;d=Cub(a.d,1)!=0;c=true;while(c){c=false;c=b.c.Tf(b.e,d);c=c|dGc(a,b,d,false);d=!d}$Fc(a)} +function wZc(a,b){var c,d,e;d=false;c=b.q.d;if(b.de){$Zc(b.q,e);d=c!=b.q.d}}return d} +function PVc(a,b){var c,d,e,f,g,h,i,j;i=b.i;j=b.j;d=a.f;e=d.i;f=d.j;g=i-e;h=j-f;c=$wnd.Math.sqrt(g*g+h*h);return c} +function Rnd(a,b){var c,d;d=jid(a);if(!d){!And&&(And=new lUd);c=(IEd(),PEd(b));d=new s0d(c);wtd(d.Vk(),a)}return d} +function Sc(a,b){var c,d;c=BD(a.c.Bc(b),14);if(!c){return a.jc()}d=a.hc();d.Gc(c);a.d-=c.gc();c.$b();return a.mc(d)} +function j7c(a,b){var c;for(c=0;c=a.c.b:a.a<=a.c.b)){throw vbb(new utb)}b=a.a;a.a+=a.c.c;++a.b;return meb(b)} +function BWb(a){var b;b=new VWb(a);rXb(a.a,zWb,new amb(OC(GC(bQ,1),Uhe,369,0,[b])));!!b.d&&Ekb(b.f,b.d);return b.f} +function Z1b(a){var b;b=new q_b(a.a);tNb(b,a);yNb(b,(wtc(),$sc),a);b.o.a=a.g;b.o.b=a.f;b.n.a=a.i;b.n.b=a.j;return b} +function A9b(a,b,c,d){var e,f;for(f=a.Kc();f.Ob();){e=BD(f.Pb(),70);e.n.a=b.a+(d.a-e.o.a)/2;e.n.b=b.b;b.b+=e.o.b+c}} +function UDb(a,b,c){var d,e;for(e=b.a.a.ec().Kc();e.Ob();){d=BD(e.Pb(),57);if(VDb(a,d,c)){return true}}return false} +function JDc(a){var b,c;for(c=new olb(a.r);c.a=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} +function y6c(a,b){var c,d,e;e=1;c=a;d=b>=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} +function sAd(a){var b,c,d,e;if(a!=null){for(c=0;c0){c=BD(Ikb(a.a,a.a.c.length-1),570);if(NYb(c,b)){return}}Ekb(a.a,new PYb(b))} +function $gc(a){Hgc();var b,c;b=a.d.c-a.e.c;c=BD(a.g,145);Hkb(c.b,new shc(b));Hkb(c.c,new uhc(b));reb(c.i,new whc(b))} +function gic(a){var b;b=new Ufb;b.a+='VerticalSegment ';Pfb(b,a.e);b.a+=' ';Qfb(b,Eb(new Gb,new olb(a.k)));return b.a} +function u4c(a){var b;b=BD(Wrb(a.c.c,''),229);if(!b){b=new W3c(d4c(c4c(new e4c,''),'Other'));Xrb(a.c.c,'',b)}return b} +function qnd(a){var b;if((a.Db&64)!=0)return Eid(a);b=new Jfb(Eid(a));b.a+=' (name: ';Efb(b,a.zb);b.a+=')';return b.a} +function Jnd(a,b,c){var d,e;e=a.sb;a.sb=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,4,e,b);!c?(c=d):c.Ei(d)}return c} +function _ic(a,b){var c,d,e;c=0;for(e=V_b(a,b).Kc();e.Ob();){d=BD(e.Pb(),11);c+=vNb(d,(wtc(),gtc))!=null?1:0}return c} +function vPc(a,b,c){var d,e,f;d=0;for(f=Jsb(a,0);f.b!=f.d.c;){e=Edb(ED(Xsb(f)));if(e>c){break}else e>=b&&++d}return d} +function RTd(a,b,c){var d,e;d=new pSd(a.e,3,13,null,(e=b.c,e?e:(jGd(),YFd)),HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function STd(a,b,c){var d,e;d=new pSd(a.e,4,13,(e=b.c,e?e:(jGd(),YFd)),null,HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function zId(a,b,c){var d,e;e=a.r;a.r=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,8,e,a.r);!c?(c=d):c.Ei(d)}return c} +function o1d(a,b){var c,d;c=BD(b,676);d=c.vk();!d&&c.wk(d=JD(b,88)?new C1d(a,BD(b,26)):new O1d(a,BD(b,148)));return d} +function kud(a,b,c){var d;a.qi(a.i+1);d=a.oi(b,c);b!=a.i&&$fb(a.g,b,a.g,b+1,a.i-b);NC(a.g,b,d);++a.i;a.bi(b,c);a.ci()} +function vwb(a,b){var c;if(b.a){c=b.a.a.length;!a.a?(a.a=new Wfb(a.d)):Qfb(a.a,a.b);Ofb(a.a,b.a,b.d.length,c)}return a} +function __d(a,b){var c,d,e,f;b.vi(a.a);f=BD(Ajd(a.a,8),1936);if(f!=null){for(c=f,d=0,e=c.length;dc){throw vbb(new qcb(xke+a+zke+b+', size: '+c))}if(a>b){throw vbb(new Wdb(xke+a+yke+b))}} +function eid(a,b,c){if(b<0){vid(a,c)}else{if(!c.Ij()){throw vbb(new Wdb(ite+c.ne()+jte))}BD(c,66).Nj().Vj(a,a.yh(),b)}} +function Jlb(a,b,c,d,e,f,g,h){var i;i=c;while(f=d||b=65&&a<=70){return a-65+10}if(a>=97&&a<=102){return a-97+10}if(a>=48&&a<=57){return a-48}return 0} +function QHd(a){var b;if((a.Db&64)!=0)return Eid(a);b=new Jfb(Eid(a));b.a+=' (source: ';Efb(b,a.d);b.a+=')';return b.a} +function OQd(a,b,c){var d,e;e=a.a;a.a=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,5,e,a.a);!c?(c=d):Qwd(c,d)}return c} +function BId(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,2,c,b))} +function eLd(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,8,c,b))} +function LPd(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,8,c,b))} +function CId(a,b){var c;c=(a.Bb&512)!=0;b?(a.Bb|=512):(a.Bb&=-513);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,3,c,b))} +function fLd(a,b){var c;c=(a.Bb&512)!=0;b?(a.Bb|=512):(a.Bb&=-513);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,9,c,b))} +function N7d(a,b){var c;if(a.b==-1&&!!a.a){c=a.a.Gj();a.b=!c?bLd(a.c.Tg(),a.a):a.c.Xg(a.a.aj(),c)}return a.c.Og(a.b,b)} +function meb(a){var b,c;if(a>-129&&a<128){b=a+128;c=(oeb(),neb)[b];!c&&(c=neb[b]=new _db(a));return c}return new _db(a)} +function Web(a){var b,c;if(a>-129&&a<128){b=a+128;c=(Yeb(),Xeb)[b];!c&&(c=Xeb[b]=new Qeb(a));return c}return new Qeb(a)} +function L5b(a){var b,c;b=a.k;if(b==(j0b(),e0b)){c=BD(vNb(a,(wtc(),Hsc)),61);return c==(Ucd(),Acd)||c==Rcd}return false} +function i1d(a,b,c){var d,e,f;f=(e=nUd(a.b,b),e);if(f){d=BD(V1d(p1d(a,f),''),26);if(d){return r1d(a,d,b,c)}}return null} +function l1d(a,b,c){var d,e,f;f=(e=nUd(a.b,b),e);if(f){d=BD(V1d(p1d(a,f),''),26);if(d){return s1d(a,d,b,c)}}return null} +function cTd(a,b){var c,d;for(d=new Fyd(a);d.e!=d.i.gc();){c=BD(Dyd(d),138);if(PD(b)===PD(c)){return true}}return false} +function vtd(a,b,c){var d;d=a.gc();if(b>d)throw vbb(new Cyd(b,d));if(a.hi()&&a.Hc(c)){throw vbb(new Wdb(kue))}a.Xh(b,c)} +function iqd(a,b){var c;c=oo(a.i,b);if(c==null){throw vbb(new cqd('Node did not exist in input.'))}Yqd(b,c);return null} +function $hd(a,b){var c;c=YKd(a,b);if(JD(c,322)){return BD(c,34)}throw vbb(new Wdb(ite+b+"' is not a valid attribute"))} +function V2d(a,b,c){var d,e;e=JD(b,99)&&(BD(b,18).Bb&Tje)!=0?new s4d(b,a):new p4d(b,a);for(d=0;db){return 1}if(a==b){return a==0?Kdb(1/a,1/b):0}return isNaN(a)?isNaN(b)?0:1:-1} +function f4b(a,b){Odd(b,'Sort end labels',1);MAb(JAb(LAb(new YAb(null,new Kub(a.b,16)),new q4b),new s4b),new u4b);Qdd(b)} +function Wxd(a,b,c){var d,e;if(a.ej()){e=a.fj();d=sud(a,b,c);a.$i(a.Zi(7,meb(c),d,b,e));return d}else{return sud(a,b,c)}} +function vAd(a,b){var c,d,e;if(a.d==null){++a.e;--a.f}else{e=b.cd();c=b.Sh();d=(c&Ohe)%a.d.length;KAd(a,d,xAd(a,d,c,e))}} +function ZId(a,b){var c;c=(a.Bb&zte)!=0;b?(a.Bb|=zte):(a.Bb&=-1025);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,10,c,b))} +function dJd(a,b){var c;c=(a.Bb&Rje)!=0;b?(a.Bb|=Rje):(a.Bb&=-4097);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,12,c,b))} +function eJd(a,b){var c;c=(a.Bb&Cve)!=0;b?(a.Bb|=Cve):(a.Bb&=-8193);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,15,c,b))} +function fJd(a,b){var c;c=(a.Bb&Dve)!=0;b?(a.Bb|=Dve):(a.Bb&=-2049);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,11,c,b))} +function jOb(a,b){var c;c=Kdb(a.b.c,b.b.c);if(c!=0){return c}c=Kdb(a.a.a,b.a.a);if(c!=0){return c}return Kdb(a.a.b,b.a.b)} +function jqd(a,b){var c;c=Ohb(a.k,b);if(c==null){throw vbb(new cqd('Port did not exist in input.'))}Yqd(b,c);return null} +function k6d(a){var b,c;for(c=l6d(bKd(a)).Kc();c.Ob();){b=GD(c.Pb());if(Dmd(a,b)){return uFd((tFd(),sFd),b)}}return null} +function n3d(a,b){var c,d,e,f,g;g=S6d(a.e.Tg(),b);f=0;c=BD(a.g,119);for(e=0;e>10)+Uje&aje;b[1]=(a&1023)+56320&aje;return zfb(b,0,b.length)} +function a_b(a){var b,c;c=BD(vNb(a,(Nyc(),Lwc)),103);if(c==(ead(),cad)){b=Edb(ED(vNb(a,owc)));return b>=1?bad:_9c}return c} +function rec(a){switch(BD(vNb(a,(Nyc(),Swc)),218).g){case 1:return new Fmc;case 3:return new wnc;default:return new zmc;}} +function Uzb(a){if(a.c){Uzb(a.c)}else if(a.d){throw vbb(new Zdb("Stream already terminated, can't be modified or used"))}} +function Mkd(a){var b;if((a.Db&64)!=0)return Eid(a);b=new Jfb(Eid(a));b.a+=' (identifier: ';Efb(b,a.k);b.a+=')';return b.a} +function ctd(a,b,c){var d,e;d=(Fhd(),e=new xkd,e);vkd(d,b);wkd(d,c);!!a&&wtd((!a.a&&(a.a=new xMd(y2,a,5)),a.a),d);return d} +function ttb(a,b,c,d){var e,f;uCb(d);uCb(c);e=a.xc(b);f=e==null?c:Myb(BD(e,15),BD(c,14));f==null?a.Bc(b):a.zc(b,f);return f} +function pqb(a){var b,c,d,e;c=(b=BD(gdb((d=a.gm,e=d.f,e==CI?d:e)),9),new xqb(b,BD(_Bb(b,b.length),9),0));rqb(c,a);return c} +function hDc(a,b,c){var d,e;for(e=a.a.ec().Kc();e.Ob();){d=BD(e.Pb(),10);if(Be(c,BD(Ikb(b,d.p),14))){return d}}return null} +function Db(b,c,d){var e;try{Cb(b,c,d)}catch(a){a=ubb(a);if(JD(a,597)){e=a;throw vbb(new ycb(e))}else throw vbb(a)}return c} +function Qbb(a,b){var c;if(Fbb(a)&&Fbb(b)){c=a-b;if(Kje>1;a.k=c-1>>1} +function Gub(){zub();var a,b,c;c=yub+++Date.now();a=QD($wnd.Math.floor(c*lke))&nke;b=QD(c-a*mke);this.a=a^1502;this.b=b^kke} +function O_b(a){var b,c,d;b=new Rkb;for(d=new olb(a.j);d.a3.4028234663852886E38){return Pje}else if(b<-3.4028234663852886E38){return Qje}return b} +function aeb(a){a-=a>>1&1431655765;a=(a>>2&858993459)+(a&858993459);a=(a>>4)+a&252645135;a+=a>>8;a+=a>>16;return a&63} +function Ev(a){var b,c,d,e;b=new cq(a.Hd().gc());e=0;for(d=vr(a.Hd().Kc());d.Ob();){c=d.Pb();bq(b,c,meb(e++))}return fn(b.a)} +function Uyb(a,b){var c,d,e;e=new Lqb;for(d=b.vc().Kc();d.Ob();){c=BD(d.Pb(),42);Rhb(e,c.cd(),Yyb(a,BD(c.dd(),15)))}return e} +function EZc(a,b){a.n.c.length==0&&Ekb(a.n,new VZc(a.s,a.t,a.i));Ekb(a.b,b);QZc(BD(Ikb(a.n,a.n.c.length-1),211),b);GZc(a,b)} +function LFb(a){if(a.c!=a.b.b||a.i!=a.g.b){a.a.c=KC(SI,Uhe,1,0,5,1);Gkb(a.a,a.b);Gkb(a.a,a.g);a.c=a.b.b;a.i=a.g.b}return a.a} +function Ycc(a,b){var c,d,e;e=0;for(d=BD(b.Kb(a),20).Kc();d.Ob();){c=BD(d.Pb(),17);Ccb(DD(vNb(c,(wtc(),ltc))))||++e}return e} +function efc(a,b){var c,d,e;d=tgc(b);e=Edb(ED(pBc(d,(Nyc(),lyc))));c=$wnd.Math.max(0,e/2-0.5);cfc(b,c,1);Ekb(a,new Dfc(b,c))} +function Ctc(){Ctc=ccb;Btc=new Dtc(ane,0);xtc=new Dtc('FIRST',1);ytc=new Dtc(Gne,2);ztc=new Dtc('LAST',3);Atc=new Dtc(Hne,4)} +function Aad(){Aad=ccb;zad=new Bad(ole,0);xad=new Bad('POLYLINE',1);wad=new Bad('ORTHOGONAL',2);yad=new Bad('SPLINES',3)} +function zYc(){zYc=ccb;xYc=new AYc('ASPECT_RATIO_DRIVEN',0);yYc=new AYc('MAX_SCALE_DRIVEN',1);wYc=new AYc('AREA_DRIVEN',2)} +function Y$c(){Y$c=ccb;V$c=new Z$c('P1_STRUCTURE',0);W$c=new Z$c('P2_PROCESSING_ORDER',1);X$c=new Z$c('P3_EXECUTION',2)} +function tVc(){tVc=ccb;sVc=new uVc('OVERLAP_REMOVAL',0);qVc=new uVc('COMPACTION',1);rVc=new uVc('GRAPH_SIZE_CALCULATION',2)} +function Jy(a,b){Iy();return My(Qie),$wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b))} +function yOc(a,b){var c,d;c=Jsb(a,0);while(c.b!=c.d.c){d=Gdb(ED(Xsb(c)));if(d==b){return}else if(d>b){Ysb(c);break}}Vsb(c,b)} +function t4c(a,b){var c,d,e,f,g;c=b.f;Xrb(a.c.d,c,b);if(b.g!=null){for(e=b.g,f=0,g=e.length;fb&&d.ue(a[f-1],a[f])>0;--f){g=a[f];NC(a,f,a[f-1]);NC(a,f-1,g)}}} +function did(a,b,c,d){if(b<0){uid(a,c,d)}else{if(!c.Ij()){throw vbb(new Wdb(ite+c.ne()+jte))}BD(c,66).Nj().Tj(a,a.yh(),b,d)}} +function xFb(a,b){if(b==a.d){return a.e}else if(b==a.e){return a.d}else{throw vbb(new Wdb('Node '+b+' not part of edge '+a))}} +function iEb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} +function GVb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} +function Xkd(a,b,c,d){switch(b){case 3:return a.f;case 4:return a.g;case 5:return a.i;case 6:return a.j;}return Ekd(a,b,c,d)} +function Ljc(a){if(a.k!=(j0b(),h0b)){return false}return FAb(new YAb(null,new Lub(new Sr(ur(U_b(a).a.Kc(),new Sq)))),new Mjc)} +function MEd(a){if(a.e==null){return a}else !a.c&&(a.c=new NEd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,null));return a.c} +function VC(a,b){if(a.h==Gje&&a.m==0&&a.l==0){b&&(QC=TC(0,0,0));return SC((wD(),uD))}b&&(QC=TC(a.l,a.m,a.h));return TC(0,0,0)} +function fcb(a){var b;if(Array.isArray(a)&&a.im===gcb){return hdb(rb(a))+'@'+(b=tb(a)>>>0,b.toString(16))}return a.toString()} +function Rpb(a){var b;this.a=(b=BD(a.e&&a.e(),9),new xqb(b,BD(_Bb(b,b.length),9),0));this.b=KC(SI,Uhe,1,this.a.a.length,5,1)} +function _Ob(a){var b,c,d;this.a=new zsb;for(d=new olb(a);d.a0&&(BCb(b-1,a.length),a.charCodeAt(b-1)==58)&&!OEd(a,CEd,DEd)} +function OEd(a,b,c){var d,e;for(d=0,e=a.length;d=e){return b.c+c}}return b.c+b.b.gc()} +function NCd(a,b){LCd();var c,d,e,f;d=KLd(a);e=b;Klb(d,0,d.length,e);for(c=0;c0){d+=e;++c}}c>1&&(d+=a.d*(c-1));return d} +function Htd(a){var b,c,d;d=new Hfb;d.a+='[';for(b=0,c=a.gc();b0&&this.b>0&&q$c(this.c,this.b,this.a)} +function ezc(a){dzc();this.c=Ou(OC(GC(h0,1),Uhe,831,0,[Uyc]));this.b=new Lqb;this.a=a;Rhb(this.b,bzc,1);Hkb(czc,new Xed(this))} +function I2c(a,b){var c;if(a.d){if(Mhb(a.b,b)){return BD(Ohb(a.b,b),51)}else{c=b.Kf();Rhb(a.b,b,c);return c}}else{return b.Kf()}} +function Kgb(a,b){var c;if(PD(a)===PD(b)){return true}if(JD(b,91)){c=BD(b,91);return a.e==c.e&&a.d==c.d&&Lgb(a,c.a)}return false} +function Zcd(a){Ucd();switch(a.g){case 4:return Acd;case 1:return zcd;case 3:return Rcd;case 2:return Tcd;default:return Scd;}} +function Ykd(a,b){switch(b){case 3:return a.f!=0;case 4:return a.g!=0;case 5:return a.i!=0;case 6:return a.j!=0;}return Hkd(a,b)} +function gWc(a){switch(a.g){case 0:return new FXc;case 1:return new IXc;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function QUc(a){switch(a.g){case 0:return new CXc;case 1:return new MXc;default:throw vbb(new Wdb(Dne+(a.f!=null?a.f:''+a.g)));}} +function b1c(a){switch(a.g){case 0:return new s1c;case 1:return new w1c;default:throw vbb(new Wdb(Mre+(a.f!=null?a.f:''+a.g)));}} +function qWc(a){switch(a.g){case 1:return new SVc;case 2:return new KVc;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function ryb(a){var b,c;if(a.b){return a.b}c=lyb?null:a.d;while(c){b=lyb?null:c.b;if(b){return b}c=lyb?null:c.d}return $xb(),Zxb} +function hhb(a){var b,c,d;if(a.e==0){return 0}b=a.d<<5;c=a.a[a.d-1];if(a.e<0){d=Mgb(a);if(d==a.d-1){--c;c=c|0}}b-=heb(c);return b} +function bhb(a){var b,c,d;if(a>5;b=a&31;d=KC(WD,oje,25,c+1,15,1);d[c]=1<3){e*=10;--f}a=(a+(e>>1))/e|0}d.i=a;return true} +function XUb(a){LUb();return Bcb(),GVb(BD(a.a,81).j,BD(a.b,103))||BD(a.a,81).d.e!=0&&GVb(BD(a.a,81).j,BD(a.b,103))?true:false} +function s3c(a){p3c();if(BD(a.We((Y9c(),b9c)),174).Hc((Idd(),Gdd))){BD(a.We(x9c),174).Fc((rcd(),qcd));BD(a.We(b9c),174).Mc(Gdd)}} +function Gxd(a,b){var c,d;if(!b){return false}else{for(c=0;c=0;--d){b=c[d];for(e=0;e>1;this.k=b-1>>1} +function r3b(a,b){Odd(b,'End label post-processing',1);MAb(JAb(LAb(new YAb(null,new Kub(a.b,16)),new w3b),new y3b),new A3b);Qdd(b)} +function NLc(a,b,c){var d,e;d=Edb(a.p[b.i.p])+Edb(a.d[b.i.p])+b.n.b+b.a.b;e=Edb(a.p[c.i.p])+Edb(a.d[c.i.p])+c.n.b+c.a.b;return e-d} +function xhb(a,b,c){var d,e;d=xbb(c,Yje);for(e=0;ybb(d,0)!=0&&e0&&(BCb(0,b.length),b.charCodeAt(0)==43)?b.substr(1):b))} +function T9d(a){var b;return a==null?null:new Ygb((b=Qge(a,true),b.length>0&&(BCb(0,b.length),b.charCodeAt(0)==43)?b.substr(1):b))} +function xud(a,b){var c;if(a.i>0){if(b.lengtha.i&&NC(b,a.i,null);return b} +function Sxd(a,b,c){var d,e,f;if(a.ej()){d=a.i;f=a.fj();kud(a,d,b);e=a.Zi(3,null,b,d,f);!c?(c=e):c.Ei(e)}else{kud(a,a.i,b)}return c} +function HMd(a,b,c){var d,e;d=new pSd(a.e,4,10,(e=b.c,JD(e,88)?BD(e,26):(jGd(),_Fd)),null,HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function GMd(a,b,c){var d,e;d=new pSd(a.e,3,10,null,(e=b.c,JD(e,88)?BD(e,26):(jGd(),_Fd)),HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function _Jb(a){$Jb();var b;b=new g7c(BD(a.e.We((Y9c(),_8c)),8));if(a.B.Hc((Idd(),Bdd))){b.a<=0&&(b.a=20);b.b<=0&&(b.b=20)}return b} +function Lzc(a){Izc();var b;(!a.q?(mmb(),mmb(),kmb):a.q)._b((Nyc(),Cxc))?(b=BD(vNb(a,Cxc),197)):(b=BD(vNb(Q_b(a),Dxc),197));return b} +function pBc(a,b){var c,d;d=null;if(wNb(a,(Nyc(),qyc))){c=BD(vNb(a,qyc),94);c.Xe(b)&&(d=c.We(b))}d==null&&(d=vNb(Q_b(a),b));return d} +function Ze(a,b){var c,d,e;if(JD(b,42)){c=BD(b,42);d=c.cd();e=Hv(a.Rc(),d);return Hb(e,c.dd())&&(e!=null||a.Rc()._b(d))}return false} +function qAd(a,b){var c,d,e;if(a.f>0){a.qj();d=b==null?0:tb(b);e=(d&Ohe)%a.d.length;c=xAd(a,e,d,b);return c!=-1}else{return false}} +function AAd(a,b){var c,d,e;if(a.f>0){a.qj();d=b==null?0:tb(b);e=(d&Ohe)%a.d.length;c=wAd(a,e,d,b);if(c){return c.dd()}}return null} +function R2d(a,b){var c,d,e,f;f=S6d(a.e.Tg(),b);c=BD(a.g,119);for(e=0;e1?Mbb(Nbb(b.a[1],32),xbb(b.a[0],Yje)):xbb(b.a[0],Yje),Sbb(Ibb(b.e,c))))} +function Hbb(a,b){var c;if(Fbb(a)&&Fbb(b)){c=a%b;if(Kje>5;b&=31;e=a.d+c+(b==0?0:1);d=KC(WD,oje,25,e,15,1);jhb(d,a.a,c,b);f=new Vgb(a.e,e,d);Jgb(f);return f} +function Ofe(a,b,c){var d,e;d=BD(Phb(Zee,b),117);e=BD(Phb($ee,b),117);if(c){Shb(Zee,a,d);Shb($ee,a,e)}else{Shb($ee,a,d);Shb(Zee,a,e)}} +function Cwb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.ue(b,f.d);if(c&&d==0){return f}if(d>=0){f=f.a[1]}else{e=f;f=f.a[0]}}return e} +function Dwb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.ue(b,f.d);if(c&&d==0){return f}if(d<=0){f=f.a[0]}else{e=f;f=f.a[1]}}return e} +function Nic(a,b,c,d){var e,f,g;e=false;if(fjc(a.f,c,d)){ijc(a.f,a.a[b][c],a.a[b][d]);f=a.a[b];g=f[d];f[d]=f[c];f[c]=g;e=true}return e} +function QHc(a,b,c,d,e){var f,g,h;g=e;while(b.b!=b.c){f=BD(fkb(b),10);h=BD(V_b(f,d).Xb(0),11);a.d[h.p]=g++;c.c[c.c.length]=h}return g} +function hBc(a,b,c){var d,e,f,g,h;g=a.k;h=b.k;d=c[g.g][h.g];e=ED(pBc(a,d));f=ED(pBc(b,d));return $wnd.Math.max((uCb(e),e),(uCb(f),f))} +function zZc(a,b,c){var d,e,f,g;d=c/a.c.length;e=0;for(g=new olb(a);g.a2000){yz=a;zz=$wnd.setTimeout(Iz,10)}}if(xz++==0){Lz((Kz(),Jz));return true}return false} +function wCc(a,b){var c,d,e;for(d=new Sr(ur(U_b(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);e=c.d.i;if(e.c==b){return false}}return true} +function Ek(b,c){var d,e;if(JD(c,245)){e=BD(c,245);try{d=b.vd(e);return d==0}catch(a){a=ubb(a);if(!JD(a,205))throw vbb(a)}}return false} +function Xz(){if(Error.stackTraceLimit>0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} +function BDb(a,b){return Iy(),Iy(),My(Qie),($wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b)))>0} +function DDb(a,b){return Iy(),Iy(),My(Qie),($wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b)))<0} +function CDb(a,b){return Iy(),Iy(),My(Qie),($wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b)))<=0} +function ydb(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;cWje){return c.fh()}d=c.Zg();if(!!d||c==a){break}}}return d} +function fvd(a){evd();if(JD(a,156)){return BD(Ohb(cvd,hK),288).vg(a)}if(Mhb(cvd,rb(a))){return BD(Ohb(cvd,rb(a)),288).vg(a)}return null} +function fZd(a){if(efb(kse,a)){return Bcb(),Acb}else if(efb(lse,a)){return Bcb(),zcb}else{throw vbb(new Wdb('Expecting true or false'))}} +function uDc(a,b){if(b.c==a){return b.d}else if(b.d==a){return b.c}throw vbb(new Wdb('Input edge is not connected to the input port.'))} +function Igb(a,b){if(a.e>b.e){return 1}if(a.eb.d){return a.e}if(a.d=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} +function Ue(a,b){var c;if(PD(b)===PD(a)){return true}if(!JD(b,21)){return false}c=BD(b,21);if(c.gc()!=a.gc()){return false}return a.Ic(c)} +function ekb(a,b){var c,d,e,f;d=a.a.length-1;c=b-a.b&d;f=a.c-b&d;e=a.c-a.b&d;mkb(c=f){hkb(a,b);return -1}else{ikb(a,b);return 1}} +function lA(a,b){var c,d;c=(BCb(b,a.length),a.charCodeAt(b));d=b+1;while(db.e){return 1}else if(a.fb.f){return 1}return tb(a)-tb(b)} +function efb(a,b){uCb(a);if(b==null){return false}if(dfb(a,b)){return true}return a.length==b.length&&dfb(a.toLowerCase(),b.toLowerCase())} +function x6d(a,b){var c,d,e,f;for(d=0,e=b.gc();d0&&ybb(a,128)<0){b=Tbb(a)+128;c=(Ceb(),Beb)[b];!c&&(c=Beb[b]=new teb(a));return c}return new teb(a)} +function _0d(a,b){var c,d;c=b.Hh(a.a);if(c){d=GD(AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),fue));if(d!=null){return d}}return b.ne()} +function a1d(a,b){var c,d;c=b.Hh(a.a);if(c){d=GD(AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),fue));if(d!=null){return d}}return b.ne()} +function FMc(a,b){wMc();var c,d;for(d=new Sr(ur(O_b(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);if(c.d.i==b||c.c.i==b){return c}}return null} +function HUb(a,b,c){this.c=a;this.f=new Rkb;this.e=new d7c;this.j=new IVb;this.n=new IVb;this.b=b;this.g=new J6c(b.c,b.d,b.b,b.a);this.a=c} +function gVb(a){var b,c,d,e;this.a=new zsb;this.d=new Tqb;this.e=0;for(c=a,d=0,e=c.length;d0}else{return false}} +function q2c(a){var b;if(PD(hkd(a,(Y9c(),J8c)))===PD((hbd(),fbd))){if(!Xod(a)){jkd(a,J8c,gbd)}else{b=BD(hkd(Xod(a),J8c),334);jkd(a,J8c,b)}}} +function ijc(a,b,c){var d,e;bIc(a.e,b,c,(Ucd(),Tcd));bIc(a.i,b,c,zcd);if(a.a){e=BD(vNb(b,(wtc(),$sc)),11);d=BD(vNb(c,$sc),11);cIc(a.g,e,d)}} +function OEc(a,b,c){var d,e,f;d=b.c.p;f=b.p;a.b[d][f]=new $Ec(a,b);if(c){a.a[d][f]=new FEc(b);e=BD(vNb(b,(wtc(),Psc)),10);!!e&&Rc(a.d,e,b)}} +function TPb(a,b){var c,d,e;Ekb(PPb,a);b.Fc(a);c=BD(Ohb(OPb,a),21);if(c){for(e=c.Kc();e.Ob();){d=BD(e.Pb(),33);Jkb(PPb,d,0)!=-1||TPb(d,b)}}} +function tyb(a,b,c){var d;(jyb?(ryb(a),true):kyb?($xb(),true):nyb?($xb(),true):myb&&($xb(),false))&&(d=new iyb(b),d.b=c,pyb(a,d),undefined)} +function xKb(a,b){var c;c=!a.A.Hc((tdd(),sdd))||a.q==(dcd(),$bd);a.u.Hc((rcd(),ncd))?c?vKb(a,b):zKb(a,b):a.u.Hc(pcd)&&(c?wKb(a,b):AKb(a,b))} +function b0d(a,b){var c,d;++a.j;if(b!=null){c=(d=a.a.Cb,JD(d,97)?BD(d,97).Jg():null);if(xlb(b,c)){Cjd(a.a,4,c);return}}Cjd(a.a,4,BD(b,126))} +function dYb(a,b,c){return new J6c($wnd.Math.min(a.a,b.a)-c/2,$wnd.Math.min(a.b,b.b)-c/2,$wnd.Math.abs(a.a-b.a)+c,$wnd.Math.abs(a.b-b.b)+c)} +function k4b(a,b){var c,d;c=beb(a.a.c.p,b.a.c.p);if(c!=0){return c}d=beb(a.a.d.i.p,b.a.d.i.p);if(d!=0){return d}return beb(b.a.d.p,a.a.d.p)} +function _Dc(a,b,c){var d,e,f,g;f=b.j;g=c.j;if(f!=g){return f.g-g.g}else{d=a.f[b.p];e=a.f[c.p];return d==0&&e==0?0:d==0?-1:e==0?1:Kdb(d,e)}} +function HFb(a,b,c){var d,e,f;if(c[b.d]){return}c[b.d]=true;for(e=new olb(LFb(b));e.a=e)return e;for(b=b>0?b:0;bd&&NC(b,d,null);return b} +function _lb(a,b){var c,d;d=a.a.length;b.lengthd&&NC(b,d,null);return b} +function Xrb(a,b,c){var d,e,f;e=BD(Ohb(a.e,b),387);if(!e){d=new lsb(a,b,c);Rhb(a.e,b,d);isb(d);return null}else{f=ijb(e,c);Yrb(a,e);return f}} +function P9d(a){var b;if(a==null)return null;b=ide(Qge(a,true));if(b==null){throw vbb(new n8d("Invalid hexBinary value: '"+a+"'"))}return b} +function ghb(a){Hgb();if(ybb(a,0)<0){if(ybb(a,-1)!=0){return new Wgb(-1,Jbb(a))}return Bgb}else return ybb(a,10)<=0?Dgb[Tbb(a)]:new Wgb(1,a)} +function wJb(){qJb();return OC(GC(DN,1),Kie,159,0,[nJb,mJb,oJb,eJb,dJb,fJb,iJb,hJb,gJb,lJb,kJb,jJb,bJb,aJb,cJb,$Ib,ZIb,_Ib,XIb,WIb,YIb,pJb])} +function vjc(a){var b;this.d=new Rkb;this.j=new d7c;this.g=new d7c;b=a.g.b;this.f=BD(vNb(Q_b(b),(Nyc(),Lwc)),103);this.e=Edb(ED(c_b(b,ryc)))} +function Pjc(a){this.b=new Rkb;this.e=new Rkb;this.d=a;this.a=!WAb(JAb(new YAb(null,new Lub(new b1b(a.b))),new Xxb(new Qjc))).sd((EAb(),DAb))} +function N5c(){N5c=ccb;L5c=new O5c('PARENTS',0);K5c=new O5c('NODES',1);I5c=new O5c('EDGES',2);M5c=new O5c('PORTS',3);J5c=new O5c('LABELS',4)} +function Tbd(){Tbd=ccb;Qbd=new Ubd('DISTRIBUTED',0);Sbd=new Ubd('JUSTIFIED',1);Obd=new Ubd('BEGIN',2);Pbd=new Ubd(gle,3);Rbd=new Ubd('END',4)} +function UMd(a){var b;b=a.yi(null);switch(b){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4;}return -1} +function cYb(a){switch(a.g){case 1:return ead(),dad;case 4:return ead(),aad;case 2:return ead(),bad;case 3:return ead(),_9c;}return ead(),cad} +function kA(a,b,c){var d;d=c.q.getFullYear()-nje+nje;d<0&&(d=-d);switch(b){case 1:a.a+=d;break;case 2:EA(a,d%100,2);break;default:EA(a,d,b);}} +function Jsb(a,b){var c,d;wCb(b,a.b);if(b>=a.b>>1){d=a.c;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c=64&&b<128&&(e=Mbb(e,Nbb(1,b-64)))}return e} +function c_b(a,b){var c,d;d=null;if(wNb(a,(Y9c(),O9c))){c=BD(vNb(a,O9c),94);c.Xe(b)&&(d=c.We(b))}d==null&&!!Q_b(a)&&(d=vNb(Q_b(a),b));return d} +function oQc(a,b){var c,d,e;e=b.d.i;d=e.k;if(d==(j0b(),h0b)||d==d0b){return}c=new Sr(ur(U_b(e).a.Kc(),new Sq));Qr(c)&&Rhb(a.k,b,BD(Rr(c),17))} +function mid(a,b){var c,d,e;d=XKd(a.Tg(),b);c=b-a.Ah();return c<0?(e=a.Yg(d),e>=0?a.lh(e):tid(a,d)):c<0?tid(a,d):BD(d,66).Nj().Sj(a,a.yh(),c)} +function Ksd(a){var b;if(JD(a.a,4)){b=fvd(a.a);if(b==null){throw vbb(new Zdb(mse+a.b+"'. "+ise+(fdb(Y3),Y3.k)+jse))}return b}else{return a.a}} +function L9d(a){var b;if(a==null)return null;b=bde(Qge(a,true));if(b==null){throw vbb(new n8d("Invalid base64Binary value: '"+a+"'"))}return b} +function Dyd(b){var c;try{c=b.i.Xb(b.e);b.mj();b.g=b.e++;return c}catch(a){a=ubb(a);if(JD(a,73)){b.mj();throw vbb(new utb)}else throw vbb(a)}} +function Zyd(b){var c;try{c=b.c.ki(b.e);b.mj();b.g=b.e++;return c}catch(a){a=ubb(a);if(JD(a,73)){b.mj();throw vbb(new utb)}else throw vbb(a)}} +function CPb(){CPb=ccb;BPb=(Y9c(),K9c);vPb=G8c;qPb=r8c;wPb=f9c;zPb=(fFb(),bFb);yPb=_Eb;APb=dFb;xPb=$Eb;sPb=(nPb(),jPb);rPb=iPb;tPb=lPb;uPb=mPb} +function NWb(a){LWb();this.c=new Rkb;this.d=a;switch(a.g){case 0:case 2:this.a=tmb(KWb);this.b=Pje;break;case 3:case 1:this.a=KWb;this.b=Qje;}} +function ued(a,b,c){var d,e;if(a.c){dld(a.c,a.c.i+b);eld(a.c,a.c.j+c)}else{for(e=new olb(a.b);e.a0){Ekb(a.b,new WA(b.a,c));d=b.a.length;0d&&(b.a+=yfb(KC(TD,$ie,25,-d,15,1)))}} +function JKb(a,b){var c,d,e;c=a.o;for(e=BD(BD(Qc(a.r,b),21),84).Kc();e.Ob();){d=BD(e.Pb(),111);d.e.a=DKb(d,c.a);d.e.b=c.b*Edb(ED(d.b.We(BKb)))}} +function S5b(a,b){var c,d,e,f;e=a.k;c=Edb(ED(vNb(a,(wtc(),htc))));f=b.k;d=Edb(ED(vNb(b,htc)));return f!=(j0b(),e0b)?-1:e!=e0b?1:c==d?0:c=0){return a.hh(b,c,d)}else{!!a.eh()&&(d=(e=a.Vg(),e>=0?a.Qg(d):a.eh().ih(a,-1-e,null,d)));return a.Sg(b,c,d)}} +function zld(a,b){switch(b){case 7:!a.e&&(a.e=new y5d(B2,a,7,4));Uxd(a.e);return;case 8:!a.d&&(a.d=new y5d(B2,a,8,5));Uxd(a.d);return;}$kd(a,b)} +function Ut(b,c){var d;d=b.Zc(c);try{return d.Pb()}catch(a){a=ubb(a);if(JD(a,109)){throw vbb(new qcb("Can't get element "+c))}else throw vbb(a)}} +function Tgb(a,b){this.e=a;if(b=0&&(c.d=a.t);break;case 3:a.t>=0&&(c.a=a.t);}if(a.C){c.b=a.C.b;c.c=a.C.c}} +function RMb(){RMb=ccb;OMb=new SMb(xle,0);NMb=new SMb(yle,1);PMb=new SMb(zle,2);QMb=new SMb(Ale,3);OMb.a=false;NMb.a=true;PMb.a=false;QMb.a=true} +function ROb(){ROb=ccb;OOb=new SOb(xle,0);NOb=new SOb(yle,1);POb=new SOb(zle,2);QOb=new SOb(Ale,3);OOb.a=false;NOb.a=true;POb.a=false;QOb.a=true} +function dac(a){var b;b=a.a;do{b=BD(Rr(new Sr(ur(R_b(b).a.Kc(),new Sq))),17).c.i;b.k==(j0b(),g0b)&&a.b.Fc(b)}while(b.k==(j0b(),g0b));a.b=Su(a.b)} +function CDc(a){var b,c,d;d=a.c.a;a.p=(Qb(d),new Tkb(d));for(c=new olb(d);c.ac.b){return true}}}return false} +function AD(a,b){if(ND(a)){return !!zD[b]}else if(a.hm){return !!a.hm[b]}else if(LD(a)){return !!yD[b]}else if(KD(a)){return !!xD[b]}return false} +function jkd(a,b,c){c==null?(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),LAd(a.o,b)):(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),HAd(a.o,b,c));return a} +function jKb(a,b,c,d){var e,f;f=b.Xe((Y9c(),W8c))?BD(b.We(W8c),21):a.j;e=uJb(f);if(e==(qJb(),pJb)){return}if(c&&!sJb(e)){return}UHb(lKb(a,e,d),b)} +function fid(a,b,c,d){var e,f,g;f=XKd(a.Tg(),b);e=b-a.Ah();return e<0?(g=a.Yg(f),g>=0?a._g(g,c,true):sid(a,f,c)):BD(f,66).Nj().Pj(a,a.yh(),e,c,d)} +function u6d(a,b,c,d){var e,f,g;if(c.mh(b)){Q6d();if(YId(b)){e=BD(c.ah(b),153);x6d(a,e)}else{f=(g=b,!g?null:BD(d,49).xh(g));!!f&&v6d(c.ah(b),f)}}} +function H3b(a){switch(a.g){case 1:return vLb(),uLb;case 3:return vLb(),rLb;case 2:return vLb(),tLb;case 4:return vLb(),sLb;default:return null;}} +function kCb(a){switch(typeof(a)){case Mhe:return LCb(a);case Lhe:return QD(a);case Khe:return Bcb(),a?1231:1237;default:return a==null?0:FCb(a);}} +function Gic(a,b,c){if(a.e){switch(a.b){case 1:oic(a.c,b,c);break;case 0:pic(a.c,b,c);}}else{mic(a.c,b,c)}a.a[b.p][c.p]=a.c.i;a.a[c.p][b.p]=a.c.e} +function lHc(a){var b,c;if(a==null){return null}c=KC(OQ,nie,193,a.length,0,2);for(b=0;b=0)return e;if(a.Fk()){for(d=0;d=e)throw vbb(new Cyd(b,e));if(a.hi()){d=a.Xc(c);if(d>=0&&d!=b){throw vbb(new Wdb(kue))}}return a.mi(b,c)} +function gx(a,b){this.a=BD(Qb(a),245);this.b=BD(Qb(b),245);if(a.vd(b)>0||a==(Lk(),Kk)||b==(_k(),$k)){throw vbb(new Wdb('Invalid range: '+nx(a,b)))}} +function mYb(a){var b,c;this.b=new Rkb;this.c=a;this.a=false;for(c=new olb(a.a);c.a0);if((b&-b)==b){return QD(b*Cub(a,31)*4.6566128730773926E-10)}do{c=Cub(a,31);d=c%b}while(c-d+(b-1)<0);return QD(d)} +function LCb(a){JCb();var b,c,d;c=':'+a;d=ICb[c];if(d!=null){return QD((uCb(d),d))}d=GCb[c];b=d==null?KCb(a):QD((uCb(d),d));MCb();ICb[c]=b;return b} +function qZb(a,b,c){Odd(c,'Compound graph preprocessor',1);a.a=new Hp;vZb(a,b,null);pZb(a,b);uZb(a);yNb(b,(wtc(),zsc),a.a);a.a=null;Uhb(a.b);Qdd(c)} +function X$b(a,b,c){switch(c.g){case 1:a.a=b.a/2;a.b=0;break;case 2:a.a=b.a;a.b=b.b/2;break;case 3:a.a=b.a/2;a.b=b.b;break;case 4:a.a=0;a.b=b.b/2;}} +function tkc(a){var b,c,d;for(d=BD(Qc(a.a,(Xjc(),Vjc)),15).Kc();d.Ob();){c=BD(d.Pb(),101);b=Bkc(c);kkc(a,c,b[0],(Fkc(),Ckc),0);kkc(a,c,b[1],Ekc,1)}} +function ukc(a){var b,c,d;for(d=BD(Qc(a.a,(Xjc(),Wjc)),15).Kc();d.Ob();){c=BD(d.Pb(),101);b=Bkc(c);kkc(a,c,b[0],(Fkc(),Ckc),0);kkc(a,c,b[1],Ekc,1)}} +function tXc(a){switch(a.g){case 0:return null;case 1:return new $Xc;case 2:return new QXc;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function OZc(a,b,c){var d,e;FZc(a,b-a.s,c-a.t);for(e=new olb(a.n);e.a1&&(f=GFb(a,b));return f} +function dmd(a){var b;if(!!a.f&&a.f.kh()){b=BD(a.f,49);a.f=BD(xid(a,b),82);a.f!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,8,b,a.f))}return a.f} +function emd(a){var b;if(!!a.i&&a.i.kh()){b=BD(a.i,49);a.i=BD(xid(a,b),82);a.i!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,7,b,a.i))}return a.i} +function zUd(a){var b;if(!!a.b&&(a.b.Db&64)!=0){b=a.b;a.b=BD(xid(a,b),18);a.b!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,21,b,a.b))}return a.b} +function uAd(a,b){var c,d,e;if(a.d==null){++a.e;++a.f}else{d=b.Sh();BAd(a,a.f+1);e=(d&Ohe)%a.d.length;c=a.d[e];!c&&(c=a.d[e]=a.uj());c.Fc(b);++a.f}} +function m3d(a,b,c){var d;if(b.Kj()){return false}else if(b.Zj()!=-2){d=b.zj();return d==null?c==null:pb(d,c)}else return b.Hj()==a.e.Tg()&&c==null} +function wo(){var a;Xj(16,Hie);a=Kp(16);this.b=KC(GF,Gie,317,a,0,1);this.c=KC(GF,Gie,317,a,0,1);this.a=null;this.e=null;this.i=0;this.f=a-1;this.g=0} +function b0b(a){n_b.call(this);this.k=(j0b(),h0b);this.j=(Xj(6,Jie),new Skb(6));this.b=(Xj(2,Jie),new Skb(2));this.d=new L_b;this.f=new s0b;this.a=a} +function Scc(a){var b,c;if(a.c.length<=1){return}b=Pcc(a,(Ucd(),Rcd));Rcc(a,BD(b.a,19).a,BD(b.b,19).a);c=Pcc(a,Tcd);Rcc(a,BD(c.a,19).a,BD(c.b,19).a)} +function Vzc(){Vzc=ccb;Uzc=new Xzc('SIMPLE',0);Rzc=new Xzc(Tne,1);Szc=new Xzc('LINEAR_SEGMENTS',2);Qzc=new Xzc('BRANDES_KOEPF',3);Tzc=new Xzc(Aqe,4)} +function XDc(a,b,c){if(!ecd(BD(vNb(b,(Nyc(),Vxc)),98))){WDc(a,b,Y_b(b,c));WDc(a,b,Y_b(b,(Ucd(),Rcd)));WDc(a,b,Y_b(b,Acd));mmb();Okb(b.j,new jEc(a))}} +function HVc(a,b,c,d){var e,f,g;e=d?BD(Qc(a.a,b),21):BD(Qc(a.b,b),21);for(g=e.Kc();g.Ob();){f=BD(g.Pb(),33);if(BVc(a,c,f)){return true}}return false} +function FMd(a){var b,c;for(c=new Fyd(a);c.e!=c.i.gc();){b=BD(Dyd(c),87);if(!!b.e||(!b.d&&(b.d=new xMd(j5,b,1)),b.d).i!=0){return true}}return false} +function QTd(a){var b,c;for(c=new Fyd(a);c.e!=c.i.gc();){b=BD(Dyd(c),87);if(!!b.e||(!b.d&&(b.d=new xMd(j5,b,1)),b.d).i!=0){return true}}return false} +function FDc(a){var b,c,d;b=0;for(d=new olb(a.c.a);d.a102)return -1;if(a<=57)return a-48;if(a<65)return -1;if(a<=70)return a-65+10;if(a<97)return -1;return a-97+10} +function Wj(a,b){if(a==null){throw vbb(new Heb('null key in entry: null='+b))}else if(b==null){throw vbb(new Heb('null value in entry: '+a+'=null'))}} +function kr(a,b){var c,d;while(a.Ob()){if(!b.Ob()){return false}c=a.Pb();d=b.Pb();if(!(PD(c)===PD(d)||c!=null&&pb(c,d))){return false}}return !b.Ob()} +function jIb(a,b){var c;c=OC(GC(UD,1),Vje,25,15,[pHb(a.a[0],b),pHb(a.a[1],b),pHb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function kIb(a,b){var c;c=OC(GC(UD,1),Vje,25,15,[qHb(a.a[0],b),qHb(a.a[1],b),qHb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function mqc(){mqc=ccb;iqc=new oqc('GREEDY',0);hqc=new oqc(Une,1);kqc=new oqc(Tne,2);lqc=new oqc('MODEL_ORDER',3);jqc=new oqc('GREEDY_MODEL_ORDER',4)} +function iUc(a,b){var c,d,e;a.b[b.g]=1;for(d=Jsb(b.d,0);d.b!=d.d.c;){c=BD(Xsb(d),188);e=c.c;a.b[e.g]==1?Dsb(a.a,c):a.b[e.g]==2?(a.b[e.g]=1):iUc(a,e)}} +function V9b(a,b){var c,d,e;e=new Skb(b.gc());for(d=b.Kc();d.Ob();){c=BD(d.Pb(),286);c.c==c.f?K9b(a,c,c.c):L9b(a,c)||(e.c[e.c.length]=c,true)}return e} +function IZc(a,b,c){var d,e,f,g,h;h=a.r+b;a.r+=b;a.d+=c;d=c/a.n.c.length;e=0;for(g=new olb(a.n);g.af&&NC(b,f,null);return b} +function Lu(a,b){var c,d;d=a.gc();if(b==null){for(c=0;c0&&(i+=e);j[k]=g;g+=h*(i+d)}} +function Uoc(a){var b,c,d;d=a.f;a.n=KC(UD,Vje,25,d,15,1);a.d=KC(UD,Vje,25,d,15,1);for(b=0;b0?a.c:0);++e}a.b=d;a.d=f} +function BZc(a,b){var c,d,e,f,g;d=0;e=0;c=0;for(g=new olb(b);g.a0?a.g:0);++c}a.c=e;a.d=d} +function AHb(a,b){var c;c=OC(GC(UD,1),Vje,25,15,[zHb(a,(gHb(),dHb),b),zHb(a,eHb,b),zHb(a,fHb,b)]);if(a.f){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function lNb(b,c,d){var e;try{aNb(b,c+b.j,d+b.k,false,true)}catch(a){a=ubb(a);if(JD(a,73)){e=a;throw vbb(new qcb(e.g+Gle+c+She+d+').'))}else throw vbb(a)}} +function mNb(b,c,d){var e;try{aNb(b,c+b.j,d+b.k,true,false)}catch(a){a=ubb(a);if(JD(a,73)){e=a;throw vbb(new qcb(e.g+Gle+c+She+d+').'))}else throw vbb(a)}} +function d5b(a){var b;if(!wNb(a,(Nyc(),xxc))){return}b=BD(vNb(a,xxc),21);if(b.Hc((Hbd(),zbd))){b.Mc(zbd);b.Fc(Bbd)}else if(b.Hc(Bbd)){b.Mc(Bbd);b.Fc(zbd)}} +function e5b(a){var b;if(!wNb(a,(Nyc(),xxc))){return}b=BD(vNb(a,xxc),21);if(b.Hc((Hbd(),Gbd))){b.Mc(Gbd);b.Fc(Ebd)}else if(b.Hc(Ebd)){b.Mc(Ebd);b.Fc(Gbd)}} +function udc(a,b,c){Odd(c,'Self-Loop ordering',1);MAb(NAb(JAb(JAb(LAb(new YAb(null,new Kub(b.b,16)),new ydc),new Adc),new Cdc),new Edc),new Gdc(a));Qdd(c)} +function ikc(a,b,c,d){var e,f;for(e=b;e0&&(e.b+=b);return e} +function GXb(a,b){var c,d,e;e=new d7c;for(d=a.Kc();d.Ob();){c=BD(d.Pb(),37);uXb(c,0,e.b);e.b+=c.f.b+b;e.a=$wnd.Math.max(e.a,c.f.a)}e.a>0&&(e.a+=b);return e} +function d_b(a){var b,c,d;d=Ohe;for(c=new olb(a.a);c.a>16==6){return a.Cb.ih(a,5,o5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?a.zh():c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Wz(a){Rz();var b=a.e;if(b&&b.stack){var c=b.stack;var d=b+'\n';c.substring(0,d.length)==d&&(c=c.substring(d.length));return c.split('\n')}return []} +function jeb(a){var b;b=(qeb(),peb);return b[a>>>28]|b[a>>24&15]<<4|b[a>>20&15]<<8|b[a>>16&15]<<12|b[a>>12&15]<<16|b[a>>8&15]<<20|b[a>>4&15]<<24|b[a&15]<<28} +function _jb(a){var b,c,d;if(a.b!=a.c){return}d=a.a.length;c=geb($wnd.Math.max(8,d))<<1;if(a.b!=0){b=_Bb(a.a,c);$jb(a,b,d);a.a=b;a.b=0}else{dCb(a.a,c)}a.c=d} +function DKb(a,b){var c;c=a.b;return c.Xe((Y9c(),s9c))?c.Hf()==(Ucd(),Tcd)?-c.rf().a-Edb(ED(c.We(s9c))):b+Edb(ED(c.We(s9c))):c.Hf()==(Ucd(),Tcd)?-c.rf().a:b} +function P_b(a){var b;if(a.b.c.length!=0&&!!BD(Ikb(a.b,0),70).a){return BD(Ikb(a.b,0),70).a}b=JZb(a);if(b!=null){return b}return ''+(!a.c?-1:Jkb(a.c.a,a,0))} +function C0b(a){var b;if(a.f.c.length!=0&&!!BD(Ikb(a.f,0),70).a){return BD(Ikb(a.f,0),70).a}b=JZb(a);if(b!=null){return b}return ''+(!a.i?-1:Jkb(a.i.j,a,0))} +function Ogc(a,b){var c,d;if(b<0||b>=a.gc()){return null}for(c=b;c0?a.c:0);e=$wnd.Math.max(e,b.d);++d}a.e=f;a.b=e} +function shd(a){var b,c;if(!a.b){a.b=Qu(BD(a.f,118).Ag().i);for(c=new Fyd(BD(a.f,118).Ag());c.e!=c.i.gc();){b=BD(Dyd(c),137);Ekb(a.b,new dhd(b))}}return a.b} +function Ctd(a,b){var c,d,e;if(b.dc()){return LCd(),LCd(),KCd}else{c=new zyd(a,b.gc());for(e=new Fyd(a);e.e!=e.i.gc();){d=Dyd(e);b.Hc(d)&&wtd(c,d)}return c}} +function bkd(a,b,c,d){if(b==0){return d?(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),a.o):(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),FAd(a.o))}return fid(a,b,c,d)} +function Tnd(a){var b,c;if(a.rb){for(b=0,c=a.rb.i;b>22);e+=d>>22;if(e<0){return false}a.l=c&Eje;a.m=d&Eje;a.h=e&Fje;return true} +function Fwb(a,b,c,d,e,f,g){var h,i;if(b.Ae()&&(i=a.a.ue(c,d),i<0||!e&&i==0)){return false}if(b.Be()&&(h=a.a.ue(c,f),h>0||!g&&h==0)){return false}return true} +function Vcc(a,b){Occ();var c;c=a.j.g-b.j.g;if(c!=0){return 0}switch(a.j.g){case 2:return Ycc(b,Ncc)-Ycc(a,Ncc);case 4:return Ycc(a,Mcc)-Ycc(b,Mcc);}return 0} +function Tqc(a){switch(a.g){case 0:return Mqc;case 1:return Nqc;case 2:return Oqc;case 3:return Pqc;case 4:return Qqc;case 5:return Rqc;default:return null;}} +function End(a,b,c){var d,e;d=(e=new rUd,yId(e,b),pnd(e,c),wtd((!a.c&&(a.c=new cUd(p5,a,12,10)),a.c),e),e);AId(d,0);DId(d,1);CId(d,true);BId(d,true);return d} +function tud(a,b){var c,d;if(b>=a.i)throw vbb(new $zd(b,a.i));++a.j;c=a.g[b];d=a.i-b-1;d>0&&$fb(a.g,b+1,a.g,b,d);NC(a.g,--a.i,null);a.fi(b,c);a.ci();return c} +function UId(a,b){var c,d;if(a.Db>>16==17){return a.Cb.ih(a,21,c5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?a.zh():c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function iDb(a){var b,c,d,e;mmb();Okb(a.c,a.a);for(e=new olb(a.c);e.ac.a.c.length)){throw vbb(new Wdb('index must be >= 0 and <= layer node count'))}!!a.c&&Lkb(a.c.a,a);a.c=c;!!c&&Dkb(c.a,b,a)} +function p7b(a,b){var c,d,e;for(d=new Sr(ur(O_b(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);e=BD(b.Kb(c),10);return new cc(Qb(e.n.b+e.o.b/2))}return wb(),wb(),vb} +function rMc(a,b){this.c=new Lqb;this.a=a;this.b=b;this.d=BD(vNb(a,(wtc(),otc)),304);PD(vNb(a,(Nyc(),yxc)))===PD((_qc(),Zqc))?(this.e=new bNc):(this.e=new WMc)} +function $dd(a,b){var c,d,e,f;f=0;for(d=new olb(a);d.a>16==6){return a.Cb.ih(a,6,B2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Lhd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Eod(a,b){var c,d;if(a.Db>>16==7){return a.Cb.ih(a,1,C2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Nhd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function lpd(a,b){var c,d;if(a.Db>>16==9){return a.Cb.ih(a,9,E2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Phd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function mQd(a,b){var c,d;if(a.Db>>16==5){return a.Cb.ih(a,9,h5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),VFd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function KHd(a,b){var c,d;if(a.Db>>16==3){return a.Cb.ih(a,0,k5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),OFd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Snd(a,b){var c,d;if(a.Db>>16==7){return a.Cb.ih(a,6,o5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),cGd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function ird(){this.a=new bqd;this.g=new wo;this.j=new wo;this.b=new Lqb;this.d=new wo;this.i=new wo;this.k=new Lqb;this.c=new Lqb;this.e=new Lqb;this.f=new Lqb} +function MCd(a,b,c){var d,e,f;c<0&&(c=0);f=a.i;for(e=c;eWje){return p6d(a,d)}if(d==a){return true}}}return false} +function HKb(a){CKb();switch(a.q.g){case 5:EKb(a,(Ucd(),Acd));EKb(a,Rcd);break;case 4:FKb(a,(Ucd(),Acd));FKb(a,Rcd);break;default:GKb(a,(Ucd(),Acd));GKb(a,Rcd);}} +function LKb(a){CKb();switch(a.q.g){case 5:IKb(a,(Ucd(),zcd));IKb(a,Tcd);break;case 4:JKb(a,(Ucd(),zcd));JKb(a,Tcd);break;default:KKb(a,(Ucd(),zcd));KKb(a,Tcd);}} +function XQb(a){var b,c;b=BD(vNb(a,(wSb(),pSb)),19);if(b){c=b.a;c==0?yNb(a,(HSb(),GSb),new Gub):yNb(a,(HSb(),GSb),new Hub(c))}else{yNb(a,(HSb(),GSb),new Hub(1))}} +function V$b(a,b){var c;c=a.i;switch(b.g){case 1:return -(a.n.b+a.o.b);case 2:return a.n.a-c.o.a;case 3:return a.n.b-c.o.b;case 4:return -(a.n.a+a.o.a);}return 0} +function hbc(a,b){switch(a.g){case 0:return b==(Ctc(),ytc)?dbc:ebc;case 1:return b==(Ctc(),ytc)?dbc:cbc;case 2:return b==(Ctc(),ytc)?cbc:ebc;default:return cbc;}} +function v$c(a,b){var c,d,e;Lkb(a.a,b);a.e-=b.r+(a.a.c.length==0?0:a.c);e=ere;for(d=new olb(a.a);d.a>16==3){return a.Cb.ih(a,12,E2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Khd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Uod(a,b){var c,d;if(a.Db>>16==11){return a.Cb.ih(a,10,E2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Ohd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function PSd(a,b){var c,d;if(a.Db>>16==10){return a.Cb.ih(a,11,c5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),aGd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function qUd(a,b){var c,d;if(a.Db>>16==10){return a.Cb.ih(a,12,n5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),dGd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function wId(a){var b;if((a.Bb&1)==0&&!!a.r&&a.r.kh()){b=BD(a.r,49);a.r=BD(xid(a,b),138);a.r!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,8,b,a.r))}return a.r} +function yHb(a,b,c){var d;d=OC(GC(UD,1),Vje,25,15,[BHb(a,(gHb(),dHb),b,c),BHb(a,eHb,b,c),BHb(a,fHb,b,c)]);if(a.f){d[0]=$wnd.Math.max(d[0],d[2]);d[2]=d[0]}return d} +function O9b(a,b){var c,d,e;e=V9b(a,b);if(e.c.length==0){return}Okb(e,new pac);c=e.c.length;for(d=0;d>19;j=b.h>>19;if(i!=j){return j-i}e=a.h;h=b.h;if(e!=h){return e-h}d=a.m;g=b.m;if(d!=g){return d-g}c=a.l;f=b.l;return c-f} +function fFb(){fFb=ccb;eFb=(rFb(),oFb);dFb=new Nsd(Yke,eFb);cFb=(UEb(),TEb);bFb=new Nsd(Zke,cFb);aFb=(MEb(),LEb);_Eb=new Nsd($ke,aFb);$Eb=new Nsd(_ke,(Bcb(),true))} +function cfc(a,b,c){var d,e;d=b*c;if(JD(a.g,145)){e=ugc(a);if(e.f.d){e.f.a||(a.d.a+=d+ple)}else{a.d.d-=d+ple;a.d.a+=d+ple}}else if(JD(a.g,10)){a.d.d-=d;a.d.a+=2*d}} +function vmc(a,b,c){var d,e,f,g,h;e=a[c.g];for(h=new olb(b.d);h.a0?a.g:0);++c}b.b=d;b.e=e} +function to(a){var b,c,d;d=a.b;if(Lp(a.i,d.length)){c=d.length*2;a.b=KC(GF,Gie,317,c,0,1);a.c=KC(GF,Gie,317,c,0,1);a.f=c-1;a.i=0;for(b=a.a;b;b=b.c){po(a,b,b)}++a.g}} +function cNb(a,b,c,d){var e,f,g,h;for(e=0;eg&&(h=g/d);e>f&&(i=f/e);Y6c(a,$wnd.Math.min(h,i));return a} +function ond(){Smd();var b,c;try{c=BD(mUd((yFd(),xFd),yte),2014);if(c){return c}}catch(a){a=ubb(a);if(JD(a,102)){b=a;uvd((h0d(),b))}else throw vbb(a)}return new knd} +function Y9d(){A9d();var b,c;try{c=BD(mUd((yFd(),xFd),Ewe),2024);if(c){return c}}catch(a){a=ubb(a);if(JD(a,102)){b=a;uvd((h0d(),b))}else throw vbb(a)}return new U9d} +function qZd(){Smd();var b,c;try{c=BD(mUd((yFd(),xFd),_ve),1941);if(c){return c}}catch(a){a=ubb(a);if(JD(a,102)){b=a;uvd((h0d(),b))}else throw vbb(a)}return new mZd} +function HQd(a,b,c){var d,e;e=a.e;a.e=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,4,e,b);!c?(c=d):c.Ei(d)}e!=b&&(b?(c=QQd(a,MQd(a,b),c)):(c=QQd(a,a.a,c)));return c} +function nB(){eB.call(this);this.e=-1;this.a=false;this.p=Rie;this.k=-1;this.c=-1;this.b=-1;this.g=false;this.f=-1;this.j=-1;this.n=-1;this.i=-1;this.d=-1;this.o=Rie} +function qEb(a,b){var c,d,e;d=a.b.d.d;a.a||(d+=a.b.d.a);e=b.b.d.d;b.a||(e+=b.b.d.a);c=Kdb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function eOb(a,b){var c,d,e;d=a.b.b.d;a.a||(d+=a.b.b.a);e=b.b.b.d;b.a||(e+=b.b.b.a);c=Kdb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function PVb(a,b){var c,d,e;d=a.b.g.d;a.a||(d+=a.b.g.a);e=b.b.g.d;b.a||(e+=b.b.g.a);c=Kdb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function ZTb(){ZTb=ccb;WTb=c3c(e3c(e3c(e3c(new j3c,(qUb(),oUb),(S8b(),m8b)),oUb,q8b),pUb,x8b),pUb,a8b);YTb=e3c(e3c(new j3c,oUb,S7b),oUb,b8b);XTb=c3c(new j3c,pUb,d8b)} +function s3b(a){var b,c,d,e,f;b=BD(vNb(a,(wtc(),Csc)),83);f=a.n;for(d=b.Cc().Kc();d.Ob();){c=BD(d.Pb(),306);e=c.i;e.c+=f.a;e.d+=f.b;c.c?VHb(c):XHb(c)}yNb(a,Csc,null)} +function qmc(a,b,c){var d,e;e=a.b;d=e.d;switch(b.g){case 1:return -d.d-c;case 2:return e.o.a+d.c+c;case 3:return e.o.b+d.a+c;case 4:return -d.b-c;default:return -1;}} +function BXc(a){var b,c,d,e,f;d=0;e=dme;if(a.b){for(b=0;b<360;b++){c=b*0.017453292519943295;zXc(a,a.d,0,0,dre,c);f=a.b.ig(a.d);if(f0){g=(f&Ohe)%a.d.length;e=wAd(a,g,f,b);if(e){h=e.ed(c);return h}}d=a.tj(f,b,c);a.c.Fc(d);return null} +function t1d(a,b){var c,d,e,f;switch(o1d(a,b)._k()){case 3:case 2:{c=OKd(b);for(e=0,f=c.i;e=0;d--){if(dfb(a[d].d,b)||dfb(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} +function Abb(a,b){var c;if(Fbb(a)&&Fbb(b)){c=a/b;if(Kje0){a.b+=2;a.a+=d}}else{a.b+=1;a.a+=$wnd.Math.min(d,e)}} +function Rpd(a,b){var c,d;d=false;if(ND(b)){d=true;Qpd(a,new yC(GD(b)))}if(!d){if(JD(b,236)){d=true;Qpd(a,(c=Kcb(BD(b,236)),new TB(c)))}}if(!d){throw vbb(new vcb(Ute))}} +function IMd(a,b,c,d){var e,f,g;e=new pSd(a.e,1,10,(g=b.c,JD(g,88)?BD(g,26):(jGd(),_Fd)),(f=c.c,JD(f,88)?BD(f,26):(jGd(),_Fd)),HLd(a,b),false);!d?(d=e):d.Ei(e);return d} +function T_b(a){var b,c;switch(BD(vNb(Q_b(a),(Nyc(),ixc)),420).g){case 0:b=a.n;c=a.o;return new f7c(b.a+c.a/2,b.b+c.b/2);case 1:return new g7c(a.n);default:return null;}} +function lrc(){lrc=ccb;irc=new mrc(ane,0);hrc=new mrc('LEFTUP',1);krc=new mrc('RIGHTUP',2);grc=new mrc('LEFTDOWN',3);jrc=new mrc('RIGHTDOWN',4);frc=new mrc('BALANCED',5)} +function FFc(a,b,c){var d,e,f;d=Kdb(a.a[b.p],a.a[c.p]);if(d==0){e=BD(vNb(b,(wtc(),Qsc)),15);f=BD(vNb(c,Qsc),15);if(e.Hc(c)){return -1}else if(f.Hc(b)){return 1}}return d} +function jXc(a){switch(a.g){case 1:return new XVc;case 2:return new ZVc;case 3:return new VVc;case 0:return null;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function Ikd(a,b,c){switch(b){case 1:!a.n&&(a.n=new cUd(D2,a,1,7));Uxd(a.n);!a.n&&(a.n=new cUd(D2,a,1,7));ytd(a.n,BD(c,14));return;case 2:Lkd(a,GD(c));return;}ekd(a,b,c)} +function Zkd(a,b,c){switch(b){case 3:ald(a,Edb(ED(c)));return;case 4:cld(a,Edb(ED(c)));return;case 5:dld(a,Edb(ED(c)));return;case 6:eld(a,Edb(ED(c)));return;}Ikd(a,b,c)} +function Fnd(a,b,c){var d,e,f;f=(d=new rUd,d);e=xId(f,b,null);!!e&&e.Fi();pnd(f,c);wtd((!a.c&&(a.c=new cUd(p5,a,12,10)),a.c),f);AId(f,0);DId(f,1);CId(f,true);BId(f,true)} +function mUd(a,b){var c,d,e;c=Crb(a.g,b);if(JD(c,235)){e=BD(c,235);e.Qh()==null&&undefined;return e.Nh()}else if(JD(c,498)){d=BD(c,1938);e=d.b;return e}else{return null}} +function Ui(a,b,c,d){var e,f;Qb(b);Qb(c);f=BD(tn(a.d,b),19);Ob(!!f,'Row %s not in %s',b,a.e);e=BD(tn(a.b,c),19);Ob(!!e,'Column %s not in %s',c,a.c);return Wi(a,f.a,e.a,d)} +function JC(a,b,c,d,e,f,g){var h,i,j,k,l;k=e[f];j=f==g-1;h=j?d:0;l=LC(h,k);d!=10&&OC(GC(a,g-f),b[f],c[f],h,l);if(!j){++f;for(i=0;i1||h==-1){f=BD(i,15);e.Wb(t6d(a,f))}else{e.Wb(s6d(a,BD(i,56)))}}}} +function Zbb(b,c,d,e){Ybb();var f=Wbb;$moduleName=c;$moduleBase=d;tbb=e;function g(){for(var a=0;aOqe){return c}else e>-1.0E-6&&++c}return c} +function PQd(a,b){var c;if(b!=a.b){c=null;!!a.b&&(c=lid(a.b,a,-4,c));!!b&&(c=kid(b,a,-4,c));c=GQd(a,b,c);!!c&&c.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,b,b))} +function SQd(a,b){var c;if(b!=a.f){c=null;!!a.f&&(c=lid(a.f,a,-1,c));!!b&&(c=kid(b,a,-1,c));c=IQd(a,b,c);!!c&&c.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,0,b,b))} +function E9d(a){var b,c,d;if(a==null)return null;c=BD(a,15);if(c.dc())return '';d=new Hfb;for(b=c.Kc();b.Ob();){Efb(d,(Q8d(),GD(b.Pb())));d.a+=' '}return lcb(d,d.a.length-1)} +function I9d(a){var b,c,d;if(a==null)return null;c=BD(a,15);if(c.dc())return '';d=new Hfb;for(b=c.Kc();b.Ob();){Efb(d,(Q8d(),GD(b.Pb())));d.a+=' '}return lcb(d,d.a.length-1)} +function qEc(a,b,c){var d,e;d=a.c[b.c.p][b.p];e=a.c[c.c.p][c.p];if(d.a!=null&&e.a!=null){return Ddb(d.a,e.a)}else if(d.a!=null){return -1}else if(e.a!=null){return 1}return 0} +function zqd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new Yge(f);for(h=(c.b-c.a)*c.c<0?(Xge(),Wge):new she(c);h.Ob();){g=BD(h.Pb(),19);e=Zpd(b,g.a);d=new Crd(a);Aqd(d.a,e)}}} +function Qqd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new Yge(f);for(h=(c.b-c.a)*c.c<0?(Xge(),Wge):new she(c);h.Ob();){g=BD(h.Pb(),19);e=Zpd(b,g.a);d=new lrd(a);nqd(d.a,e)}}} +function eFd(b){var c;if(b!=null&&b.length>0&&bfb(b,b.length-1)==33){try{c=PEd(qfb(b,0,b.length-1));return c.e==null}catch(a){a=ubb(a);if(!JD(a,32))throw vbb(a)}}return false} +function h3d(a,b,c){var d,e,f;d=b.ak();f=b.dd();e=d.$j()?H2d(a,3,d,null,f,M2d(a,d,f,JD(d,99)&&(BD(d,18).Bb&Tje)!=0),true):H2d(a,1,d,d.zj(),f,-1,true);c?c.Ei(e):(c=e);return c} +function Vee(){var a,b,c;b=0;for(a=0;a<'X'.length;a++){c=Uee((BCb(a,'X'.length),'X'.charCodeAt(a)));if(c==0)throw vbb(new mde('Unknown Option: '+'X'.substr(a)));b|=c}return b} +function mZb(a,b,c){var d,e,f;d=Q_b(b);e=a_b(d);f=new H0b;F0b(f,b);switch(c.g){case 1:G0b(f,Wcd(Zcd(e)));break;case 2:G0b(f,Zcd(e));}yNb(f,(Nyc(),Uxc),ED(vNb(a,Uxc)));return f} +function U9b(a){var b,c;b=BD(Rr(new Sr(ur(R_b(a.a).a.Kc(),new Sq))),17);c=BD(Rr(new Sr(ur(U_b(a.a).a.Kc(),new Sq))),17);return Ccb(DD(vNb(b,(wtc(),ltc))))||Ccb(DD(vNb(c,ltc)))} +function Xjc(){Xjc=ccb;Tjc=new Yjc('ONE_SIDE',0);Vjc=new Yjc('TWO_SIDES_CORNER',1);Wjc=new Yjc('TWO_SIDES_OPPOSING',2);Ujc=new Yjc('THREE_SIDES',3);Sjc=new Yjc('FOUR_SIDES',4)} +function jkc(a,b,c,d,e){var f,g;f=BD(GAb(JAb(b.Oc(),new _kc),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);g=BD(Si(a.b,c,d),15);e==0?g.Wc(0,f):g.Gc(f)} +function KDc(a,b){var c,d,e,f,g;for(f=new olb(b.a);f.a0&&ric(this,this.c-1,(Ucd(),zcd));this.c0&&a[0].length>0&&(this.c=Ccb(DD(vNb(Q_b(a[0][0]),(wtc(),Rsc)))));this.a=KC(CX,nie,2018,a.length,0,2);this.b=KC(FX,nie,2019,a.length,0,2);this.d=new ss} +function tKc(a){if(a.c.length==0){return false}if((tCb(0,a.c.length),BD(a.c[0],17)).c.i.k==(j0b(),g0b)){return true}return FAb(NAb(new YAb(null,new Kub(a,16)),new wKc),new yKc)} +function rRc(a,b,c){Odd(c,'Tree layout',1);H2c(a.b);K2c(a.b,(yRc(),uRc),uRc);K2c(a.b,vRc,vRc);K2c(a.b,wRc,wRc);K2c(a.b,xRc,xRc);a.a=F2c(a.b,b);sRc(a,b,Udd(c,1));Qdd(c);return b} +function HXc(a,b){var c,d,e,f,g,h,i;h=gVc(b);f=b.f;i=b.g;g=$wnd.Math.sqrt(f*f+i*i);e=0;for(d=new olb(h);d.a=0){c=Abb(a,Jje);d=Hbb(a,Jje)}else{b=Pbb(a,1);c=Abb(b,500000000);d=Hbb(b,500000000);d=wbb(Nbb(d,1),xbb(a,1))}return Mbb(Nbb(d,32),xbb(c,Yje))} +function oQb(a,b,c){var d,e;d=(sCb(b.b!=0),BD(Nsb(b,b.a.a),8));switch(c.g){case 0:d.b=0;break;case 2:d.b=a.f;break;case 3:d.a=0;break;default:d.a=a.g;}e=Jsb(b,0);Vsb(e,d);return b} +function pmc(a,b,c,d){var e,f,g,h,i;i=a.b;f=b.d;g=f.j;h=umc(g,i.d[g.g],c);e=P6c(R6c(f.n),f.a);switch(f.j.g){case 1:case 3:h.a+=e.a;break;case 2:case 4:h.b+=e.b;}Gsb(d,h,d.c.b,d.c)} +function yJc(a,b,c){var d,e,f,g;g=Jkb(a.e,b,0);f=new zJc;f.b=c;d=new Bib(a.e,g);while(d.b1;b>>=1){(b&1)!=0&&(d=Ogb(d,c));c.d==1?(c=Ogb(c,c)):(c=new Xgb(Lhb(c.a,c.d,KC(WD,oje,25,c.d<<1,15,1))))}d=Ogb(d,c);return d} +function zub(){zub=ccb;var a,b,c,d;wub=KC(UD,Vje,25,25,15,1);xub=KC(UD,Vje,25,33,15,1);d=1.52587890625E-5;for(b=32;b>=0;b--){xub[b]=d;d*=0.5}c=1;for(a=24;a>=0;a--){wub[a]=c;c*=0.5}} +function S1b(a){var b,c;if(Ccb(DD(hkd(a,(Nyc(),fxc))))){for(c=new Sr(ur(_sd(a).a.Kc(),new Sq));Qr(c);){b=BD(Rr(c),79);if(Qld(b)){if(Ccb(DD(hkd(b,gxc)))){return true}}}}return false} +function kjc(a,b){var c,d,e;if(Qqb(a.f,b)){b.b=a;d=b.c;Jkb(a.j,d,0)!=-1||Ekb(a.j,d);e=b.d;Jkb(a.j,e,0)!=-1||Ekb(a.j,e);c=b.a.b;if(c.c.length!=0){!a.i&&(a.i=new vjc(a));qjc(a.i,c)}}} +function rmc(a){var b,c,d,e,f;c=a.c.d;d=c.j;e=a.d.d;f=e.j;if(d==f){return c.p=0&&dfb(a.substr(b,'GMT'.length),'GMT')){c[0]=b+3;return tA(a,c,d)}if(b>=0&&dfb(a.substr(b,'UTC'.length),'UTC')){c[0]=b+3;return tA(a,c,d)}return tA(a,c,d)} +function tjc(a,b){var c,d,e,f,g;f=a.g.a;g=a.g.b;for(d=new olb(a.d);d.ac;f--){a[f]|=b[f-c-1]>>>g;a[f-1]=b[f-c-1]<=a.f){break}f.c[f.c.length]=c}return f} +function sfd(a){var b,c,d,e;b=null;for(e=new olb(a.wf());e.a0&&$fb(a.g,b,a.g,b+d,h);g=c.Kc();a.i+=d;for(e=0;ef&&nfb(j,sfb(c[h],ltb))){e=h;f=i}}e>=0&&(d[0]=b+f);return e} +function MIb(a,b){var c;c=NIb(a.b.Hf(),b.b.Hf());if(c!=0){return c}switch(a.b.Hf().g){case 1:case 2:return beb(a.b.sf(),b.b.sf());case 3:case 4:return beb(b.b.sf(),a.b.sf());}return 0} +function iRb(a){var b,c,d;d=a.e.c.length;a.a=IC(WD,[nie,oje],[48,25],15,[d,d],2);for(c=new olb(a.c);c.a>4&15;f=a[d]&15;g[e++]=Qmd[c];g[e++]=Qmd[f]}return zfb(g,0,g.length)}} +function j3d(a,b,c){var d,e,f;d=b.ak();f=b.dd();e=d.$j()?H2d(a,4,d,f,null,M2d(a,d,f,JD(d,99)&&(BD(d,18).Bb&Tje)!=0),true):H2d(a,d.Kj()?2:1,d,f,d.zj(),-1,true);c?c.Ei(e):(c=e);return c} +function wfb(a){var b,c;if(a>=Tje){b=Uje+(a-Tje>>10&1023)&aje;c=56320+(a-Tje&1023)&aje;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&aje)}} +function bKb(a,b){$Jb();var c,d,e,f;e=BD(BD(Qc(a.r,b),21),84);if(e.gc()>=2){d=BD(e.Kc().Pb(),111);c=a.u.Hc((rcd(),mcd));f=a.u.Hc(qcd);return !d.a&&!c&&(e.gc()==2||f)}else{return false}} +function IVc(a,b,c,d,e){var f,g,h;f=JVc(a,b,c,d,e);h=false;while(!f){AVc(a,e,true);h=true;f=JVc(a,b,c,d,e)}h&&AVc(a,e,false);g=dVc(e);if(g.c.length!=0){!!a.d&&a.d.lg(g);IVc(a,e,c,d,g)}} +function Mad(){Mad=ccb;Kad=new Nad(ane,0);Iad=new Nad('DIRECTED',1);Lad=new Nad('UNDIRECTED',2);Gad=new Nad('ASSOCIATION',3);Jad=new Nad('GENERALIZATION',4);Had=new Nad('DEPENDENCY',5)} +function kfd(a,b){var c;if(!mpd(a)){throw vbb(new Zdb(Sse))}c=mpd(a);switch(b.g){case 1:return -(a.j+a.f);case 2:return a.i-c.g;case 3:return a.j-c.f;case 4:return -(a.i+a.g);}return 0} +function cub(a,b){var c,d;uCb(b);d=a.b.c.length;Ekb(a.b,b);while(d>0){c=d;d=(d-1)/2|0;if(a.a.ue(Ikb(a.b,d),b)<=0){Nkb(a.b,c,b);return true}Nkb(a.b,c,Ikb(a.b,d))}Nkb(a.b,d,b);return true} +function BHb(a,b,c,d){var e,f;e=0;if(!c){for(f=0;f=h} +function Tpd(a,b,c,d){var e;e=false;if(ND(d)){e=true;Upd(b,c,GD(d))}if(!e){if(KD(d)){e=true;Tpd(a,b,c,d)}}if(!e){if(JD(d,236)){e=true;Spd(b,c,BD(d,236))}}if(!e){throw vbb(new vcb(Ute))}} +function W0d(a,b){var c,d,e;c=b.Hh(a.a);if(c){e=AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),Sve);if(e!=null){for(d=1;d<(O6d(),K6d).length;++d){if(dfb(K6d[d],e)){return d}}}}return 0} +function X0d(a,b){var c,d,e;c=b.Hh(a.a);if(c){e=AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),Sve);if(e!=null){for(d=1;d<(O6d(),L6d).length;++d){if(dfb(L6d[d],e)){return d}}}}return 0} +function Ve(a,b){var c,d,e,f;uCb(b);f=a.a.gc();if(f0?1:0;while(f.a[e]!=c){f=f.a[e];e=a.a.ue(c.d,f.d)>0?1:0}f.a[e]=d;d.b=c.b;d.a[0]=c.a[0];d.a[1]=c.a[1];c.a[0]=null;c.a[1]=null} +function ucd(a){rcd();var b,c;b=qqb(ncd,OC(GC(E1,1),Kie,273,0,[pcd]));if(Ox(Cx(b,a))>1){return false}c=qqb(mcd,OC(GC(E1,1),Kie,273,0,[lcd,qcd]));if(Ox(Cx(c,a))>1){return false}return true} +function fod(a,b){var c;c=Phb((yFd(),xFd),a);JD(c,498)?Shb(xFd,a,new bUd(this,b)):Shb(xFd,a,this);bod(this,b);if(b==(LFd(),KFd)){this.wb=BD(this,1939);BD(b,1941)}else{this.wb=(NFd(),MFd)}} +function lZd(b){var c,d,e;if(b==null){return null}c=null;for(d=0;d=_ie?'error':d>=900?'warn':d>=800?'info':'log');gCb(c,a.a);!!a.b&&hCb(b,c,a.b,'Exception: ',true)} +function vNb(a,b){var c,d;d=(!a.q&&(a.q=new Lqb),Ohb(a.q,b));if(d!=null){return d}c=b.wg();JD(c,4)&&(c==null?(!a.q&&(a.q=new Lqb),Thb(a.q,b)):(!a.q&&(a.q=new Lqb),Rhb(a.q,b,c)),a);return c} +function qUb(){qUb=ccb;lUb=new rUb('P1_CYCLE_BREAKING',0);mUb=new rUb('P2_LAYERING',1);nUb=new rUb('P3_NODE_ORDERING',2);oUb=new rUb('P4_NODE_PLACEMENT',3);pUb=new rUb('P5_EDGE_ROUTING',4)} +function SUb(a,b){var c,d,e,f,g;e=b==1?KUb:JUb;for(d=e.a.ec().Kc();d.Ob();){c=BD(d.Pb(),103);for(g=BD(Qc(a.f.c,c),21).Kc();g.Ob();){f=BD(g.Pb(),46);Lkb(a.b.b,f.b);Lkb(a.b.a,BD(f.b,81).d)}}} +function IWb(a,b){AWb();var c;if(a.c==b.c){if(a.b==b.b||pWb(a.b,b.b)){c=mWb(a.b)?1:-1;if(a.a&&!b.a){return c}else if(!a.a&&b.a){return -c}}return beb(a.b.g,b.b.g)}else{return Kdb(a.c,b.c)}} +function y6b(a,b){var c;Odd(b,'Hierarchical port position processing',1);c=a.b;c.c.length>0&&x6b((tCb(0,c.c.length),BD(c.c[0],29)),a);c.c.length>1&&x6b(BD(Ikb(c,c.c.length-1),29),a);Qdd(b)} +function RVc(a,b){var c,d,e;if(CVc(a,b)){return true}for(d=new olb(b);d.a=e||b<0)throw vbb(new qcb(lue+b+mue+e));if(c>=e||c<0)throw vbb(new qcb(nue+c+mue+e));b!=c?(d=(f=a.Ti(c),a.Hi(b,f),f)):(d=a.Oi(c));return d} +function m6d(a){var b,c,d;d=a;if(a){b=0;for(c=a.Ug();c;c=c.Ug()){if(++b>Wje){return m6d(c)}d=c;if(c==a){throw vbb(new Zdb('There is a cycle in the containment hierarchy of '+a))}}}return d} +function Fe(a){var b,c,d;d=new xwb(She,'[',']');for(c=a.Kc();c.Ob();){b=c.Pb();uwb(d,PD(b)===PD(a)?'(this Collection)':b==null?Xhe:fcb(b))}return !d.a?d.c:d.e.length==0?d.a.a:d.a.a+(''+d.e)} +function CVc(a,b){var c,d;d=false;if(b.gc()<2){return false}for(c=0;cd&&(BCb(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||b1&&(a.j.b+=a.e)}else{a.j.a+=c.a;a.j.b=$wnd.Math.max(a.j.b,c.b);a.d.c.length>1&&(a.j.a+=a.e)}} +function gkc(){gkc=ccb;dkc=OC(GC(F1,1),bne,61,0,[(Ucd(),Acd),zcd,Rcd]);ckc=OC(GC(F1,1),bne,61,0,[zcd,Rcd,Tcd]);ekc=OC(GC(F1,1),bne,61,0,[Rcd,Tcd,Acd]);fkc=OC(GC(F1,1),bne,61,0,[Tcd,Acd,zcd])} +function omc(a,b,c,d){var e,f,g,h,i,j,k;g=a.c.d;h=a.d.d;if(g.j==h.j){return}k=a.b;e=g.j;i=null;while(e!=h.j){i=b==0?Xcd(e):Vcd(e);f=umc(e,k.d[e.g],c);j=umc(i,k.d[i.g],c);Dsb(d,P6c(f,j));e=i}} +function oFc(a,b,c,d){var e,f,g,h,i;g=JHc(a.a,b,c);h=BD(g.a,19).a;f=BD(g.b,19).a;if(d){i=BD(vNb(b,(wtc(),gtc)),10);e=BD(vNb(c,gtc),10);if(!!i&&!!e){mic(a.b,i,e);h+=a.b.i;f+=a.b.e}}return h>f} +function oHc(a){var b,c,d,e,f,g,h,i,j;this.a=lHc(a);this.b=new Rkb;for(c=a,d=0,e=c.length;dwic(a.d).c){a.i+=a.g.c;yic(a.d)}else if(wic(a.d).c>wic(a.g).c){a.e+=a.d.c;yic(a.g)}else{a.i+=vic(a.g);a.e+=vic(a.d);yic(a.g);yic(a.d)}}} +function XOc(a,b,c){var d,e,f,g;f=b.q;g=b.r;new DOc((HOc(),FOc),b,f,1);new DOc(FOc,f,g,1);for(e=new olb(c);e.ah&&(i=h/d);e>f&&(j=f/e);g=$wnd.Math.min(i,j);a.a+=g*(b.a-a.a);a.b+=g*(b.b-a.b)} +function sZc(a,b,c,d,e){var f,g;g=false;f=BD(Ikb(c.b,0),33);while(yZc(a,b,f,d,e)){g=true;NZc(c,f);if(c.b.c.length==0){break}f=BD(Ikb(c.b,0),33)}c.b.c.length==0&&v$c(c.j,c);g&&a$c(b.q);return g} +function t6c(a,b){i6c();var c,d,e,f;if(b.b<2){return false}f=Jsb(b,0);c=BD(Xsb(f),8);d=c;while(f.b!=f.d.c){e=BD(Xsb(f),8);if(s6c(a,d,e)){return true}d=e}if(s6c(a,d,c)){return true}return false} +function ckd(a,b,c,d){var e,f;if(c==0){return !a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),bId(a.o,b,d)}return f=BD(XKd((e=BD(Ajd(a,16),26),!e?a.zh():e),c),66),f.Nj().Rj(a,yjd(a),c-aLd(a.zh()),b,d)} +function bod(a,b){var c;if(b!=a.sb){c=null;!!a.sb&&(c=BD(a.sb,49).ih(a,1,i5,c));!!b&&(c=BD(b,49).gh(a,1,i5,c));c=Jnd(a,b,c);!!c&&c.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,4,b,b))} +function yqd(a,b){var c,d,e,f;if(b){e=Xpd(b,'x');c=new zrd(a);hmd(c.a,(uCb(e),e));f=Xpd(b,'y');d=new Ard(a);imd(d.a,(uCb(f),f))}else{throw vbb(new cqd('All edge sections need an end point.'))}} +function wqd(a,b){var c,d,e,f;if(b){e=Xpd(b,'x');c=new wrd(a);omd(c.a,(uCb(e),e));f=Xpd(b,'y');d=new xrd(a);pmd(d.a,(uCb(f),f))}else{throw vbb(new cqd('All edge sections need a start point.'))}} +function pyb(a,b){var c,d,e,f,g,h,i;for(d=syb(a),f=0,h=d.length;f>22-b;e=a.h<>22-b}else if(b<44){c=0;d=a.l<>44-b}else{c=0;d=0;e=a.l<a){throw vbb(new Wdb('k must be smaller than n'))}else return b==0||b==a?1:a==0?0:q6c(a)/(q6c(b)*q6c(a-b))} +function jfd(a,b){var c,d,e,f;c=new _ud(a);while(c.g==null&&!c.c?Uud(c):c.g==null||c.i!=0&&BD(c.g[c.i-1],47).Ob()){f=BD(Vud(c),56);if(JD(f,160)){d=BD(f,160);for(e=0;e>4];b[c*2+1]=gde[f&15]}return zfb(b,0,b.length)} +function fn(a){Vm();var b,c,d;d=a.c.length;switch(d){case 0:return Um;case 1:b=BD(qr(new olb(a)),42);return ln(b.cd(),b.dd());default:c=BD(Qkb(a,KC(CK,zie,42,a.c.length,0,1)),165);return new wx(c);}} +function ITb(a){var b,c,d,e,f,g;b=new jkb;c=new jkb;Wjb(b,a);Wjb(c,a);while(c.b!=c.c){e=BD(fkb(c),37);for(g=new olb(e.a);g.a0&&WGc(a,c,b);return e}return TGc(a,b,c)} +function MSc(a,b,c){var d,e,f,g;if(b.b!=0){d=new Psb;for(g=Jsb(b,0);g.b!=g.d.c;){f=BD(Xsb(g),86);ye(d,URc(f));e=f.e;e.a=BD(vNb(f,(mTc(),kTc)),19).a;e.b=BD(vNb(f,lTc),19).a}MSc(a,d,Udd(c,d.b/a.a|0))}} +function JZc(a,b){var c,d,e,f,g;if(a.e<=b){return a.g}if(LZc(a,a.g,b)){return a.g}f=a.r;d=a.g;g=a.r;e=(f-d)/2+d;while(d+11&&(a.e.b+=a.a)}else{a.e.a+=c.a;a.e.b=$wnd.Math.max(a.e.b,c.b);a.d.c.length>1&&(a.e.a+=a.a)}} +function cmc(a){var b,c,d,e;e=a.i;b=e.b;d=e.j;c=e.g;switch(e.a.g){case 0:c.a=(a.g.b.o.a-d.a)/2;break;case 1:c.a=b.d.n.a+b.d.a.a;break;case 2:c.a=b.d.n.a+b.d.a.a-d.a;break;case 3:c.b=b.d.n.b+b.d.a.b;}} +function Q6c(a,b,c,d,e){if(dd&&(a.a=d);a.be&&(a.b=e);return a} +function lsd(a){if(JD(a,149)){return esd(BD(a,149))}else if(JD(a,229)){return fsd(BD(a,229))}else if(JD(a,23)){return gsd(BD(a,23))}else{throw vbb(new Wdb(Xte+Fe(new amb(OC(GC(SI,1),Uhe,1,5,[a])))))}} +function mhb(a,b,c,d,e){var f,g,h;f=true;for(g=0;g>>e|c[g+d+1]<>>e;++g}return f} +function zMc(a,b,c,d){var e,f,g;if(b.k==(j0b(),g0b)){for(f=new Sr(ur(R_b(b).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);g=e.c.i.k;if(g==g0b&&a.c.a[e.c.i.c.p]==d&&a.c.a[b.c.p]==c){return true}}}return false} +function mD(a,b){var c,d,e,f;b&=63;c=a.h&Fje;if(b<22){f=c>>>b;e=a.m>>b|c<<22-b;d=a.l>>b|a.m<<22-b}else if(b<44){f=0;e=c>>>b-22;d=a.m>>b-22|a.h<<44-b}else{f=0;e=0;d=c>>>b-44}return TC(d&Eje,e&Eje,f&Fje)} +function Iic(a,b,c,d){var e;this.b=d;this.e=a==(rGc(),pGc);e=b[c];this.d=IC(sbb,[nie,dle],[177,25],16,[e.length,e.length],2);this.a=IC(WD,[nie,oje],[48,25],15,[e.length,e.length],2);this.c=new sic(b,c)} +function ljc(a){var b,c,d;a.k=new Ki((Ucd(),OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])).length,a.j.c.length);for(d=new olb(a.j);d.a=c){K9b(a,b,d.p);return true}}return false} +function Iod(a){var b;if((a.Db&64)!=0)return fld(a);b=new Wfb(dte);!a.a||Qfb(Qfb((b.a+=' "',b),a.a),'"');Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function Z2d(a,b,c){var d,e,f,g,h;h=S6d(a.e.Tg(),b);e=BD(a.g,119);d=0;for(g=0;gc){return Jb(a,c,'start index')}if(b<0||b>c){return Jb(b,c,'end index')}return hc('end index (%s) must not be less than start index (%s)',OC(GC(SI,1),Uhe,1,5,[meb(b),meb(a)]))} +function Pz(b,c){var d,e,f,g;for(e=0,f=b.length;e0&&iCc(a,f,c))}}b.p=0} +function p5c(a){var b;this.c=new Psb;this.f=a.e;this.e=a.d;this.i=a.g;this.d=a.c;this.b=a.b;this.k=a.j;this.a=a.a;!a.i?(this.j=(b=BD(gdb(e1),9),new xqb(b,BD(_Bb(b,b.length),9),0))):(this.j=a.i);this.g=a.f} +function Wb(a){var b,c,d,e;b=Kfb(Qfb(new Wfb('Predicates.'),'and'),40);c=true;for(e=new vib(a);e.b0?h[g-1]:KC(OQ,kne,10,0,0,1);e=h[g];j=g=0?a.Bh(e):vid(a,d)}else{throw vbb(new Wdb(ite+d.ne()+jte))}}else{eid(a,c,d)}} +function aqd(a){var b,c;c=null;b=false;if(JD(a,204)){b=true;c=BD(a,204).a}if(!b){if(JD(a,258)){b=true;c=''+BD(a,258).a}}if(!b){if(JD(a,483)){b=true;c=''+BD(a,483).a}}if(!b){throw vbb(new vcb(Ute))}return c} +function ORd(a,b){var c,d;if(a.f){while(b.Ob()){c=BD(b.Pb(),72);d=c.ak();if(JD(d,99)&&(BD(d,18).Bb&ote)!=0&&(!a.e||d.Gj()!=x2||d.aj()!=0)&&c.dd()!=null){b.Ub();return true}}return false}else{return b.Ob()}} +function QRd(a,b){var c,d;if(a.f){while(b.Sb()){c=BD(b.Ub(),72);d=c.ak();if(JD(d,99)&&(BD(d,18).Bb&ote)!=0&&(!a.e||d.Gj()!=x2||d.aj()!=0)&&c.dd()!=null){b.Pb();return true}}return false}else{return b.Sb()}} +function I2d(a,b,c){var d,e,f,g,h,i;i=S6d(a.e.Tg(),b);d=0;h=a.i;e=BD(a.g,119);for(g=0;g1&&(b.c[b.c.length]=f,true)}} +function TJc(a){var b,c,d,e;c=new Psb;ye(c,a.o);d=new twb;while(c.b!=0){b=BD(c.b==0?null:(sCb(c.b!=0),Nsb(c,c.a.a)),508);e=KJc(a,b,true);e&&Ekb(d.a,b)}while(d.a.c.length!=0){b=BD(rwb(d),508);KJc(a,b,false)}} +function _5c(){_5c=ccb;$5c=new a6c(ole,0);T5c=new a6c('BOOLEAN',1);X5c=new a6c('INT',2);Z5c=new a6c('STRING',3);U5c=new a6c('DOUBLE',4);V5c=new a6c('ENUM',5);W5c=new a6c('ENUMSET',6);Y5c=new a6c('OBJECT',7)} +function H6c(a,b){var c,d,e,f,g;d=$wnd.Math.min(a.c,b.c);f=$wnd.Math.min(a.d,b.d);e=$wnd.Math.max(a.c+a.b,b.c+b.b);g=$wnd.Math.max(a.d+a.a,b.d+b.a);if(e=(e/2|0)){this.e=!d?null:d.c;this.d=e;while(c++0){uu(this)}}this.b=b;this.a=null} +function rEb(a,b){var c,d;b.a?sEb(a,b):(c=BD(Exb(a.b,b.b),57),!!c&&c==a.a[b.b.f]&&!!c.a&&c.a!=b.b.a&&c.c.Fc(b.b),d=BD(Dxb(a.b,b.b),57),!!d&&a.a[d.f]==b.b&&!!d.a&&d.a!=b.b.a&&b.b.c.Fc(d),Fxb(a.b,b.b),undefined)} +function FJb(a,b){var c,d;c=BD(Mpb(a.b,b),124);if(BD(BD(Qc(a.r,b),21),84).dc()){c.n.b=0;c.n.c=0;return}c.n.b=a.C.b;c.n.c=a.C.c;a.A.Hc((tdd(),sdd))&&KJb(a,b);d=JJb(a,b);KIb(a,b)==(Tbd(),Qbd)&&(d+=2*a.w);c.a.a=d} +function OKb(a,b){var c,d;c=BD(Mpb(a.b,b),124);if(BD(BD(Qc(a.r,b),21),84).dc()){c.n.d=0;c.n.a=0;return}c.n.d=a.C.d;c.n.a=a.C.a;a.A.Hc((tdd(),sdd))&&SKb(a,b);d=RKb(a,b);KIb(a,b)==(Tbd(),Qbd)&&(d+=2*a.w);c.a.b=d} +function cOb(a,b){var c,d,e,f;f=new Rkb;for(d=new olb(b);d.ac.a&&(d.Hc((i8c(),c8c))?(e=(b.a-c.a)/2):d.Hc(e8c)&&(e=b.a-c.a));b.b>c.b&&(d.Hc((i8c(),g8c))?(f=(b.b-c.b)/2):d.Hc(f8c)&&(f=b.b-c.b));Efd(a,e,f)} +function aod(a,b,c,d,e,f,g,h,i,j,k,l,m){JD(a.Cb,88)&&XMd($Kd(BD(a.Cb,88)),4);pnd(a,c);a.f=g;dJd(a,h);fJd(a,i);ZId(a,j);eJd(a,k);CId(a,l);aJd(a,m);BId(a,true);AId(a,e);a.ok(f);yId(a,b);d!=null&&(a.i=null,_Id(a,d))} +function PRd(a){var b,c;if(a.f){while(a.n>0){b=BD(a.k.Xb(a.n-1),72);c=b.ak();if(JD(c,99)&&(BD(c,18).Bb&ote)!=0&&(!a.e||c.Gj()!=x2||c.aj()!=0)&&b.dd()!=null){return true}else{--a.n}}return false}else{return a.n>0}} +function Jb(a,b,c){if(a<0){return hc(The,OC(GC(SI,1),Uhe,1,5,[c,meb(a)]))}else if(b<0){throw vbb(new Wdb(Vhe+b))}else{return hc('%s (%s) must not be greater than size (%s)',OC(GC(SI,1),Uhe,1,5,[c,meb(a),meb(b)]))}} +function Llb(a,b,c,d,e,f){var g,h,i,j;g=d-c;if(g<7){Ilb(b,c,d,f);return}i=c+e;h=d+e;j=i+(h-i>>1);Llb(b,a,i,j,-e,f);Llb(b,a,j,h,-e,f);if(f.ue(a[j-1],a[j])<=0){while(c=0?a.sh(f,c):uid(a,e,c)}else{throw vbb(new Wdb(ite+e.ne()+jte))}}else{did(a,d,e,c)}} +function q6d(b){var c,d,e,f;d=BD(b,49).qh();if(d){try{e=null;c=nUd((yFd(),xFd),LEd(MEd(d)));if(c){f=c.rh();!!f&&(e=f.Wk(tfb(d.e)))}if(!!e&&e!=b){return q6d(e)}}catch(a){a=ubb(a);if(!JD(a,60))throw vbb(a)}}return b} +function jrb(a,b,c){var d,e,f,g;g=b==null?0:a.b.se(b);e=(d=a.a.get(g),d==null?new Array:d);if(e.length==0){a.a.set(g,e)}else{f=grb(a,b,e);if(f){return f.ed(c)}}NC(e,e.length,new pjb(b,c));++a.c;zpb(a.b);return null} +function YUc(a,b){var c,d;H2c(a.a);K2c(a.a,(PUc(),NUc),NUc);K2c(a.a,OUc,OUc);d=new j3c;e3c(d,OUc,(tVc(),sVc));PD(hkd(b,(ZWc(),LWc)))!==PD((pWc(),mWc))&&e3c(d,OUc,qVc);e3c(d,OUc,rVc);E2c(a.a,d);c=F2c(a.a,b);return c} +function uC(a){if(!a){return OB(),NB}var b=a.valueOf?a.valueOf():a;if(b!==a){var c=qC[typeof b];return c?c(b):xC(typeof b)}else if(a instanceof Array||a instanceof $wnd.Array){return new xB(a)}else{return new fC(a)}} +function RJb(a,b,c){var d,e,f;f=a.o;d=BD(Mpb(a.p,c),244);e=d.i;e.b=gIb(d);e.a=fIb(d);e.b=$wnd.Math.max(e.b,f.a);e.b>f.a&&!b&&(e.b=f.a);e.c=-(e.b-f.a)/2;switch(c.g){case 1:e.d=-e.a;break;case 3:e.d=f.b;}hIb(d);iIb(d)} +function SJb(a,b,c){var d,e,f;f=a.o;d=BD(Mpb(a.p,c),244);e=d.i;e.b=gIb(d);e.a=fIb(d);e.a=$wnd.Math.max(e.a,f.b);e.a>f.b&&!b&&(e.a=f.b);e.d=-(e.a-f.b)/2;switch(c.g){case 4:e.c=-e.b;break;case 2:e.c=f.a;}hIb(d);iIb(d)} +function Jgc(a,b){var c,d,e,f,g;if(b.dc()){return}e=BD(b.Xb(0),128);if(b.gc()==1){Igc(a,e,e,1,0,b);return}c=1;while(c0){try{f=Icb(c,Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){e=a;throw vbb(new rFd(e))}else throw vbb(a)}}d=(!b.a&&(b.a=new z0d(b)),b.a);return f=0?BD(qud(d,f),56):null} +function Ib(a,b){if(a<0){return hc(The,OC(GC(SI,1),Uhe,1,5,['index',meb(a)]))}else if(b<0){throw vbb(new Wdb(Vhe+b))}else{return hc('%s (%s) must be less than size (%s)',OC(GC(SI,1),Uhe,1,5,['index',meb(a),meb(b)]))}} +function Slb(a){var b,c,d,e,f;if(a==null){return Xhe}f=new xwb(She,'[',']');for(c=a,d=0,e=c.length;d0){g=a.c.d;h=a.d.d;e=Y6c(c7c(new f7c(h.a,h.b),g),1/(d+1));f=new f7c(g.a,g.b);for(c=new olb(a.a);c.a=0?a._g(c,true,true):sid(a,e,true),153));BD(d,215).ol(b)}else{throw vbb(new Wdb(ite+b.ne()+jte))}} +function ugb(a){var b,c;if(a>-140737488355328&&a<140737488355328){if(a==0){return 0}b=a<0;b&&(a=-a);c=QD($wnd.Math.floor($wnd.Math.log(a)/0.6931471805599453));(!b||a!=$wnd.Math.pow(2,c))&&++c;return c}return vgb(Cbb(a))} +function QOc(a){var b,c,d,e,f,g,h;f=new zsb;for(c=new olb(a);c.a2&&h.e.b+h.j.b<=2){e=h;d=g}f.a.zc(e,f);e.q=d}return f} +function K5b(a,b){var c,d,e;d=new b0b(a);tNb(d,b);yNb(d,(wtc(),Gsc),b);yNb(d,(Nyc(),Vxc),(dcd(),$bd));yNb(d,mwc,(F7c(),B7c));__b(d,(j0b(),e0b));c=new H0b;F0b(c,d);G0b(c,(Ucd(),Tcd));e=new H0b;F0b(e,d);G0b(e,zcd);return d} +function Spc(a){switch(a.g){case 0:return new fGc((rGc(),oGc));case 1:return new CFc;case 2:return new fHc;default:throw vbb(new Wdb('No implementation is available for the crossing minimizer '+(a.f!=null?a.f:''+a.g)));}} +function tDc(a,b){var c,d,e,f,g;a.c[b.p]=true;Ekb(a.a,b);for(g=new olb(b.j);g.a=f){g.$b()}else{e=g.Kc();for(d=0;d0?zh():g<0&&Bw(a,b,-g);return true}else{return false}} +function fIb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){g=jIb(a,true);b=0;for(d=g,e=0,f=d.length;e0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}else{h=Mtb(Zzb(OAb(JAb(Plb(a.a),new xIb),new zIb)))}return h>0?h+a.n.d+a.n.a:0} +function gIb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){h=Mtb(Zzb(OAb(JAb(Plb(a.a),new tIb),new vIb)))}else{g=kIb(a,true);b=0;for(d=g,e=0,f=d.length;e0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}return h>0?h+a.n.b+a.n.c:0} +function MJb(a,b){var c,d,e,f;f=BD(Mpb(a.b,b),124);c=f.a;for(e=BD(BD(Qc(a.r,b),21),84).Kc();e.Ob();){d=BD(e.Pb(),111);!!d.c&&(c.a=$wnd.Math.max(c.a,ZHb(d.c)))}if(c.a>0){switch(b.g){case 2:f.n.c=a.s;break;case 4:f.n.b=a.s;}}} +function NQb(a,b){var c,d,e;c=BD(vNb(b,(wSb(),oSb)),19).a-BD(vNb(a,oSb),19).a;if(c==0){d=c7c(R6c(BD(vNb(a,(HSb(),DSb)),8)),BD(vNb(a,ESb),8));e=c7c(R6c(BD(vNb(b,DSb),8)),BD(vNb(b,ESb),8));return Kdb(d.a*d.b,e.a*e.b)}return c} +function iRc(a,b){var c,d,e;c=BD(vNb(b,(JTc(),ETc)),19).a-BD(vNb(a,ETc),19).a;if(c==0){d=c7c(R6c(BD(vNb(a,(mTc(),VSc)),8)),BD(vNb(a,WSc),8));e=c7c(R6c(BD(vNb(b,VSc),8)),BD(vNb(b,WSc),8));return Kdb(d.a*d.b,e.a*e.b)}return c} +function TZb(a){var b,c;c=new Ufb;c.a+='e_';b=KZb(a);b!=null&&(c.a+=''+b,c);if(!!a.c&&!!a.d){Qfb((c.a+=' ',c),C0b(a.c));Qfb(Pfb((c.a+='[',c),a.c.i),']');Qfb((c.a+=gne,c),C0b(a.d));Qfb(Pfb((c.a+='[',c),a.d.i),']')}return c.a} +function zRc(a){switch(a.g){case 0:return new lUc;case 1:return new sUc;case 2:return new CUc;case 3:return new IUc;default:throw vbb(new Wdb('No implementation is available for the layout phase '+(a.f!=null?a.f:''+a.g)));}} +function mfd(a,b,c,d,e){var f;f=0;switch(e.g){case 1:f=$wnd.Math.max(0,b.b+a.b-(c.b+d));break;case 3:f=$wnd.Math.max(0,-a.b-d);break;case 2:f=$wnd.Math.max(0,-a.a-d);break;case 4:f=$wnd.Math.max(0,b.a+a.a-(c.a+d));}return f} +function mqd(a,b,c){var d,e,f,g,h;if(c){e=c.a.length;d=new Yge(e);for(h=(d.b-d.a)*d.c<0?(Xge(),Wge):new she(d);h.Ob();){g=BD(h.Pb(),19);f=Zpd(c,g.a);Lte in f.a||Mte in f.a?$qd(a,f,b):erd(a,f,b);otd(BD(Ohb(a.b,Wpd(f)),79))}}} +function LJd(a){var b,c;switch(a.b){case -1:{return true}case 0:{c=a.t;if(c>1||c==-1){a.b=-1;return true}else{b=wId(a);if(!!b&&(Q6d(),b.Cj()==Bve)){a.b=-1;return true}else{a.b=1;return false}}}default:case 1:{return false}}} +function k1d(a,b){var c,d,e,f,g;d=(!b.s&&(b.s=new cUd(t5,b,21,17)),b.s);f=null;for(e=0,g=d.i;e=0&&f=0?a._g(c,true,true):sid(a,e,true),153));return BD(d,215).ll(b)}else{throw vbb(new Wdb(ite+b.ne()+lte))}} +function BZd(){tZd();var a;if(sZd)return BD(nUd((yFd(),xFd),_ve),1939);rEd(CK,new J_d);CZd();a=BD(JD(Phb((yFd(),xFd),_ve),547)?Phb(xFd,_ve):new AZd,547);sZd=true;yZd(a);zZd(a);Rhb((JFd(),IFd),a,new EZd);Shb(xFd,_ve,a);return a} +function v2d(a,b){var c,d,e,f;a.j=-1;if(oid(a.e)){c=a.i;f=a.i!=0;lud(a,b);d=new pSd(a.e,3,a.c,null,b,c,f);e=b.Qk(a.e,a.c,null);e=h3d(a,b,e);if(!e){Uhd(a.e,d)}else{e.Ei(d);e.Fi()}}else{lud(a,b);e=b.Qk(a.e,a.c,null);!!e&&e.Fi()}} +function rA(a,b){var c,d,e;e=0;d=b[0];if(d>=a.length){return -1}c=(BCb(d,a.length),a.charCodeAt(d));while(c>=48&&c<=57){e=e*10+(c-48);++d;if(d>=a.length){break}c=(BCb(d,a.length),a.charCodeAt(d))}d>b[0]?(b[0]=d):(e=-1);return e} +function vMb(a){var b,c,d,e,f;e=BD(a.a,19).a;f=BD(a.b,19).a;c=e;d=f;b=$wnd.Math.max($wnd.Math.abs(e),$wnd.Math.abs(f));if(e<=0&&e==f){c=0;d=f-1}else{if(e==-b&&f!=b){c=f;d=e;f>=0&&++c}else{c=-f;d=e}}return new vgd(meb(c),meb(d))} +function fNb(a,b,c,d){var e,f,g,h,i,j;for(e=0;e=0&&j>=0&&i=a.i)throw vbb(new qcb(lue+b+mue+a.i));if(c>=a.i)throw vbb(new qcb(nue+c+mue+a.i));d=a.g[c];if(b!=c){b>16);b=d>>16&16;c=16-b;a=a>>b;d=a-256;b=d>>16&8;c+=b;a<<=b;d=a-Rje;b=d>>16&4;c+=b;a<<=b;d=a-oie;b=d>>16&2;c+=b;a<<=b;d=a>>14;b=d&~(d>>1);return c+2-b}} +function $Pb(a){QPb();var b,c,d,e;PPb=new Rkb;OPb=new Lqb;NPb=new Rkb;b=(!a.a&&(a.a=new cUd(E2,a,10,11)),a.a);SPb(b);for(e=new Fyd(b);e.e!=e.i.gc();){d=BD(Dyd(e),33);if(Jkb(PPb,d,0)==-1){c=new Rkb;Ekb(NPb,c);TPb(d,c)}}return NPb} +function BQb(a,b,c){var d,e,f,g;a.a=c.b.d;if(JD(b,352)){e=itd(BD(b,79),false,false);f=ofd(e);d=new FQb(a);reb(f,d);ifd(f,e);b.We((Y9c(),Q8c))!=null&&reb(BD(b.We(Q8c),74),d)}else{g=BD(b,470);g.Hg(g.Dg()+a.a.a);g.Ig(g.Eg()+a.a.b)}} +function _5b(a,b){var c,d,e,f,g,h,i,j;j=Edb(ED(vNb(b,(Nyc(),zyc))));i=a[0].n.a+a[0].o.a+a[0].d.c+j;for(h=1;h=0){return c}h=U6c(c7c(new f7c(g.c+g.b/2,g.d+g.a/2),new f7c(f.c+f.b/2,f.d+f.a/2)));return -(xOb(f,g)-1)*h} +function ufd(a,b,c){var d;MAb(new YAb(null,(!c.a&&(c.a=new cUd(A2,c,6,6)),new Kub(c.a,16))),new Mfd(a,b));MAb(new YAb(null,(!c.n&&(c.n=new cUd(D2,c,1,7)),new Kub(c.n,16))),new Ofd(a,b));d=BD(hkd(c,(Y9c(),Q8c)),74);!!d&&p7c(d,a,b)} +function sid(a,b,c){var d,e,f;f=e1d((O6d(),M6d),a.Tg(),b);if(f){Q6d();BD(f,66).Oj()||(f=_1d(q1d(M6d,f)));e=(d=a.Yg(f),BD(d>=0?a._g(d,true,true):sid(a,f,true),153));return BD(e,215).hl(b,c)}else{throw vbb(new Wdb(ite+b.ne()+lte))}} +function wAd(a,b,c,d){var e,f,g,h,i;e=a.d[b];if(e){f=e.g;i=e.i;if(d!=null){for(h=0;h=c){d=b;j=(i.c+i.a)/2;g=j-c;if(i.c<=j-c){e=new bPc(i.c,g);Dkb(a,d++,e)}h=j+c;if(h<=i.a){f=new bPc(h,i.a);wCb(d,a.c.length);aCb(a.c,d,f)}}} +function u0d(a){var b;if(!a.c&&a.g==null){a.d=a.si(a.f);wtd(a,a.d);b=a.d}else{if(a.g==null){return true}else if(a.i==0){return false}else{b=BD(a.g[a.i-1],47)}}if(b==a.b&&null.km>=null.jm()){Vud(a);return u0d(a)}else{return b.Ob()}} +function KTb(a,b,c){var d,e,f,g,h;h=c;!h&&(h=Ydd(new Zdd,0));Odd(h,Vme,1);aUb(a.c,b);g=EYb(a.a,b);if(g.gc()==1){MTb(BD(g.Xb(0),37),h)}else{f=1/g.gc();for(e=g.Kc();e.Ob();){d=BD(e.Pb(),37);MTb(d,Udd(h,f))}}CYb(a.a,g,b);NTb(b);Qdd(h)} +function qYb(a){this.a=a;if(a.c.i.k==(j0b(),e0b)){this.c=a.c;this.d=BD(vNb(a.c.i,(wtc(),Hsc)),61)}else if(a.d.i.k==e0b){this.c=a.d;this.d=BD(vNb(a.d.i,(wtc(),Hsc)),61)}else{throw vbb(new Wdb('Edge '+a+' is not an external edge.'))}} +function oQd(a,b){var c,d,e;e=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,e,a.b));if(!b){pnd(a,null);qQd(a,0);pQd(a,null)}else if(b!=a){pnd(a,b.zb);qQd(a,b.d);c=(d=b.c,d==null?b.zb:d);pQd(a,c==null||dfb(c,b.zb)?null:c)}} +function NRd(a){var b,c;if(a.f){while(a.n=g)throw vbb(new Cyd(b,g));e=c[b];if(g==1){d=null}else{d=KC($3,hve,415,g-1,0,1);$fb(c,0,d,0,b);f=g-b-1;f>0&&$fb(c,b+1,d,b,f)}b0d(a,d);a0d(a,b,e);return e} +function m8d(){m8d=ccb;k8d=BD(qud(ZKd((r8d(),q8d).qb),6),34);h8d=BD(qud(ZKd(q8d.qb),3),34);i8d=BD(qud(ZKd(q8d.qb),4),34);j8d=BD(qud(ZKd(q8d.qb),5),18);XId(k8d);XId(h8d);XId(i8d);XId(j8d);l8d=new amb(OC(GC(t5,1),Mve,170,0,[k8d,h8d]))} +function AJb(a,b){var c;this.d=new H_b;this.b=b;this.e=new g7c(b.qf());c=a.u.Hc((rcd(),ocd));a.u.Hc(ncd)?a.D?(this.a=c&&!b.If()):(this.a=true):a.u.Hc(pcd)?c?(this.a=!(b.zf().Kc().Ob()||b.Bf().Kc().Ob())):(this.a=false):(this.a=false)} +function IKb(a,b){var c,d,e,f;c=a.o.a;for(f=BD(BD(Qc(a.r,b),21),84).Kc();f.Ob();){e=BD(f.Pb(),111);e.e.a=(d=e.b,d.Xe((Y9c(),s9c))?d.Hf()==(Ucd(),Tcd)?-d.rf().a-Edb(ED(d.We(s9c))):c+Edb(ED(d.We(s9c))):d.Hf()==(Ucd(),Tcd)?-d.rf().a:c)}} +function Q1b(a,b){var c,d,e,f;c=BD(vNb(a,(Nyc(),Lwc)),103);f=BD(hkd(b,$xc),61);e=BD(vNb(a,Vxc),98);if(e!=(dcd(),bcd)&&e!=ccd){if(f==(Ucd(),Scd)){f=lfd(b,c);f==Scd&&(f=Zcd(c))}}else{d=M1b(b);d>0?(f=Zcd(c)):(f=Wcd(Zcd(c)))}jkd(b,$xc,f)} +function olc(a,b){var c,d,e,f,g;g=a.j;b.a!=b.b&&Okb(g,new Ulc);e=g.c.length/2|0;for(d=0;d0&&WGc(a,c,b);return f}else if(d.a!=null){WGc(a,b,c);return -1}else if(e.a!=null){WGc(a,c,b);return 1}return 0} +function swd(a,b){var c,d,e,f;if(a.ej()){c=a.Vi();f=a.fj();++a.j;a.Hi(c,a.oi(c,b));d=a.Zi(3,null,b,c,f);if(a.bj()){e=a.cj(b,null);if(!e){a.$i(d)}else{e.Ei(d);e.Fi()}}else{a.$i(d)}}else{Bvd(a,b);if(a.bj()){e=a.cj(b,null);!!e&&e.Fi()}}} +function D2d(a,b){var c,d,e,f,g;g=S6d(a.e.Tg(),b);e=new yud;c=BD(a.g,119);for(f=a.i;--f>=0;){d=c[f];g.rl(d.ak())&&wtd(e,d)}!Yxd(a,e)&&oid(a.e)&&GLd(a,b.$j()?H2d(a,6,b,(mmb(),jmb),null,-1,false):H2d(a,b.Kj()?2:1,b,null,null,-1,false))} +function Dhb(){Dhb=ccb;var a,b;Bhb=KC(cJ,nie,91,32,0,1);Chb=KC(cJ,nie,91,32,0,1);a=1;for(b=0;b<=18;b++){Bhb[b]=ghb(a);Chb[b]=ghb(Nbb(a,b));a=Ibb(a,5)}for(;bg){return false}}if(b.q){d=b.C;g=d.c.c.a-d.o.a/2;e=d.n.a-c;if(e>g){return false}}return true} +function wcc(a,b){var c;Odd(b,'Partition preprocessing',1);c=BD(GAb(JAb(LAb(JAb(new YAb(null,new Kub(a.a,16)),new Acc),new Ccc),new Ecc),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);MAb(c.Oc(),new Gcc);Qdd(b)} +function DMc(a){wMc();var b,c,d,e,f,g,h;c=new $rb;for(e=new olb(a.e.b);e.a1?(a.e*=Edb(a.a)):(a.f/=Edb(a.a));DOb(a);EOb(a);AOb(a);yNb(a.b,(CPb(),uPb),a.g)} +function Y5b(a,b,c){var d,e,f,g,h,i;d=0;i=c;if(!b){d=c*(a.c.length-1);i*=-1}for(f=new olb(a);f.a=0){if(!b){b=new Ifb;d>0&&Efb(b,a.substr(0,d))}b.a+='\\';Afb(b,c&aje)}else !!b&&Afb(b,c&aje)}return b?b.a:a} +function l5c(a){var b;if(!a.a){throw vbb(new Zdb('IDataType class expected for layout option '+a.f))}b=gvd(a.a);if(b==null){throw vbb(new Zdb("Couldn't create new instance of property '"+a.f+"'. "+ise+(fdb(Y3),Y3.k)+jse))}return BD(b,414)} +function aid(a){var b,c,d,e,f;f=a.eh();if(f){if(f.kh()){e=xid(a,f);if(e!=f){c=a.Vg();d=(b=a.Vg(),b>=0?a.Qg(null):a.eh().ih(a,-1-b,null,null));a.Rg(BD(e,49),c);!!d&&d.Fi();a.Lg()&&a.Mg()&&c>-1&&Uhd(a,new nSd(a,9,c,f,e));return e}}}return f} +function nTb(a){var b,c,d,e,f,g,h,i;g=0;f=a.f.e;for(d=0;d>5;if(e>=a.d){return a.e<0}c=a.a[e];b=1<<(b&31);if(a.e<0){d=Mgb(a);if(e>16)),15).Xc(f);if(h0){!(fad(a.a.c)&&b.n.d)&&!(gad(a.a.c)&&b.n.b)&&(b.g.d+=$wnd.Math.max(0,d/2-0.5));!(fad(a.a.c)&&b.n.a)&&!(gad(a.a.c)&&b.n.c)&&(b.g.a-=d-1)}}} +function N3b(a){var b,c,d,e,f;e=new Rkb;f=O3b(a,e);b=BD(vNb(a,(wtc(),gtc)),10);if(b){for(d=new olb(b.j);d.a>b;f=a.m>>b|c<<22-b;e=a.l>>b|a.m<<22-b}else if(b<44){g=d?Fje:0;f=c>>b-22;e=a.m>>b-22|c<<44-b}else{g=d?Fje:0;f=d?Eje:0;e=c>>b-44}return TC(e&Eje,f&Eje,g&Fje)} +function XOb(a){var b,c,d,e,f,g;this.c=new Rkb;this.d=a;d=Pje;e=Pje;b=Qje;c=Qje;for(g=Jsb(a,0);g.b!=g.d.c;){f=BD(Xsb(g),8);d=$wnd.Math.min(d,f.a);e=$wnd.Math.min(e,f.b);b=$wnd.Math.max(b,f.a);c=$wnd.Math.max(c,f.b)}this.a=new J6c(d,e,b-d,c-e)} +function Dac(a,b){var c,d,e,f,g,h;for(f=new olb(a.b);f.a0&&JD(b,42)){a.a.qj();j=BD(b,42);i=j.cd();f=i==null?0:tb(i);g=DAd(a.a,f);c=a.a.d[g];if(c){d=BD(c.g,367);k=c.i;for(h=0;h=2){c=e.Kc();b=ED(c.Pb());while(c.Ob()){f=b;b=ED(c.Pb());d=$wnd.Math.min(d,(uCb(b),b)-(uCb(f),f))}}return d} +function gUc(a,b){var c,d,e,f,g;d=new Psb;Gsb(d,b,d.c.b,d.c);do{c=(sCb(d.b!=0),BD(Nsb(d,d.a.a),86));a.b[c.g]=1;for(f=Jsb(c.d,0);f.b!=f.d.c;){e=BD(Xsb(f),188);g=e.c;a.b[g.g]==1?Dsb(a.a,e):a.b[g.g]==2?(a.b[g.g]=1):Gsb(d,g,d.c.b,d.c)}}while(d.b!=0)} +function Ju(a,b){var c,d,e;if(PD(b)===PD(Qb(a))){return true}if(!JD(b,15)){return false}d=BD(b,15);e=a.gc();if(e!=d.gc()){return false}if(JD(d,54)){for(c=0;c0&&(e=c);for(g=new olb(a.f.e);g.a0){b-=1;c-=1}else{if(d>=0&&e<0){b+=1;c+=1}else{if(d>0&&e>=0){b-=1;c+=1}else{b+=1;c-=1}}}}}return new vgd(meb(b),meb(c))} +function PIc(a,b){if(a.cb.c){return 1}else if(a.bb.b){return 1}else if(a.a!=b.a){return tb(a.a)-tb(b.a)}else if(a.d==(UIc(),TIc)&&b.d==SIc){return -1}else if(a.d==SIc&&b.d==TIc){return 1}return 0} +function aNc(a,b){var c,d,e,f,g;f=b.a;f.c.i==b.b?(g=f.d):(g=f.c);f.c.i==b.b?(d=f.c):(d=f.d);e=NLc(a.a,g,d);if(e>0&&e0}else if(e<0&&-e0}return false} +function RZc(a,b,c,d){var e,f,g,h,i,j,k,l;e=(b-a.d)/a.c.c.length;f=0;a.a+=c;a.d=b;for(l=new olb(a.c);l.a>24}return g} +function vdb(a){if(a.pe()){var b=a.c;b.qe()?(a.o='['+b.n):!b.pe()?(a.o='[L'+b.ne()+';'):(a.o='['+b.ne());a.b=b.me()+'[]';a.k=b.oe()+'[]';return}var c=a.j;var d=a.d;d=d.split('/');a.o=ydb('.',[c,ydb('$',d)]);a.b=ydb('.',[c,ydb('.',d)]);a.k=d[d.length-1]} +function qGb(a,b){var c,d,e,f,g;g=null;for(f=new olb(a.e.a);f.a=0;b-=2){for(c=0;c<=b;c+=2){if(a.b[c]>a.b[c+2]||a.b[c]===a.b[c+2]&&a.b[c+1]>a.b[c+3]){d=a.b[c+2];a.b[c+2]=a.b[c];a.b[c]=d;d=a.b[c+3];a.b[c+3]=a.b[c+1];a.b[c+1]=d}}}a.c=true} +function UUb(a,b){var c,d,e,f,g,h,i,j;g=b==1?KUb:JUb;for(f=g.a.ec().Kc();f.Ob();){e=BD(f.Pb(),103);for(i=BD(Qc(a.f.c,e),21).Kc();i.Ob();){h=BD(i.Pb(),46);d=BD(h.b,81);j=BD(h.a,189);c=j.c;switch(e.g){case 2:case 1:d.g.d+=c;break;case 4:case 3:d.g.c+=c;}}}} +function PFc(a,b){var c,d,e,f,g,h,i,j,k;j=-1;k=0;for(g=a,h=0,i=g.length;h0&&++k}}++j}return k} +function Eid(a){var b,c;c=new Wfb(hdb(a.gm));c.a+='@';Qfb(c,(b=tb(a)>>>0,b.toString(16)));if(a.kh()){c.a+=' (eProxyURI: ';Pfb(c,a.qh());if(a.$g()){c.a+=' eClass: ';Pfb(c,a.$g())}c.a+=')'}else if(a.$g()){c.a+=' (eClass: ';Pfb(c,a.$g());c.a+=')'}return c.a} +function TDb(a){var b,c,d,e;if(a.e){throw vbb(new Zdb((fdb(TM),Jke+TM.k+Kke)))}a.d==(ead(),cad)&&SDb(a,aad);for(c=new olb(a.a.a);c.a>24}return c} +function lKb(a,b,c){var d,e,f;e=BD(Mpb(a.i,b),306);if(!e){e=new bIb(a.d,b,c);Npb(a.i,b,e);if(sJb(b)){CHb(a.a,b.c,b.b,e)}else{f=rJb(b);d=BD(Mpb(a.p,f),244);switch(f.g){case 1:case 3:e.j=true;lIb(d,b.b,e);break;case 4:case 2:e.k=true;lIb(d,b.c,e);}}}return e} +function r3d(a,b,c,d){var e,f,g,h,i,j;h=new yud;i=S6d(a.e.Tg(),b);e=BD(a.g,119);Q6d();if(BD(b,66).Oj()){for(g=0;g=0){return e}else{f=1;for(h=new olb(b.j);h.a0&&b.ue((tCb(e-1,a.c.length),BD(a.c[e-1],10)),f)>0){Nkb(a,e,(tCb(e-1,a.c.length),BD(a.c[e-1],10)));--e}tCb(e,a.c.length);a.c[e]=f}c.a=new Lqb;c.b=new Lqb} +function n5c(a,b,c){var d,e,f,g,h,i,j,k;k=(d=BD(b.e&&b.e(),9),new xqb(d,BD(_Bb(d,d.length),9),0));i=mfb(c,'[\\[\\]\\s,]+');for(f=i,g=0,h=f.length;g0){!(fad(a.a.c)&&b.n.d)&&!(gad(a.a.c)&&b.n.b)&&(b.g.d-=$wnd.Math.max(0,d/2-0.5));!(fad(a.a.c)&&b.n.a)&&!(gad(a.a.c)&&b.n.c)&&(b.g.a+=$wnd.Math.max(0,d-1))}}} +function Hac(a,b,c){var d,e;if((a.c-a.b&a.a.length-1)==2){if(b==(Ucd(),Acd)||b==zcd){xac(BD(bkb(a),15),(rbd(),nbd));xac(BD(bkb(a),15),obd)}else{xac(BD(bkb(a),15),(rbd(),obd));xac(BD(bkb(a),15),nbd)}}else{for(e=new xkb(a);e.a!=e.b;){d=BD(vkb(e),15);xac(d,c)}}} +function htd(a,b){var c,d,e,f,g,h,i;e=Nu(new qtd(a));h=new Bib(e,e.c.length);f=Nu(new qtd(b));i=new Bib(f,f.c.length);g=null;while(h.b>0&&i.b>0){c=(sCb(h.b>0),BD(h.a.Xb(h.c=--h.b),33));d=(sCb(i.b>0),BD(i.a.Xb(i.c=--i.b),33));if(c==d){g=c}else{break}}return g} +function Cub(a,b){var c,d,e,f,g,h;f=a.a*kke+a.b*1502;h=a.b*kke+11;c=$wnd.Math.floor(h*lke);f+=c;h-=c*mke;f%=mke;a.a=f;a.b=h;if(b<=24){return $wnd.Math.floor(a.a*wub[b])}else{e=a.a*(1<=2147483648&&(d-=Zje);return d}} +function Zic(a,b,c){var d,e,f,g;if(bjc(a,b)>bjc(a,c)){d=V_b(c,(Ucd(),zcd));a.d=d.dc()?0:B0b(BD(d.Xb(0),11));g=V_b(b,Tcd);a.b=g.dc()?0:B0b(BD(g.Xb(0),11))}else{e=V_b(c,(Ucd(),Tcd));a.d=e.dc()?0:B0b(BD(e.Xb(0),11));f=V_b(b,zcd);a.b=f.dc()?0:B0b(BD(f.Xb(0),11))}} +function l6d(a){var b,c,d,e,f,g,h;if(a){b=a.Hh(_ve);if(b){g=GD(AAd((!b.b&&(b.b=new sId((jGd(),fGd),x6,b)),b.b),'conversionDelegates'));if(g!=null){h=new Rkb;for(d=mfb(g,'\\w+'),e=0,f=d.length;ea.c){break}else if(e.a>=a.s){f<0&&(f=g);h=g}}i=(a.s+a.c)/2;if(f>=0){d=NOc(a,b,f,h);i=$Oc((tCb(d,b.c.length),BD(b.c[d],329)));YOc(b,d,c)}return i} +function lZc(){lZc=ccb;RYc=new Osd((Y9c(),r8c),1.3);VYc=I8c;gZc=new q0b(15);fZc=new Osd(f9c,gZc);jZc=new Osd(T9c,15);SYc=w8c;_Yc=Y8c;aZc=_8c;bZc=b9c;$Yc=W8c;cZc=e9c;hZc=x9c;eZc=(OYc(),KYc);ZYc=IYc;dZc=JYc;iZc=MYc;WYc=HYc;XYc=O8c;YYc=P8c;UYc=GYc;TYc=FYc;kZc=NYc} +function Bnd(a,b,c){var d,e,f,g,h,i,j;g=(f=new RHd,f);PHd(g,(uCb(b),b));j=(!g.b&&(g.b=new sId((jGd(),fGd),x6,g)),g.b);for(i=1;i0&&JPb(this,e)}} +function IQb(a,b,c,d,e,f){var g,h,i;if(!e[b.b]){e[b.b]=true;g=d;!g&&(g=new kRb);Ekb(g.e,b);for(i=f[b.b].Kc();i.Ob();){h=BD(i.Pb(),282);if(h.d==c||h.c==c){continue}h.c!=b&&IQb(a,h.c,b,g,e,f);h.d!=b&&IQb(a,h.d,b,g,e,f);Ekb(g.c,h);Gkb(g.d,h.b)}return g}return null} +function e4b(a){var b,c,d,e,f,g,h;b=0;for(e=new olb(a.e);e.a=2} +function gec(a,b){var c,d,e,f;Odd(b,'Self-Loop pre-processing',1);for(d=new olb(a.a);d.a1){return false}b=qqb(zbd,OC(GC(B1,1),Kie,93,0,[ybd,Bbd]));if(Ox(Cx(b,a))>1){return false}d=qqb(Gbd,OC(GC(B1,1),Kie,93,0,[Fbd,Ebd]));if(Ox(Cx(d,a))>1){return false}return true} +function U0d(a,b){var c,d,e;c=b.Hh(a.a);if(c){e=GD(AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),'affiliation'));if(e!=null){d=kfb(e,wfb(35));return d==-1?l1d(a,u1d(a,bKd(b.Hj())),e):d==0?l1d(a,null,e.substr(1)):l1d(a,e.substr(0,d),e.substr(d+1))}}return null} +function ic(b){var c,d,e;try{return b==null?Xhe:fcb(b)}catch(a){a=ubb(a);if(JD(a,102)){c=a;e=hdb(rb(b))+'@'+(d=(Zfb(),kCb(b))>>>0,d.toString(16));tyb(xyb(),($xb(),'Exception during lenientFormat for '+e),c);return '<'+e+' threw '+hdb(c.gm)+'>'}else throw vbb(a)}} +function mzc(a){switch(a.g){case 0:return new xDc;case 1:return new ZCc;case 2:return new DCc;case 3:return new QCc;case 4:return new LDc;case 5:return new iDc;default:throw vbb(new Wdb('No implementation is available for the layerer '+(a.f!=null?a.f:''+a.g)));}} +function AQc(a,b,c){var d,e,f;for(f=new olb(a.t);f.a0){d.b.n-=d.c;d.b.n<=0&&d.b.u>0&&Dsb(b,d.b)}}for(e=new olb(a.i);e.a0){d.a.u-=d.c;d.a.u<=0&&d.a.n>0&&Dsb(c,d.a)}}} +function Vud(a){var b,c,d,e,f;if(a.g==null){a.d=a.si(a.f);wtd(a,a.d);if(a.c){f=a.f;return f}}b=BD(a.g[a.i-1],47);e=b.Pb();a.e=b;c=a.si(e);if(c.Ob()){a.d=c;wtd(a,c)}else{a.d=null;while(!b.Ob()){NC(a.g,--a.i,null);if(a.i==0){break}d=BD(a.g[a.i-1],47);b=d}}return e} +function r2d(a,b){var c,d,e,f,g,h;d=b;e=d.ak();if(T6d(a.e,e)){if(e.hi()&&E2d(a,e,d.dd())){return false}}else{h=S6d(a.e.Tg(),e);c=BD(a.g,119);for(f=0;f1||c>1){return 2}}if(b+c==1){return 2}return 0} +function WQb(a,b,c){var d,e,f,g,h;Odd(c,'ELK Force',1);Ccb(DD(hkd(b,(wSb(),jSb))))||$Cb((d=new _Cb((Pgd(),new bhd(b))),d));h=TQb(b);XQb(h);YQb(a,BD(vNb(h,fSb),424));g=LQb(a.a,h);for(f=g.Kc();f.Ob();){e=BD(f.Pb(),231);tRb(a.b,e,Udd(c,1/g.gc()))}h=KQb(g);SQb(h);Qdd(c)} +function yoc(a,b){var c,d,e,f,g;Odd(b,'Breaking Point Processor',1);xoc(a);if(Ccb(DD(vNb(a,(Nyc(),Jyc))))){for(e=new olb(a.b);e.a=0?a._g(d,true,true):sid(a,f,true),153));BD(e,215).ml(b,c)}else{throw vbb(new Wdb(ite+b.ne()+jte))}} +function ROc(a,b){var c,d,e,f,g;c=new Rkb;e=LAb(new YAb(null,new Kub(a,16)),new iPc);f=LAb(new YAb(null,new Kub(a,16)),new kPc);g=aAb(_zb(OAb(ty(OC(GC(xM,1),Uhe,833,0,[e,f])),new mPc)));for(d=1;d=2*b&&Ekb(c,new bPc(g[d-1]+b,g[d]-b))}return c} +function AXc(a,b,c){Odd(c,'Eades radial',1);c.n&&!!b&&Tdd(c,i6d(b),(pgd(),mgd));a.d=BD(hkd(b,(MUc(),LUc)),33);a.c=Edb(ED(hkd(b,(ZWc(),VWc))));a.e=tXc(BD(hkd(b,WWc),293));a.a=gWc(BD(hkd(b,YWc),426));a.b=jXc(BD(hkd(b,RWc),340));BXc(a);c.n&&!!b&&Tdd(c,i6d(b),(pgd(),mgd))} +function Fqd(a,b,c){var d,e,f,g,h,j,k,l;if(c){f=c.a.length;d=new Yge(f);for(h=(d.b-d.a)*d.c<0?(Xge(),Wge):new she(d);h.Ob();){g=BD(h.Pb(),19);e=Zpd(c,g.a);!!e&&(i=null,j=Uqd(a,(k=(Fhd(),l=new ppd,l),!!b&&npd(k,b),k),e),Lkd(j,_pd(e,Vte)),grd(e,j),hrd(e,j),crd(a,e,j))}}} +function UKd(a){var b,c,d,e,f,g;if(!a.j){g=new HPd;b=KKd;f=b.a.zc(a,b);if(f==null){for(d=new Fyd(_Kd(a));d.e!=d.i.gc();){c=BD(Dyd(d),26);e=UKd(c);ytd(g,e);wtd(g,c)}b.a.Bc(a)!=null}vud(g);a.j=new nNd((BD(qud(ZKd((NFd(),MFd).o),11),18),g.i),g.g);$Kd(a).b&=-33}return a.j} +function O9d(a){var b,c,d,e;if(a==null){return null}else{d=Qge(a,true);e=Nwe.length;if(dfb(d.substr(d.length-e,e),Nwe)){c=d.length;if(c==4){b=(BCb(0,d.length),d.charCodeAt(0));if(b==43){return z9d}else if(b==45){return y9d}}else if(c==3){return z9d}}return new Odb(d)}} +function _C(a){var b,c,d;c=a.l;if((c&c-1)!=0){return -1}d=a.m;if((d&d-1)!=0){return -1}b=a.h;if((b&b-1)!=0){return -1}if(b==0&&d==0&&c==0){return -1}if(b==0&&d==0&&c!=0){return ieb(c)}if(b==0&&d!=0&&c==0){return ieb(d)+22}if(b!=0&&d==0&&c==0){return ieb(b)+44}return -1} +function qbc(a,b){var c,d,e,f,g;Odd(b,'Edge joining',1);c=Ccb(DD(vNb(a,(Nyc(),Byc))));for(e=new olb(a.b);e.a1){for(e=new olb(a.a);e.a0);f.a.Xb(f.c=--f.b);Aib(f,e);sCb(f.b3&&EA(a,0,b-3)}} +function cUb(a){var b,c,d,e;if(PD(vNb(a,(Nyc(),axc)))===PD((hbd(),ebd))){return !a.e&&PD(vNb(a,Cwc))!==PD((Xrc(),Urc))}d=BD(vNb(a,Dwc),292);e=Ccb(DD(vNb(a,Hwc)))||PD(vNb(a,Iwc))===PD((Rpc(),Opc));b=BD(vNb(a,Bwc),19).a;c=a.a.c.length;return !e&&d!=(Xrc(),Urc)&&(b==0||b>c)} +function lkc(a){var b,c;c=0;for(;c0){break}}if(c>0&&c0){break}}if(b>0&&c>16!=6&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+qmd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?cmd(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,6,d));d=bmd(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,6,b,b))} +function npd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=9&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+opd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?lpd(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,9,d));d=kpd(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,9,b,b))} +function Rld(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+Sld(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Lld(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,12,d));d=Kld(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,b,b))} +function VId(b){var c,d,e,f,g;e=wId(b);g=b.j;if(g==null&&!!e){return b.$j()?null:e.zj()}else if(JD(e,148)){d=e.Aj();if(d){f=d.Nh();if(f!=b.i){c=BD(e,148);if(c.Ej()){try{b.g=f.Kh(c,g)}catch(a){a=ubb(a);if(JD(a,78)){b.g=null}else throw vbb(a)}}b.i=f}}return b.g}return null} +function wOb(a){var b;b=new Rkb;Ekb(b,new aDb(new f7c(a.c,a.d),new f7c(a.c+a.b,a.d)));Ekb(b,new aDb(new f7c(a.c,a.d),new f7c(a.c,a.d+a.a)));Ekb(b,new aDb(new f7c(a.c+a.b,a.d+a.a),new f7c(a.c+a.b,a.d)));Ekb(b,new aDb(new f7c(a.c+a.b,a.d+a.a),new f7c(a.c,a.d+a.a)));return b} +function IJc(a,b,c,d){var e,f,g;g=LZb(b,c);d.c[d.c.length]=b;if(a.j[g.p]==-1||a.j[g.p]==2||a.a[b.p]){return d}a.j[g.p]=-1;for(f=new Sr(ur(O_b(g).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);if(!(!OZb(e)&&!(!OZb(e)&&e.c.i.c==e.d.i.c))||e==b){continue}return IJc(a,e,g,d)}return d} +function vQb(a,b,c){var d,e,f;for(f=b.a.ec().Kc();f.Ob();){e=BD(f.Pb(),79);d=BD(Ohb(a.b,e),266);!d&&(Xod(jtd(e))==Xod(ltd(e))?uQb(a,e,c):jtd(e)==Xod(ltd(e))?Ohb(a.c,e)==null&&Ohb(a.b,ltd(e))!=null&&xQb(a,e,c,false):Ohb(a.d,e)==null&&Ohb(a.b,jtd(e))!=null&&xQb(a,e,c,true))}} +function jcc(a,b){var c,d,e,f,g,h,i;for(e=a.Kc();e.Ob();){d=BD(e.Pb(),10);h=new H0b;F0b(h,d);G0b(h,(Ucd(),zcd));yNb(h,(wtc(),ftc),(Bcb(),true));for(g=b.Kc();g.Ob();){f=BD(g.Pb(),10);i=new H0b;F0b(i,f);G0b(i,Tcd);yNb(i,ftc,true);c=new UZb;yNb(c,ftc,true);QZb(c,h);RZb(c,i)}}} +function jnc(a,b,c,d){var e,f,g,h;e=hnc(a,b,c);f=hnc(a,c,b);g=BD(Ohb(a.c,b),112);h=BD(Ohb(a.c,c),112);if(ed.b.g&&(f.c[f.c.length]=d,true)}}return f} +function k$c(){k$c=ccb;g$c=new l$c('CANDIDATE_POSITION_LAST_PLACED_RIGHT',0);f$c=new l$c('CANDIDATE_POSITION_LAST_PLACED_BELOW',1);i$c=new l$c('CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT',2);h$c=new l$c('CANDIDATE_POSITION_WHOLE_DRAWING_BELOW',3);j$c=new l$c('WHOLE_DRAWING',4)} +function Xqd(a,b){if(JD(b,239)){return iqd(a,BD(b,33))}else if(JD(b,186)){return jqd(a,BD(b,118))}else if(JD(b,354)){return hqd(a,BD(b,137))}else if(JD(b,352)){return gqd(a,BD(b,79))}else if(b){return null}else{throw vbb(new Wdb(Xte+Fe(new amb(OC(GC(SI,1),Uhe,1,5,[b])))))}} +function aic(a){var b,c,d,e,f,g,h;f=new Psb;for(e=new olb(a.d.a);e.a1){b=nGb((c=new pGb,++a.b,c),a.d);for(h=Jsb(f,0);h.b!=h.d.c;){g=BD(Xsb(h),121);AFb(DFb(CFb(EFb(BFb(new FFb,1),0),b),g))}}} +function $od(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=11&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+_od(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Uod(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,10,d));d=Tod(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,11,b,b))} +function uZb(a){var b,c,d,e;for(d=new nib((new eib(a.b)).a);d.b;){c=lib(d);e=BD(c.cd(),11);b=BD(c.dd(),10);yNb(b,(wtc(),$sc),e);yNb(e,gtc,b);yNb(e,Nsc,(Bcb(),true));G0b(e,BD(vNb(b,Hsc),61));vNb(b,Hsc);yNb(e.i,(Nyc(),Vxc),(dcd(),acd));BD(vNb(Q_b(e.i),Ksc),21).Fc((Orc(),Krc))}} +function G4b(a,b,c){var d,e,f,g,h,i;f=0;g=0;if(a.c){for(i=new olb(a.d.i.j);i.af.a){return -1}else if(e.ai){k=a.d;a.d=KC(y4,jve,63,2*i+4,0,1);for(f=0;f=9223372036854775807){return wD(),sD}e=false;if(a<0){e=true;a=-a}d=0;if(a>=Ije){d=QD(a/Ije);a-=d*Ije}c=0;if(a>=Hje){c=QD(a/Hje);a-=c*Hje}b=QD(a);f=TC(b,c,d);e&&ZC(f);return f} +function rKb(a,b){var c,d,e,f;c=!b||!a.u.Hc((rcd(),ncd));f=0;for(e=new olb(a.e.Cf());e.a=-b&&d==b){return new vgd(meb(c-1),meb(d))}return new vgd(meb(c),meb(d-1))} +function W8b(){S8b();return OC(GC(AS,1),Kie,77,0,[Y7b,V7b,Z7b,n8b,G8b,r8b,M8b,w8b,E8b,i8b,A8b,v8b,F8b,e8b,O8b,P7b,z8b,I8b,o8b,H8b,Q8b,C8b,Q7b,D8b,R8b,K8b,P8b,p8b,b8b,q8b,m8b,N8b,T7b,_7b,t8b,S7b,u8b,k8b,f8b,x8b,h8b,W7b,U7b,l8b,g8b,y8b,L8b,R7b,B8b,j8b,s8b,c8b,a8b,J8b,$7b,d8b,X7b])} +function Yic(a,b,c){a.d=0;a.b=0;b.k==(j0b(),i0b)&&c.k==i0b&&BD(vNb(b,(wtc(),$sc)),10)==BD(vNb(c,$sc),10)&&(ajc(b).j==(Ucd(),Acd)?Zic(a,b,c):Zic(a,c,b));b.k==i0b&&c.k==g0b?ajc(b).j==(Ucd(),Acd)?(a.d=1):(a.b=1):c.k==i0b&&b.k==g0b&&(ajc(c).j==(Ucd(),Acd)?(a.b=1):(a.d=1));cjc(a,b,c)} +function esd(a){var b,c,d,e,f,g,h,i,j,k,l;l=hsd(a);b=a.a;i=b!=null;i&&Upd(l,'category',a.a);e=Fhe(new Pib(a.d));g=!e;if(g){j=new wB;cC(l,'knownOptions',j);c=new msd(j);reb(new Pib(a.d),c)}f=Fhe(a.g);h=!f;if(h){k=new wB;cC(l,'supportedFeatures',k);d=new osd(k);reb(a.g,d)}return l} +function ty(a){var b,c,d,e,f,g,h,i,j;d=false;b=336;c=0;f=new Xp(a.length);for(h=a,i=0,j=h.length;i>16!=7&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+Iod(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Eod(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=BD(b,49).gh(a,1,C2,d));d=Dod(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,7,b,b))} +function NHd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+QHd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?KHd(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=BD(b,49).gh(a,0,k5,d));d=JHd(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,b,b))} +function Ehb(a,b){Dhb();var c,d,e,f,g,h,i,j,k;if(b.d>a.d){h=a;a=b;b=h}if(b.d<63){return Ihb(a,b)}g=(a.d&-2)<<4;j=Rgb(a,g);k=Rgb(b,g);d=yhb(a,Qgb(j,g));e=yhb(b,Qgb(k,g));i=Ehb(j,k);c=Ehb(d,e);f=Ehb(yhb(j,d),yhb(e,k));f=thb(thb(f,i),c);f=Qgb(f,g);i=Qgb(i,g<<1);return thb(thb(i,f),c)} +function aGc(a,b,c){var d,e,f,g,h;g=CHc(a,c);h=KC(OQ,kne,10,b.length,0,1);d=0;for(f=g.Kc();f.Ob();){e=BD(f.Pb(),11);Ccb(DD(vNb(e,(wtc(),Nsc))))&&(h[d++]=BD(vNb(e,gtc),10))}if(d=0;f+=c?1:-1){g=g|b.c.Sf(i,f,c,d&&!Ccb(DD(vNb(b.j,(wtc(),Jsc))))&&!Ccb(DD(vNb(b.j,(wtc(),mtc)))));g=g|b.q._f(i,f,c);g=g|cGc(a,i[f],c,d)}Qqb(a.c,b);return g} +function o3b(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(k=m_b(a.j),l=0,m=k.length;l1&&(a.a=true);ZNb(BD(c.b,65),P6c(R6c(BD(b.b,65).c),Y6c(c7c(R6c(BD(c.b,65).a),BD(b.b,65).a),e)));D1c(a,b);F1c(a,c)}} +function rVb(a){var b,c,d,e,f,g,h;for(f=new olb(a.a.a);f.a0&&f>0?(g.p=b++):d>0?(g.p=c++):f>0?(g.p=e++):(g.p=c++);}}mmb();Okb(a.j,new fcc)} +function Vec(a){var b,c;c=null;b=BD(Ikb(a.g,0),17);do{c=b.d.i;if(wNb(c,(wtc(),Wsc))){return BD(vNb(c,Wsc),11).i}if(c.k!=(j0b(),h0b)&&Qr(new Sr(ur(U_b(c).a.Kc(),new Sq)))){b=BD(Rr(new Sr(ur(U_b(c).a.Kc(),new Sq))),17)}else if(c.k!=h0b){return null}}while(!!c&&c.k!=(j0b(),h0b));return c} +function Omc(a,b){var c,d,e,f,g,h,i,j,k;h=b.j;g=b.g;i=BD(Ikb(h,h.c.length-1),113);k=(tCb(0,h.c.length),BD(h.c[0],113));j=Kmc(a,g,i,k);for(f=1;fj){i=c;k=e;j=d}}b.a=k;b.c=i} +function sEb(a,b){var c,d;d=Axb(a.b,b.b);if(!d){throw vbb(new Zdb('Invalid hitboxes for scanline constraint calculation.'))}(mEb(b.b,BD(Cxb(a.b,b.b),57))||mEb(b.b,BD(Bxb(a.b,b.b),57)))&&(Zfb(),b.b+' has overlap.');a.a[b.b.f]=BD(Exb(a.b,b.b),57);c=BD(Dxb(a.b,b.b),57);!!c&&(a.a[c.f]=b.b)} +function AFb(a){if(!a.a.d||!a.a.e){throw vbb(new Zdb((fdb(fN),fN.k+' must have a source and target '+(fdb(jN),jN.k)+' specified.')))}if(a.a.d==a.a.e){throw vbb(new Zdb('Network simplex does not support self-loops: '+a.a+' '+a.a.d+' '+a.a.e))}NFb(a.a.d.g,a.a);NFb(a.a.e.b,a.a);return a.a} +function HHc(a,b,c){var d,e,f,g,h,i,j;j=new Hxb(new tIc(a));for(g=OC(GC(aR,1),lne,11,0,[b,c]),h=0,i=g.length;hi-a.b&&hi-a.a&&h0&&++n}}}++m}return n} +function hUc(a,b){var c,d,e,f,g;g=BD(vNb(b,(JTc(),FTc)),425);for(f=Jsb(b.b,0);f.b!=f.d.c;){e=BD(Xsb(f),86);if(a.b[e.g]==0){switch(g.g){case 0:iUc(a,e);break;case 1:gUc(a,e);}a.b[e.g]=2}}for(d=Jsb(a.a,0);d.b!=d.d.c;){c=BD(Xsb(d),188);ze(c.b.d,c,true);ze(c.c.b,c,true)}yNb(b,(mTc(),gTc),a.a)} +function S6d(a,b){Q6d();var c,d,e,f;if(!b){return P6d}else if(b==(Q8d(),N8d)||(b==v8d||b==t8d||b==u8d)&&a!=s8d){return new Z6d(a,b)}else{d=BD(b,677);c=d.pk();if(!c){a2d(q1d((O6d(),M6d),b));c=d.pk()}f=(!c.i&&(c.i=new Lqb),c.i);e=BD(Wd(irb(f.f,a)),1942);!e&&Rhb(f,a,e=new Z6d(a,b));return e}} +function Tbc(a,b){var c,d,e,f,g,h,i,j,k;i=BD(vNb(a,(wtc(),$sc)),11);j=l7c(OC(GC(m1,1),nie,8,0,[i.i.n,i.n,i.a])).a;k=a.i.n.b;c=k_b(a.e);for(e=c,f=0,g=e.length;f0){if(f.a){h=f.b.rf().a;if(c>h){e=(c-h)/2;f.d.b=e;f.d.c=e}}else{f.d.c=a.s+c}}else if(tcd(a.u)){d=sfd(f.b);d.c<0&&(f.d.b=-d.c);d.c+d.b>f.b.rf().a&&(f.d.c=d.c+d.b-f.b.rf().a)}}} +function Eec(a,b){var c,d,e,f;Odd(b,'Semi-Interactive Crossing Minimization Processor',1);c=false;for(e=new olb(a.b);e.a=0){if(b==c){return new vgd(meb(-b-1),meb(-b-1))}if(b==-c){return new vgd(meb(-b),meb(c+1))}}if($wnd.Math.abs(b)>$wnd.Math.abs(c)){if(b<0){return new vgd(meb(-b),meb(c))}return new vgd(meb(-b),meb(c+1))}return new vgd(meb(b+1),meb(c))} +function q5b(a){var b,c;c=BD(vNb(a,(Nyc(),mxc)),163);b=BD(vNb(a,(wtc(),Osc)),303);if(c==(Ctc(),ytc)){yNb(a,mxc,Btc);yNb(a,Osc,(esc(),dsc))}else if(c==Atc){yNb(a,mxc,Btc);yNb(a,Osc,(esc(),bsc))}else if(b==(esc(),dsc)){yNb(a,mxc,ytc);yNb(a,Osc,csc)}else if(b==bsc){yNb(a,mxc,Atc);yNb(a,Osc,csc)}} +function FNc(){FNc=ccb;DNc=new RNc;zNc=e3c(new j3c,(qUb(),nUb),(S8b(),o8b));CNc=c3c(e3c(new j3c,nUb,C8b),pUb,B8b);ENc=b3c(b3c(g3c(c3c(e3c(new j3c,lUb,M8b),pUb,L8b),oUb),K8b),N8b);ANc=c3c(e3c(e3c(e3c(new j3c,mUb,r8b),oUb,t8b),oUb,u8b),pUb,s8b);BNc=c3c(e3c(e3c(new j3c,oUb,u8b),oUb,_7b),pUb,$7b)} +function hQc(){hQc=ccb;cQc=e3c(c3c(new j3c,(qUb(),pUb),(S8b(),c8b)),nUb,o8b);gQc=b3c(b3c(g3c(c3c(e3c(new j3c,lUb,M8b),pUb,L8b),oUb),K8b),N8b);dQc=c3c(e3c(e3c(e3c(new j3c,mUb,r8b),oUb,t8b),oUb,u8b),pUb,s8b);fQc=e3c(e3c(new j3c,nUb,C8b),pUb,B8b);eQc=c3c(e3c(e3c(new j3c,oUb,u8b),oUb,_7b),pUb,$7b)} +function GNc(a,b,c,d,e){var f,g;if((!OZb(b)&&b.c.i.c==b.d.i.c||!T6c(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])),c))&&!OZb(b)){b.c==e?St(b.a,0,new g7c(c)):Dsb(b.a,new g7c(c));if(d&&!Rqb(a.a,c)){g=BD(vNb(b,(Nyc(),jxc)),74);if(!g){g=new s7c;yNb(b,jxc,g)}f=new g7c(c);Gsb(g,f,g.c.b,g.c);Qqb(a.a,f)}}} +function Qac(a){var b,c;for(c=new Sr(ur(R_b(a).a.Kc(),new Sq));Qr(c);){b=BD(Rr(c),17);if(b.c.i.k!=(j0b(),f0b)){throw vbb(new y2c(Fne+P_b(a)+"' has its layer constraint set to FIRST, but has at least one incoming edge that "+' does not come from a FIRST_SEPARATE node. That must not happen.'))}}} +function vjd(a,b,c){var d,e,f,g,h,i,j;e=aeb(a.Db&254);if(e==0){a.Eb=c}else{if(e==1){h=KC(SI,Uhe,1,2,5,1);f=zjd(a,b);if(f==0){h[0]=c;h[1]=a.Eb}else{h[0]=a.Eb;h[1]=c}}else{h=KC(SI,Uhe,1,e+1,5,1);g=CD(a.Eb);for(d=2,i=0,j=0;d<=128;d<<=1){d==b?(h[j++]=c):(a.Db&d)!=0&&(h[j++]=g[i++])}}a.Eb=h}a.Db|=b} +function ENb(a,b,c){var d,e,f,g;this.b=new Rkb;e=0;d=0;for(g=new olb(a);g.a0){f=BD(Ikb(this.b,0),167);e+=f.o;d+=f.p}e*=2;d*=2;b>1?(e=QD($wnd.Math.ceil(e*b))):(d=QD($wnd.Math.ceil(d/b)));this.a=new pNb(e,d)} +function Igc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r;k=d;if(b.j&&b.o){n=BD(Ohb(a.f,b.A),57);p=n.d.c+n.d.b;--k}else{p=b.a.c+b.a.b}l=e;if(c.q&&c.o){n=BD(Ohb(a.f,c.C),57);j=n.d.c;++l}else{j=c.a.c}q=j-p;i=$wnd.Math.max(2,l-k);h=q/i;o=p+h;for(m=k;m=0;g+=e?1:-1){h=b[g];i=d==(Ucd(),zcd)?e?V_b(h,d):Su(V_b(h,d)):e?Su(V_b(h,d)):V_b(h,d);f&&(a.c[h.p]=i.gc());for(l=i.Kc();l.Ob();){k=BD(l.Pb(),11);a.d[k.p]=j++}Gkb(c,i)}} +function aQc(a,b,c){var d,e,f,g,h,i,j,k;f=Edb(ED(a.b.Kc().Pb()));j=Edb(ED(Pq(b.b)));d=Y6c(R6c(a.a),j-c);e=Y6c(R6c(b.a),c-f);k=P6c(d,e);Y6c(k,1/(j-f));this.a=k;this.b=new Rkb;h=true;g=a.b.Kc();g.Pb();while(g.Ob()){i=Edb(ED(g.Pb()));if(h&&i-c>Oqe){this.b.Fc(c);h=false}this.b.Fc(i)}h&&this.b.Fc(c)} +function vGb(a){var b,c,d,e;yGb(a,a.n);if(a.d.c.length>0){Blb(a.c);while(GGb(a,BD(mlb(new olb(a.e.a)),121))>5;b&=31;if(d>=a.d){return a.e<0?(Hgb(),Bgb):(Hgb(),Ggb)}f=a.d-d;e=KC(WD,oje,25,f+1,15,1);mhb(e,f,a.a,d,b);if(a.e<0){for(c=0;c0&&a.a[c]<<32-b!=0){for(c=0;c=0){return false}else{c=e1d((O6d(),M6d),e,b);if(!c){return true}else{d=c.Zj();return (d>1||d==-1)&&$1d(q1d(M6d,c))!=3}}}}else{return false}} +function R1b(a,b,c,d){var e,f,g,h,i;h=atd(BD(qud((!b.b&&(b.b=new y5d(z2,b,4,7)),b.b),0),82));i=atd(BD(qud((!b.c&&(b.c=new y5d(z2,b,5,8)),b.c),0),82));if(Xod(h)==Xod(i)){return null}if(ntd(i,h)){return null}g=Mld(b);if(g==c){return d}else{f=BD(Ohb(a.a,g),10);if(f){e=f.e;if(e){return e}}}return null} +function Cac(a,b){var c;c=BD(vNb(a,(Nyc(),Rwc)),276);Odd(b,'Label side selection ('+c+')',1);switch(c.g){case 0:Dac(a,(rbd(),nbd));break;case 1:Dac(a,(rbd(),obd));break;case 2:Bac(a,(rbd(),nbd));break;case 3:Bac(a,(rbd(),obd));break;case 4:Eac(a,(rbd(),nbd));break;case 5:Eac(a,(rbd(),obd));}Qdd(b)} +function bGc(a,b,c){var d,e,f,g,h,i;d=RFc(c,a.length);g=a[d];if(g[0].k!=(j0b(),e0b)){return}f=SFc(c,g.length);i=b.j;for(e=0;e0){c[0]+=a.d;g-=c[0]}if(c[2]>0){c[2]+=a.d;g-=c[2]}f=$wnd.Math.max(0,g);c[1]=$wnd.Math.max(c[1],g);vHb(a,eHb,e.c+d.b+c[0]-(c[1]-g)/2,c);if(b==eHb){a.c.b=f;a.c.c=e.c+d.b+(f-g)/2}} +function AYb(){this.c=KC(UD,Vje,25,(Ucd(),OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])).length,15,1);this.b=KC(UD,Vje,25,OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd]).length,15,1);this.a=KC(UD,Vje,25,OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd]).length,15,1);zlb(this.c,Pje);zlb(this.b,Qje);zlb(this.a,Qje)} +function Ufe(a,b,c){var d,e,f,g;if(b<=c){e=b;f=c}else{e=c;f=b}d=0;if(a.b==null){a.b=KC(WD,oje,25,2,15,1);a.b[0]=e;a.b[1]=f;a.c=true}else{d=a.b.length;if(a.b[d-1]+1==e){a.b[d-1]=f;return}g=KC(WD,oje,25,d+2,15,1);$fb(a.b,0,g,0,d);a.b=g;a.b[d-1]>=e&&(a.c=false,a.a=false);a.b[d++]=e;a.b[d]=f;a.c||Yfe(a)}} +function inc(a,b,c){var d,e,f,g,h,i,j;j=b.d;a.a=new Skb(j.c.length);a.c=new Lqb;for(h=new olb(j);h.a=0?a._g(j,false,true):sid(a,c,false),58));n:for(f=l.Kc();f.Ob();){e=BD(f.Pb(),56);for(k=0;k1){Xxd(e,e.i-1)}}return d}} +function Z2b(a,b){var c,d,e,f,g,h,i;Odd(b,'Comment post-processing',1);for(f=new olb(a.b);f.aa.d[g.p]){c+=zHc(a.b,f);Wjb(a.a,meb(f))}}while(!akb(a.a)){xHc(a.b,BD(fkb(a.a),19).a)}}return c} +function o2c(a,b,c){var d,e,f,g;f=(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a).i;for(e=new Fyd((!b.a&&(b.a=new cUd(E2,b,10,11)),b.a));e.e!=e.i.gc();){d=BD(Dyd(e),33);(!d.a&&(d.a=new cUd(E2,d,10,11)),d.a).i==0||(f+=o2c(a,d,false))}if(c){g=Xod(b);while(g){f+=(!g.a&&(g.a=new cUd(E2,g,10,11)),g.a).i;g=Xod(g)}}return f} +function Xxd(a,b){var c,d,e,f;if(a.ej()){d=null;e=a.fj();a.ij()&&(d=a.kj(a.pi(b),null));c=a.Zi(4,f=tud(a,b),null,b,e);if(a.bj()&&f!=null){d=a.dj(f,d);if(!d){a.$i(c)}else{d.Ei(c);d.Fi()}}else{if(!d){a.$i(c)}else{d.Ei(c);d.Fi()}}return f}else{f=tud(a,b);if(a.bj()&&f!=null){d=a.dj(f,null);!!d&&d.Fi()}return f}} +function UKb(a){var b,c,d,e,f,g,h,i,j,k;j=a.a;b=new Tqb;i=0;for(d=new olb(a.d);d.ah.d&&(k=h.d+h.a+j)}}c.c.d=k;b.a.zc(c,b);i=$wnd.Math.max(i,c.c.d+c.c.a)}return i} +function Orc(){Orc=ccb;Frc=new Prc('COMMENTS',0);Hrc=new Prc('EXTERNAL_PORTS',1);Irc=new Prc('HYPEREDGES',2);Jrc=new Prc('HYPERNODES',3);Krc=new Prc('NON_FREE_PORTS',4);Lrc=new Prc('NORTH_SOUTH_PORTS',5);Nrc=new Prc(Wne,6);Erc=new Prc('CENTER_LABELS',7);Grc=new Prc('END_LABELS',8);Mrc=new Prc('PARTITIONS',9)} +function gVc(a){var b,c,d,e,f;e=new Rkb;b=new Vqb((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));for(d=new Sr(ur(_sd(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),79);if(!JD(qud((!c.b&&(c.b=new y5d(z2,c,4,7)),c.b),0),186)){f=atd(BD(qud((!c.c&&(c.c=new y5d(z2,c,5,8)),c.c),0),82));b.a._b(f)||(e.c[e.c.length]=f,true)}}return e} +function fVc(a){var b,c,d,e,f,g;f=new Tqb;b=new Vqb((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));for(e=new Sr(ur(_sd(a).a.Kc(),new Sq));Qr(e);){d=BD(Rr(e),79);if(!JD(qud((!d.b&&(d.b=new y5d(z2,d,4,7)),d.b),0),186)){g=atd(BD(qud((!d.c&&(d.c=new y5d(z2,d,5,8)),d.c),0),82));b.a._b(g)||(c=f.a.zc(g,f),c==null)}}return f} +function zA(a,b,c,d,e){if(d<0){d=oA(a,e,OC(GC(ZI,1),nie,2,6,[bje,cje,dje,eje,fje,gje,hje,ije,jje,kje,lje,mje]),b);d<0&&(d=oA(a,e,OC(GC(ZI,1),nie,2,6,['Jan','Feb','Mar','Apr',fje,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} +function BA(a,b,c,d,e){if(d<0){d=oA(a,e,OC(GC(ZI,1),nie,2,6,[bje,cje,dje,eje,fje,gje,hje,ije,jje,kje,lje,mje]),b);d<0&&(d=oA(a,e,OC(GC(ZI,1),nie,2,6,['Jan','Feb','Mar','Apr',fje,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} +function DA(a,b,c,d,e,f){var g,h,i,j;h=32;if(d<0){if(b[0]>=a.length){return false}h=bfb(a,b[0]);if(h!=43&&h!=45){return false}++b[0];d=rA(a,b);if(d<0){return false}h==45&&(d=-d)}if(h==32&&b[0]-c==2&&e.b==2){i=new eB;j=i.q.getFullYear()-nje+nje-80;g=j%100;f.a=d==g;d+=(j/100|0)*100+(d=j&&(i=d)}!!i&&(k=$wnd.Math.max(k,i.a.o.a));if(k>m){l=j;m=k}}return l} +function ode(a,b,c){var d,e,f;a.e=c;a.d=0;a.b=0;a.f=1;a.i=b;(a.e&16)==16&&(a.i=Xee(a.i));a.j=a.i.length;nde(a);f=rde(a);if(a.d!=a.j)throw vbb(new mde(tvd((h0d(),sue))));if(a.g){for(d=0;dvre?Okb(i,a.b):d<=vre&&d>wre?Okb(i,a.d):d<=wre&&d>xre?Okb(i,a.c):d<=xre&&Okb(i,a.a);f=ZXc(a,i,f)}return e} +function Hgb(){Hgb=ccb;var a;Cgb=new Ugb(1,1);Egb=new Ugb(1,10);Ggb=new Ugb(0,0);Bgb=new Ugb(-1,1);Dgb=OC(GC(cJ,1),nie,91,0,[Ggb,Cgb,new Ugb(1,2),new Ugb(1,3),new Ugb(1,4),new Ugb(1,5),new Ugb(1,6),new Ugb(1,7),new Ugb(1,8),new Ugb(1,9),Egb]);Fgb=KC(cJ,nie,91,32,0,1);for(a=0;a1;if(h){d=new f7c(e,c.b);Dsb(b.a,d)}n7c(b.a,OC(GC(m1,1),nie,8,0,[m,l]))} +function jdd(a){r4c(a,new E3c(P3c(M3c(O3c(N3c(new R3c,Rse),'ELK Randomizer'),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new mdd)));p4c(a,Rse,ame,fdd);p4c(a,Rse,wme,15);p4c(a,Rse,yme,meb(0));p4c(a,Rse,_le,tme)} +function hde(){hde=ccb;var a,b,c,d,e,f;fde=KC(SD,wte,25,255,15,1);gde=KC(TD,$ie,25,16,15,1);for(b=0;b<255;b++){fde[b]=-1}for(c=57;c>=48;c--){fde[c]=c-48<<24>>24}for(d=70;d>=65;d--){fde[d]=d-65+10<<24>>24}for(e=102;e>=97;e--){fde[e]=e-97+10<<24>>24}for(f=0;f<10;f++)gde[f]=48+f&aje;for(a=10;a<=15;a++)gde[a]=65+a-10&aje} +function BVc(a,b,c){var d,e,f,g,h,i,j,k;h=b.i-a.g/2;i=c.i-a.g/2;j=b.j-a.g/2;k=c.j-a.g/2;f=b.g+a.g/2;g=c.g+a.g/2;d=b.f+a.g/2;e=c.f+a.g/2;if(h>19!=0){return '-'+qD(hD(a))}c=a;d='';while(!(c.l==0&&c.m==0&&c.h==0)){e=RC(Jje);c=UC(c,e,true);b=''+pD(QC);if(!(c.l==0&&c.m==0&&c.h==0)){f=9-b.length;for(;f>0;f--){b='0'+b}}d=b+d}return d} +function xrb(){if(!Object.create||!Object.getOwnPropertyNames){return false}var a='__proto__';var b=Object.create(null);if(b[a]!==undefined){return false}var c=Object.getOwnPropertyNames(b);if(c.length!=0){return false}b[a]=42;if(b[a]!==42){return false}if(Object.getOwnPropertyNames(b).length==0){return false}return true} +function Pgc(a){var b,c,d,e,f,g,h;b=false;c=0;for(e=new olb(a.d.b);e.a=a.a){return -1}if(!F6b(b,c)){return -1}if(Qq(BD(d.Kb(b),20))){return 1}e=0;for(g=BD(d.Kb(b),20).Kc();g.Ob();){f=BD(g.Pb(),17);i=f.c.i==b?f.d.i:f.c.i;h=G6b(a,i,c,d);if(h==-1){return -1}e=$wnd.Math.max(e,h);if(e>a.c-1){return -1}}return e+1} +function Btd(a,b){var c,d,e,f,g,h;if(PD(b)===PD(a)){return true}if(!JD(b,15)){return false}d=BD(b,15);h=a.gc();if(d.gc()!=h){return false}g=d.Kc();if(a.ni()){for(c=0;c0){a.qj();if(b!=null){for(f=0;f>24}case 97:case 98:case 99:case 100:case 101:case 102:{return a-97+10<<24>>24}case 65:case 66:case 67:case 68:case 69:case 70:{return a-65+10<<24>>24}default:{throw vbb(new Oeb('Invalid hexadecimal'))}}} +function AUc(a,b,c){var d,e,f,g;Odd(c,'Processor order nodes',2);a.a=Edb(ED(vNb(b,(JTc(),HTc))));e=new Psb;for(g=Jsb(b.b,0);g.b!=g.d.c;){f=BD(Xsb(g),86);Ccb(DD(vNb(f,(mTc(),jTc))))&&(Gsb(e,f,e.c.b,e.c),true)}d=(sCb(e.b!=0),BD(e.a.a.c,86));yUc(a,d);!c.b&&Rdd(c,1);BUc(a,d,0-Edb(ED(vNb(d,(mTc(),bTc))))/2,0);!c.b&&Rdd(c,1);Qdd(c)} +function rFb(){rFb=ccb;qFb=new sFb('SPIRAL',0);lFb=new sFb('LINE_BY_LINE',1);mFb=new sFb('MANHATTAN',2);kFb=new sFb('JITTER',3);oFb=new sFb('QUADRANTS_LINE_BY_LINE',4);pFb=new sFb('QUADRANTS_MANHATTAN',5);nFb=new sFb('QUADRANTS_JITTER',6);jFb=new sFb('COMBINE_LINE_BY_LINE_MANHATTAN',7);iFb=new sFb('COMBINE_JITTER_MANHATTAN',8)} +function roc(a,b,c,d){var e,f,g,h,i,j;i=woc(a,c);j=woc(b,c);e=false;while(!!i&&!!j){if(d||uoc(i,j,c)){g=woc(i,c);h=woc(j,c);zoc(b);zoc(a);f=i.c;sbc(i,false);sbc(j,false);if(c){Z_b(b,j.p,f);b.p=j.p;Z_b(a,i.p+1,f);a.p=i.p}else{Z_b(a,i.p,f);a.p=i.p;Z_b(b,j.p+1,f);b.p=j.p}$_b(i,null);$_b(j,null);i=g;j=h;e=true}else{break}}return e} +function VDc(a,b,c,d){var e,f,g,h,i;e=false;f=false;for(h=new olb(d.j);h.a=b.length){throw vbb(new qcb('Greedy SwitchDecider: Free layer not in graph.'))}this.c=b[a];this.e=new dIc(d);THc(this.e,this.c,(Ucd(),Tcd));this.i=new dIc(d);THc(this.i,this.c,zcd);this.f=new ejc(this.c);this.a=!f&&e.i&&!e.s&&this.c[0].k==(j0b(),e0b);this.a&&hjc(this,a,b.length)} +function hKb(a,b){var c,d,e,f,g,h;f=!a.B.Hc((Idd(),zdd));g=a.B.Hc(Cdd);a.a=new FHb(g,f,a.c);!!a.n&&u_b(a.a.n,a.n);lIb(a.g,(gHb(),eHb),a.a);if(!b){d=new mIb(1,f,a.c);d.n.a=a.k;Npb(a.p,(Ucd(),Acd),d);e=new mIb(1,f,a.c);e.n.d=a.k;Npb(a.p,Rcd,e);h=new mIb(0,f,a.c);h.n.c=a.k;Npb(a.p,Tcd,h);c=new mIb(0,f,a.c);c.n.b=a.k;Npb(a.p,zcd,c)}} +function Vgc(a){var b,c,d;b=BD(vNb(a.d,(Nyc(),Swc)),218);switch(b.g){case 2:c=Ngc(a);break;case 3:c=(d=new Rkb,MAb(JAb(NAb(LAb(LAb(new YAb(null,new Kub(a.d.b,16)),new Shc),new Uhc),new Whc),new ehc),new Yhc(d)),d);break;default:throw vbb(new Zdb('Compaction not supported for '+b+' edges.'));}Ugc(a,c);reb(new Pib(a.g),new Ehc(a))} +function a2c(a,b){var c;c=new zNb;!!b&&tNb(c,BD(Ohb(a.a,C2),94));JD(b,470)&&tNb(c,BD(Ohb(a.a,G2),94));if(JD(b,354)){tNb(c,BD(Ohb(a.a,D2),94));return c}JD(b,82)&&tNb(c,BD(Ohb(a.a,z2),94));if(JD(b,239)){tNb(c,BD(Ohb(a.a,E2),94));return c}if(JD(b,186)){tNb(c,BD(Ohb(a.a,F2),94));return c}JD(b,352)&&tNb(c,BD(Ohb(a.a,B2),94));return c} +function wSb(){wSb=ccb;oSb=new Osd((Y9c(),D9c),meb(1));uSb=new Osd(T9c,80);tSb=new Osd(M9c,5);bSb=new Osd(r8c,tme);pSb=new Osd(E9c,meb(1));sSb=new Osd(H9c,(Bcb(),true));lSb=new q0b(50);kSb=new Osd(f9c,lSb);dSb=O8c;mSb=t9c;cSb=new Osd(B8c,false);jSb=e9c;iSb=b9c;hSb=Y8c;gSb=W8c;nSb=x9c;fSb=(SRb(),LRb);vSb=QRb;eSb=KRb;qSb=NRb;rSb=PRb} +function ZXb(a){var b,c,d,e,f,g,h,i;i=new jYb;for(h=new olb(a.a);h.a0&&b=0){return false}else{b.p=c.b;Ekb(c.e,b)}if(e==(j0b(),g0b)||e==i0b){for(g=new olb(b.j);g.a1||g==-1)&&(f|=16);(e.Bb&ote)!=0&&(f|=64)}(c.Bb&Tje)!=0&&(f|=Dve);f|=zte}else{if(JD(b,457)){f|=512}else{d=b.Bj();!!d&&(d.i&1)!=0&&(f|=256)}}(a.Bb&512)!=0&&(f|=128);return f} +function hc(a,b){var c,d,e,f,g;a=a==null?Xhe:(uCb(a),a);for(e=0;ea.d[h.p]){c+=zHc(a.b,f);Wjb(a.a,meb(f))}}else{++g}}c+=a.b.d*g;while(!akb(a.a)){xHc(a.b,BD(fkb(a.a),19).a)}}return c} +function Y6d(a,b){var c;if(a.f==W6d){c=$1d(q1d((O6d(),M6d),b));return a.e?c==4&&b!=(m8d(),k8d)&&b!=(m8d(),h8d)&&b!=(m8d(),i8d)&&b!=(m8d(),j8d):c==2}if(!!a.d&&(a.d.Hc(b)||a.d.Hc(_1d(q1d((O6d(),M6d),b)))||a.d.Hc(e1d((O6d(),M6d),a.b,b)))){return true}if(a.f){if(x1d((O6d(),a.f),b2d(q1d(M6d,b)))){c=$1d(q1d(M6d,b));return a.e?c==4:c==2}}return false} +function iVc(a,b,c,d){var e,f,g,h,i,j,k,l;g=BD(hkd(c,(Y9c(),C9c)),8);i=g.a;k=g.b+a;e=$wnd.Math.atan2(k,i);e<0&&(e+=dre);e+=b;e>dre&&(e-=dre);h=BD(hkd(d,C9c),8);j=h.a;l=h.b+a;f=$wnd.Math.atan2(l,j);f<0&&(f+=dre);f+=b;f>dre&&(f-=dre);return Iy(),My(1.0E-10),$wnd.Math.abs(e-f)<=1.0E-10||e==f||isNaN(e)&&isNaN(f)?0:ef?1:Ny(isNaN(e),isNaN(f))} +function YDb(a){var b,c,d,e,f,g,h;h=new Lqb;for(d=new olb(a.a.b);d.a=b.o){throw vbb(new rcb)}i=c>>5;h=c&31;g=Nbb(1,Tbb(Nbb(h,1)));f?(b.n[d][i]=Mbb(b.n[d][i],g)):(b.n[d][i]=xbb(b.n[d][i],Lbb(g)));g=Nbb(g,1);e?(b.n[d][i]=Mbb(b.n[d][i],g)):(b.n[d][i]=xbb(b.n[d][i],Lbb(g)))}catch(a){a=ubb(a);if(JD(a,320)){throw vbb(new qcb(Dle+b.o+'*'+b.p+Ele+c+She+d+Fle))}else throw vbb(a)}} +function BUc(a,b,c,d){var e,f,g;if(b){f=Edb(ED(vNb(b,(mTc(),fTc))))+d;g=c+Edb(ED(vNb(b,bTc)))/2;yNb(b,kTc,meb(Tbb(Cbb($wnd.Math.round(f)))));yNb(b,lTc,meb(Tbb(Cbb($wnd.Math.round(g)))));b.d.b==0||BUc(a,BD(pr((e=Jsb((new ZRc(b)).a.d,0),new aSc(e))),86),c+Edb(ED(vNb(b,bTc)))+a.a,d+Edb(ED(vNb(b,cTc))));vNb(b,iTc)!=null&&BUc(a,BD(vNb(b,iTc),86),c,d)}} +function N9b(a,b){var c,d,e,f,g,h,i,j,k,l,m;i=Q_b(b.a);e=Edb(ED(vNb(i,(Nyc(),pyc))))*2;k=Edb(ED(vNb(i,wyc)));j=$wnd.Math.max(e,k);f=KC(UD,Vje,25,b.f-b.c+1,15,1);d=-j;c=0;for(h=b.b.Kc();h.Ob();){g=BD(h.Pb(),10);d+=a.a[g.c.p]+j;f[c++]=d}d+=a.a[b.a.c.p]+j;f[c++]=d;for(m=new olb(b.e);m.a0){d=(!a.n&&(a.n=new cUd(D2,a,1,7)),BD(qud(a.n,0),137)).a;!d||Qfb(Qfb((b.a+=' "',b),d),'"')}}else{Qfb(Qfb((b.a+=' "',b),c),'"')}Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function opd(a){var b,c,d;if((a.Db&64)!=0)return fld(a);b=new Wfb(fte);c=a.k;if(!c){!a.n&&(a.n=new cUd(D2,a,1,7));if(a.n.i>0){d=(!a.n&&(a.n=new cUd(D2,a,1,7)),BD(qud(a.n,0),137)).a;!d||Qfb(Qfb((b.a+=' "',b),d),'"')}}else{Qfb(Qfb((b.a+=' "',b),c),'"')}Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function h4c(a,b){var c,d,e,f,g,h,i;if(b==null||b.length==0){return null}e=BD(Phb(a.a,b),149);if(!e){for(d=(h=(new $ib(a.b)).a.vc().Kc(),new djb(h));d.a.Ob();){c=(f=BD(d.a.Pb(),42),BD(f.dd(),149));g=c.c;i=b.length;if(dfb(g.substr(g.length-i,i),b)&&(b.length==g.length||bfb(g,g.length-b.length-1)==46)){if(e){return null}e=c}}!!e&&Shb(a.a,b,e)}return e} +function QLb(a,b){var c,d,e,f;c=new VLb;d=BD(GAb(NAb(new YAb(null,new Kub(a.f,16)),c),Ayb(new hzb,new jzb,new Gzb,new Izb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Eyb),Dyb]))),21);e=d.gc();d=BD(GAb(NAb(new YAb(null,new Kub(b.f,16)),c),Ayb(new hzb,new jzb,new Gzb,new Izb,OC(GC(xL,1),Kie,132,0,[Eyb,Dyb]))),21);f=d.gc();if(ee.p){G0b(f,Rcd);if(f.d){h=f.o.b;b=f.a.b;f.a.b=h-b}}else if(f.j==Rcd&&e.p>a.p){G0b(f,Acd);if(f.d){h=f.o.b;b=f.a.b;f.a.b=-(h-b)}}break}}return e} +function NOc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;f=c;if(c1;if(h){d=new f7c(e,c.b);Dsb(b.a,d)}n7c(b.a,OC(GC(m1,1),nie,8,0,[m,l]))} +function Nid(a,b,c){var d,e,f,g,h,i;if(!b){return null}else{if(c<=-1){d=XKd(b.Tg(),-1-c);if(JD(d,99)){return BD(d,18)}else{g=BD(b.ah(d),153);for(h=0,i=g.gc();h0){e=i.length;while(e>0&&i[e-1]==''){--e}e=40;g&&FGb(a);wGb(a);vGb(a);c=zGb(a);d=0;while(!!c&&d0&&Dsb(a.f,f)}else{a.c[g]-=j+1;a.c[g]<=0&&a.a[g]>0&&Dsb(a.e,f)}}}}} +function _Kb(a){var b,c,d,e,f,g,h,i,j;h=new Hxb(BD(Qb(new nLb),62));j=Qje;for(c=new olb(a.d);c.a=0&&ic?b:c;j<=l;++j){if(j==c){h=d++}else{f=e[j];k=o.rl(f.ak());j==b&&(i=j==l&&!k?d-1:d);k&&++d}}m=BD(Wxd(a,b,c),72);h!=i&&GLd(a,new ESd(a.e,7,g,meb(h),n.dd(),i));return m}}}else{return BD(sud(a,b,c),72)}return BD(Wxd(a,b,c),72)} +function Qcc(a,b){var c,d,e,f,g,h,i;Odd(b,'Port order processing',1);i=BD(vNb(a,(Nyc(),_xc)),421);for(d=new olb(a.b);d.a=0){h=bD(a,g);if(h){j<22?(i.l|=1<>>1;g.m=k>>>1|(l&1)<<21;g.l=m>>>1|(k&1)<<21;--j}c&&ZC(i);if(f){if(d){QC=hD(a);e&&(QC=nD(QC,(wD(),uD)))}else{QC=TC(a.l,a.m,a.h)}}return i} +function TDc(a,b){var c,d,e,f,g,h,i,j,k,l;j=a.e[b.c.p][b.p]+1;i=b.c.a.c.length+1;for(h=new olb(a.a);h.a0&&(BCb(0,a.length),a.charCodeAt(0)==45||(BCb(0,a.length),a.charCodeAt(0)==43))?1:0;for(d=g;dc){throw vbb(new Oeb(Oje+a+'"'))}return h} +function dnc(a){var b,c,d,e,f,g,h;g=new Psb;for(f=new olb(a.a);f.a1)&&b==1&&BD(a.a[a.b],10).k==(j0b(),f0b)){zac(BD(a.a[a.b],10),(rbd(),nbd))}else if(d&&(!c||(a.c-a.b&a.a.length-1)>1)&&b==1&&BD(a.a[a.c-1&a.a.length-1],10).k==(j0b(),f0b)){zac(BD(a.a[a.c-1&a.a.length-1],10),(rbd(),obd))}else if((a.c-a.b&a.a.length-1)==2){zac(BD(bkb(a),10),(rbd(),nbd));zac(BD(bkb(a),10),obd)}else{wac(a,e)}Yjb(a)} +function pRc(a,b,c){var d,e,f,g,h;f=0;for(e=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));e.e!=e.i.gc();){d=BD(Dyd(e),33);g='';(!d.n&&(d.n=new cUd(D2,d,1,7)),d.n).i==0||(g=BD(qud((!d.n&&(d.n=new cUd(D2,d,1,7)),d.n),0),137).a);h=new XRc(f++,b,g);tNb(h,d);yNb(h,(mTc(),dTc),d);h.e.b=d.j+d.f/2;h.f.a=$wnd.Math.max(d.g,1);h.e.a=d.i+d.g/2;h.f.b=$wnd.Math.max(d.f,1);Dsb(b.b,h);jrb(c.f,d,h)}} +function B2b(a){var b,c,d,e,f;d=BD(vNb(a,(wtc(),$sc)),33);f=BD(hkd(d,(Nyc(),Fxc)),174).Hc((tdd(),sdd));if(!a.e){e=BD(vNb(a,Ksc),21);b=new f7c(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);if(e.Hc((Orc(),Hrc))){jkd(d,Vxc,(dcd(),$bd));Afd(d,b.a,b.b,false,true)}else{Ccb(DD(hkd(d,Gxc)))||Afd(d,b.a,b.b,true,true)}}f?jkd(d,Fxc,pqb(sdd)):jkd(d,Fxc,(c=BD(gdb(I1),9),new xqb(c,BD(_Bb(c,c.length),9),0)))} +function tA(a,b,c){var d,e,f,g;if(b[0]>=a.length){c.o=0;return true}switch(bfb(a,b[0])){case 43:e=1;break;case 45:e=-1;break;default:c.o=0;return true;}++b[0];f=b[0];g=rA(a,b);if(g==0&&b[0]==f){return false}if(b[0]=0&&h!=c){f=new nSd(a,1,h,g,null);!d?(d=f):d.Ei(f)}if(c>=0){f=new nSd(a,1,c,h==c?g:null,b);!d?(d=f):d.Ei(f)}}return d} +function LEd(a){var b,c,d;if(a.b==null){d=new Hfb;if(a.i!=null){Efb(d,a.i);d.a+=':'}if((a.f&256)!=0){if((a.f&256)!=0&&a.a!=null){YEd(a.i)||(d.a+='//',d);Efb(d,a.a)}if(a.d!=null){d.a+='/';Efb(d,a.d)}(a.f&16)!=0&&(d.a+='/',d);for(b=0,c=a.j.length;bm){return false}l=(i=MZc(d,m,false),i.a);if(k+h+l<=b.b){KZc(c,f-c.s);c.c=true;KZc(d,f-c.s);OZc(d,c.s,c.t+c.d+h);d.k=true;WZc(c.q,d);n=true;if(e){s$c(b,d);d.j=b;if(a.c.length>g){v$c((tCb(g,a.c.length),BD(a.c[g],200)),d);(tCb(g,a.c.length),BD(a.c[g],200)).a.c.length==0&&Kkb(a,g)}}}return n} +function kcc(a,b){var c,d,e,f,g,h;Odd(b,'Partition midprocessing',1);e=new Hp;MAb(JAb(new YAb(null,new Kub(a.a,16)),new occ),new qcc(e));if(e.d==0){return}h=BD(GAb(UAb((f=e.i,new YAb(null,(!f?(e.i=new zf(e,e.c)):f).Nc()))),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);d=h.Kc();c=BD(d.Pb(),19);while(d.Ob()){g=BD(d.Pb(),19);jcc(BD(Qc(e,c),21),BD(Qc(e,g),21));c=g}Qdd(b)} +function DYb(a,b,c){var d,e,f,g,h,i,j,k;if(b.p==0){b.p=1;g=c;if(!g){e=new Rkb;f=(d=BD(gdb(F1),9),new xqb(d,BD(_Bb(d,d.length),9),0));g=new vgd(e,f)}BD(g.a,15).Fc(b);b.k==(j0b(),e0b)&&BD(g.b,21).Fc(BD(vNb(b,(wtc(),Hsc)),61));for(i=new olb(b.j);i.a0){e=BD(a.Ab.g,1934);if(b==null){for(f=0;f1){for(d=new olb(e);d.ac.s&&hh){h=e;k.c=KC(SI,Uhe,1,0,5,1)}e==h&&Ekb(k,new vgd(c.c.i,c))}mmb();Okb(k,a.c);Dkb(a.b,i.p,k)}}} +function MMc(a,b){var c,d,e,f,g,h,i,j,k;for(g=new olb(b.b);g.ah){h=e;k.c=KC(SI,Uhe,1,0,5,1)}e==h&&Ekb(k,new vgd(c.d.i,c))}mmb();Okb(k,a.c);Dkb(a.f,i.p,k)}}} +function Y7c(a){r4c(a,new E3c(P3c(M3c(O3c(N3c(new R3c,qse),'ELK Box'),'Algorithm for packing of unconnected boxes, i.e. graphs without edges.'),new _7c)));p4c(a,qse,ame,U7c);p4c(a,qse,wme,15);p4c(a,qse,vme,meb(0));p4c(a,qse,Jre,Ksd(O7c));p4c(a,qse,Fme,Ksd(Q7c));p4c(a,qse,Eme,Ksd(S7c));p4c(a,qse,_le,pse);p4c(a,qse,Ame,Ksd(P7c));p4c(a,qse,Tme,Ksd(R7c));p4c(a,qse,rse,Ksd(M7c));p4c(a,qse,lqe,Ksd(N7c))} +function W$b(a,b){var c,d,e,f,g,h,i,j,k;e=a.i;g=e.o.a;f=e.o.b;if(g<=0&&f<=0){return Ucd(),Scd}j=a.n.a;k=a.n.b;h=a.o.a;c=a.o.b;switch(b.g){case 2:case 1:if(j<0){return Ucd(),Tcd}else if(j+h>g){return Ucd(),zcd}break;case 4:case 3:if(k<0){return Ucd(),Acd}else if(k+c>f){return Ucd(),Rcd}}i=(j+h/2)/g;d=(k+c/2)/f;return i+d<=1&&i-d<=0?(Ucd(),Tcd):i+d>=1&&i-d>=0?(Ucd(),zcd):d<0.5?(Ucd(),Acd):(Ucd(),Rcd)} +function pJc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=false;k=Edb(ED(vNb(b,(Nyc(),vyc))));o=Qie*k;for(e=new olb(b.b);e.ai+o){p=l.g+m.g;m.a=(m.g*m.a+l.g*l.a)/p;m.g=p;l.f=m;c=true}}f=h;l=m}}return c} +function VGb(a,b,c,d,e,f,g){var h,i,j,k,l,m;m=new I6c;for(j=b.Kc();j.Ob();){h=BD(j.Pb(),839);for(l=new olb(h.wf());l.a0){if(h.a){j=h.b.rf().b;if(e>j){if(a.v||h.c.d.c.length==1){g=(e-j)/2;h.d.d=g;h.d.a=g}else{c=BD(Ikb(h.c.d,0),181).rf().b;d=(c-j)/2;h.d.d=$wnd.Math.max(0,d);h.d.a=e-d-j}}}else{h.d.a=a.t+e}}else if(tcd(a.u)){f=sfd(h.b);f.d<0&&(h.d.d=-f.d);f.d+f.a>h.b.rf().b&&(h.d.a=f.d+f.a-h.b.rf().b)}}} +function FC(a,b){var c;switch(HC(a)){case 6:return ND(b);case 7:return LD(b);case 8:return KD(b);case 3:return Array.isArray(b)&&(c=HC(b),!(c>=14&&c<=16));case 11:return b!=null&&typeof b===Nhe;case 12:return b!=null&&(typeof b===Jhe||typeof b==Nhe);case 0:return AD(b,a.__elementTypeId$);case 2:return OD(b)&&!(b.im===gcb);case 1:return OD(b)&&!(b.im===gcb)||AD(b,a.__elementTypeId$);default:return true;}} +function xOb(a,b){var c,d,e,f;d=$wnd.Math.min($wnd.Math.abs(a.c-(b.c+b.b)),$wnd.Math.abs(a.c+a.b-b.c));f=$wnd.Math.min($wnd.Math.abs(a.d-(b.d+b.a)),$wnd.Math.abs(a.d+a.a-b.d));c=$wnd.Math.abs(a.c+a.b/2-(b.c+b.b/2));if(c>a.b/2+b.b/2){return 1}e=$wnd.Math.abs(a.d+a.a/2-(b.d+b.a/2));if(e>a.a/2+b.a/2){return 1}if(c==0&&e==0){return 0}if(c==0){return f/e+1}if(e==0){return d/c+1}return $wnd.Math.min(d/c,f/e)+1} +function mgb(a,b){var c,d,e,f,g,h;e=pgb(a);h=pgb(b);if(e==h){if(a.e==b.e&&a.a<54&&b.a<54){return a.fb.f?1:0}d=a.e-b.e;c=(a.d>0?a.d:$wnd.Math.floor((a.a-1)*Xje)+1)-(b.d>0?b.d:$wnd.Math.floor((b.a-1)*Xje)+1);if(c>d+1){return e}else if(c0&&(g=Ogb(g,Khb(d)));return Igb(f,g)}}else return e0&&a.d!=(yTb(),xTb)&&(h+=g*(d.d.a+a.a[b.b][d.b]*(b.d.a-d.d.a)/c));c>0&&a.d!=(yTb(),vTb)&&(i+=g*(d.d.b+a.a[b.b][d.b]*(b.d.b-d.d.b)/c))}switch(a.d.g){case 1:return new f7c(h/f,b.d.b);case 2:return new f7c(b.d.a,i/f);default:return new f7c(h/f,i/f);}} +function Wcc(a,b){Occ();var c,d,e,f,g;g=BD(vNb(a.i,(Nyc(),Vxc)),98);f=a.j.g-b.j.g;if(f!=0||!(g==(dcd(),Zbd)||g==_bd||g==$bd)){return 0}if(g==(dcd(),Zbd)){c=BD(vNb(a,Wxc),19);d=BD(vNb(b,Wxc),19);if(!!c&&!!d){e=c.a-d.a;if(e!=0){return e}}}switch(a.j.g){case 1:return Kdb(a.n.a,b.n.a);case 2:return Kdb(a.n.b,b.n.b);case 3:return Kdb(b.n.a,a.n.a);case 4:return Kdb(b.n.b,a.n.b);default:throw vbb(new Zdb(ine));}} +function tfd(a){var b,c,d,e,f,g;c=(!a.a&&(a.a=new xMd(y2,a,5)),a.a).i+2;g=new Skb(c);Ekb(g,new f7c(a.j,a.k));MAb(new YAb(null,(!a.a&&(a.a=new xMd(y2,a,5)),new Kub(a.a,16))),new Qfd(g));Ekb(g,new f7c(a.b,a.c));b=1;while(b0){jEb(i,false,(ead(),aad));jEb(i,true,bad)}Hkb(b.g,new $hc(a,c));Rhb(a.g,b,c)} +function Neb(){Neb=ccb;var a;Jeb=OC(GC(WD,1),oje,25,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);Keb=KC(WD,oje,25,37,15,1);Leb=OC(GC(WD,1),oje,25,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]);Meb=KC(XD,Sje,25,37,14,1);for(a=2;a<=36;a++){Keb[a]=QD($wnd.Math.pow(a,Jeb[a]));Meb[a]=Abb(rie,Keb[a])}} +function pfd(a){var b;if((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i!=1){throw vbb(new Wdb(Tse+(!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i))}b=new s7c;!!btd(BD(qud((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b),0),82))&&ye(b,qfd(a,btd(BD(qud((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b),0),82)),false));!!btd(BD(qud((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c),0),82))&&ye(b,qfd(a,btd(BD(qud((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c),0),82)),true));return b} +function _Mc(a,b){var c,d,e,f,g;b.d?(e=a.a.c==(YLc(),XLc)?R_b(b.b):U_b(b.b)):(e=a.a.c==(YLc(),WLc)?R_b(b.b):U_b(b.b));f=false;for(d=new Sr(ur(e.a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);g=Ccb(a.a.f[a.a.g[b.b.p].p]);if(!g&&!OZb(c)&&c.c.i.c==c.d.i.c){continue}if(Ccb(a.a.n[a.a.g[b.b.p].p])||Ccb(a.a.n[a.a.g[b.b.p].p])){continue}f=true;if(Rqb(a.b,a.a.g[TMc(c,b.b).p])){b.c=true;b.a=c;return b}}b.c=f;b.a=null;return b} +function bed(a,b,c,d,e){var f,g,h,i,j,k,l;mmb();Okb(a,new Red);h=new Bib(a,0);l=new Rkb;f=0;while(h.bf*2){k=new wed(l);j=red(g)/qed(g);i=fed(k,b,new p0b,c,d,e,j);P6c(X6c(k.e),i);l.c=KC(SI,Uhe,1,0,5,1);f=0;l.c[l.c.length]=k;l.c[l.c.length]=g;f=red(k)*qed(k)+red(g)*qed(g)}else{l.c[l.c.length]=g;f+=red(g)*qed(g)}}return l} +function qwd(a,b,c){var d,e,f,g,h,i,j;d=c.gc();if(d==0){return false}else{if(a.ej()){i=a.fj();zvd(a,b,c);g=d==1?a.Zi(3,null,c.Kc().Pb(),b,i):a.Zi(5,null,c,b,i);if(a.bj()){h=d<100?null:new Ixd(d);f=b+d;for(e=b;e0){for(g=0;g>16==-15&&a.Cb.nh()&&Rwd(new oSd(a.Cb,9,13,c,a.c,HLd(QSd(BD(a.Cb,59)),a)))}else if(JD(a.Cb,88)){if(a.Db>>16==-23&&a.Cb.nh()){b=a.c;JD(b,88)||(b=(jGd(),_Fd));JD(c,88)||(c=(jGd(),_Fd));Rwd(new oSd(a.Cb,9,10,c,b,HLd(VKd(BD(a.Cb,26)),a)))}}}}return a.c} +function f7b(a,b){var c,d,e,f,g,h,i,j,k,l;Odd(b,'Hypernodes processing',1);for(e=new olb(a.b);e.ac);return e} +function XFc(a,b){var c,d,e;d=Cub(a.d,1)!=0;!Ccb(DD(vNb(b.j,(wtc(),Jsc))))&&!Ccb(DD(vNb(b.j,mtc)))||PD(vNb(b.j,(Nyc(),ywc)))===PD((tAc(),rAc))?b.c.Tf(b.e,d):(d=Ccb(DD(vNb(b.j,Jsc))));dGc(a,b,d,true);Ccb(DD(vNb(b.j,mtc)))&&yNb(b.j,mtc,(Bcb(),false));if(Ccb(DD(vNb(b.j,Jsc)))){yNb(b.j,Jsc,(Bcb(),false));yNb(b.j,mtc,true)}c=NFc(a,b);do{$Fc(a);if(c==0){return 0}d=!d;e=c;dGc(a,b,d,false);c=NFc(a,b)}while(e>c);return e} +function uNd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;if(b==c){return true}else{b=vNd(a,b);c=vNd(a,c);d=JQd(b);if(d){k=JQd(c);if(k!=d){if(!k){return false}else{i=d.Dj();o=k.Dj();return i==o&&i!=null}}else{g=(!b.d&&(b.d=new xMd(j5,b,1)),b.d);f=g.i;m=(!c.d&&(c.d=new xMd(j5,c,1)),c.d);if(f==m.i){for(j=0;j0;h=xFb(b,f);c?OFb(h.b,b):OFb(h.g,b);LFb(h).c.length==1&&(Gsb(d,h,d.c.b,d.c),true);e=new vgd(f,b);Wjb(a.o,e);Lkb(a.e.a,f)}} +function _Nb(a,b){var c,d,e,f,g,h,i;d=$wnd.Math.abs(D6c(a.b).a-D6c(b.b).a);h=$wnd.Math.abs(D6c(a.b).b-D6c(b.b).b);e=0;i=0;c=1;g=1;if(d>a.b.b/2+b.b.b/2){e=$wnd.Math.min($wnd.Math.abs(a.b.c-(b.b.c+b.b.b)),$wnd.Math.abs(a.b.c+a.b.b-b.b.c));c=1-e/d}if(h>a.b.a/2+b.b.a/2){i=$wnd.Math.min($wnd.Math.abs(a.b.d-(b.b.d+b.b.a)),$wnd.Math.abs(a.b.d+a.b.a-b.b.d));g=1-i/h}f=$wnd.Math.min(c,g);return (1-f)*$wnd.Math.sqrt(d*d+h*h)} +function lQc(a){var b,c,d,e;nQc(a,a.e,a.f,(FQc(),DQc),true,a.c,a.i);nQc(a,a.e,a.f,DQc,false,a.c,a.i);nQc(a,a.e,a.f,EQc,true,a.c,a.i);nQc(a,a.e,a.f,EQc,false,a.c,a.i);mQc(a,a.c,a.e,a.f,a.i);d=new Bib(a.i,0);while(d.b=65;c--){$ce[c]=c-65<<24>>24}for(d=122;d>=97;d--){$ce[d]=d-97+26<<24>>24}for(e=57;e>=48;e--){$ce[e]=e-48+52<<24>>24}$ce[43]=62;$ce[47]=63;for(f=0;f<=25;f++)_ce[f]=65+f&aje;for(g=26,i=0;g<=51;++g,i++)_ce[g]=97+i&aje;for(a=52,h=0;a<=61;++a,h++)_ce[a]=48+h&aje;_ce[62]=43;_ce[63]=47} +function FXb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.dc()){return new d7c}j=0;l=0;for(e=a.Kc();e.Ob();){d=BD(e.Pb(),37);f=d.f;j=$wnd.Math.max(j,f.a);l+=f.a*f.b}j=$wnd.Math.max(j,$wnd.Math.sqrt(l)*Edb(ED(vNb(BD(a.Kc().Pb(),37),(Nyc(),owc)))));m=0;n=0;i=0;c=b;for(h=a.Kc();h.Ob();){g=BD(h.Pb(),37);k=g.f;if(m+k.a>j){m=0;n+=i+b;i=0}uXb(g,m,n);c=$wnd.Math.max(c,m+k.a);i=$wnd.Math.max(i,k.b);m+=k.a+b}return new f7c(c+b,n+i+b)} +function mQc(a,b,c,d,e){var f,g,h,i,j,k,l;for(g=new olb(b);g.af){return Ucd(),zcd}break;case 4:case 3:if(i<0){return Ucd(),Acd}else if(i+a.f>e){return Ucd(),Rcd}}g=(h+a.g/2)/f;c=(i+a.f/2)/e;return g+c<=1&&g-c<=0?(Ucd(),Tcd):g+c>=1&&g-c>=0?(Ucd(),zcd):c<0.5?(Ucd(),Acd):(Ucd(),Rcd)} +function vhb(a,b,c,d,e){var f,g;f=wbb(xbb(b[0],Yje),xbb(d[0],Yje));a[0]=Tbb(f);f=Obb(f,32);if(c>=e){for(g=1;g0){e.b[g++]=0;e.b[g++]=f.b[0]-1}for(b=1;b0){pOc(i,i.d-e.d);e.c==(HOc(),FOc)&&nOc(i,i.a-e.d);i.d<=0&&i.i>0&&(Gsb(b,i,b.c.b,b.c),true)}}}for(f=new olb(a.f);f.a0){qOc(h,h.i-e.d);e.c==(HOc(),FOc)&&oOc(h,h.b-e.d);h.i<=0&&h.d>0&&(Gsb(c,h,c.c.b,c.c),true)}}}} +function gSc(a,b,c){var d,e,f,g,h,i,j,k;Odd(c,'Processor compute fanout',1);Uhb(a.b);Uhb(a.a);h=null;f=Jsb(b.b,0);while(!h&&f.b!=f.d.c){j=BD(Xsb(f),86);Ccb(DD(vNb(j,(mTc(),jTc))))&&(h=j)}i=new Psb;Gsb(i,h,i.c.b,i.c);fSc(a,i);for(k=Jsb(b.b,0);k.b!=k.d.c;){j=BD(Xsb(k),86);g=GD(vNb(j,(mTc(),$Sc)));e=Phb(a.b,g)!=null?BD(Phb(a.b,g),19).a:0;yNb(j,ZSc,meb(e));d=1+(Phb(a.a,g)!=null?BD(Phb(a.a,g),19).a:0);yNb(j,XSc,meb(d))}Qdd(c)} +function WPc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;m=VPc(a,c);for(i=0;i0);d.a.Xb(d.c=--d.b);l>m+i&&uib(d)}for(g=new olb(n);g.a0);d.a.Xb(d.c=--d.b)}}}} +function Jfe(){wfe();var a,b,c,d,e,f;if(gfe)return gfe;a=(++vfe,new $fe(4));Xfe(a,Kfe(vxe,true));Zfe(a,Kfe('M',true));Zfe(a,Kfe('C',true));f=(++vfe,new $fe(4));for(d=0;d<11;d++){Ufe(f,d,d)}b=(++vfe,new $fe(4));Xfe(b,Kfe('M',true));Ufe(b,4448,4607);Ufe(b,65438,65439);e=(++vfe,new Lge(2));Kge(e,a);Kge(e,ffe);c=(++vfe,new Lge(2));c.$l(Bfe(f,Kfe('L',true)));c.$l(b);c=(++vfe,new lge(3,c));c=(++vfe,new rge(e,c));gfe=c;return gfe} +function S3c(a){var b,c;b=GD(hkd(a,(Y9c(),o8c)));if(T3c(b,a)){return}if(!ikd(a,F9c)&&((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a).i!=0||Ccb(DD(hkd(a,M8c))))){if(b==null||ufb(b).length==0){if(!T3c(sne,a)){c=Qfb(Qfb(new Wfb('Unable to load default layout algorithm '),sne),' for unconfigured node ');yfd(a,c);throw vbb(new y2c(c.a))}}else{c=Qfb(Qfb(new Wfb("Layout algorithm '"),b),"' not found for ");yfd(a,c);throw vbb(new y2c(c.a))}}} +function hIb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;c=a.i;b=a.n;if(a.b==0){n=c.c+b.b;m=c.b-b.b-b.c;for(g=a.a,i=0,k=g.length;i0){l-=d[0]+a.c;d[0]+=a.c}d[2]>0&&(l-=d[2]+a.c);d[1]=$wnd.Math.max(d[1],l);mHb(a.a[1],c.c+b.b+d[0]-(d[1]-l)/2,d[1])}for(f=a.a,h=0,j=f.length;h0?(a.n.c.length-1)*a.i:0;for(d=new olb(a.n);d.a1){for(d=Jsb(e,0);d.b!=d.d.c;){c=BD(Xsb(d),231);f=0;for(i=new olb(c.e);i.a0){b[0]+=a.c;l-=b[0]}b[2]>0&&(l-=b[2]+a.c);b[1]=$wnd.Math.max(b[1],l);nHb(a.a[1],d.d+c.d+b[0]-(b[1]-l)/2,b[1])}else{o=d.d+c.d;n=d.a-c.d-c.a;for(g=a.a,i=0,k=g.length;i=0&&f!=c){throw vbb(new Wdb(kue))}}e=0;for(i=0;i0||Jy(e.b.d,a.b.d+a.b.a)==0&&d.b<0||Jy(e.b.d+e.b.a,a.b.d)==0&&d.b>0){h=0;break}}else{h=$wnd.Math.min(h,YNb(a,e,d))}h=$wnd.Math.min(h,ONb(a,f,h,d))}return h} +function ifd(a,b){var c,d,e,f,g,h,i;if(a.b<2){throw vbb(new Wdb('The vector chain must contain at least a source and a target point.'))}e=(sCb(a.b!=0),BD(a.a.a.c,8));nmd(b,e.a,e.b);i=new Oyd((!b.a&&(b.a=new xMd(y2,b,5)),b.a));g=Jsb(a,1);while(g.aEdb(REc(g.g,g.d[0]).a)){sCb(i.b>0);i.a.Xb(i.c=--i.b);Aib(i,g);e=true}else if(!!h.e&&h.e.gc()>0){f=(!h.e&&(h.e=new Rkb),h.e).Mc(b);j=(!h.e&&(h.e=new Rkb),h.e).Mc(c);if(f||j){(!h.e&&(h.e=new Rkb),h.e).Fc(g);++g.c}}}e||(d.c[d.c.length]=g,true)} +function odc(a){var b,c,d;if(fcd(BD(vNb(a,(Nyc(),Vxc)),98))){for(c=new olb(a.j);c.a>>0,'0'+b.toString(16));d='\\x'+qfb(c,c.length-2,c.length)}else if(a>=Tje){c=(b=a>>>0,'0'+b.toString(16));d='\\v'+qfb(c,c.length-6,c.length)}else d=''+String.fromCharCode(a&aje);}return d} +function yhb(a,b){var c,d,e,f,g,h,i,j,k,l;g=a.e;i=b.e;if(i==0){return a}if(g==0){return b.e==0?b:new Vgb(-b.e,b.d,b.a)}f=a.d;h=b.d;if(f+h==2){c=xbb(a.a[0],Yje);d=xbb(b.a[0],Yje);g<0&&(c=Jbb(c));i<0&&(d=Jbb(d));return ghb(Qbb(c,d))}e=f!=h?f>h?1:-1:whb(a.a,b.a,f);if(e==-1){l=-i;k=g==i?zhb(b.a,h,a.a,f):uhb(b.a,h,a.a,f)}else{l=g;if(g==i){if(e==0){return Hgb(),Ggb}k=zhb(a.a,f,b.a,h)}else{k=uhb(a.a,f,b.a,h)}}j=new Vgb(l,k.length,k);Jgb(j);return j} +function YPc(a){var b,c,d,e,f,g;this.e=new Rkb;this.a=new Rkb;for(c=a.b-1;c<3;c++){St(a,0,BD(Ut(a,0),8))}if(a.b<4){throw vbb(new Wdb('At (least dimension + 1) control points are necessary!'))}else{this.b=3;this.d=true;this.c=false;TPc(this,a.b+this.b-1);g=new Rkb;f=new olb(this.e);for(b=0;b=b.o&&c.f<=b.f||b.a*0.5<=c.f&&b.a*1.5>=c.f){g=BD(Ikb(b.n,b.n.c.length-1),211);if(g.e+g.d+c.g+e<=d&&(f=BD(Ikb(b.n,b.n.c.length-1),211),f.f-a.f+c.f<=a.b||a.a.c.length==1)){EZc(b,c);return true}else if(b.s+c.g<=d&&(b.t+b.d+c.f+e<=a.b||a.a.c.length==1)){Ekb(b.b,c);h=BD(Ikb(b.n,b.n.c.length-1),211);Ekb(b.n,new VZc(b.s,h.f+h.a+b.i,b.i));QZc(BD(Ikb(b.n,b.n.c.length-1),211),c);GZc(b,c);return true}}return false} +function Zxd(a,b,c){var d,e,f,g;if(a.ej()){e=null;f=a.fj();d=a.Zi(1,g=uud(a,b,c),c,b,f);if(a.bj()&&!(a.ni()&&g!=null?pb(g,c):PD(g)===PD(c))){g!=null&&(e=a.dj(g,e));e=a.cj(c,e);a.ij()&&(e=a.lj(g,c,e));if(!e){a.$i(d)}else{e.Ei(d);e.Fi()}}else{a.ij()&&(e=a.lj(g,c,e));if(!e){a.$i(d)}else{e.Ei(d);e.Fi()}}return g}else{g=uud(a,b,c);if(a.bj()&&!(a.ni()&&g!=null?pb(g,c):PD(g)===PD(c))){e=null;g!=null&&(e=a.dj(g,null));e=a.cj(c,e);!!e&&e.Fi()}return g}} +function YA(a,b){var c,d,e,f,g,h,i,j;b%=24;if(a.q.getHours()!=b){d=new $wnd.Date(a.q.getTime());d.setDate(d.getDate()+1);h=a.q.getTimezoneOffset()-d.getTimezoneOffset();if(h>0){i=h/60|0;j=h%60;e=a.q.getDate();c=a.q.getHours();c+i>=24&&++e;f=new $wnd.Date(a.q.getFullYear(),a.q.getMonth(),e,b+i,a.q.getMinutes()+j,a.q.getSeconds(),a.q.getMilliseconds());a.q.setTime(f.getTime())}}g=a.q.getTime();a.q.setTime(g+3600000);a.q.getHours()!=b&&a.q.setTime(g)} +function opc(a,b){var c,d,e,f,g;Odd(b,'Path-Like Graph Wrapping',1);if(a.b.c.length==0){Qdd(b);return}e=new Xoc(a);g=(e.i==null&&(e.i=Soc(e,new Zoc)),Edb(e.i)*e.f);c=g/(e.i==null&&(e.i=Soc(e,new Zoc)),Edb(e.i));if(e.b>c){Qdd(b);return}switch(BD(vNb(a,(Nyc(),Gyc)),337).g){case 2:f=new hpc;break;case 0:f=new Ync;break;default:f=new kpc;}d=f.Vf(a,e);if(!f.Wf()){switch(BD(vNb(a,Myc),338).g){case 2:d=tpc(e,d);break;case 1:d=rpc(e,d);}}npc(a,e,d);Qdd(b)} +function MFc(a,b){var c,d,e,f;Fub(a.d,a.e);a.c.a.$b();if(Edb(ED(vNb(b.j,(Nyc(),uwc))))!=0||Edb(ED(vNb(b.j,uwc)))!=0){c=dme;PD(vNb(b.j,ywc))!==PD((tAc(),rAc))&&yNb(b.j,(wtc(),Jsc),(Bcb(),true));f=BD(vNb(b.j,Ayc),19).a;for(e=0;ee&&++j;Ekb(g,(tCb(h+j,b.c.length),BD(b.c[h+j],19)));i+=(tCb(h+j,b.c.length),BD(b.c[h+j],19)).a-d;++c;while(c1&&(i>red(h)*qed(h)/2||g.b==0)){l=new wed(m);k=red(h)/qed(h);j=fed(l,b,new p0b,c,d,e,k);P6c(X6c(l.e),j);h=l;n.c[n.c.length]=l;i=0;m.c=KC(SI,Uhe,1,0,5,1)}}}Gkb(n,m);return n} +function y6d(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;if(c.mh(b)){k=(n=b,!n?null:BD(d,49).xh(n));if(k){p=c.bh(b,a.a);o=b.t;if(o>1||o==-1){l=BD(p,69);m=BD(k,69);if(l.dc()){m.$b()}else{g=!!zUd(b);f=0;for(h=a.a?l.Kc():l.Zh();h.Ob();){j=BD(h.Pb(),56);e=BD(Wrb(a,j),56);if(!e){if(a.b&&!g){m.Xh(f,j);++f}}else{if(g){i=m.Xc(e);i==-1?m.Xh(f,e):f!=i&&m.ji(f,e)}else{m.Xh(f,e)}++f}}}}else{if(p==null){k.Wb(null)}else{e=Wrb(a,p);e==null?a.b&&!zUd(b)&&k.Wb(p):k.Wb(e)}}}}} +function E6b(a,b){var c,d,e,f,g,h,i,j;c=new L6b;for(e=new Sr(ur(R_b(b).a.Kc(),new Sq));Qr(e);){d=BD(Rr(e),17);if(OZb(d)){continue}h=d.c.i;if(F6b(h,C6b)){j=G6b(a,h,C6b,B6b);if(j==-1){continue}c.b=$wnd.Math.max(c.b,j);!c.a&&(c.a=new Rkb);Ekb(c.a,h)}}for(g=new Sr(ur(U_b(b).a.Kc(),new Sq));Qr(g);){f=BD(Rr(g),17);if(OZb(f)){continue}i=f.d.i;if(F6b(i,B6b)){j=G6b(a,i,B6b,C6b);if(j==-1){continue}c.d=$wnd.Math.max(c.d,j);!c.c&&(c.c=new Rkb);Ekb(c.c,i)}}return c} +function Khb(a){Dhb();var b,c,d,e;b=QD(a);if(a1000000){throw vbb(new ocb('power of ten too big'))}if(a<=Ohe){return Qgb(Pgb(Bhb[1],b),b)}d=Pgb(Bhb[1],Ohe);e=d;c=Cbb(a-Ohe);b=QD(a%Ohe);while(ybb(c,Ohe)>0){e=Ogb(e,d);c=Qbb(c,Ohe)}e=Ogb(e,Pgb(Bhb[1],b));e=Qgb(e,Ohe);c=Cbb(a-Ohe);while(ybb(c,Ohe)>0){e=Qgb(e,Ohe);c=Qbb(c,Ohe)}e=Qgb(e,b);return e} +function X5b(a,b){var c,d,e,f,g,h,i,j,k;Odd(b,'Hierarchical port dummy size processing',1);i=new Rkb;k=new Rkb;d=Edb(ED(vNb(a,(Nyc(),myc))));c=d*2;for(f=new olb(a.b);f.aj&&d>j){k=h;j=Edb(b.p[h.p])+Edb(b.d[h.p])+h.o.b+h.d.a}else{e=false;c.n&&Sdd(c,'bk node placement breaks on '+h+' which should have been after '+k);break}}if(!e){break}}c.n&&Sdd(c,b+' is feasible: '+e);return e} +function XNc(a,b,c,d){var e,f,g,h,i,j,k;h=-1;for(k=new olb(a);k.a=q&&a.e[i.p]>o*a.b||t>=c*q){m.c[m.c.length]=h;h=new Rkb;ye(g,f);f.a.$b();j-=k;n=$wnd.Math.max(n,j*a.b+p);j+=t;s=t;t=0;k=0;p=0}}return new vgd(n,m)} +function q4c(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;for(c=(j=(new $ib(a.c.b)).a.vc().Kc(),new djb(j));c.a.Ob();){b=(h=BD(c.a.Pb(),42),BD(h.dd(),149));e=b.a;e==null&&(e='');d=i4c(a.c,e);!d&&e.length==0&&(d=u4c(a));!!d&&!ze(d.c,b,false)&&Dsb(d.c,b)}for(g=Jsb(a.a,0);g.b!=g.d.c;){f=BD(Xsb(g),478);k=j4c(a.c,f.a);n=j4c(a.c,f.b);!!k&&!!n&&Dsb(k.c,new vgd(n,f.c))}Osb(a.a);for(m=Jsb(a.b,0);m.b!=m.d.c;){l=BD(Xsb(m),478);b=g4c(a.c,l.a);i=j4c(a.c,l.b);!!b&&!!i&&B3c(b,i,l.c)}Osb(a.b)} +function qvd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;f=new fC(a);g=new ird;e=(ko(g.g),ko(g.j),Uhb(g.b),ko(g.d),ko(g.i),Uhb(g.k),Uhb(g.c),Uhb(g.e),n=drd(g,f,null),ard(g,f),n);if(b){j=new fC(b);h=rvd(j);jfd(e,OC(GC(g2,1),Uhe,527,0,[h]))}m=false;l=false;if(c){j=new fC(c);que in j.a&&(m=aC(j,que).ge().a);rue in j.a&&(l=aC(j,rue).ge().a)}k=Vdd(Xdd(new Zdd,m),l);t2c(new w2c,e,k);que in f.a&&cC(f,que,null);if(m||l){i=new eC;nvd(k,i,m,l);cC(f,que,i)}d=new Prd(g);Ghe(new _ud(e),d)} +function pA(a,b,c){var d,e,f,g,h,i,j,k,l;g=new nB;j=OC(GC(WD,1),oje,25,15,[0]);e=-1;f=0;d=0;for(i=0;i0){if(e<0&&k.a){e=i;f=j[0];d=0}if(e>=0){h=k.b;if(i==e){h-=d++;if(h==0){return 0}}if(!wA(b,j,k,h,g)){i=e-1;j[0]=f;continue}}else{e=-1;if(!wA(b,j,k,0,g)){return 0}}}else{e=-1;if(bfb(k.c,0)==32){l=j[0];uA(b,j);if(j[0]>l){continue}}else if(ofb(b,k.c,j[0])){j[0]+=k.c.length;continue}return 0}}if(!mB(g,c)){return 0}return j[0]} +function SKd(a){var b,c,d,e,f,g,h,i;if(!a.f){i=new CNd;h=new CNd;b=KKd;g=b.a.zc(a,b);if(g==null){for(f=new Fyd(_Kd(a));f.e!=f.i.gc();){e=BD(Dyd(f),26);ytd(i,SKd(e))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}for(d=(!a.s&&(a.s=new cUd(t5,a,21,17)),new Fyd(a.s));d.e!=d.i.gc();){c=BD(Dyd(d),170);JD(c,99)&&wtd(h,BD(c,18))}vud(h);a.r=new UNd(a,(BD(qud(ZKd((NFd(),MFd).o),6),18),h.i),h.g);ytd(i,a.r);vud(i);a.f=new nNd((BD(qud(ZKd(MFd.o),5),18),i.i),i.g);$Kd(a).b&=-3}return a.f} +function rMb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.o;d=KC(WD,oje,25,g,15,1);e=KC(WD,oje,25,g,15,1);c=a.p;b=KC(WD,oje,25,c,15,1);f=KC(WD,oje,25,c,15,1);for(j=0;j=0&&!YMb(a,k,l)){--l}e[k]=l}for(n=0;n=0&&!YMb(a,h,o)){--h}f[o]=h}for(i=0;ib[m]&&md[i]&&aNb(a,i,m,false,true)}}} +function lRb(a){var b,c,d,e,f,g,h,i;c=Ccb(DD(vNb(a,(wSb(),cSb))));f=a.a.c.d;h=a.a.d.d;if(c){g=Y6c(c7c(new f7c(h.a,h.b),f),0.5);i=Y6c(R6c(a.e),0.5);b=c7c(P6c(new f7c(f.a,f.b),g),i);a7c(a.d,b)}else{e=Edb(ED(vNb(a.a,tSb)));d=a.d;if(f.a>=h.a){if(f.b>=h.b){d.a=h.a+(f.a-h.a)/2+e;d.b=h.b+(f.b-h.b)/2-e-a.e.b}else{d.a=h.a+(f.a-h.a)/2+e;d.b=f.b+(h.b-f.b)/2+e}}else{if(f.b>=h.b){d.a=f.a+(h.a-f.a)/2+e;d.b=h.b+(f.b-h.b)/2+e}else{d.a=f.a+(h.a-f.a)/2+e;d.b=f.b+(h.b-f.b)/2-e-a.e.b}}}} +function Qge(a,b){var c,d,e,f,g,h,i;if(a==null){return null}f=a.length;if(f==0){return ''}i=KC(TD,$ie,25,f,15,1);ACb(0,f,a.length);ACb(0,f,i.length);ffb(a,0,f,i,0);c=null;h=b;for(e=0,g=0;e0?qfb(c.a,0,f-1):''}}else{return !c?a:c.a}} +function DPb(a){r4c(a,new E3c(P3c(M3c(O3c(N3c(new R3c,Yle),'ELK DisCo'),'Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out.'),new GPb)));p4c(a,Yle,Zle,Ksd(BPb));p4c(a,Yle,$le,Ksd(vPb));p4c(a,Yle,_le,Ksd(qPb));p4c(a,Yle,ame,Ksd(wPb));p4c(a,Yle,Zke,Ksd(zPb));p4c(a,Yle,$ke,Ksd(yPb));p4c(a,Yle,Yke,Ksd(APb));p4c(a,Yle,_ke,Ksd(xPb));p4c(a,Yle,Tle,Ksd(sPb));p4c(a,Yle,Ule,Ksd(rPb));p4c(a,Yle,Vle,Ksd(tPb));p4c(a,Yle,Wle,Ksd(uPb))} +function Zbc(a,b,c,d){var e,f,g,h,i,j,k,l,m;f=new b0b(a);__b(f,(j0b(),i0b));yNb(f,(Nyc(),Vxc),(dcd(),$bd));e=0;if(b){g=new H0b;yNb(g,(wtc(),$sc),b);yNb(f,$sc,b.i);G0b(g,(Ucd(),Tcd));F0b(g,f);m=k_b(b.e);for(j=m,k=0,l=j.length;k0){c-=d.length-b;if(c>=0){e.a+='0.';for(;c>egb.length;c-=egb.length){Rfb(e,egb)}Sfb(e,egb,QD(c));Qfb(e,d.substr(b))}else{c=b-c;Qfb(e,qfb(d,b,QD(c)));e.a+='.';Qfb(e,pfb(d,QD(c)))}}else{Qfb(e,d.substr(b));for(;c<-egb.length;c+=egb.length){Rfb(e,egb)}Sfb(e,egb,QD(-c))}return e.a} +function v6c(a,b,c,d){var e,f,g,h,i,j,k,l,m;i=c7c(new f7c(c.a,c.b),a);j=i.a*b.b-i.b*b.a;k=b.a*d.b-b.b*d.a;l=(i.a*d.b-i.b*d.a)/k;m=j/k;if(k==0){if(j==0){e=P6c(new f7c(c.a,c.b),Y6c(new f7c(d.a,d.b),0.5));f=S6c(a,e);g=S6c(P6c(new f7c(a.a,a.b),b),e);h=$wnd.Math.sqrt(d.a*d.a+d.b*d.b)*0.5;if(f=0&&l<=1&&m>=0&&m<=1?P6c(new f7c(a.a,a.b),Y6c(new f7c(b.a,b.b),l)):null}} +function OTb(a,b,c){var d,e,f,g,h;d=BD(vNb(a,(Nyc(),zwc)),21);c.a>b.a&&(d.Hc((i8c(),c8c))?(a.c.a+=(c.a-b.a)/2):d.Hc(e8c)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((i8c(),g8c))?(a.c.b+=(c.b-b.b)/2):d.Hc(f8c)&&(a.c.b+=c.b-b.b));if(BD(vNb(a,(wtc(),Ksc)),21).Hc((Orc(),Hrc))&&(c.a>b.a||c.b>b.b)){for(h=new olb(a.a);h.ab.a&&(d.Hc((i8c(),c8c))?(a.c.a+=(c.a-b.a)/2):d.Hc(e8c)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((i8c(),g8c))?(a.c.b+=(c.b-b.b)/2):d.Hc(f8c)&&(a.c.b+=c.b-b.b));if(BD(vNb(a,(wtc(),Ksc)),21).Hc((Orc(),Hrc))&&(c.a>b.a||c.b>b.b)){for(g=new olb(a.a);g.ab){e=0;f+=k.b+c;l.c[l.c.length]=k;k=new x$c(f,c);d=new PZc(0,k.f,k,c);s$c(k,d);e=0}if(d.b.c.length==0||i.f>=d.o&&i.f<=d.f||d.a*0.5<=i.f&&d.a*1.5>=i.f){EZc(d,i)}else{g=new PZc(d.s+d.r+c,k.f,k,c);s$c(k,g);EZc(g,i)}e=i.i+i.g}l.c[l.c.length]=k;return l} +function OKd(a){var b,c,d,e,f,g,h,i;if(!a.a){a.o=null;i=new GNd(a);b=new KNd;c=KKd;h=c.a.zc(a,c);if(h==null){for(g=new Fyd(_Kd(a));g.e!=g.i.gc();){f=BD(Dyd(g),26);ytd(i,OKd(f))}c.a.Bc(a)!=null;c.a.gc()==0&&undefined}for(e=(!a.s&&(a.s=new cUd(t5,a,21,17)),new Fyd(a.s));e.e!=e.i.gc();){d=BD(Dyd(e),170);JD(d,322)&&wtd(b,BD(d,34))}vud(b);a.k=new PNd(a,(BD(qud(ZKd((NFd(),MFd).o),7),18),b.i),b.g);ytd(i,a.k);vud(i);a.a=new nNd((BD(qud(ZKd(MFd.o),4),18),i.i),i.g);$Kd(a).b&=-2}return a.a} +function vZc(a,b,c,d,e,f,g){var h,i,j,k,l,m;l=false;i=ZZc(c.q,b.f+b.b-c.q.f);m=e-(c.q.e+i-g);if(m=(tCb(f,a.c.length),BD(a.c[f],200)).e;k=(h=MZc(d,m,false),h.a);if(k>b.b&&!j){return false}if(j||k<=b.b){if(j&&k>b.b){c.d=k;KZc(c,JZc(c,k))}else{$Zc(c.q,i);c.c=true}KZc(d,e-(c.s+c.r));OZc(d,c.q.e+c.q.d,b.f);s$c(b,d);if(a.c.length>f){v$c((tCb(f,a.c.length),BD(a.c[f],200)),d);(tCb(f,a.c.length),BD(a.c[f],200)).a.c.length==0&&Kkb(a,f)}l=true}return l} +function C2d(a,b,c,d){var e,f,g,h,i,j,k;k=S6d(a.e.Tg(),b);e=0;f=BD(a.g,119);i=null;Q6d();if(BD(b,66).Oj()){for(h=0;ha.o.a){k=(i-a.o.a)/2;h.b=$wnd.Math.max(h.b,k);h.c=$wnd.Math.max(h.c,k)}} +function rvd(a){var b,c,d,e,f,g,h,i;f=new b2c;Z1c(f,(Y1c(),V1c));for(d=(e=$B(a,KC(ZI,nie,2,0,6,1)),new vib(new amb((new mC(a,e)).b)));d.b0?a.i:0)>b&&i>0){f=0;g+=i+a.i;e=$wnd.Math.max(e,m);d+=i+a.i;i=0;m=0;if(c){++l;Ekb(a.n,new VZc(a.s,g,a.i))}h=0}m+=j.g+(h>0?a.i:0);i=$wnd.Math.max(i,j.f);c&&QZc(BD(Ikb(a.n,l),211),j);f+=j.g+(h>0?a.i:0);++h}e=$wnd.Math.max(e,m);d+=i;if(c){a.r=e;a.d=d;u$c(a.j)}return new J6c(a.s,a.t,e,d)} +function $fb(a,b,c,d,e){Zfb();var f,g,h,i,j,k,l,m,n;vCb(a,'src');vCb(c,'dest');m=rb(a);i=rb(c);rCb((m.i&4)!=0,'srcType is not an array');rCb((i.i&4)!=0,'destType is not an array');l=m.c;g=i.c;rCb((l.i&1)!=0?l==g:(g.i&1)==0,"Array types don't match");n=a.length;j=c.length;if(b<0||d<0||e<0||b+e>n||d+e>j){throw vbb(new pcb)}if((l.i&1)==0&&m!=i){k=CD(a);f=CD(c);if(PD(a)===PD(c)&&bd;){NC(f,h,k[--b])}}else{for(h=d+e;d0&&$Bb(a,b,c,d,e,true)} +function phb(){phb=ccb;nhb=OC(GC(WD,1),oje,25,15,[Rie,1162261467,Iie,1220703125,362797056,1977326743,Iie,387420489,Jje,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,1280000000,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729000000,887503681,Iie,1291467969,1544804416,1838265625,60466176]);ohb=OC(GC(WD,1),oje,25,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])} +function soc(a){var b,c,d,e,f,g,h,i;for(e=new olb(a.b);e.a=a.b.length){f[e++]=g.b[d++];f[e++]=g.b[d++]}else if(d>=g.b.length){f[e++]=a.b[c++];f[e++]=a.b[c++]}else if(g.b[d]0?a.i:0)}++b}Ce(a.n,i);a.d=c;a.r=d;a.g=0;a.f=0;a.e=0;a.o=Pje;a.p=Pje;for(f=new olb(a.b);f.a0){e=(!a.n&&(a.n=new cUd(D2,a,1,7)),BD(qud(a.n,0),137)).a;!e||Qfb(Qfb((b.a+=' "',b),e),'"')}}else{Qfb(Qfb((b.a+=' "',b),d),'"')}c=(!a.b&&(a.b=new y5d(z2,a,4,7)),!(a.b.i<=1&&(!a.c&&(a.c=new y5d(z2,a,5,8)),a.c.i<=1)));c?(b.a+=' [',b):(b.a+=' ',b);Qfb(b,Eb(new Gb,new Fyd(a.b)));c&&(b.a+=']',b);b.a+=gne;c&&(b.a+='[',b);Qfb(b,Eb(new Gb,new Fyd(a.c)));c&&(b.a+=']',b);return b.a} +function TQd(a,b){var c,d,e,f,g,h,i;if(a.a){h=a.a.ne();i=null;if(h!=null){b.a+=''+h}else{g=a.a.Dj();if(g!=null){f=hfb(g,wfb(91));if(f!=-1){i=g.substr(f);b.a+=''+qfb(g==null?Xhe:(uCb(g),g),0,f)}else{b.a+=''+g}}}if(!!a.d&&a.d.i!=0){e=true;b.a+='<';for(d=new Fyd(a.d);d.e!=d.i.gc();){c=BD(Dyd(d),87);e?(e=false):(b.a+=She,b);TQd(c,b)}b.a+='>'}i!=null&&(b.a+=''+i,b)}else if(a.e){h=a.e.zb;h!=null&&(b.a+=''+h,b)}else{b.a+='?';if(a.b){b.a+=' super ';TQd(a.b,b)}else{if(a.f){b.a+=' extends ';TQd(a.f,b)}}}} +function Z9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;v=a.c;w=b.c;c=Jkb(v.a,a,0);d=Jkb(w.a,b,0);t=BD(W_b(a,(KAc(),HAc)).Kc().Pb(),11);C=BD(W_b(a,IAc).Kc().Pb(),11);u=BD(W_b(b,HAc).Kc().Pb(),11);D=BD(W_b(b,IAc).Kc().Pb(),11);r=k_b(t.e);A=k_b(C.g);s=k_b(u.e);B=k_b(D.g);Z_b(a,d,w);for(g=s,k=0,o=g.length;kk){new DOc((HOc(),GOc),c,b,j-k)}else if(j>0&&k>0){new DOc((HOc(),GOc),b,c,0);new DOc(GOc,c,b,0)}}return g} +function TUb(a,b){var c,d,e,f,g,h;for(g=new nib((new eib(a.f.b)).a);g.b;){f=lib(g);e=BD(f.cd(),594);if(b==1){if(e.gf()!=(ead(),dad)&&e.gf()!=_9c){continue}}else{if(e.gf()!=(ead(),aad)&&e.gf()!=bad){continue}}d=BD(BD(f.dd(),46).b,81);h=BD(BD(f.dd(),46).a,189);c=h.c;switch(e.gf().g){case 2:d.g.c=a.e.a;d.g.b=$wnd.Math.max(1,d.g.b+c);break;case 1:d.g.c=d.g.c+c;d.g.b=$wnd.Math.max(1,d.g.b-c);break;case 4:d.g.d=a.e.b;d.g.a=$wnd.Math.max(1,d.g.a+c);break;case 3:d.g.d=d.g.d+c;d.g.a=$wnd.Math.max(1,d.g.a-c);}}} +function nJc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;h=KC(WD,oje,25,b.b.c.length,15,1);j=KC(NQ,Kie,267,b.b.c.length,0,1);i=KC(OQ,kne,10,b.b.c.length,0,1);for(l=a.a,m=0,n=l.length;m0&&!!i[d]&&(o=jBc(a.b,i[d],e));p=$wnd.Math.max(p,e.c.c.b+o)}for(f=new olb(k.e);f.a1){throw vbb(new Wdb(Hwe))}if(!i){f=R6d(b,d.Kc().Pb());g.Fc(f)}}return xtd(a,I2d(a,b,c),g)} +function Pmc(a,b){var c,d,e,f;Jmc(b.b.j);MAb(NAb(new YAb(null,new Kub(b.d,16)),new $mc),new anc);for(f=new olb(b.d);f.aa.o.b){return false}c=V_b(a,zcd);h=b.d+b.a+(c.gc()-1)*g;if(h>a.o.b){return false}}return true} +function thb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.e;i=b.e;if(g==0){return b}if(i==0){return a}f=a.d;h=b.d;if(f+h==2){c=xbb(a.a[0],Yje);d=xbb(b.a[0],Yje);if(g==i){k=wbb(c,d);o=Tbb(k);n=Tbb(Pbb(k,32));return n==0?new Ugb(g,o):new Vgb(g,2,OC(GC(WD,1),oje,25,15,[o,n]))}return ghb(g<0?Qbb(d,c):Qbb(c,d))}else if(g==i){m=g;l=f>=h?uhb(a.a,f,b.a,h):uhb(b.a,h,a.a,f)}else{e=f!=h?f>h?1:-1:whb(a.a,b.a,f);if(e==0){return Hgb(),Ggb}if(e==1){m=g;l=zhb(a.a,f,b.a,h)}else{m=i;l=zhb(b.a,h,a.a,f)}}j=new Vgb(m,l.length,l);Jgb(j);return j} +function oZb(a,b,c,d,e,f,g){var h,i,j,k,l,m,n;l=Ccb(DD(vNb(b,(Nyc(),vxc))));m=null;f==(KAc(),HAc)&&d.c.i==c?(m=d.c):f==IAc&&d.d.i==c&&(m=d.d);j=g;if(!j||!l||!!m){k=(Ucd(),Scd);m?(k=m.j):fcd(BD(vNb(c,Vxc),98))&&(k=f==HAc?Tcd:zcd);i=lZb(a,b,c,f,k,d);h=kZb((Q_b(c),d));if(f==HAc){QZb(h,BD(Ikb(i.j,0),11));RZb(h,e)}else{QZb(h,e);RZb(h,BD(Ikb(i.j,0),11))}j=new yZb(d,h,i,BD(vNb(i,(wtc(),$sc)),11),f,!m)}else{Ekb(j.e,d);n=$wnd.Math.max(Edb(ED(vNb(j.d,Zwc))),Edb(ED(vNb(d,Zwc))));yNb(j.d,Zwc,n)}Rc(a.a,d,new BZb(j.d,b,f));return j} +function V1d(a,b){var c,d,e,f,g,h,i,j,k,l;k=null;!!a.d&&(k=BD(Phb(a.d,b),138));if(!k){f=a.a.Mh();l=f.i;if(!a.d||Vhb(a.d)!=l){i=new Lqb;!!a.d&&Ld(i,a.d);j=i.f.c+i.g.c;for(h=j;h0){n=(o-1)*c;!!h&&(n+=d);!!k&&(n+=d);n=a.b[e+1]){e+=2}else if(c0){d=new Tkb(BD(Qc(a.a,f),21));mmb();Okb(d,new EZb(b));e=new Bib(f.b,0);while(e.bv)){i=2;g=Ohe}else if(i==0){i=1;g=A}else{i=0;g=A}}else{n=A>=g||g-A0?1:Ny(isNaN(d),isNaN(0)))>=0^(null,My(Jqe),($wnd.Math.abs(h)<=Jqe||h==0||isNaN(h)&&isNaN(0)?0:h<0?-1:h>0?1:Ny(isNaN(h),isNaN(0)))>=0)){return $wnd.Math.max(h,d)}My(Jqe);if(($wnd.Math.abs(d)<=Jqe||d==0||isNaN(d)&&isNaN(0)?0:d<0?-1:d>0?1:Ny(isNaN(d),isNaN(0)))>0){return $wnd.Math.sqrt(h*h+d*d)}return -$wnd.Math.sqrt(h*h+d*d)} +function Kge(a,b){var c,d,e,f,g,h;if(!b)return;!a.a&&(a.a=new Wvb);if(a.e==2){Tvb(a.a,b);return}if(b.e==1){for(e=0;e=Tje?Efb(c,Tee(d)):Afb(c,d&aje);g=(++vfe,new Hge(10,null,0));Vvb(a.a,g,h-1)}else{c=(g.bm().length+f,new Ifb);Efb(c,g.bm())}if(b.e==0){d=b._l();d>=Tje?Efb(c,Tee(d)):Afb(c,d&aje)}else{Efb(c,b.bm())}BD(g,521).b=c.a} +function rgb(a){var b,c,d,e,f;if(a.g!=null){return a.g}if(a.a<32){a.g=rhb(Cbb(a.f),QD(a.e));return a.g}e=shb((!a.c&&(a.c=fhb(a.f)),a.c),0);if(a.e==0){return e}b=(!a.c&&(a.c=fhb(a.f)),a.c).e<0?2:1;c=e.length;d=-a.e+c-b;f=new Ufb;f.a+=''+e;if(a.e>0&&d>=-6){if(d>=0){Tfb(f,c-QD(a.e),String.fromCharCode(46))}else{f.a=qfb(f.a,0,b-1)+'0.'+pfb(f.a,b-1);Tfb(f,b+1,zfb(egb,0,-QD(d)-1))}}else{if(c-b>=1){Tfb(f,b,String.fromCharCode(46));++c}Tfb(f,c,String.fromCharCode(69));d>0&&Tfb(f,++c,String.fromCharCode(43));Tfb(f,++c,''+Ubb(Cbb(d)))}a.g=f.a;return a.g} +function npc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(c.dc()){return}h=0;m=0;d=c.Kc();o=BD(d.Pb(),19).a;while(h1&&(i=j.mg(i,a.a,h))}if(i.c.length==1){return BD(Ikb(i,i.c.length-1),220)}if(i.c.length==2){return lYc((tCb(0,i.c.length),BD(i.c[0],220)),(tCb(1,i.c.length),BD(i.c[1],220)),g,f)}return null} +function JNb(a){var b,c,d,e,f,g;Hkb(a.a,new PNb);for(c=new olb(a.a);c.a=$wnd.Math.abs(d.b)){d.b=0;f.d+f.a>g.d&&f.dg.c&&f.c0){b=new _zd(a.i,a.g);c=a.i;f=c<100?null:new Ixd(c);if(a.ij()){for(d=0;d0){h=a.g;j=a.i;oud(a);f=j<100?null:new Ixd(j);for(d=0;d>13|(a.m&15)<<9;e=a.m>>4&8191;f=a.m>>17|(a.h&255)<<5;g=(a.h&1048320)>>8;h=b.l&8191;i=b.l>>13|(b.m&15)<<9;j=b.m>>4&8191;k=b.m>>17|(b.h&255)<<5;l=(b.h&1048320)>>8;B=c*h;C=d*h;D=e*h;F=f*h;G=g*h;if(i!=0){C+=c*i;D+=d*i;F+=e*i;G+=f*i}if(j!=0){D+=c*j;F+=d*j;G+=e*j}if(k!=0){F+=c*k;G+=d*k}l!=0&&(G+=c*l);n=B&Eje;o=(C&511)<<13;m=n+o;q=B>>22;r=C>>9;s=(D&262143)<<4;t=(F&31)<<17;p=q+r+s+t;v=D>>18;w=F>>5;A=(G&4095)<<8;u=v+w+A;p+=m>>22;m&=Eje;u+=p>>22;p&=Eje;u&=Fje;return TC(m,p,u)} +function o7b(a){var b,c,d,e,f,g,h;h=BD(Ikb(a.j,0),11);if(h.g.c.length!=0&&h.e.c.length!=0){throw vbb(new Zdb('Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.'))}if(h.g.c.length!=0){f=Pje;for(c=new olb(h.g);c.a4){if(a.wj(b)){if(a.rk()){e=BD(b,49);d=e.Ug();i=d==a.e&&(a.Dk()?e.Og(e.Vg(),a.zk())==a.Ak():-1-e.Vg()==a.aj());if(a.Ek()&&!i&&!d&&!!e.Zg()){for(f=0;f0&&(j=a.n.a/f);break;case 2:case 4:e=a.i.o.b;e>0&&(j=a.n.b/e);}yNb(a,(wtc(),htc),j)}i=a.o;g=a.a;if(d){g.a=d.a;g.b=d.b;a.d=true}else if(b!=bcd&&b!=ccd&&h!=Scd){switch(h.g){case 1:g.a=i.a/2;break;case 2:g.a=i.a;g.b=i.b/2;break;case 3:g.a=i.a/2;g.b=i.b;break;case 4:g.b=i.b/2;}}else{g.a=i.a/2;g.b=i.b/2}} +function vwd(a){var b,c,d,e,f,g,h,i,j,k;if(a.ej()){k=a.Vi();i=a.fj();if(k>0){b=new Aud(a.Gi());c=k;f=c<100?null:new Ixd(c);Cvd(a,c,b.g);e=c==1?a.Zi(4,qud(b,0),null,0,i):a.Zi(6,b,null,-1,i);if(a.bj()){for(d=new Fyd(b);d.e!=d.i.gc();){f=a.dj(Dyd(d),f)}if(!f){a.$i(e)}else{f.Ei(e);f.Fi()}}else{if(!f){a.$i(e)}else{f.Ei(e);f.Fi()}}}else{Cvd(a,a.Vi(),a.Wi());a.$i(a.Zi(6,(mmb(),jmb),null,-1,i))}}else if(a.bj()){k=a.Vi();if(k>0){h=a.Wi();j=k;Cvd(a,k,h);f=j<100?null:new Ixd(j);for(d=0;da.d[g.p]){c+=zHc(a.b,f)*BD(i.b,19).a;Wjb(a.a,meb(f))}}while(!akb(a.a)){xHc(a.b,BD(fkb(a.a),19).a)}}return c} +function eed(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;l=new g7c(BD(hkd(a,(X7c(),R7c)),8));l.a=$wnd.Math.max(l.a-c.b-c.c,0);l.b=$wnd.Math.max(l.b-c.d-c.a,0);e=ED(hkd(a,L7c));(e==null||(uCb(e),e)<=0)&&(e=1.3);h=new Rkb;for(o=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));o.e!=o.i.gc();){n=BD(Dyd(o),33);g=new xed(n);h.c[h.c.length]=g}m=BD(hkd(a,M7c),311);switch(m.g){case 3:q=bed(h,b,l.a,l.b,(j=d,uCb(e),e,j));break;case 1:q=aed(h,b,l.a,l.b,(k=d,uCb(e),e,k));break;default:q=ced(h,b,l.a,l.b,(i=d,uCb(e),e,i));}f=new wed(q);p=fed(f,b,c,l.a,l.b,d,(uCb(e),e));Afd(a,p.a,p.b,false,true)} +function vkc(a,b){var c,d,e,f;c=b.b;f=new Tkb(c.j);e=0;d=c.j;d.c=KC(SI,Uhe,1,0,5,1);hkc(BD(Si(a.b,(Ucd(),Acd),(Fkc(),Ekc)),15),c);e=ikc(f,e,new blc,d);hkc(BD(Si(a.b,Acd,Dkc),15),c);e=ikc(f,e,new dlc,d);hkc(BD(Si(a.b,Acd,Ckc),15),c);hkc(BD(Si(a.b,zcd,Ekc),15),c);hkc(BD(Si(a.b,zcd,Dkc),15),c);e=ikc(f,e,new flc,d);hkc(BD(Si(a.b,zcd,Ckc),15),c);hkc(BD(Si(a.b,Rcd,Ekc),15),c);e=ikc(f,e,new hlc,d);hkc(BD(Si(a.b,Rcd,Dkc),15),c);e=ikc(f,e,new jlc,d);hkc(BD(Si(a.b,Rcd,Ckc),15),c);hkc(BD(Si(a.b,Tcd,Ekc),15),c);e=ikc(f,e,new Pkc,d);hkc(BD(Si(a.b,Tcd,Dkc),15),c);hkc(BD(Si(a.b,Tcd,Ckc),15),c)} +function nbc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;Odd(b,'Layer size calculation',1);k=Pje;j=Qje;e=false;for(h=new olb(a.b);h.a0.5?(r-=g*2*(o-0.5)):o<0.5&&(r+=f*2*(0.5-o));e=h.d.b;rq.a-p-k&&(r=q.a-p-k);h.n.a=b+r}} +function ced(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;h=KC(UD,Vje,25,a.c.length,15,1);m=new gub(new Ned);_tb(m,a);j=0;p=new Rkb;while(m.b.c.length!=0){g=BD(m.b.c.length==0?null:Ikb(m.b,0),157);if(j>1&&red(g)*qed(g)/2>h[0]){f=0;while(fh[f]){++f}o=new Jib(p,0,f+1);l=new wed(o);k=red(g)/qed(g);i=fed(l,b,new p0b,c,d,e,k);P6c(X6c(l.e),i);zCb(cub(m,l));n=new Jib(p,f+1,p.c.length);_tb(m,n);p.c=KC(SI,Uhe,1,0,5,1);j=0;Dlb(h,h.length,0)}else{q=m.b.c.length==0?null:Ikb(m.b,0);q!=null&&fub(m,0);j>0&&(h[j]=h[j-1]);h[j]+=red(g)*qed(g);++j;p.c[p.c.length]=g}}return p} +function Wac(a){var b,c,d,e,f;d=BD(vNb(a,(Nyc(),mxc)),163);if(d==(Ctc(),ytc)){for(c=new Sr(ur(R_b(a).a.Kc(),new Sq));Qr(c);){b=BD(Rr(c),17);if(!Yac(b)){throw vbb(new y2c(Fne+P_b(a)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. "+'FIRST_SEPARATE nodes must not have incoming edges.'))}}}else if(d==Atc){for(f=new Sr(ur(U_b(a).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);if(!Yac(e)){throw vbb(new y2c(Fne+P_b(a)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. "+'LAST_SEPARATE nodes must not have outgoing edges.'))}}}} +function C9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;Odd(b,'Label dummy removal',1);d=Edb(ED(vNb(a,(Nyc(),nyc))));e=Edb(ED(vNb(a,ryc)));j=BD(vNb(a,Lwc),103);for(i=new olb(a.b);i.a0&&iCc(a,h,l)}for(e=new olb(l);e.a>19!=0){b=hD(b);i=!i}g=_C(b);f=false;e=false;d=false;if(a.h==Gje&&a.m==0&&a.l==0){e=true;f=true;if(g==-1){a=SC((wD(),sD));d=true;i=!i}else{h=lD(a,g);i&&ZC(h);c&&(QC=TC(0,0,0));return h}}else if(a.h>>19!=0){f=true;a=hD(a);d=true;i=!i}if(g!=-1){return WC(a,g,i,f,c)}if(eD(a,b)<0){c&&(f?(QC=hD(a)):(QC=TC(a.l,a.m,a.h)));return TC(0,0,0)}return XC(d?a:TC(a.l,a.m,a.h),b,i,f,e,c)} +function F2c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(a.e&&a.c.cb.f||b.g>a.f){return}c=0;d=0;for(g=a.w.a.ec().Kc();g.Ob();){e=BD(g.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&++c}for(h=a.r.a.ec().Kc();h.Ob();){e=BD(h.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&--c}for(i=b.w.a.ec().Kc();i.Ob();){e=BD(i.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&++d}for(f=b.r.a.ec().Kc();f.Ob();){e=BD(f.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&--d}if(c=0){f=wid(b,c.substr(1,h-1));l=c.substr(h+1,j-(h+1));return pid(b,l,f)}}else{d=-1;Vcb==null&&(Vcb=new RegExp('\\d'));if(Vcb.test(String.fromCharCode(i))){d=lfb(c,wfb(46),j-1);if(d>=0){e=BD(hid(b,Bid(b,c.substr(1,d-1)),false),58);k=0;try{k=Icb(c.substr(d+1),Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){g=a;throw vbb(new rFd(g))}else throw vbb(a)}if(k=0){return c}switch($1d(q1d(a,c))){case 2:{if(dfb('',o1d(a,c.Hj()).ne())){i=b2d(q1d(a,c));h=a2d(q1d(a,c));k=r1d(a,b,i,h);if(k){return k}e=f1d(a,b);for(g=0,l=e.gc();g1){throw vbb(new Wdb(Hwe))}k=S6d(a.e.Tg(),b);d=BD(a.g,119);for(g=0;g1;for(j=new b1b(m.b);llb(j.a)||llb(j.b);){i=BD(llb(j.a)?mlb(j.a):mlb(j.b),17);l=i.c==m?i.d:i.c;$wnd.Math.abs(l7c(OC(GC(m1,1),nie,8,0,[l.i.n,l.n,l.a])).b-g.b)>1&&GNc(a,i,g,f,m)}}} +function XPc(a){var b,c,d,e,f,g;e=new Bib(a.e,0);d=new Bib(a.a,0);if(a.d){for(c=0;cOqe){f=b;g=0;while($wnd.Math.abs(b-f)0);e.a.Xb(e.c=--e.b);WPc(a,a.b-g,f,d,e);sCb(e.b0);d.a.Xb(d.c=--d.b)}if(!a.d){for(c=0;c0){a.f[k.p]=n/(k.e.c.length+k.g.c.length);a.c=$wnd.Math.min(a.c,a.f[k.p]);a.b=$wnd.Math.max(a.b,a.f[k.p])}else h&&(a.f[k.p]=n)}} +function $9d(a){a.b=null;a.bb=null;a.fb=null;a.qb=null;a.a=null;a.c=null;a.d=null;a.e=null;a.f=null;a.n=null;a.M=null;a.L=null;a.Q=null;a.R=null;a.K=null;a.db=null;a.eb=null;a.g=null;a.i=null;a.j=null;a.k=null;a.gb=null;a.o=null;a.p=null;a.q=null;a.r=null;a.$=null;a.ib=null;a.S=null;a.T=null;a.t=null;a.s=null;a.u=null;a.v=null;a.w=null;a.B=null;a.A=null;a.C=null;a.D=null;a.F=null;a.G=null;a.H=null;a.I=null;a.J=null;a.P=null;a.Z=null;a.U=null;a.V=null;a.W=null;a.X=null;a.Y=null;a._=null;a.ab=null;a.cb=null;a.hb=null;a.nb=null;a.lb=null;a.mb=null;a.ob=null;a.pb=null;a.jb=null;a.kb=null;a.N=false;a.O=false} +function l5b(a,b,c){var d,e,f,g;Odd(c,'Graph transformation ('+a.a+')',1);g=Mu(b.a);for(f=new olb(b.b);f.a0){a.a=i+(n-1)*f;b.c.b+=a.a;b.f.b+=a.a}}if(o.a.gc()!=0){m=new tPc(1,f);n=sPc(m,b,o,p,b.f.b+i-b.c.b);n>0&&(b.f.b+=i+(n-1)*f)}} +function kKd(a,b){var c,d,e,f;f=a.F;if(b==null){a.F=null;$Jd(a,null)}else{a.F=(uCb(b),b);d=hfb(b,wfb(60));if(d!=-1){e=b.substr(0,d);hfb(b,wfb(46))==-1&&!dfb(e,Khe)&&!dfb(e,Eve)&&!dfb(e,Fve)&&!dfb(e,Gve)&&!dfb(e,Hve)&&!dfb(e,Ive)&&!dfb(e,Jve)&&!dfb(e,Kve)&&(e=Lve);c=kfb(b,wfb(62));c!=-1&&(e+=''+b.substr(c+1));$Jd(a,e)}else{e=b;if(hfb(b,wfb(46))==-1){d=hfb(b,wfb(91));d!=-1&&(e=b.substr(0,d));if(!dfb(e,Khe)&&!dfb(e,Eve)&&!dfb(e,Fve)&&!dfb(e,Gve)&&!dfb(e,Hve)&&!dfb(e,Ive)&&!dfb(e,Jve)&&!dfb(e,Kve)){e=Lve;d!=-1&&(e+=''+b.substr(d))}else{e=b}}$Jd(a,e);e==b&&(a.F=a.D)}}(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,5,f,b))} +function AMc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;p=b.b.c.length;if(p<3){return}n=KC(WD,oje,25,p,15,1);l=0;for(k=new olb(b.b);k.ag)&&Qqb(a.b,BD(q.b,17))}}++h}f=g}}}} +function o5c(b,c){var d;if(c==null||dfb(c,Xhe)){return null}if(c.length==0&&b.k!=(_5c(),W5c)){return null}switch(b.k.g){case 1:return efb(c,kse)?(Bcb(),Acb):efb(c,lse)?(Bcb(),zcb):null;case 2:try{return meb(Icb(c,Rie,Ohe))}catch(a){a=ubb(a);if(JD(a,127)){return null}else throw vbb(a)}case 4:try{return Hcb(c)}catch(a){a=ubb(a);if(JD(a,127)){return null}else throw vbb(a)}case 3:return c;case 5:j5c(b);return m5c(b,c);case 6:j5c(b);return n5c(b,b.a,c);case 7:try{d=l5c(b);d.Jf(c);return d}catch(a){a=ubb(a);if(JD(a,32)){return null}else throw vbb(a)}default:throw vbb(new Zdb('Invalid type set for this layout option.'));}} +function JWb(a){AWb();var b,c,d,e,f,g,h;h=new CWb;for(c=new olb(a);c.a=h.b.c)&&(h.b=b);if(!h.c||b.c<=h.c.c){h.d=h.c;h.c=b}(!h.e||b.d>=h.e.d)&&(h.e=b);(!h.f||b.d<=h.f.d)&&(h.f=b)}d=new NWb((lWb(),hWb));rXb(a,yWb,new amb(OC(GC(bQ,1),Uhe,369,0,[d])));g=new NWb(kWb);rXb(a,xWb,new amb(OC(GC(bQ,1),Uhe,369,0,[g])));e=new NWb(iWb);rXb(a,wWb,new amb(OC(GC(bQ,1),Uhe,369,0,[e])));f=new NWb(jWb);rXb(a,vWb,new amb(OC(GC(bQ,1),Uhe,369,0,[f])));DWb(d.c,hWb);DWb(e.c,iWb);DWb(f.c,jWb);DWb(g.c,kWb);h.a.c=KC(SI,Uhe,1,0,5,1);Gkb(h.a,d.c);Gkb(h.a,Su(e.c));Gkb(h.a,f.c);Gkb(h.a,Su(g.c));return h} +function jxd(a){var b;switch(a.d){case 1:{if(a.hj()){return a.o!=-2}break}case 2:{if(a.hj()){return a.o==-2}break}case 3:case 5:case 4:case 6:case 7:{return a.o>-2}default:{return false}}b=a.gj();switch(a.p){case 0:return b!=null&&Ccb(DD(b))!=Kbb(a.k,0);case 1:return b!=null&&BD(b,217).a!=Tbb(a.k)<<24>>24;case 2:return b!=null&&BD(b,172).a!=(Tbb(a.k)&aje);case 6:return b!=null&&Kbb(BD(b,162).a,a.k);case 5:return b!=null&&BD(b,19).a!=Tbb(a.k);case 7:return b!=null&&BD(b,184).a!=Tbb(a.k)<<16>>16;case 3:return b!=null&&Edb(ED(b))!=a.j;case 4:return b!=null&&BD(b,155).a!=a.j;default:return b==null?a.n!=null:!pb(b,a.n);}} +function nOd(a,b,c){var d,e,f,g;if(a.Fk()&&a.Ek()){g=oOd(a,BD(c,56));if(PD(g)!==PD(c)){a.Oi(b);a.Ui(b,pOd(a,b,g));if(a.rk()){f=(e=BD(c,49),a.Dk()?a.Bk()?e.ih(a.b,zUd(BD(XKd(wjd(a.b),a.aj()),18)).n,BD(XKd(wjd(a.b),a.aj()).Yj(),26).Bj(),null):e.ih(a.b,bLd(e.Tg(),zUd(BD(XKd(wjd(a.b),a.aj()),18))),null,null):e.ih(a.b,-1-a.aj(),null,null));!BD(g,49).eh()&&(f=(d=BD(g,49),a.Dk()?a.Bk()?d.gh(a.b,zUd(BD(XKd(wjd(a.b),a.aj()),18)).n,BD(XKd(wjd(a.b),a.aj()).Yj(),26).Bj(),f):d.gh(a.b,bLd(d.Tg(),zUd(BD(XKd(wjd(a.b),a.aj()),18))),null,f):d.gh(a.b,-1-a.aj(),null,f)));!!f&&f.Fi()}oid(a.b)&&a.$i(a.Zi(9,c,g,b,false));return g}}return c} +function Noc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;k=Edb(ED(vNb(a,(Nyc(),oyc))));d=Edb(ED(vNb(a,Cyc)));m=new _fd;yNb(m,oyc,k+d);j=b;r=j.d;p=j.c.i;s=j.d.i;q=G1b(p.c);t=G1b(s.c);e=new Rkb;for(l=q;l<=t;l++){h=new b0b(a);__b(h,(j0b(),g0b));yNb(h,(wtc(),$sc),j);yNb(h,Vxc,(dcd(),$bd));yNb(h,qyc,m);n=BD(Ikb(a.b,l),29);l==q?Z_b(h,n.a.c.length-c,n):$_b(h,n);u=Edb(ED(vNb(j,Zwc)));if(u<0){u=0;yNb(j,Zwc,u)}h.o.b=u;o=$wnd.Math.floor(u/2);g=new H0b;G0b(g,(Ucd(),Tcd));F0b(g,h);g.n.b=o;i=new H0b;G0b(i,zcd);F0b(i,h);i.n.b=o;RZb(j,g);f=new UZb;tNb(f,j);yNb(f,jxc,null);QZb(f,i);RZb(f,r);Ooc(h,j,f);e.c[e.c.length]=f;j=f}return e} +function sbc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;i=BD(Y_b(a,(Ucd(),Tcd)).Kc().Pb(),11).e;n=BD(Y_b(a,zcd).Kc().Pb(),11).g;h=i.c.length;t=A0b(BD(Ikb(a.j,0),11));while(h-->0){p=(tCb(0,i.c.length),BD(i.c[0],17));e=(tCb(0,n.c.length),BD(n.c[0],17));s=e.d.e;f=Jkb(s,e,0);SZb(p,e.d,f);QZb(e,null);RZb(e,null);o=p.a;b&&Dsb(o,new g7c(t));for(d=Jsb(e.a,0);d.b!=d.d.c;){c=BD(Xsb(d),8);Dsb(o,new g7c(c))}r=p.b;for(m=new olb(e.b);m.a0&&(g=$wnd.Math.max(g,IJb(a.C.b+d.d.b,e)))}else{n=m+k.d.c+a.w+d.d.b;g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(l-e)<=ple||l==e||isNaN(l)&&isNaN(e)?0:n/(e-l)))}k=d;l=e;m=f}if(!!a.C&&a.C.c>0){n=m+a.C.c;j&&(n+=k.d.c);g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(l-1)<=ple||l==1||isNaN(l)&&isNaN(1)?0:n/(1-l)))}c.n.b=0;c.a.a=g} +function NKb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;c=BD(Mpb(a.b,b),124);i=BD(BD(Qc(a.r,b),21),84);if(i.dc()){c.n.d=0;c.n.a=0;return}j=a.u.Hc((rcd(),ncd));g=0;a.A.Hc((tdd(),sdd))&&SKb(a,b);h=i.Kc();k=null;m=0;l=0;while(h.Ob()){d=BD(h.Pb(),111);f=Edb(ED(d.b.We((CKb(),BKb))));e=d.b.rf().b;if(!k){!!a.C&&a.C.d>0&&(g=$wnd.Math.max(g,IJb(a.C.d+d.d.d,f)))}else{n=l+k.d.a+a.w+d.d.d;g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(m-f)<=ple||m==f||isNaN(m)&&isNaN(f)?0:n/(f-m)))}k=d;m=f;l=e}if(!!a.C&&a.C.a>0){n=l+a.C.a;j&&(n+=k.d.a);g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(m-1)<=ple||m==1||isNaN(m)&&isNaN(1)?0:n/(1-m)))}c.n.d=0;c.a.b=g} +function _Ec(a,b,c){var d,e,f,g,h,i;this.g=a;h=b.d.length;i=c.d.length;this.d=KC(OQ,kne,10,h+i,0,1);for(g=0;g0?ZEc(this,this.f/this.a):REc(b.g,b.d[0]).a!=null&&REc(c.g,c.d[0]).a!=null?ZEc(this,(Edb(REc(b.g,b.d[0]).a)+Edb(REc(c.g,c.d[0]).a))/2):REc(b.g,b.d[0]).a!=null?ZEc(this,REc(b.g,b.d[0]).a):REc(c.g,c.d[0]).a!=null&&ZEc(this,REc(c.g,c.d[0]).a)} +function BUb(a,b){var c,d,e,f,g,h,i,j,k,l;a.a=new dVb(oqb(t1));for(d=new olb(b.a);d.a=1){if(q-g>0&&l>=0){i.n.a+=p;i.n.b+=f*g}else if(q-g<0&&k>=0){i.n.a+=p*q;i.n.b+=f}}}a.o.a=b.a;a.o.b=b.b;yNb(a,(Nyc(),Fxc),(tdd(),d=BD(gdb(I1),9),new xqb(d,BD(_Bb(d,d.length),9),0)))} +function iFd(a,b,c,d,e,f){var g;if(!(b==null||!OEd(b,zEd,AEd))){throw vbb(new Wdb('invalid scheme: '+b))}if(!a&&!(c!=null&&hfb(c,wfb(35))==-1&&c.length>0&&(BCb(0,c.length),c.charCodeAt(0)!=47))){throw vbb(new Wdb('invalid opaquePart: '+c))}if(a&&!(b!=null&&hnb(GEd,b.toLowerCase()))&&!(c==null||!OEd(c,CEd,DEd))){throw vbb(new Wdb(mve+c))}if(a&&b!=null&&hnb(GEd,b.toLowerCase())&&!eFd(c)){throw vbb(new Wdb(mve+c))}if(!fFd(d)){throw vbb(new Wdb('invalid device: '+d))}if(!hFd(e)){g=e==null?'invalid segments: null':'invalid segment: '+VEd(e);throw vbb(new Wdb(g))}if(!(f==null||hfb(f,wfb(35))==-1)){throw vbb(new Wdb('invalid query: '+f))}} +function nVc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;Odd(b,'Calculate Graph Size',1);b.n&&!!a&&Tdd(b,i6d(a),(pgd(),mgd));h=dme;i=dme;f=ere;g=ere;for(l=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));l.e!=l.i.gc();){j=BD(Dyd(l),33);o=j.i;p=j.j;r=j.g;d=j.f;e=BD(hkd(j,(Y9c(),S8c)),142);h=$wnd.Math.min(h,o-e.b);i=$wnd.Math.min(i,p-e.d);f=$wnd.Math.max(f,o+r+e.c);g=$wnd.Math.max(g,p+d+e.a)}n=BD(hkd(a,(Y9c(),f9c)),116);m=new f7c(h-n.b,i-n.d);for(k=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));k.e!=k.i.gc();){j=BD(Dyd(k),33);dld(j,j.i-m.a);eld(j,j.j-m.b)}q=f-h+(n.b+n.c);c=g-i+(n.d+n.a);cld(a,q);ald(a,c);b.n&&!!a&&Tdd(b,i6d(a),(pgd(),mgd))} +function rGb(a){var b,c,d,e,f,g,h,i,j,k;d=new Rkb;for(g=new olb(a.e.a);g.a0){gA(a,c,0);c.a+=String.fromCharCode(d);e=lA(b,f);gA(a,c,e);f+=e-1;continue}if(d==39){if(f+11){p=KC(WD,oje,25,a.b.b.c.length,15,1);l=0;for(j=new olb(a.b.b);j.a=h&&e<=i){if(h<=e&&f<=i){c[k++]=e;c[k++]=f;d+=2}else if(h<=e){c[k++]=e;c[k++]=i;a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=h;c[k++]=f;d+=2}else{c[k++]=h;c[k++]=i;a.b[d]=i+1}}else if(iQie)&&h<10);zVb(a.c,new _Ub);OUb(a);vVb(a.c);yUb(a.f)} +function sZb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(!Ccb(DD(vNb(c,(Nyc(),fxc))))){return}for(h=new olb(c.j);h.a=2){i=Jsb(c,0);g=BD(Xsb(i),8);h=BD(Xsb(i),8);while(h.a0&&jEb(j,true,(ead(),bad));h.k==(j0b(),e0b)&&kEb(j);Rhb(a.f,h,b)}}} +function Bbc(a,b,c){var d,e,f,g,h,i,j,k,l,m;Odd(c,'Node promotion heuristic',1);a.g=b;Abc(a);a.q=BD(vNb(b,(Nyc(),rxc)),260);k=BD(vNb(a.g,qxc),19).a;f=new Jbc;switch(a.q.g){case 2:case 1:Dbc(a,f);break;case 3:a.q=(kAc(),jAc);Dbc(a,f);i=0;for(h=new olb(a.a);h.aa.j){a.q=dAc;Dbc(a,f)}break;case 4:a.q=(kAc(),jAc);Dbc(a,f);j=0;for(e=new olb(a.b);e.aa.k){a.q=gAc;Dbc(a,f)}break;case 6:m=QD($wnd.Math.ceil(a.f.length*k/100));Dbc(a,new Mbc(m));break;case 5:l=QD($wnd.Math.ceil(a.d*k/100));Dbc(a,new Pbc(l));break;default:Dbc(a,f);}Ebc(a,b);Qdd(c)} +function fFc(a,b,c){var d,e,f,g;this.j=a;this.e=WZb(a);this.o=this.j.e;this.i=!!this.o;this.p=this.i?BD(Ikb(c,Q_b(this.o).p),214):null;e=BD(vNb(a,(wtc(),Ksc)),21);this.g=e.Hc((Orc(),Hrc));this.b=new Rkb;this.d=new rHc(this.e);g=BD(vNb(this.j,jtc),230);this.q=wFc(b,g,this.e);this.k=new BGc(this);f=Ou(OC(GC(qY,1),Uhe,225,0,[this,this.d,this.k,this.q]));if(b==(rGc(),oGc)&&!Ccb(DD(vNb(a,(Nyc(),Awc))))){d=new SEc(this.e);f.c[f.c.length]=d;this.c=new uEc(d,g,BD(this.q,402))}else if(b==oGc&&Ccb(DD(vNb(a,(Nyc(),Awc))))){d=new SEc(this.e);f.c[f.c.length]=d;this.c=new XGc(d,g,BD(this.q,402))}else{this.c=new Oic(b,this)}Ekb(f,this.c);$Ic(f,this.e);this.s=AGc(this.k)} +function xUc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;l=BD(pr((g=Jsb((new ZRc(b)).a.d,0),new aSc(g))),86);o=l?BD(vNb(l,(mTc(),_Sc)),86):null;e=1;while(!!l&&!!o){i=0;u=0;c=l;d=o;for(h=0;h=a.i){++a.i;Ekb(a.a,meb(1));Ekb(a.b,k)}else{d=a.c[b.p][1];Nkb(a.a,j,meb(BD(Ikb(a.a,j),19).a+1-d));Nkb(a.b,j,Edb(ED(Ikb(a.b,j)))+k-d*a.e)}(a.q==(kAc(),dAc)&&(BD(Ikb(a.a,j),19).a>a.j||BD(Ikb(a.a,j-1),19).a>a.j)||a.q==gAc&&(Edb(ED(Ikb(a.b,j)))>a.k||Edb(ED(Ikb(a.b,j-1)))>a.k))&&(i=false);for(g=new Sr(ur(R_b(b).a.Kc(),new Sq));Qr(g);){f=BD(Rr(g),17);h=f.c.i;if(a.f[h.p]==j){l=Cbc(a,h);e=e+BD(l.a,19).a;i=i&&Ccb(DD(l.b))}}a.f[b.p]=j;e=e+a.c[b.p][0];return new vgd(meb(e),(Bcb(),i?true:false))} +function sPc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r;l=new Lqb;g=new Rkb;qPc(a,c,a.d.fg(),g,l);qPc(a,d,a.d.gg(),g,l);a.b=0.2*(p=rPc(LAb(new YAb(null,new Kub(g,16)),new xPc)),q=rPc(LAb(new YAb(null,new Kub(g,16)),new zPc)),$wnd.Math.min(p,q));f=0;for(h=0;h=2&&(r=WNc(g,true,m),!a.e&&(a.e=new ZOc(a)),VOc(a.e,r,g,a.b),undefined);uPc(g,m);wPc(g);n=-1;for(k=new olb(g);k.ah} +function k6b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=BD(vNb(a,(Nyc(),Vxc)),98);g=a.f;f=a.d;h=g.a+f.b+f.c;i=0-f.d-a.c.b;k=g.b+f.d+f.a-a.c.b;j=new Rkb;l=new Rkb;for(e=new olb(b);e.a0),BD(k.a.Xb(k.c=--k.b),17));while(f!=d&&k.b>0){a.a[f.p]=true;a.a[d.p]=true;f=(sCb(k.b>0),BD(k.a.Xb(k.c=--k.b),17))}k.b>0&&uib(k)}}}} +function Vmd(b,c,d){var e,f,g,h,i,j,k,l,m;if(b.a!=c.Aj()){throw vbb(new Wdb(tte+c.ne()+ute))}e=o1d((O6d(),M6d),c).$k();if(e){return e.Aj().Nh().Ih(e,d)}h=o1d(M6d,c).al();if(h){if(d==null){return null}i=BD(d,15);if(i.dc()){return ''}m=new Hfb;for(g=i.Kc();g.Ob();){f=g.Pb();Efb(m,h.Aj().Nh().Ih(h,f));m.a+=' '}return lcb(m,m.a.length-1)}l=o1d(M6d,c).bl();if(!l.dc()){for(k=l.Kc();k.Ob();){j=BD(k.Pb(),148);if(j.wj(d)){try{m=j.Aj().Nh().Ih(j,d);if(m!=null){return m}}catch(a){a=ubb(a);if(!JD(a,102))throw vbb(a)}}}throw vbb(new Wdb("Invalid value: '"+d+"' for datatype :"+c.ne()))}BD(c,834).Fj();return d==null?null:JD(d,172)?''+BD(d,172).a:rb(d)==$J?CQd(Pmd[0],BD(d,199)):fcb(d)} +function zQc(a){var b,c,d,e,f,g,h,i,j,k;j=new Psb;h=new Psb;for(f=new olb(a);f.a-1){for(e=Jsb(h,0);e.b!=e.d.c;){d=BD(Xsb(e),128);d.v=g}while(h.b!=0){d=BD(Vt(h,0),128);for(c=new olb(d.i);c.a0){c+=i.n.a+i.o.a/2;++l}for(o=new olb(i.j);o.a0&&(c/=l);r=KC(UD,Vje,25,d.a.c.length,15,1);h=0;for(j=new olb(d.a);j.a=h&&e<=i){if(h<=e&&f<=i){d+=2}else if(h<=e){a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=e;c[k++]=h-1;d+=2}else{c[k++]=e;c[k++]=h-1;a.b[d]=i+1;g+=2}}else if(i0?(e-=86400000):(e+=86400000);i=new gB(wbb(Cbb(b.q.getTime()),e))}k=new Vfb;j=a.a.length;for(f=0;f=97&&d<=122||d>=65&&d<=90){for(g=f+1;g=j){throw vbb(new Wdb("Missing trailing '"))}g+10&&c.c==0){!b&&(b=new Rkb);b.c[b.c.length]=c}}if(b){while(b.c.length!=0){c=BD(Kkb(b,0),233);if(!!c.b&&c.b.c.length>0){for(f=(!c.b&&(c.b=new Rkb),new olb(c.b));f.aJkb(a,c,0)){return new vgd(e,c)}}else if(Edb(REc(e.g,e.d[0]).a)>Edb(REc(c.g,c.d[0]).a)){return new vgd(e,c)}}}for(h=(!c.e&&(c.e=new Rkb),c.e).Kc();h.Ob();){g=BD(h.Pb(),233);i=(!g.b&&(g.b=new Rkb),g.b);wCb(0,i.c.length);aCb(i.c,0,c);g.c==i.c.length&&(b.c[b.c.length]=g,true)}}}return null} +function wlb(a,b){var c,d,e,f,g,h,i,j,k;if(a==null){return Xhe}i=b.a.zc(a,b);if(i!=null){return '[...]'}c=new xwb(She,'[',']');for(e=a,f=0,g=e.length;f=14&&k<=16))){if(b.a._b(d)){!c.a?(c.a=new Wfb(c.d)):Qfb(c.a,c.b);Nfb(c.a,'[...]')}else{h=CD(d);j=new Vqb(b);uwb(c,wlb(h,j))}}else JD(d,177)?uwb(c,Xlb(BD(d,177))):JD(d,190)?uwb(c,Qlb(BD(d,190))):JD(d,195)?uwb(c,Rlb(BD(d,195))):JD(d,2012)?uwb(c,Wlb(BD(d,2012))):JD(d,48)?uwb(c,Ulb(BD(d,48))):JD(d,364)?uwb(c,Vlb(BD(d,364))):JD(d,832)?uwb(c,Tlb(BD(d,832))):JD(d,104)&&uwb(c,Slb(BD(d,104)))}else{uwb(c,d==null?Xhe:fcb(d))}}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)} +function xQb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;h=itd(b,false,false);r=ofd(h);d&&(r=w7c(r));t=Edb(ED(hkd(b,(CPb(),vPb))));q=(sCb(r.b!=0),BD(r.a.a.c,8));l=BD(Ut(r,1),8);if(r.b>2){k=new Rkb;Gkb(k,new Jib(r,1,r.b));f=sQb(k,t+a.a);s=new XOb(f);tNb(s,b);c.c[c.c.length]=s}else{d?(s=BD(Ohb(a.b,jtd(b)),266)):(s=BD(Ohb(a.b,ltd(b)),266))}i=jtd(b);d&&(i=ltd(b));g=zQb(q,i);j=t+a.a;if(g.a){j+=$wnd.Math.abs(q.b-l.b);p=new f7c(l.a,(l.b+q.b)/2)}else{j+=$wnd.Math.abs(q.a-l.a);p=new f7c((l.a+q.a)/2,l.b)}d?Rhb(a.d,b,new ZOb(s,g,p,j)):Rhb(a.c,b,new ZOb(s,g,p,j));Rhb(a.b,b,s);o=(!b.n&&(b.n=new cUd(D2,b,1,7)),b.n);for(n=new Fyd(o);n.e!=n.i.gc();){m=BD(Dyd(n),137);e=wQb(a,m,true,0,0);c.c[c.c.length]=e}} +function wPc(a){var b,c,d,e,f,g,h,i,j,k;j=new Rkb;h=new Rkb;for(g=new olb(a);g.a-1){for(f=new olb(h);f.a0){continue}rOc(i,$wnd.Math.min(i.o,e.o-1));qOc(i,i.i-1);i.i==0&&(h.c[h.c.length]=i,true)}}}} +function QQd(a,b,c){var d,e,f,g,h,i,j;j=a.c;!b&&(b=FQd);a.c=b;if((a.Db&4)!=0&&(a.Db&1)==0){i=new nSd(a,1,2,j,a.c);!c?(c=i):c.Ei(i)}if(j!=b){if(JD(a.Cb,284)){if(a.Db>>16==-10){c=BD(a.Cb,284).nk(b,c)}else if(a.Db>>16==-15){!b&&(b=(jGd(),YFd));!j&&(j=(jGd(),YFd));if(a.Cb.nh()){i=new pSd(a.Cb,1,13,j,b,HLd(QSd(BD(a.Cb,59)),a),false);!c?(c=i):c.Ei(i)}}}else if(JD(a.Cb,88)){if(a.Db>>16==-23){JD(b,88)||(b=(jGd(),_Fd));JD(j,88)||(j=(jGd(),_Fd));if(a.Cb.nh()){i=new pSd(a.Cb,1,10,j,b,HLd(VKd(BD(a.Cb,26)),a),false);!c?(c=i):c.Ei(i)}}}else if(JD(a.Cb,444)){h=BD(a.Cb,836);g=(!h.b&&(h.b=new RYd(new NYd)),h.b);for(f=(d=new nib((new eib(g.a)).a),new ZYd(d));f.a.b;){e=BD(lib(f.a).cd(),87);c=QQd(e,MQd(e,h),c)}}}return c} +function O1b(a,b){var c,d,e,f,g,h,i,j,k,l,m;g=Ccb(DD(hkd(a,(Nyc(),fxc))));m=BD(hkd(a,Yxc),21);i=false;j=false;l=new Fyd((!a.c&&(a.c=new cUd(F2,a,9,9)),a.c));while(l.e!=l.i.gc()&&(!i||!j)){f=BD(Dyd(l),118);h=0;for(e=ul(pl(OC(GC(KI,1),Uhe,20,0,[(!f.d&&(f.d=new y5d(B2,f,8,5)),f.d),(!f.e&&(f.e=new y5d(B2,f,7,4)),f.e)])));Qr(e);){d=BD(Rr(e),79);k=g&&Qld(d)&&Ccb(DD(hkd(d,gxc)));c=ELd((!d.b&&(d.b=new y5d(z2,d,4,7)),d.b),f)?a==Xod(atd(BD(qud((!d.c&&(d.c=new y5d(z2,d,5,8)),d.c),0),82))):a==Xod(atd(BD(qud((!d.b&&(d.b=new y5d(z2,d,4,7)),d.b),0),82)));if(k||c){++h;if(h>1){break}}}h>0?(i=true):m.Hc((rcd(),ncd))&&(!f.n&&(f.n=new cUd(D2,f,1,7)),f.n).i>0&&(i=true);h>1&&(j=true)}i&&b.Fc((Orc(),Hrc));j&&b.Fc((Orc(),Irc))} +function zfd(a){var b,c,d,e,f,g,h,i,j,k,l,m;m=BD(hkd(a,(Y9c(),Y8c)),21);if(m.dc()){return null}h=0;g=0;if(m.Hc((tdd(),rdd))){k=BD(hkd(a,t9c),98);d=2;c=2;e=2;f=2;b=!Xod(a)?BD(hkd(a,z8c),103):BD(hkd(Xod(a),z8c),103);for(j=new Fyd((!a.c&&(a.c=new cUd(F2,a,9,9)),a.c));j.e!=j.i.gc();){i=BD(Dyd(j),118);l=BD(hkd(i,A9c),61);if(l==(Ucd(),Scd)){l=lfd(i,b);jkd(i,A9c,l)}if(k==(dcd(),$bd)){switch(l.g){case 1:d=$wnd.Math.max(d,i.i+i.g);break;case 2:c=$wnd.Math.max(c,i.j+i.f);break;case 3:e=$wnd.Math.max(e,i.i+i.g);break;case 4:f=$wnd.Math.max(f,i.j+i.f);}}else{switch(l.g){case 1:d+=i.g+2;break;case 2:c+=i.f+2;break;case 3:e+=i.g+2;break;case 4:f+=i.f+2;}}}h=$wnd.Math.max(d,e);g=$wnd.Math.max(c,f)}return Afd(a,h,g,true,true)} +function lnc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=BD(GAb(VAb(JAb(new YAb(null,new Kub(b.d,16)),new pnc(c)),new rnc(c)),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);l=Ohe;k=Rie;for(i=new olb(b.b.j);i.a0;if(j){if(j){m=r.p;g?++m:--m;l=BD(Ikb(r.c.a,m),10);d=I4b(l);n=!(s6c(d,w,c[0])||n6c(d,w,c[0]))}}else{n=true}}o=false;v=b.D.i;if(!!v&&!!v.c&&h.e){k=g&&v.p>0||!g&&v.p0&&(b.a+=She,b);yfd(BD(Dyd(h),160),b)}b.a+=gne;i=new Oyd((!d.c&&(d.c=new y5d(z2,d,5,8)),d.c));while(i.e!=i.i.gc()){i.e>0&&(b.a+=She,b);yfd(BD(Dyd(i),160),b)}b.a+=')'}}} +function y2b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;f=BD(vNb(a,(wtc(),$sc)),79);if(!f){return}d=a.a;e=new g7c(c);P6c(e,C2b(a));if(f_b(a.d.i,a.c.i)){m=a.c;l=l7c(OC(GC(m1,1),nie,8,0,[m.n,m.a]));c7c(l,c)}else{l=A0b(a.c)}Gsb(d,l,d.a,d.a.a);n=A0b(a.d);vNb(a,utc)!=null&&P6c(n,BD(vNb(a,utc),8));Gsb(d,n,d.c.b,d.c);q7c(d,e);g=itd(f,true,true);kmd(g,BD(qud((!f.b&&(f.b=new y5d(z2,f,4,7)),f.b),0),82));lmd(g,BD(qud((!f.c&&(f.c=new y5d(z2,f,5,8)),f.c),0),82));ifd(d,g);for(k=new olb(a.b);k.a=0){i=null;h=new Bib(k.a,j+1);while(h.bg?1:Ny(isNaN(0),isNaN(g)))<0&&(null,My(Jqe),($wnd.Math.abs(g-1)<=Jqe||g==1||isNaN(g)&&isNaN(1)?0:g<1?-1:g>1?1:Ny(isNaN(g),isNaN(1)))<0)&&(null,My(Jqe),($wnd.Math.abs(0-h)<=Jqe||0==h||isNaN(0)&&isNaN(h)?0:0h?1:Ny(isNaN(0),isNaN(h)))<0)&&(null,My(Jqe),($wnd.Math.abs(h-1)<=Jqe||h==1||isNaN(h)&&isNaN(1)?0:h<1?-1:h>1?1:Ny(isNaN(h),isNaN(1)))<0));return f} +function z6d(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;for(l=new usb(new nsb(a));l.b!=l.c.a.d;){k=tsb(l);h=BD(k.d,56);b=BD(k.e,56);g=h.Tg();for(p=0,u=(g.i==null&&TKd(g),g.i).length;p=0&&p=j.c.c.length?(k=JJc((j0b(),h0b),g0b)):(k=JJc((j0b(),g0b),g0b));k*=2;f=c.a.g;c.a.g=$wnd.Math.max(f,f+(k-f));g=c.b.g;c.b.g=$wnd.Math.max(g,g+(k-g));e=b}}} +function VNc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;v=Hx(a);k=new Rkb;h=a.c.length;l=h-1;m=h+1;while(v.a.c!=0){while(c.b!=0){t=(sCb(c.b!=0),BD(Nsb(c,c.a.a),112));Jwb(v.a,t)!=null;t.g=l--;YNc(t,b,c,d)}while(b.b!=0){u=(sCb(b.b!=0),BD(Nsb(b,b.a.a),112));Jwb(v.a,u)!=null;u.g=m++;YNc(u,b,c,d)}j=Rie;for(r=(g=new Ywb((new cxb((new Gjb(v.a)).a)).b),new Njb(g));sib(r.a.a);){q=(f=Wwb(r.a),BD(f.cd(),112));if(!d&&q.b>0&&q.a<=0){k.c=KC(SI,Uhe,1,0,5,1);k.c[k.c.length]=q;break}p=q.i-q.d;if(p>=j){if(p>j){k.c=KC(SI,Uhe,1,0,5,1);j=p}k.c[k.c.length]=q}}if(k.c.length!=0){i=BD(Ikb(k,Bub(e,k.c.length)),112);Jwb(v.a,i)!=null;i.g=m++;YNc(i,b,c,d);k.c=KC(SI,Uhe,1,0,5,1)}}s=a.c.length+1;for(o=new olb(a);o.a0){m.d+=k.n.d;m.d+=k.d}if(m.a>0){m.a+=k.n.a;m.a+=k.d}if(m.b>0){m.b+=k.n.b;m.b+=k.d}if(m.c>0){m.c+=k.n.c;m.c+=k.d}return m} +function d6b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;m=c.d;l=c.c;f=new f7c(c.f.a+c.d.b+c.d.c,c.f.b+c.d.d+c.d.a);g=f.b;for(j=new olb(a.a);j.a0){a.c[b.c.p][b.p].d+=Cub(a.i,24)*lke*0.07000000029802322-0.03500000014901161;a.c[b.c.p][b.p].a=a.c[b.c.p][b.p].d/a.c[b.c.p][b.p].b}} +function m5b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;for(o=new olb(a);o.ad.d;d.d=$wnd.Math.max(d.d,b);if(h&&c){d.d=$wnd.Math.max(d.d,d.a);d.a=d.d+e}break;case 3:c=b>d.a;d.a=$wnd.Math.max(d.a,b);if(h&&c){d.a=$wnd.Math.max(d.a,d.d);d.d=d.a+e}break;case 2:c=b>d.c;d.c=$wnd.Math.max(d.c,b);if(h&&c){d.c=$wnd.Math.max(d.b,d.c);d.b=d.c+e}break;case 4:c=b>d.b;d.b=$wnd.Math.max(d.b,b);if(h&&c){d.b=$wnd.Math.max(d.b,d.c);d.c=d.b+e}}}}} +function l3b(a){var b,c,d,e,f,g,h,i,j,k,l;for(j=new olb(a);j.a0||k.j==Tcd&&k.e.c.length-k.g.c.length<0)){b=false;break}for(e=new olb(k.g);e.a=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}if(c){for(g=new olb(s.e);g.a=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}}if(h>0){w+=m/h;++n}}if(n>0){b.a=e*w/n;b.g=n}else{b.a=0;b.g=0}} +function oMc(a,b){var c,d,e,f,g,h,i,j,k,l,m;for(e=new olb(a.a.b);e.aQje||b.o==cMc&&k0&&dld(r,u*w);v>0&&eld(r,v*A)}stb(a.b,new CQb);b=new Rkb;for(h=new nib((new eib(a.c)).a);h.b;){g=lib(h);d=BD(g.cd(),79);c=BD(g.dd(),395).a;e=itd(d,false,false);l=oQb(jtd(d),ofd(e),c);ifd(l,e);t=ktd(d);if(!!t&&Jkb(b,t,0)==-1){b.c[b.c.length]=t;pQb(t,(sCb(l.b!=0),BD(l.a.a.c,8)),c)}}for(q=new nib((new eib(a.d)).a);q.b;){p=lib(q);d=BD(p.cd(),79);c=BD(p.dd(),395).a;e=itd(d,false,false);l=oQb(ltd(d),w7c(ofd(e)),c);l=w7c(l);ifd(l,e);t=mtd(d);if(!!t&&Jkb(b,t,0)==-1){b.c[b.c.length]=t;pQb(t,(sCb(l.b!=0),BD(l.c.b.c,8)),c)}}} +function _Vc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;if(c.c.length!=0){o=new Rkb;for(n=new olb(c);n.a1){n=new ZQc(o,t,d);reb(t,new PQc(a,n));g.c[g.c.length]=n;for(l=t.a.ec().Kc();l.Ob();){k=BD(l.Pb(),46);Lkb(f,k.b)}}if(h.a.gc()>1){n=new ZQc(o,h,d);reb(h,new RQc(a,n));g.c[g.c.length]=n;for(l=h.a.ec().Kc();l.Ob();){k=BD(l.Pb(),46);Lkb(f,k.b)}}}} +function $Wc(a){r4c(a,new E3c(L3c(P3c(M3c(O3c(N3c(new R3c,sre),'ELK Radial'),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new bXc),sre)));p4c(a,sre,uqe,Ksd(UWc));p4c(a,sre,wme,Ksd(XWc));p4c(a,sre,Fme,Ksd(NWc));p4c(a,sre,Tme,Ksd(OWc));p4c(a,sre,Eme,Ksd(PWc));p4c(a,sre,Gme,Ksd(MWc));p4c(a,sre,Dme,Ksd(QWc));p4c(a,sre,Hme,Ksd(TWc));p4c(a,sre,ore,Ksd(KWc));p4c(a,sre,nre,Ksd(LWc));p4c(a,sre,rre,Ksd(RWc));p4c(a,sre,lre,Ksd(SWc));p4c(a,sre,mre,Ksd(VWc));p4c(a,sre,pre,Ksd(WWc));p4c(a,sre,qre,Ksd(YWc))} +function LIb(a){var b;this.r=Cy(new OIb,new SIb);this.b=new Rpb(BD(Qb(F1),290));this.p=new Rpb(BD(Qb(F1),290));this.i=new Rpb(BD(Qb(DN),290));this.e=a;this.o=new g7c(a.rf());this.D=a.Df()||Ccb(DD(a.We((Y9c(),M8c))));this.A=BD(a.We((Y9c(),Y8c)),21);this.B=BD(a.We(b9c),21);this.q=BD(a.We(t9c),98);this.u=BD(a.We(x9c),21);if(!ucd(this.u)){throw vbb(new y2c('Invalid port label placement: '+this.u))}this.v=Ccb(DD(a.We(z9c)));this.j=BD(a.We(W8c),21);if(!Jbd(this.j)){throw vbb(new y2c('Invalid node label placement: '+this.j))}this.n=BD(bgd(a,U8c),116);this.k=Edb(ED(bgd(a,Q9c)));this.d=Edb(ED(bgd(a,P9c)));this.w=Edb(ED(bgd(a,X9c)));this.s=Edb(ED(bgd(a,R9c)));this.t=Edb(ED(bgd(a,S9c)));this.C=BD(bgd(a,V9c),142);this.c=2*this.d;b=!this.B.Hc((Idd(),zdd));this.f=new mIb(0,b,0);this.g=new mIb(1,b,0);lIb(this.f,(gHb(),eHb),this.g)} +function Lgd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;t=0;o=0;n=0;m=1;for(s=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));s.e!=s.i.gc();){q=BD(Dyd(s),33);m+=sr(new Sr(ur(_sd(q).a.Kc(),new Sq)));B=q.g;o=$wnd.Math.max(o,B);l=q.f;n=$wnd.Math.max(n,l);t+=B*l}p=(!a.a&&(a.a=new cUd(E2,a,10,11)),a.a).i;g=t+2*d*d*m*p;f=$wnd.Math.sqrt(g);i=$wnd.Math.max(f*c,o);h=$wnd.Math.max(f/c,n);for(r=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));r.e!=r.i.gc();){q=BD(Dyd(r),33);C=e.b+(Cub(b,26)*ike+Cub(b,27)*jke)*(i-q.g);D=e.b+(Cub(b,26)*ike+Cub(b,27)*jke)*(h-q.f);dld(q,C);eld(q,D)}A=i+(e.b+e.c);w=h+(e.d+e.a);for(v=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));v.e!=v.i.gc();){u=BD(Dyd(v),33);for(k=new Sr(ur(_sd(u).a.Kc(),new Sq));Qr(k);){j=BD(Rr(k),79);Pld(j)||Kgd(j,b,A,w)}}A+=e.b+e.c;w+=e.d+e.a;Afd(a,A,w,false,true)} +function Jcb(a){var b,c,d,e,f,g,h,i,j,k,l;if(a==null){throw vbb(new Oeb(Xhe))}j=a;f=a.length;i=false;if(f>0){b=(BCb(0,a.length),a.charCodeAt(0));if(b==45||b==43){a=a.substr(1);--f;i=b==45}}if(f==0){throw vbb(new Oeb(Oje+j+'"'))}while(a.length>0&&(BCb(0,a.length),a.charCodeAt(0)==48)){a=a.substr(1);--f}if(f>(Neb(),Leb)[10]){throw vbb(new Oeb(Oje+j+'"'))}for(e=0;e0){l=-parseInt(a.substr(0,d),10);a=a.substr(d);f-=d;c=false}while(f>=g){d=parseInt(a.substr(0,g),10);a=a.substr(g);f-=g;if(c){c=false}else{if(ybb(l,h)<0){throw vbb(new Oeb(Oje+j+'"'))}l=Ibb(l,k)}l=Qbb(l,d)}if(ybb(l,0)>0){throw vbb(new Oeb(Oje+j+'"'))}if(!i){l=Jbb(l);if(ybb(l,0)<0){throw vbb(new Oeb(Oje+j+'"'))}}return l} +function Z6d(a,b){X6d();var c,d,e,f,g,h,i;this.a=new a7d(this);this.b=a;this.c=b;this.f=c2d(q1d((O6d(),M6d),b));if(this.f.dc()){if((h=t1d(M6d,a))==b){this.e=true;this.d=new Rkb;this.f=new oFd;this.f.Fc(Ewe);BD(V1d(p1d(M6d,bKd(a)),''),26)==a&&this.f.Fc(u1d(M6d,bKd(a)));for(e=g1d(M6d,a).Kc();e.Ob();){d=BD(e.Pb(),170);switch($1d(q1d(M6d,d))){case 4:{this.d.Fc(d);break}case 5:{this.f.Gc(c2d(q1d(M6d,d)));break}}}}else{Q6d();if(BD(b,66).Oj()){this.e=true;this.f=null;this.d=new Rkb;for(g=0,i=(a.i==null&&TKd(a),a.i).length;g=0&&g0&&(BD(Mpb(a.b,b),124).a.b=c)} +function b3b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;Odd(b,'Comment pre-processing',1);c=0;i=new olb(a.a);while(i.a0){j=(BCb(0,c.length),c.charCodeAt(0));if(j!=64){if(j==37){m=c.lastIndexOf('%');k=false;if(m!=0&&(m==n-1||(k=(BCb(m+1,c.length),c.charCodeAt(m+1)==46)))){h=c.substr(1,m-1);u=dfb('%',h)?null:QEd(h);e=0;if(k){try{e=Icb(c.substr(m+2),Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){i=a;throw vbb(new rFd(i))}else throw vbb(a)}}for(r=pRd(b.Wg());r.Ob();){p=MRd(r);if(JD(p,510)){f=BD(p,590);t=f.d;if((u==null?t==null:dfb(u,t))&&e--==0){return f}}}return null}}l=c.lastIndexOf('.');o=l==-1?c:c.substr(0,l);d=0;if(l!=-1){try{d=Icb(c.substr(l+1),Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){o=c}else throw vbb(a)}}o=dfb('%',o)?null:QEd(o);for(q=pRd(b.Wg());q.Ob();){p=MRd(q);if(JD(p,191)){g=BD(p,191);s=g.ne();if((o==null?s==null:dfb(o,s))&&d--==0){return g}}}return null}}return rid(b,c)} +function f6b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;w=new Rkb;for(o=new olb(a.b);o.a=b.length)return {done:true};var a=b[d++];return {value:[a,c.get(a)],done:false}}}};if(!xrb()){e.prototype.createObject=function(){return {}};e.prototype.get=function(a){return this.obj[':'+a]};e.prototype.set=function(a,b){this.obj[':'+a]=b};e.prototype[hke]=function(a){delete this.obj[':'+a]};e.prototype.keys=function(){var a=[];for(var b in this.obj){b.charCodeAt(0)==58&&a.push(b.substring(1))}return a}}return e} +function cde(a){ade();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;l=a.length*8;if(l==0){return ''}h=l%24;n=l/24|0;m=h!=0?n+1:n;f=null;f=KC(TD,$ie,25,m*4,15,1);j=0;k=0;b=0;c=0;d=0;g=0;e=0;for(i=0;i>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;q=(d&-128)==0?d>>6<<24>>24:(d>>6^252)<<24>>24;f[g++]=_ce[o];f[g++]=_ce[p|j<<4];f[g++]=_ce[k<<2|q];f[g++]=_ce[d&63]}if(h==8){b=a[e];j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;f[g++]=_ce[o];f[g++]=_ce[j<<4];f[g++]=61;f[g++]=61}else if(h==16){b=a[e];c=a[e+1];k=(c&15)<<24>>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;f[g++]=_ce[o];f[g++]=_ce[p|j<<4];f[g++]=_ce[k<<2];f[g++]=61}return zfb(f,0,f.length)} +function mB(a,b){var c,d,e,f,g,h,i;a.e==0&&a.p>0&&(a.p=-(a.p-1));a.p>Rie&&dB(b,a.p-nje);g=b.q.getDate();ZA(b,1);a.k>=0&&aB(b,a.k);if(a.c>=0){ZA(b,a.c)}else if(a.k>=0){i=new fB(b.q.getFullYear()-nje,b.q.getMonth(),35);d=35-i.q.getDate();ZA(b,$wnd.Math.min(d,g))}else{ZA(b,g)}a.f<0&&(a.f=b.q.getHours());a.b>0&&a.f<12&&(a.f+=12);$A(b,a.f==24&&a.g?0:a.f);a.j>=0&&_A(b,a.j);a.n>=0&&bB(b,a.n);a.i>=0&&cB(b,wbb(Ibb(Abb(Cbb(b.q.getTime()),_ie),_ie),a.i));if(a.a){e=new eB;dB(e,e.q.getFullYear()-nje-80);Gbb(Cbb(b.q.getTime()),Cbb(e.q.getTime()))&&dB(b,e.q.getFullYear()-nje+100)}if(a.d>=0){if(a.c==-1){c=(7+a.d-b.q.getDay())%7;c>3&&(c-=7);h=b.q.getMonth();ZA(b,b.q.getDate()+c);b.q.getMonth()!=h&&ZA(b,b.q.getDate()+(c>0?-7:7))}else{if(b.q.getDay()!=a.d){return false}}}if(a.o>Rie){f=b.q.getTimezoneOffset();cB(b,wbb(Cbb(b.q.getTime()),(a.o-f)*60*_ie))}return true} +function z2b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=vNb(b,(wtc(),$sc));if(!JD(e,239)){return}o=BD(e,33);p=b.e;m=new g7c(b.c);f=b.d;m.a+=f.b;m.b+=f.d;u=BD(hkd(o,(Nyc(),Ixc)),174);if(uqb(u,(Idd(),Add))){n=BD(hkd(o,Kxc),116);w_b(n,f.a);z_b(n,f.d);x_b(n,f.b);y_b(n,f.c)}c=new Rkb;for(k=new olb(b.a);k.a0&&Ekb(a.p,k);Ekb(a.o,k)}b-=d;n=i+b;j+=b*a.e;Nkb(a.a,h,meb(n));Nkb(a.b,h,j);a.j=$wnd.Math.max(a.j,n);a.k=$wnd.Math.max(a.k,j);a.d+=b;b+=p}} +function Ucd(){Ucd=ccb;var a;Scd=new Ycd(ole,0);Acd=new Ycd(xle,1);zcd=new Ycd(yle,2);Rcd=new Ycd(zle,3);Tcd=new Ycd(Ale,4);Fcd=(mmb(),new zob((a=BD(gdb(F1),9),new xqb(a,BD(_Bb(a,a.length),9),0))));Gcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[])));Bcd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[])));Ocd=Up(qqb(Rcd,OC(GC(F1,1),bne,61,0,[])));Qcd=Up(qqb(Tcd,OC(GC(F1,1),bne,61,0,[])));Lcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[Rcd])));Ecd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[Tcd])));Ncd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[Tcd])));Hcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd])));Pcd=Up(qqb(Rcd,OC(GC(F1,1),bne,61,0,[Tcd])));Ccd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[Rcd])));Kcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd,Tcd])));Dcd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[Rcd,Tcd])));Mcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[Rcd,Tcd])));Icd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd,Rcd])));Jcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd,Rcd,Tcd])))} +function fSc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;if(b.b!=0){n=new Psb;h=null;o=null;d=QD($wnd.Math.floor($wnd.Math.log(b.b)*$wnd.Math.LOG10E)+1);i=0;for(t=Jsb(b,0);t.b!=t.d.c;){r=BD(Xsb(t),86);if(PD(o)!==PD(vNb(r,(mTc(),$Sc)))){o=GD(vNb(r,$Sc));i=0}o!=null?(h=o+iSc(i++,d)):(h=iSc(i++,d));yNb(r,$Sc,h);for(q=(e=Jsb((new ZRc(r)).a.d,0),new aSc(e));Wsb(q.a);){p=BD(Xsb(q.a),188).c;Gsb(n,p,n.c.b,n.c);yNb(p,$Sc,h)}}m=new Lqb;for(g=0;g=i){sCb(r.b>0);r.a.Xb(r.c=--r.b);break}else if(p.a>j){if(!e){Ekb(p.b,l);p.c=$wnd.Math.min(p.c,j);p.a=$wnd.Math.max(p.a,i);e=p}else{Gkb(e.b,p.b);e.a=$wnd.Math.max(e.a,p.a);uib(r)}}}if(!e){e=new TCc;e.c=j;e.a=i;Aib(r,e);Ekb(e.b,l)}}h=b.b;k=0;for(q=new olb(d);q.ah?1:0}if(a.b){a.b._b(f)&&(e=BD(a.b.xc(f),19).a);a.b._b(i)&&(h=BD(a.b.xc(i),19).a)}return eh?1:0}return b.e.c.length!=0&&c.g.c.length!=0?1:-1} +function acc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;Odd(b,Ine,1);p=new Rkb;w=new Rkb;for(j=new olb(a.b);j.a0&&(t-=n);h_b(g,t);k=0;for(m=new olb(g.a);m.a0);h.a.Xb(h.c=--h.b)}i=0.4*d*k;!f&&h.bb.d.c){n=a.c[b.a.d];q=a.c[l.a.d];if(n==q){continue}AFb(DFb(CFb(EFb(BFb(new FFb,1),100),n),q))}}}}}}} +function QEd(a){IEd();var b,c,d,e,f,g,h,i;if(a==null)return null;e=hfb(a,wfb(37));if(e<0){return a}else{i=new Wfb(a.substr(0,e));b=KC(SD,wte,25,4,15,1);h=0;d=0;for(g=a.length;ee+2&&_Ed((BCb(e+1,a.length),a.charCodeAt(e+1)),xEd,yEd)&&_Ed((BCb(e+2,a.length),a.charCodeAt(e+2)),xEd,yEd)){c=dFd((BCb(e+1,a.length),a.charCodeAt(e+1)),(BCb(e+2,a.length),a.charCodeAt(e+2)));e+=2;if(d>0){(c&192)==128?(b[h++]=c<<24>>24):(d=0)}else if(c>=128){if((c&224)==192){b[h++]=c<<24>>24;d=2}else if((c&240)==224){b[h++]=c<<24>>24;d=3}else if((c&248)==240){b[h++]=c<<24>>24;d=4}}if(d>0){if(h==d){switch(h){case 2:{Kfb(i,((b[0]&31)<<6|b[1]&63)&aje);break}case 3:{Kfb(i,((b[0]&15)<<12|(b[1]&63)<<6|b[2]&63)&aje);break}}h=0;d=0}}else{for(f=0;f0){if(g+d>a.length){return false}h=rA(a.substr(0,g+d),b)}else{h=rA(a,b)}}switch(f){case 71:h=oA(a,g,OC(GC(ZI,1),nie,2,6,[pje,qje]),b);e.e=h;return true;case 77:return zA(a,b,e,h,g);case 76:return BA(a,b,e,h,g);case 69:return xA(a,b,g,e);case 99:return AA(a,b,g,e);case 97:h=oA(a,g,OC(GC(ZI,1),nie,2,6,['AM','PM']),b);e.b=h;return true;case 121:return DA(a,b,g,h,c,e);case 100:if(h<=0){return false}e.c=h;return true;case 83:if(h<0){return false}return yA(h,g,b[0],e);case 104:h==12&&(h=0);case 75:case 72:if(h<0){return false}e.f=h;e.g=false;return true;case 107:if(h<0){return false}e.f=h;e.g=true;return true;case 109:if(h<0){return false}e.j=h;return true;case 115:if(h<0){return false}e.n=h;return true;case 90:if(gw&&(o.c=w-o.b);Ekb(g.d,new BLb(o,bLb(g,o)));s=b==Acd?$wnd.Math.max(s,p.b+j.b.rf().b):$wnd.Math.min(s,p.b)}s+=b==Acd?a.t:-a.t;t=cLb((g.e=s,g));t>0&&(BD(Mpb(a.b,b),124).a.b=t);for(k=m.Kc();k.Ob();){j=BD(k.Pb(),111);if(!j.c||j.c.d.c.length<=0){continue}o=j.c.i;o.c-=j.e.a;o.d-=j.e.b}} +function SPb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;b=new Lqb;for(i=new Fyd(a);i.e!=i.i.gc();){h=BD(Dyd(i),33);c=new Tqb;Rhb(OPb,h,c);n=new aQb;e=BD(GAb(new YAb(null,new Lub(new Sr(ur($sd(h).a.Kc(),new Sq)))),Wyb(n,Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)])))),83);RPb(c,BD(e.xc((Bcb(),true)),14),new cQb);d=BD(GAb(JAb(BD(e.xc(false),15).Lc(),new eQb),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[Dyb]))),15);for(g=d.Kc();g.Ob();){f=BD(g.Pb(),79);m=ktd(f);if(m){j=BD(Wd(irb(b.f,m)),21);if(!j){j=UPb(m);jrb(b.f,m,j)}ye(c,j)}}e=BD(GAb(new YAb(null,new Lub(new Sr(ur(_sd(h).a.Kc(),new Sq)))),Wyb(n,Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[Dyb])))),83);RPb(c,BD(e.xc(true),14),new gQb);d=BD(GAb(JAb(BD(e.xc(false),15).Lc(),new iQb),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[Dyb]))),15);for(l=d.Kc();l.Ob();){k=BD(l.Pb(),79);m=mtd(k);if(m){j=BD(Wd(irb(b.f,m)),21);if(!j){j=UPb(m);jrb(b.f,m,j)}ye(c,j)}}}} +function rhb(a,b){phb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p;i=ybb(a,0)<0;i&&(a=Jbb(a));if(ybb(a,0)==0){switch(b){case 0:return '0';case 1:return $je;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:n=new Ufb;b<0?(n.a+='0E+',n):(n.a+='0E',n);n.a+=b==Rie?'2147483648':''+-b;return n.a;}}k=18;l=KC(TD,$ie,25,k+1,15,1);c=k;p=a;do{j=p;p=Abb(p,10);l[--c]=Tbb(wbb(48,Qbb(j,Ibb(p,10))))&aje}while(ybb(p,0)!=0);e=Qbb(Qbb(Qbb(k,c),b),1);if(b==0){i&&(l[--c]=45);return zfb(l,c,k-c)}if(b>0&&ybb(e,-6)>=0){if(ybb(e,0)>=0){f=c+Tbb(e);for(h=k-1;h>=f;h--){l[h+1]=l[h]}l[++f]=46;i&&(l[--c]=45);return zfb(l,c,k-c+1)}for(g=2;Gbb(g,wbb(Jbb(e),1));g++){l[--c]=48}l[--c]=46;l[--c]=48;i&&(l[--c]=45);return zfb(l,c,k-c)}o=c+1;d=k;m=new Vfb;i&&(m.a+='-',m);if(d-o>=1){Kfb(m,l[c]);m.a+='.';m.a+=zfb(l,c+1,k-c-1)}else{m.a+=zfb(l,c,k-c)}m.a+='E';ybb(e,0)>0&&(m.a+='+',m);m.a+=''+Ubb(e);return m.a} +function iQc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;a.e.a.$b();a.f.a.$b();a.c.c=KC(SI,Uhe,1,0,5,1);a.i.c=KC(SI,Uhe,1,0,5,1);a.g.a.$b();if(b){for(g=new olb(b.a);g.a=1){if(v-j>0&&o>=0){dld(l,l.i+u);eld(l,l.j+i*j)}else if(v-j<0&&n>=0){dld(l,l.i+u*v);eld(l,l.j+i)}}}}jkd(a,(Y9c(),Y8c),(tdd(),f=BD(gdb(I1),9),new xqb(f,BD(_Bb(f,f.length),9),0)));return new f7c(w,k)} +function Yfd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;n=Xod(atd(BD(qud((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b),0),82)));o=Xod(atd(BD(qud((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c),0),82)));l=n==o;h=new d7c;b=BD(hkd(a,(Zad(),Sad)),74);if(!!b&&b.b>=2){if((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i==0){c=(Fhd(),e=new rmd,e);wtd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a),c)}else if((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i>1){m=new Oyd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a));while(m.e!=m.i.gc()){Eyd(m)}}ifd(b,BD(qud((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a),0),202))}if(l){for(d=new Fyd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a));d.e!=d.i.gc();){c=BD(Dyd(d),202);for(j=new Fyd((!c.a&&(c.a=new xMd(y2,c,5)),c.a));j.e!=j.i.gc();){i=BD(Dyd(j),469);h.a=$wnd.Math.max(h.a,i.a);h.b=$wnd.Math.max(h.b,i.b)}}}for(g=new Fyd((!a.n&&(a.n=new cUd(D2,a,1,7)),a.n));g.e!=g.i.gc();){f=BD(Dyd(g),137);k=BD(hkd(f,Yad),8);!!k&&bld(f,k.a,k.b);if(l){h.a=$wnd.Math.max(h.a,f.i+f.g);h.b=$wnd.Math.max(h.b,f.j+f.f)}}return h} +function yMc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;t=b.c.length;e=new ULc(a.a,c,null,null);B=KC(UD,Vje,25,t,15,1);p=KC(UD,Vje,25,t,15,1);o=KC(UD,Vje,25,t,15,1);q=0;for(h=0;hB[i]&&(q=i);for(l=new olb(a.a.b);l.an){if(f){Fsb(w,m);Fsb(B,meb(j.b-1))}H=c.b;I+=m+b;m=0;k=$wnd.Math.max(k,c.b+c.c+G)}dld(h,H);eld(h,I);k=$wnd.Math.max(k,H+G+c.c);m=$wnd.Math.max(m,l);H+=G+b}k=$wnd.Math.max(k,d);F=I+m+c.a;if(Fqme;C=$wnd.Math.abs(m.b-o.b)>qme;(!c&&B&&C||c&&(B||C))&&Dsb(q.a,u)}ye(q.a,d);d.b==0?(m=u):(m=(sCb(d.b!=0),BD(d.c.b.c,8)));bZb(n,l,p);if(AZb(e)==A){if(Q_b(A.i)!=e.a){p=new d7c;Y$b(p,Q_b(A.i),s)}yNb(q,utc,p)}cZb(n,q,s);k.a.zc(n,k)}QZb(q,v);RZb(q,A)}for(j=k.a.ec().Kc();j.Ob();){i=BD(j.Pb(),17);QZb(i,null);RZb(i,null)}Qdd(b)} +function KQb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a.gc()==1){return BD(a.Xb(0),231)}else if(a.gc()<=0){return new kRb}for(e=a.Kc();e.Ob();){c=BD(e.Pb(),231);o=0;k=Ohe;l=Ohe;i=Rie;j=Rie;for(n=new olb(c.e);n.ah){t=0;u+=g+r;g=0}JQb(p,c,t,u);b=$wnd.Math.max(b,t+q.a);g=$wnd.Math.max(g,q.b);t+=q.a+r}return p} +function Ioc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;k=new s7c;switch(a.a.g){case 3:m=BD(vNb(b.e,(wtc(),rtc)),15);n=BD(vNb(b.j,rtc),15);o=BD(vNb(b.f,rtc),15);c=BD(vNb(b.e,ptc),15);d=BD(vNb(b.j,ptc),15);e=BD(vNb(b.f,ptc),15);g=new Rkb;Gkb(g,m);n.Jc(new Loc);Gkb(g,JD(n,152)?km(BD(n,152)):JD(n,131)?BD(n,131).a:JD(n,54)?new ov(n):new dv(n));Gkb(g,o);f=new Rkb;Gkb(f,c);Gkb(f,JD(d,152)?km(BD(d,152)):JD(d,131)?BD(d,131).a:JD(d,54)?new ov(d):new dv(d));Gkb(f,e);yNb(b.f,rtc,g);yNb(b.f,ptc,f);yNb(b.f,stc,b.f);yNb(b.e,rtc,null);yNb(b.e,ptc,null);yNb(b.j,rtc,null);yNb(b.j,ptc,null);break;case 1:ye(k,b.e.a);Dsb(k,b.i.n);ye(k,Su(b.j.a));Dsb(k,b.a.n);ye(k,b.f.a);break;default:ye(k,b.e.a);ye(k,Su(b.j.a));ye(k,b.f.a);}Osb(b.f.a);ye(b.f.a,k);QZb(b.f,b.e.c);h=BD(vNb(b.e,(Nyc(),jxc)),74);j=BD(vNb(b.j,jxc),74);i=BD(vNb(b.f,jxc),74);if(!!h||!!j||!!i){l=new s7c;Goc(l,i);Goc(l,j);Goc(l,h);yNb(b.f,jxc,l)}QZb(b.j,null);RZb(b.j,null);QZb(b.e,null);RZb(b.e,null);$_b(b.a,null);$_b(b.i,null);!!b.g&&Ioc(a,b.g)} +function bde(a){ade();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;f=rfb(a);o=ede(f);if(o%4!=0){return null}p=o/4|0;if(p==0)return KC(SD,wte,25,0,15,1);l=null;b=0;c=0;d=0;e=0;g=0;h=0;i=0;j=0;n=0;m=0;k=0;l=KC(SD,wte,25,p*3,15,1);for(;n>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}if(!dde(g=f[k++])||!dde(h=f[k++])){return null}b=$ce[g];c=$ce[h];i=f[k++];j=f[k++];if($ce[i]==-1||$ce[j]==-1){if(i==61&&j==61){if((c&15)!=0)return null;q=KC(SD,wte,25,n*3+1,15,1);$fb(l,0,q,0,n*3);q[m]=(b<<2|c>>4)<<24>>24;return q}else if(i!=61&&j==61){d=$ce[i];if((d&3)!=0)return null;q=KC(SD,wte,25,n*3+2,15,1);$fb(l,0,q,0,n*3);q[m++]=(b<<2|c>>4)<<24>>24;q[m]=((c&15)<<4|d>>2&15)<<24>>24;return q}else{return null}}else{d=$ce[i];e=$ce[j];l[m++]=(b<<2|c>>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}return l} +function Sbc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;Odd(b,Ine,1);o=BD(vNb(a,(Nyc(),Swc)),218);for(e=new olb(a.b);e.a=2){p=true;m=new olb(f.j);c=BD(mlb(m),11);n=null;while(m.a0){e=BD(Ikb(q.c.a,w-1),10);g=a.i[e.p];B=$wnd.Math.ceil(jBc(a.n,e,q));f=v.a.e-q.d.d-(g.a.e+e.o.b+e.d.a)-B}j=Pje;if(w0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)<0;o=t.a.e.e-t.a.a-(t.b.e.e-t.b.a)<0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)>0;n=t.a.e.e+t.b.aA.b.e.e+A.a.a;u=0;!p&&!o&&(m?f+l>0?(u=l):j-d>0&&(u=d):n&&(f+h>0?(u=h):j-s>0&&(u=s)));v.a.e+=u;v.b&&(v.d.e+=u);return false} +function XGb(a,b,c){var d,e,f,g,h,i,j,k,l,m;d=new J6c(b.qf().a,b.qf().b,b.rf().a,b.rf().b);e=new I6c;if(a.c){for(g=new olb(b.wf());g.aj&&(d.a+=yfb(KC(TD,$ie,25,-j,15,1)));d.a+='Is';if(hfb(i,wfb(32))>=0){for(e=0;e=d.o.b/2}else{s=!l}if(s){r=BD(vNb(d,(wtc(),vtc)),15);if(!r){f=new Rkb;yNb(d,vtc,f)}else if(m){f=r}else{e=BD(vNb(d,tsc),15);if(!e){f=new Rkb;yNb(d,tsc,f)}else{r.gc()<=e.gc()?(f=r):(f=e)}}}else{e=BD(vNb(d,(wtc(),tsc)),15);if(!e){f=new Rkb;yNb(d,tsc,f)}else if(l){f=e}else{r=BD(vNb(d,vtc),15);if(!r){f=new Rkb;yNb(d,vtc,f)}else{e.gc()<=r.gc()?(f=e):(f=r)}}}f.Fc(a);yNb(a,(wtc(),vsc),c);if(b.d==c){RZb(b,null);c.e.c.length+c.g.c.length==0&&F0b(c,null);d3b(c)}else{QZb(b,null);c.e.c.length+c.g.c.length==0&&F0b(c,null)}Osb(b.a)} +function aoc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;s=new Bib(a.b,0);k=b.Kc();o=0;j=BD(k.Pb(),19).a;v=0;c=new Tqb;A=new zsb;while(s.b=a.a){d=E6b(a,s);k=$wnd.Math.max(k,d.b);u=$wnd.Math.max(u,d.d);Ekb(h,new vgd(s,d))}}B=new Rkb;for(j=0;j0),q.a.Xb(q.c=--q.b),C=new H1b(a.b),Aib(q,C),sCb(q.b0){j=0;!!q&&(j+=h);j+=(C-1)*g;!!t&&(j+=h);B&&!!t&&(j=$wnd.Math.max(j,jQc(t,g,s,A)));if(j0){m=k<100?null:new Ixd(k);j=new Aud(b);o=j.g;r=KC(WD,oje,25,k,15,1);d=0;u=new zud(k);for(e=0;e=0;){if(n!=null?pb(n,o[i]):PD(n)===PD(o[i])){if(r.length<=d){q=r;r=KC(WD,oje,25,2*r.length,15,1);$fb(q,0,r,0,d)}r[d++]=e;wtd(u,o[i]);break v}}n=n;if(PD(n)===PD(h)){break}}}j=u;o=u.g;k=d;if(d>r.length){q=r;r=KC(WD,oje,25,d,15,1);$fb(q,0,r,0,d)}if(d>0){t=true;for(f=0;f=0;){tud(a,r[g])}if(d!=k){for(e=k;--e>=d;){tud(j,e)}q=r;r=KC(WD,oje,25,d,15,1);$fb(q,0,r,0,d)}b=j}}}else{b=Ctd(a,b);for(e=a.i;--e>=0;){if(b.Hc(a.g[e])){tud(a,e);t=true}}}if(t){if(r!=null){c=b.gc();l=c==1?FLd(a,4,b.Kc().Pb(),null,r[0],p):FLd(a,6,b,r,r[0],p);m=c<100?null:new Ixd(c);for(e=b.Kc();e.Ob();){n=e.Pb();m=Q2d(a,BD(n,72),m)}if(!m){Uhd(a.e,l)}else{m.Ei(l);m.Fi()}}else{m=Vxd(b.gc());for(e=b.Kc();e.Ob();){n=e.Pb();m=Q2d(a,BD(n,72),m)}!!m&&m.Fi()}return true}else{return false}} +function fYb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=new mYb(b);c.a||$Xb(b);j=ZXb(b);i=new Hp;q=new AYb;for(p=new olb(b.a);p.a0||c.o==dMc&&e0){l=BD(Ikb(m.c.a,g-1),10);B=jBc(a.b,m,l);q=m.n.b-m.d.d-(l.n.b+l.o.b+l.d.a+B)}else{q=m.n.b-m.d.d}j=$wnd.Math.min(q,j);if(gg?Anc(a,b,c):Anc(a,c,b);return eg?1:0}}d=BD(vNb(b,(wtc(),Zsc)),19).a;f=BD(vNb(c,Zsc),19).a;d>f?Anc(a,b,c):Anc(a,c,b);return df?1:0} +function u2c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;if(Ccb(DD(hkd(b,(Y9c(),d9c))))){return mmb(),mmb(),jmb}j=(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a).i!=0;l=s2c(b);k=!l.dc();if(j||k){e=BD(hkd(b,F9c),149);if(!e){throw vbb(new y2c('Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.'))}s=D3c(e,(Csd(),ysd));q2c(b);if(!j&&k&&!s){return mmb(),mmb(),jmb}i=new Rkb;if(PD(hkd(b,J8c))===PD((hbd(),ebd))&&(D3c(e,vsd)||D3c(e,usd))){n=p2c(a,b);o=new Psb;ye(o,(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a));while(o.b!=0){m=BD(o.b==0?null:(sCb(o.b!=0),Nsb(o,o.a.a)),33);q2c(m);r=PD(hkd(m,J8c))===PD(gbd);if(r||ikd(m,o8c)&&!C3c(e,hkd(m,F9c))){h=u2c(a,m,c,d);Gkb(i,h);jkd(m,J8c,gbd);hfd(m)}else{ye(o,(!m.a&&(m.a=new cUd(E2,m,10,11)),m.a))}}}else{n=(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a).i;for(g=new Fyd((!b.a&&(b.a=new cUd(E2,b,10,11)),b.a));g.e!=g.i.gc();){f=BD(Dyd(g),33);h=u2c(a,f,c,d);Gkb(i,h);hfd(f)}}for(q=new olb(i);q.a=0?(n=Zcd(h)):(n=Wcd(Zcd(h)));a.Ye($xc,n)}j=new d7c;m=false;if(a.Xe(Txc)){a7c(j,BD(a.We(Txc),8));m=true}else{_6c(j,g.a/2,g.b/2)}switch(n.g){case 4:yNb(k,mxc,(Ctc(),ytc));yNb(k,Bsc,(Gqc(),Fqc));k.o.b=g.b;p<0&&(k.o.a=-p);G0b(l,(Ucd(),zcd));m||(j.a=g.a);j.a-=g.a;break;case 2:yNb(k,mxc,(Ctc(),Atc));yNb(k,Bsc,(Gqc(),Dqc));k.o.b=g.b;p<0&&(k.o.a=-p);G0b(l,(Ucd(),Tcd));m||(j.a=0);break;case 1:yNb(k,Osc,(esc(),dsc));k.o.a=g.a;p<0&&(k.o.b=-p);G0b(l,(Ucd(),Rcd));m||(j.b=g.b);j.b-=g.b;break;case 3:yNb(k,Osc,(esc(),bsc));k.o.a=g.a;p<0&&(k.o.b=-p);G0b(l,(Ucd(),Acd));m||(j.b=0);}a7c(l.n,j);yNb(k,Txc,j);if(b==Zbd||b==_bd||b==$bd){o=0;if(b==Zbd&&a.Xe(Wxc)){switch(n.g){case 1:case 2:o=BD(a.We(Wxc),19).a;break;case 3:case 4:o=-BD(a.We(Wxc),19).a;}}else{switch(n.g){case 4:case 2:o=f.b;b==_bd&&(o/=e.b);break;case 1:case 3:o=f.a;b==_bd&&(o/=e.a);}}yNb(k,htc,o)}yNb(k,Hsc,n);return k} +function AGc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;c=Edb(ED(vNb(a.a.j,(Nyc(),Ewc))));if(c<-1||!a.a.i||ecd(BD(vNb(a.a.o,Vxc),98))||V_b(a.a.o,(Ucd(),zcd)).gc()<2&&V_b(a.a.o,Tcd).gc()<2){return true}if(a.a.c.Rf()){return false}v=0;u=0;t=new Rkb;for(i=a.a.e,j=0,k=i.length;j=c} +function ovd(){mvd();function h(f){var g=this;this.dispatch=function(a){var b=a.data;switch(b.cmd){case 'algorithms':var c=pvd((mmb(),new lnb(new $ib(lvd.b))));f.postMessage({id:b.id,data:c});break;case 'categories':var d=pvd((mmb(),new lnb(new $ib(lvd.c))));f.postMessage({id:b.id,data:d});break;case 'options':var e=pvd((mmb(),new lnb(new $ib(lvd.d))));f.postMessage({id:b.id,data:e});break;case 'register':svd(b.algorithms);f.postMessage({id:b.id});break;case 'layout':qvd(b.graph,b.layoutOptions||{},b.options||{});f.postMessage({id:b.id,data:b.graph});break;}};this.saveDispatch=function(b){try{g.dispatch(b)}catch(a){f.postMessage({id:b.data.id,error:a})}}} +function j(b){var c=this;this.dispatcher=new h({postMessage:function(a){c.onmessage({data:a})}});this.postMessage=function(a){setTimeout(function(){c.dispatcher.saveDispatch({data:a})},0)}} +if(typeof document===uke&&typeof self!==uke){var i=new h(self);self.onmessage=i.saveDispatch}else if(typeof module!==uke&&module.exports){Object.defineProperty(exports,'__esModule',{value:true});module.exports={'default':j,Worker:j}}} +function aae(a){if(a.N)return;a.N=true;a.b=Lnd(a,0);Knd(a.b,0);Knd(a.b,1);Knd(a.b,2);a.bb=Lnd(a,1);Knd(a.bb,0);Knd(a.bb,1);a.fb=Lnd(a,2);Knd(a.fb,3);Knd(a.fb,4);Qnd(a.fb,5);a.qb=Lnd(a,3);Knd(a.qb,0);Qnd(a.qb,1);Qnd(a.qb,2);Knd(a.qb,3);Knd(a.qb,4);Qnd(a.qb,5);Knd(a.qb,6);a.a=Mnd(a,4);a.c=Mnd(a,5);a.d=Mnd(a,6);a.e=Mnd(a,7);a.f=Mnd(a,8);a.g=Mnd(a,9);a.i=Mnd(a,10);a.j=Mnd(a,11);a.k=Mnd(a,12);a.n=Mnd(a,13);a.o=Mnd(a,14);a.p=Mnd(a,15);a.q=Mnd(a,16);a.s=Mnd(a,17);a.r=Mnd(a,18);a.t=Mnd(a,19);a.u=Mnd(a,20);a.v=Mnd(a,21);a.w=Mnd(a,22);a.B=Mnd(a,23);a.A=Mnd(a,24);a.C=Mnd(a,25);a.D=Mnd(a,26);a.F=Mnd(a,27);a.G=Mnd(a,28);a.H=Mnd(a,29);a.J=Mnd(a,30);a.I=Mnd(a,31);a.K=Mnd(a,32);a.M=Mnd(a,33);a.L=Mnd(a,34);a.P=Mnd(a,35);a.Q=Mnd(a,36);a.R=Mnd(a,37);a.S=Mnd(a,38);a.T=Mnd(a,39);a.U=Mnd(a,40);a.V=Mnd(a,41);a.X=Mnd(a,42);a.W=Mnd(a,43);a.Y=Mnd(a,44);a.Z=Mnd(a,45);a.$=Mnd(a,46);a._=Mnd(a,47);a.ab=Mnd(a,48);a.cb=Mnd(a,49);a.db=Mnd(a,50);a.eb=Mnd(a,51);a.gb=Mnd(a,52);a.hb=Mnd(a,53);a.ib=Mnd(a,54);a.jb=Mnd(a,55);a.kb=Mnd(a,56);a.lb=Mnd(a,57);a.mb=Mnd(a,58);a.nb=Mnd(a,59);a.ob=Mnd(a,60);a.pb=Mnd(a,61)} +function f5b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=0;if(b.f.a==0){for(q=new olb(a);q.aj&&(tCb(j,b.c.length),BD(b.c[j],200)).a.c.length==0){Lkb(b,(tCb(j,b.c.length),b.c[j]))}}if(!i){--f;continue}if(uZc(b,k,e,i,m,c,j,d)){l=true;continue}if(m){if(vZc(b,k,e,i,c,j,d)){l=true;continue}else if(wZc(k,e)){e.c=true;l=true;continue}}else if(wZc(k,e)){e.c=true;l=true;continue}if(l){continue}}if(wZc(k,e)){e.c=true;l=true;!!i&&(i.k=false);continue}else{a$c(e.q)}}return l} +function fed(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;p=0;D=0;for(j=new olb(a.b);j.ap){if(f){Fsb(w,n);Fsb(B,meb(k.b-1));Ekb(a.d,o);h.c=KC(SI,Uhe,1,0,5,1)}H=c.b;I+=n+b;n=0;l=$wnd.Math.max(l,c.b+c.c+G)}h.c[h.c.length]=i;ued(i,H,I);l=$wnd.Math.max(l,H+G+c.c);n=$wnd.Math.max(n,m);H+=G+b;o=i}Gkb(a.a,h);Ekb(a.d,BD(Ikb(h,h.c.length-1),157));l=$wnd.Math.max(l,d);F=I+n+c.a;if(F1&&(g=$wnd.Math.min(g,$wnd.Math.abs(BD(Ut(h.a,1),8).b-k.b)))}}}}}else{for(p=new olb(b.j);p.ae){f=m.a-e;g=Ohe;d.c=KC(SI,Uhe,1,0,5,1);e=m.a}if(m.a>=e){d.c[d.c.length]=h;h.a.b>1&&(g=$wnd.Math.min(g,$wnd.Math.abs(BD(Ut(h.a,h.a.b-2),8).b-m.b)))}}}}}if(d.c.length!=0&&f>b.o.a/2&&g>b.o.b/2){n=new H0b;F0b(n,b);G0b(n,(Ucd(),Acd));n.n.a=b.o.a/2;r=new H0b;F0b(r,b);G0b(r,Rcd);r.n.a=b.o.a/2;r.n.b=b.o.b;for(i=new olb(d);i.a=j.b?QZb(h,r):QZb(h,n)}else{j=BD(Msb(h.a),8);q=h.a.b==0?A0b(h.c):BD(Isb(h.a),8);q.b>=j.b?RZb(h,r):RZb(h,n)}l=BD(vNb(h,(Nyc(),jxc)),74);!!l&&ze(l,j,true)}b.n.a=e-b.o.a/2}} +function erd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K;D=null;G=b;F=Rqd(a,dtd(c),G);Lkd(F,_pd(G,Vte));H=BD(oo(a.g,Vpd(aC(G,Cte))),33);m=aC(G,'sourcePort');d=null;!!m&&(d=Vpd(m));I=BD(oo(a.j,d),118);if(!H){h=Wpd(G);o="An edge must have a source node (edge id: '"+h;p=o+$te;throw vbb(new cqd(p))}if(!!I&&!Hb(mpd(I),H)){i=_pd(G,Vte);q="The source port of an edge must be a port of the edge's source node (edge id: '"+i;r=q+$te;throw vbb(new cqd(r))}B=(!F.b&&(F.b=new y5d(z2,F,4,7)),F.b);f=null;I?(f=I):(f=H);wtd(B,f);J=BD(oo(a.g,Vpd(aC(G,bue))),33);n=aC(G,'targetPort');e=null;!!n&&(e=Vpd(n));K=BD(oo(a.j,e),118);if(!J){l=Wpd(G);s="An edge must have a target node (edge id: '"+l;t=s+$te;throw vbb(new cqd(t))}if(!!K&&!Hb(mpd(K),J)){j=_pd(G,Vte);u="The target port of an edge must be a port of the edge's target node (edge id: '"+j;v=u+$te;throw vbb(new cqd(v))}C=(!F.c&&(F.c=new y5d(z2,F,5,8)),F.c);g=null;K?(g=K):(g=J);wtd(C,g);if((!F.b&&(F.b=new y5d(z2,F,4,7)),F.b).i==0||(!F.c&&(F.c=new y5d(z2,F,5,8)),F.c).i==0){k=_pd(G,Vte);w=Zte+k;A=w+$te;throw vbb(new cqd(A))}grd(G,F);frd(G,F);D=crd(a,G,F);return D} +function DXb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;l=FXb(zXb(a,(Ucd(),Fcd)),b);o=EXb(zXb(a,Gcd),b);u=EXb(zXb(a,Ocd),b);B=GXb(zXb(a,Qcd),b);m=GXb(zXb(a,Bcd),b);s=EXb(zXb(a,Ncd),b);p=EXb(zXb(a,Hcd),b);w=EXb(zXb(a,Pcd),b);v=EXb(zXb(a,Ccd),b);C=GXb(zXb(a,Ecd),b);r=EXb(zXb(a,Lcd),b);t=EXb(zXb(a,Kcd),b);A=EXb(zXb(a,Dcd),b);D=GXb(zXb(a,Mcd),b);n=GXb(zXb(a,Icd),b);q=EXb(zXb(a,Jcd),b);c=w6c(OC(GC(UD,1),Vje,25,15,[s.a,B.a,w.a,D.a]));d=w6c(OC(GC(UD,1),Vje,25,15,[o.a,l.a,u.a,q.a]));e=r.a;f=w6c(OC(GC(UD,1),Vje,25,15,[p.a,m.a,v.a,n.a]));j=w6c(OC(GC(UD,1),Vje,25,15,[s.b,o.b,p.b,t.b]));i=w6c(OC(GC(UD,1),Vje,25,15,[B.b,l.b,m.b,q.b]));k=C.b;h=w6c(OC(GC(UD,1),Vje,25,15,[w.b,u.b,v.b,A.b]));vXb(zXb(a,Fcd),c+e,j+k);vXb(zXb(a,Jcd),c+e,j+k);vXb(zXb(a,Gcd),c+e,0);vXb(zXb(a,Ocd),c+e,j+k+i);vXb(zXb(a,Qcd),0,j+k);vXb(zXb(a,Bcd),c+e+d,j+k);vXb(zXb(a,Hcd),c+e+d,0);vXb(zXb(a,Pcd),0,j+k+i);vXb(zXb(a,Ccd),c+e+d,j+k+i);vXb(zXb(a,Ecd),0,j);vXb(zXb(a,Lcd),c,0);vXb(zXb(a,Dcd),0,j+k+i);vXb(zXb(a,Icd),c+e+d,0);g=new d7c;g.a=w6c(OC(GC(UD,1),Vje,25,15,[c+d+e+f,C.a,t.a,A.a]));g.b=w6c(OC(GC(UD,1),Vje,25,15,[j+i+k+h,r.b,D.b,n.b]));return g} +function Ngc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;p=new Rkb;for(m=new olb(a.d.b);m.ae.d.d+e.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}d.b!=d.d.c&&(b=c)}if(k){f=BD(Ohb(a.f,g.d.i),57);if(b.bf.d.d+f.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}}for(h=new Sr(ur(R_b(n).a.Kc(),new Sq));Qr(h);){g=BD(Rr(h),17);if(g.a.b!=0){b=BD(Isb(g.a),8);if(g.d.j==(Ucd(),Acd)){q=new hic(b,new f7c(b.a,e.d.d),e,g);q.f.a=true;q.a=g.d;p.c[p.c.length]=q}if(g.d.j==Rcd){q=new hic(b,new f7c(b.a,e.d.d+e.d.a),e,g);q.f.d=true;q.a=g.d;p.c[p.c.length]=q}}}}}return p} +function WJc(a,b,c){var d,e,f,g,h,i,j,k,l;Odd(c,'Network simplex node placement',1);a.e=b;a.n=BD(vNb(b,(wtc(),otc)),304);VJc(a);HJc(a);MAb(LAb(new YAb(null,new Kub(a.e.b,16)),new KKc),new MKc(a));MAb(JAb(LAb(JAb(LAb(new YAb(null,new Kub(a.e.b,16)),new zLc),new BLc),new DLc),new FLc),new IKc(a));if(Ccb(DD(vNb(a.e,(Nyc(),Axc))))){g=Udd(c,1);Odd(g,'Straight Edges Pre-Processing',1);UJc(a);Qdd(g)}JFb(a.f);f=BD(vNb(b,Ayc),19).a*a.f.a.c.length;uGb(HGb(IGb(LGb(a.f),f),false),Udd(c,1));if(a.d.a.gc()!=0){g=Udd(c,1);Odd(g,'Flexible Where Space Processing',1);h=BD(Btb(RAb(NAb(new YAb(null,new Kub(a.f.a,16)),new OKc),new iKc)),19).a;i=BD(Btb(QAb(NAb(new YAb(null,new Kub(a.f.a,16)),new QKc),new mKc)),19).a;j=i-h;k=nGb(new pGb,a.f);l=nGb(new pGb,a.f);AFb(DFb(CFb(BFb(EFb(new FFb,20000),j),k),l));MAb(JAb(JAb(Plb(a.i),new SKc),new UKc),new WKc(h,k,j,l));for(e=a.d.a.ec().Kc();e.Ob();){d=BD(e.Pb(),213);d.g=1}uGb(HGb(IGb(LGb(a.f),f),false),Udd(g,1));Qdd(g)}if(Ccb(DD(vNb(b,Axc)))){g=Udd(c,1);Odd(g,'Straight Edges Post-Processing',1);TJc(a);Qdd(g)}GJc(a);a.e=null;a.f=null;a.i=null;a.c=null;Uhb(a.k);a.j=null;a.a=null;a.o=null;a.d.a.$b();Qdd(c)} +function lMc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;for(h=new olb(a.a.b);h.a0){d=l.gc();j=QD($wnd.Math.floor((d+1)/2))-1;e=QD($wnd.Math.ceil((d+1)/2))-1;if(b.o==dMc){for(k=e;k>=j;k--){if(b.a[u.p]==u){p=BD(l.Xb(k),46);o=BD(p.a,10);if(!Rqb(c,p.b)&&n>a.b.e[o.p]){b.a[o.p]=u;b.g[u.p]=b.g[o.p];b.a[u.p]=b.g[u.p];b.f[b.g[u.p].p]=(Bcb(),Ccb(b.f[b.g[u.p].p])&u.k==(j0b(),g0b)?true:false);n=a.b.e[o.p]}}}}else{for(k=j;k<=e;k++){if(b.a[u.p]==u){r=BD(l.Xb(k),46);q=BD(r.a,10);if(!Rqb(c,r.b)&&n=o){if(s>o){n.c=KC(SI,Uhe,1,0,5,1);o=s}n.c[n.c.length]=g}}if(n.c.length!=0){m=BD(Ikb(n,Bub(b,n.c.length)),128);F.a.Bc(m)!=null;m.s=p++;AQc(m,C,w);n.c=KC(SI,Uhe,1,0,5,1)}}u=a.c.length+1;for(h=new olb(a);h.aD.s){uib(c);Lkb(D.i,d);if(d.c>0){d.a=D;Ekb(D.t,d);d.b=A;Ekb(A.i,d)}}}}} +function qde(a){var b,c,d,e,f;b=a.c;switch(b){case 11:return a.Ml();case 12:return a.Ol();case 14:return a.Ql();case 15:return a.Tl();case 16:return a.Rl();case 17:return a.Ul();case 21:nde(a);return wfe(),wfe(),ffe;case 10:switch(a.a){case 65:return a.yl();case 90:return a.Dl();case 122:return a.Kl();case 98:return a.El();case 66:return a.zl();case 60:return a.Jl();case 62:return a.Hl();}}f=pde(a);b=a.c;switch(b){case 3:return a.Zl(f);case 4:return a.Xl(f);case 5:return a.Yl(f);case 0:if(a.a==123&&a.d=48&&b<=57){d=b-48;while(e=48&&b<=57){d=d*10+b-48;if(d<0)throw vbb(new mde(tvd((h0d(),bve))))}}else{throw vbb(new mde(tvd((h0d(),Zue))))}c=d;if(b==44){if(e>=a.j){throw vbb(new mde(tvd((h0d(),_ue))))}else if((b=bfb(a.i,e++))>=48&&b<=57){c=b-48;while(e=48&&b<=57){c=c*10+b-48;if(c<0)throw vbb(new mde(tvd((h0d(),bve))))}if(d>c)throw vbb(new mde(tvd((h0d(),ave))))}else{c=-1}}if(b!=125)throw vbb(new mde(tvd((h0d(),$ue))));if(a.sl(e)){f=(wfe(),wfe(),++vfe,new lge(9,f));a.d=e+1}else{f=(wfe(),wfe(),++vfe,new lge(3,f));a.d=e}f.dm(d);f.cm(c);nde(a)}}return f} +function $bc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;p=new Skb(b.b);u=new Skb(b.b);m=new Skb(b.b);B=new Skb(b.b);q=new Skb(b.b);for(A=Jsb(b,0);A.b!=A.d.c;){v=BD(Xsb(A),11);for(h=new olb(v.g);h.a0;r=v.g.c.length>0;j&&r?(m.c[m.c.length]=v,true):j?(p.c[p.c.length]=v,true):r&&(u.c[u.c.length]=v,true)}for(o=new olb(p);o.a1){o=new Oyd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a));while(o.e!=o.i.gc()){Eyd(o)}}g=BD(qud((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a),0),202);q=H;H>v+u?(q=v+u):Hw+p?(r=w+p):Iv-u&&qw-p&&rH+G?(B=H+G):vI+A?(C=I+A):wH-G&&BI-A&&Cc&&(m=c-1);n=N+Cub(b,24)*lke*l-l/2;n<0?(n=1):n>d&&(n=d-1);e=(Fhd(),i=new xkd,i);vkd(e,m);wkd(e,n);wtd((!g.a&&(g.a=new xMd(y2,g,5)),g.a),e)}} +function Nyc(){Nyc=ccb;iyc=(Y9c(),I9c);jyc=J9c;kyc=K9c;lyc=L9c;nyc=M9c;oyc=N9c;ryc=P9c;tyc=R9c;uyc=S9c;syc=Q9c;vyc=T9c;xyc=U9c;zyc=X9c;qyc=O9c;hyc=(jwc(),Bvc);myc=Cvc;pyc=Dvc;wyc=Evc;byc=new Osd(D9c,meb(0));cyc=yvc;dyc=zvc;eyc=Avc;Kyc=awc;Cyc=Hvc;Dyc=Kvc;Gyc=Svc;Eyc=Nvc;Fyc=Pvc;Myc=fwc;Lyc=cwc;Iyc=Yvc;Hyc=Wvc;Jyc=$vc;Cxc=pvc;Dxc=qvc;Xwc=Auc;Ywc=Duc;Lxc=new q0b(12);Kxc=new Osd(f9c,Lxc);Twc=(Aad(),wad);Swc=new Osd(E8c,Twc);Uxc=new Osd(s9c,0);fyc=new Osd(E9c,meb(1));owc=new Osd(r8c,tme);Jxc=d9c;Vxc=t9c;$xc=A9c;Kwc=y8c;mwc=p8c;axc=J8c;gyc=new Osd(H9c,(Bcb(),true));fxc=M8c;gxc=N8c;Fxc=Y8c;Ixc=b9c;Gxc=$8c;Nwc=(ead(),cad);Lwc=new Osd(z8c,Nwc);xxc=W8c;wxc=U8c;Yxc=x9c;Xxc=w9c;Zxc=z9c;Oxc=(Tbd(),Sbd);new Osd(l9c,Oxc);Qxc=o9c;Rxc=p9c;Sxc=q9c;Pxc=n9c;Byc=Gvc;sxc=avc;rxc=$uc;Ayc=Fvc;mxc=Suc;Jwc=muc;Iwc=kuc;Awc=Xtc;Bwc=Ytc;Dwc=buc;Cwc=Ztc;Hwc=iuc;uxc=cvc;vxc=dvc;ixc=Luc;Exc=uvc;zxc=hvc;$wc=Guc;Bxc=nvc;Vwc=wuc;Wwc=yuc;zwc=w8c;yxc=evc;swc=Mtc;rwc=Ktc;qwc=Jtc;cxc=Juc;bxc=Iuc;dxc=Kuc;Hxc=_8c;jxc=Q8c;Zwc=G8c;Qwc=C8c;Pwc=B8c;Ewc=euc;Wxc=v9c;pwc=v8c;exc=L8c;Txc=r9c;Mxc=h9c;Nxc=j9c;oxc=Vuc;pxc=Xuc;ayc=C9c;nwc=Itc;qxc=Zuc;Rwc=suc;Owc=quc;txc=S8c;kxc=Puc;Axc=kvc;yyc=V9c;Mwc=ouc;_xc=wvc;Uwc=uuc;lxc=Ruc;Fwc=guc;hxc=P8c;nxc=Uuc;Gwc=huc;ywc=Vtc;wwc=Stc;uwc=Qtc;vwc=Rtc;xwc=Utc;twc=Otc;_wc=Huc} +function shb(a,b){phb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;B=a.e;o=a.d;e=a.a;if(B==0){switch(b){case 0:return '0';case 1:return $je;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:w=new Ufb;b<0?(w.a+='0E+',w):(w.a+='0E',w);w.a+=-b;return w.a;}}t=o*10+1+7;u=KC(TD,$ie,25,t+1,15,1);c=t;if(o==1){h=e[0];if(h<0){H=xbb(h,Yje);do{p=H;H=Abb(H,10);u[--c]=48+Tbb(Qbb(p,Ibb(H,10)))&aje}while(ybb(H,0)!=0)}else{H=h;do{p=H;H=H/10|0;u[--c]=48+(p-H*10)&aje}while(H!=0)}}else{D=KC(WD,oje,25,o,15,1);G=o;$fb(e,0,D,0,G);I:while(true){A=0;for(j=G-1;j>=0;j--){F=wbb(Nbb(A,32),xbb(D[j],Yje));r=qhb(F);D[j]=Tbb(r);A=Tbb(Obb(r,32))}s=Tbb(A);q=c;do{u[--c]=48+s%10&aje}while((s=s/10|0)!=0&&c!=0);d=9-q+c;for(i=0;i0;i++){u[--c]=48}l=G-1;for(;D[l]==0;l--){if(l==0){break I}}G=l+1}while(u[c]==48){++c}}n=B<0;g=t-c-b-1;if(b==0){n&&(u[--c]=45);return zfb(u,c,t-c)}if(b>0&&g>=-6){if(g>=0){k=c+g;for(m=t-1;m>=k;m--){u[m+1]=u[m]}u[++k]=46;n&&(u[--c]=45);return zfb(u,c,t-c+1)}for(l=2;l<-g+1;l++){u[--c]=48}u[--c]=46;u[--c]=48;n&&(u[--c]=45);return zfb(u,c,t-c)}C=c+1;f=t;v=new Vfb;n&&(v.a+='-',v);if(f-C>=1){Kfb(v,u[c]);v.a+='.';v.a+=zfb(u,c+1,t-c-1)}else{v.a+=zfb(u,c,t-c)}v.a+='E';g>0&&(v.a+='+',v);v.a+=''+g;return v.a} +function z$c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;a.c=b;a.g=new Lqb;c=(Pgd(),new bhd(a.c));d=new YGb(c);UGb(d);t=GD(hkd(a.c,(d0c(),Y_c)));i=BD(hkd(a.c,$_c),316);v=BD(hkd(a.c,__c),429);g=BD(hkd(a.c,T_c),482);u=BD(hkd(a.c,Z_c),430);a.j=Edb(ED(hkd(a.c,a0c)));h=a.a;switch(i.g){case 0:h=a.a;break;case 1:h=a.b;break;case 2:h=a.i;break;case 3:h=a.e;break;case 4:h=a.f;break;default:throw vbb(new Wdb(Mre+(i.f!=null?i.f:''+i.g)));}a.d=new g_c(h,v,g);yNb(a.d,(XNb(),VNb),DD(hkd(a.c,V_c)));a.d.c=Ccb(DD(hkd(a.c,U_c)));if(Vod(a.c).i==0){return a.d}for(l=new Fyd(Vod(a.c));l.e!=l.i.gc();){k=BD(Dyd(l),33);n=k.g/2;m=k.f/2;w=new f7c(k.i+n,k.j+m);while(Mhb(a.g,w)){O6c(w,($wnd.Math.random()-0.5)*qme,($wnd.Math.random()-0.5)*qme)}p=BD(hkd(k,(Y9c(),S8c)),142);q=new aOb(w,new J6c(w.a-n-a.j/2-p.b,w.b-m-a.j/2-p.d,k.g+a.j+(p.b+p.c),k.f+a.j+(p.d+p.a)));Ekb(a.d.i,q);Rhb(a.g,w,new vgd(q,k))}switch(u.g){case 0:if(t==null){a.d.d=BD(Ikb(a.d.i,0),65)}else{for(s=new olb(a.d.i);s.a1&&(Gsb(k,r,k.c.b,k.c),true);Zsb(e)}}}r=s}}return k} +function $Bc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L;Odd(c,'Greedy cycle removal',1);t=b.a;L=t.c.length;a.a=KC(WD,oje,25,L,15,1);a.c=KC(WD,oje,25,L,15,1);a.b=KC(WD,oje,25,L,15,1);j=0;for(r=new olb(t);r.a0?G+1:1}for(g=new olb(w.g);g.a0?G+1:1}}a.c[j]==0?Dsb(a.e,p):a.a[j]==0&&Dsb(a.f,p);++j}o=-1;n=1;l=new Rkb;a.d=BD(vNb(b,(wtc(),jtc)),230);while(L>0){while(a.e.b!=0){I=BD(Lsb(a.e),10);a.b[I.p]=o--;_Bc(a,I);--L}while(a.f.b!=0){J=BD(Lsb(a.f),10);a.b[J.p]=n++;_Bc(a,J);--L}if(L>0){m=Rie;for(s=new olb(t);s.a=m){if(u>m){l.c=KC(SI,Uhe,1,0,5,1);m=u}l.c[l.c.length]=p}}}k=a.Zf(l);a.b[k.p]=n++;_Bc(a,k);--L}}H=t.c.length+1;for(j=0;ja.b[K]){PZb(d,true);yNb(b,Asc,(Bcb(),true))}}}}a.a=null;a.c=null;a.b=null;Osb(a.f);Osb(a.e);Qdd(c)} +function sQb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=new Rkb;h=new Rkb;q=b/2;n=a.gc();e=BD(a.Xb(0),8);r=BD(a.Xb(1),8);o=tQb(e.a,e.b,r.a,r.b,q);Ekb(d,(tCb(0,o.c.length),BD(o.c[0],8)));Ekb(h,(tCb(1,o.c.length),BD(o.c[1],8)));for(j=2;j=0;i--){Dsb(c,(tCb(i,g.c.length),BD(g.c[i],8)))}return c} +function aFd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;g=true;l=null;d=null;e=null;b=false;n=BEd;j=null;f=null;h=0;i=UEd(a,h,zEd,AEd);if(i=0&&dfb(a.substr(h,'//'.length),'//')){h+=2;i=UEd(a,h,CEd,DEd);d=a.substr(h,i-h);h=i}else if(l!=null&&(h==a.length||(BCb(h,a.length),a.charCodeAt(h)!=47))){g=false;i=ifb(a,wfb(35),h);i==-1&&(i=a.length);d=a.substr(h,i-h);h=i}if(!c&&h0&&bfb(k,k.length-1)==58){e=k;h=i}}if(h=a.j){a.a=-1;a.c=1;return}b=bfb(a.i,a.d++);a.a=b;if(a.b==1){switch(b){case 92:d=10;if(a.d>=a.j)throw vbb(new mde(tvd((h0d(),uue))));a.a=bfb(a.i,a.d++);break;case 45:if((a.e&512)==512&&a.d=a.j)break;if(bfb(a.i,a.d)!=63)break;if(++a.d>=a.j)throw vbb(new mde(tvd((h0d(),vue))));b=bfb(a.i,a.d++);switch(b){case 58:d=13;break;case 61:d=14;break;case 33:d=15;break;case 91:d=19;break;case 62:d=18;break;case 60:if(a.d>=a.j)throw vbb(new mde(tvd((h0d(),vue))));b=bfb(a.i,a.d++);if(b==61){d=16}else if(b==33){d=17}else throw vbb(new mde(tvd((h0d(),wue))));break;case 35:while(a.d=a.j)throw vbb(new mde(tvd((h0d(),uue))));a.a=bfb(a.i,a.d++);break;default:d=0;}a.c=d} +function P5b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;A=BD(vNb(a,(Nyc(),Vxc)),98);if(!(A!=(dcd(),bcd)&&A!=ccd)){return}o=a.b;n=o.c.length;k=new Skb((Xj(n+2,Mie),Oy(wbb(wbb(5,n+2),(n+2)/10|0))));p=new Skb((Xj(n+2,Mie),Oy(wbb(wbb(5,n+2),(n+2)/10|0))));Ekb(k,new Lqb);Ekb(k,new Lqb);Ekb(p,new Rkb);Ekb(p,new Rkb);w=new Rkb;for(b=0;b=v||!wCc(r,d))&&(d=yCc(b,k));$_b(r,d);for(f=new Sr(ur(R_b(r).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);if(a.a[e.p]){continue}p=e.c.i;--a.e[p.p];a.e[p.p]==0&&(zCb(cub(n,p)),true)}}for(j=k.c.length-1;j>=0;--j){Ekb(b.b,(tCb(j,k.c.length),BD(k.c[j],29)))}b.a.c=KC(SI,Uhe,1,0,5,1);Qdd(c)} +function gee(a){var b,c,d,e,f,g,h,i,j;a.b=1;nde(a);b=null;if(a.c==0&&a.a==94){nde(a);b=(wfe(),wfe(),++vfe,new $fe(4));Ufe(b,0,lxe);h=(null,++vfe,new $fe(4))}else{h=(wfe(),wfe(),++vfe,new $fe(4))}e=true;while((j=a.c)!=1){if(j==0&&a.a==93&&!e){if(b){Zfe(b,h);h=b}break}c=a.a;d=false;if(j==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:Xfe(h,fee(c));d=true;break;case 105:case 73:case 99:case 67:c=(Xfe(h,fee(c)),-1);c<0&&(d=true);break;case 112:case 80:i=tde(a,c);if(!i)throw vbb(new mde(tvd((h0d(),Iue))));Xfe(h,i);d=true;break;default:c=eee(a);}}else if(j==24&&!e){if(b){Zfe(b,h);h=b}f=gee(a);Zfe(h,f);if(a.c!=0||a.a!=93)throw vbb(new mde(tvd((h0d(),Mue))));break}nde(a);if(!d){if(j==0){if(c==91)throw vbb(new mde(tvd((h0d(),Nue))));if(c==93)throw vbb(new mde(tvd((h0d(),Oue))));if(c==45&&!e&&a.a!=93)throw vbb(new mde(tvd((h0d(),Pue))))}if(a.c!=0||a.a!=45||c==45&&e){Ufe(h,c,c)}else{nde(a);if((j=a.c)==1)throw vbb(new mde(tvd((h0d(),Kue))));if(j==0&&a.a==93){Ufe(h,c,c);Ufe(h,45,45)}else if(j==0&&a.a==93||j==24){throw vbb(new mde(tvd((h0d(),Pue))))}else{g=a.a;if(j==0){if(g==91)throw vbb(new mde(tvd((h0d(),Nue))));if(g==93)throw vbb(new mde(tvd((h0d(),Oue))));if(g==45)throw vbb(new mde(tvd((h0d(),Pue))))}else j==10&&(g=eee(a));nde(a);if(c>g)throw vbb(new mde(tvd((h0d(),Sue))));Ufe(h,c,g)}}}e=false}if(a.c==1)throw vbb(new mde(tvd((h0d(),Kue))));Yfe(h);Vfe(h);a.b=0;nde(a);return h} +function xZd(a){Bnd(a.c,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#decimal']));Bnd(a.d,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#integer']));Bnd(a.e,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#boolean']));Bnd(a.f,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EBoolean',fue,'EBoolean:Object']));Bnd(a.i,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#byte']));Bnd(a.g,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#hexBinary']));Bnd(a.j,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EByte',fue,'EByte:Object']));Bnd(a.n,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EChar',fue,'EChar:Object']));Bnd(a.t,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#double']));Bnd(a.u,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EDouble',fue,'EDouble:Object']));Bnd(a.F,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#float']));Bnd(a.G,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EFloat',fue,'EFloat:Object']));Bnd(a.I,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#int']));Bnd(a.J,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EInt',fue,'EInt:Object']));Bnd(a.N,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#long']));Bnd(a.O,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'ELong',fue,'ELong:Object']));Bnd(a.Z,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#short']));Bnd(a.$,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EShort',fue,'EShort:Object']));Bnd(a._,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#string']))} +function fRc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;if(a.c.length==1){return tCb(0,a.c.length),BD(a.c[0],135)}else if(a.c.length<=0){return new SRc}for(i=new olb(a);i.al){F=0;G+=k+A;k=0}eRc(v,g,F,G);b=$wnd.Math.max(b,F+w.a);k=$wnd.Math.max(k,w.b);F+=w.a+A}u=new Lqb;c=new Lqb;for(C=new olb(a);C.aSLc(f))&&(l=f)}}!l&&(l=(tCb(0,q.c.length),BD(q.c[0],180)));for(p=new olb(b.b);p.a=-1900?1:0;c>=4?Qfb(a,OC(GC(ZI,1),nie,2,6,[pje,qje])[h]):Qfb(a,OC(GC(ZI,1),nie,2,6,['BC','AD'])[h]);break;case 121:kA(a,c,d);break;case 77:jA(a,c,d);break;case 107:i=e.q.getHours();i==0?EA(a,24,c):EA(a,i,c);break;case 83:iA(a,c,e);break;case 69:k=d.q.getDay();c==5?Qfb(a,OC(GC(ZI,1),nie,2,6,['S','M','T','W','T','F','S'])[k]):c==4?Qfb(a,OC(GC(ZI,1),nie,2,6,[rje,sje,tje,uje,vje,wje,xje])[k]):Qfb(a,OC(GC(ZI,1),nie,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[k]);break;case 97:e.q.getHours()>=12&&e.q.getHours()<24?Qfb(a,OC(GC(ZI,1),nie,2,6,['AM','PM'])[1]):Qfb(a,OC(GC(ZI,1),nie,2,6,['AM','PM'])[0]);break;case 104:l=e.q.getHours()%12;l==0?EA(a,12,c):EA(a,l,c);break;case 75:m=e.q.getHours()%12;EA(a,m,c);break;case 72:n=e.q.getHours();EA(a,n,c);break;case 99:o=d.q.getDay();c==5?Qfb(a,OC(GC(ZI,1),nie,2,6,['S','M','T','W','T','F','S'])[o]):c==4?Qfb(a,OC(GC(ZI,1),nie,2,6,[rje,sje,tje,uje,vje,wje,xje])[o]):c==3?Qfb(a,OC(GC(ZI,1),nie,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[o]):EA(a,o,1);break;case 76:p=d.q.getMonth();c==5?Qfb(a,OC(GC(ZI,1),nie,2,6,['J','F','M','A','M','J','J','A','S','O','N','D'])[p]):c==4?Qfb(a,OC(GC(ZI,1),nie,2,6,[bje,cje,dje,eje,fje,gje,hje,ije,jje,kje,lje,mje])[p]):c==3?Qfb(a,OC(GC(ZI,1),nie,2,6,['Jan','Feb','Mar','Apr',fje,'Jun','Jul','Aug','Sep','Oct','Nov','Dec'])[p]):EA(a,p+1,c);break;case 81:q=d.q.getMonth()/3|0;c<4?Qfb(a,OC(GC(ZI,1),nie,2,6,['Q1','Q2','Q3','Q4'])[q]):Qfb(a,OC(GC(ZI,1),nie,2,6,['1st quarter','2nd quarter','3rd quarter','4th quarter'])[q]);break;case 100:r=d.q.getDate();EA(a,r,c);break;case 109:j=e.q.getMinutes();EA(a,j,c);break;case 115:g=e.q.getSeconds();EA(a,g,c);break;case 122:c<4?Qfb(a,f.c[0]):Qfb(a,f.c[1]);break;case 118:Qfb(a,f.b);break;case 90:c<3?Qfb(a,OA(f)):c==3?Qfb(a,NA(f)):Qfb(a,QA(f.a));break;default:return false;}return true} +function X1b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;N1b(b);i=BD(qud((!b.b&&(b.b=new y5d(z2,b,4,7)),b.b),0),82);k=BD(qud((!b.c&&(b.c=new y5d(z2,b,5,8)),b.c),0),82);h=atd(i);j=atd(k);g=(!b.a&&(b.a=new cUd(A2,b,6,6)),b.a).i==0?null:BD(qud((!b.a&&(b.a=new cUd(A2,b,6,6)),b.a),0),202);A=BD(Ohb(a.a,h),10);F=BD(Ohb(a.a,j),10);B=null;G=null;if(JD(i,186)){w=BD(Ohb(a.a,i),299);if(JD(w,11)){B=BD(w,11)}else if(JD(w,10)){A=BD(w,10);B=BD(Ikb(A.j,0),11)}}if(JD(k,186)){D=BD(Ohb(a.a,k),299);if(JD(D,11)){G=BD(D,11)}else if(JD(D,10)){F=BD(D,10);G=BD(Ikb(F.j,0),11)}}if(!A||!F){throw vbb(new z2c('The source or the target of edge '+b+' could not be found. '+'This usually happens when an edge connects a node laid out by ELK Layered to a node in '+'another level of hierarchy laid out by either another instance of ELK Layered or another '+'layout algorithm alltogether. The former can be solved by setting the hierarchyHandling '+'option to INCLUDE_CHILDREN.'))}p=new UZb;tNb(p,b);yNb(p,(wtc(),$sc),b);yNb(p,(Nyc(),jxc),null);n=BD(vNb(d,Ksc),21);A==F&&n.Fc((Orc(),Nrc));if(!B){v=(KAc(),IAc);C=null;if(!!g&&fcd(BD(vNb(A,Vxc),98))){C=new f7c(g.j,g.k);Bfd(C,Mld(b));Cfd(C,c);if(ntd(j,h)){v=HAc;P6c(C,A.n)}}B=$$b(A,C,v,d)}if(!G){v=(KAc(),HAc);H=null;if(!!g&&fcd(BD(vNb(F,Vxc),98))){H=new f7c(g.b,g.c);Bfd(H,Mld(b));Cfd(H,c)}G=$$b(F,H,v,Q_b(F))}QZb(p,B);RZb(p,G);(B.e.c.length>1||B.g.c.length>1||G.e.c.length>1||G.g.c.length>1)&&n.Fc((Orc(),Irc));for(m=new Fyd((!b.n&&(b.n=new cUd(D2,b,1,7)),b.n));m.e!=m.i.gc();){l=BD(Dyd(m),137);if(!Ccb(DD(hkd(l,Jxc)))&&!!l.a){q=Z1b(l);Ekb(p.b,q);switch(BD(vNb(q,Qwc),272).g){case 1:case 2:n.Fc((Orc(),Grc));break;case 0:n.Fc((Orc(),Erc));yNb(q,Qwc,(qad(),nad));}}}f=BD(vNb(d,Iwc),314);r=BD(vNb(d,Exc),315);e=f==(Rpc(),Opc)||r==(Vzc(),Rzc);if(!!g&&(!g.a&&(g.a=new xMd(y2,g,5)),g.a).i!=0&&e){s=ofd(g);o=new s7c;for(u=Jsb(s,0);u.b!=u.d.c;){t=BD(Xsb(u),8);Dsb(o,new g7c(t))}yNb(p,_sc,o)}return p} +function yZd(a){if(a.gb)return;a.gb=true;a.b=Lnd(a,0);Knd(a.b,18);Qnd(a.b,19);a.a=Lnd(a,1);Knd(a.a,1);Qnd(a.a,2);Qnd(a.a,3);Qnd(a.a,4);Qnd(a.a,5);a.o=Lnd(a,2);Knd(a.o,8);Knd(a.o,9);Qnd(a.o,10);Qnd(a.o,11);Qnd(a.o,12);Qnd(a.o,13);Qnd(a.o,14);Qnd(a.o,15);Qnd(a.o,16);Qnd(a.o,17);Qnd(a.o,18);Qnd(a.o,19);Qnd(a.o,20);Qnd(a.o,21);Qnd(a.o,22);Qnd(a.o,23);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);a.p=Lnd(a,3);Knd(a.p,2);Knd(a.p,3);Knd(a.p,4);Knd(a.p,5);Qnd(a.p,6);Qnd(a.p,7);Pnd(a.p);Pnd(a.p);a.q=Lnd(a,4);Knd(a.q,8);a.v=Lnd(a,5);Qnd(a.v,9);Pnd(a.v);Pnd(a.v);Pnd(a.v);a.w=Lnd(a,6);Knd(a.w,2);Knd(a.w,3);Knd(a.w,4);Qnd(a.w,5);a.B=Lnd(a,7);Qnd(a.B,1);Pnd(a.B);Pnd(a.B);Pnd(a.B);a.Q=Lnd(a,8);Qnd(a.Q,0);Pnd(a.Q);a.R=Lnd(a,9);Knd(a.R,1);a.S=Lnd(a,10);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);a.T=Lnd(a,11);Qnd(a.T,10);Qnd(a.T,11);Qnd(a.T,12);Qnd(a.T,13);Qnd(a.T,14);Pnd(a.T);Pnd(a.T);a.U=Lnd(a,12);Knd(a.U,2);Knd(a.U,3);Qnd(a.U,4);Qnd(a.U,5);Qnd(a.U,6);Qnd(a.U,7);Pnd(a.U);a.V=Lnd(a,13);Qnd(a.V,10);a.W=Lnd(a,14);Knd(a.W,18);Knd(a.W,19);Knd(a.W,20);Qnd(a.W,21);Qnd(a.W,22);Qnd(a.W,23);a.bb=Lnd(a,15);Knd(a.bb,10);Knd(a.bb,11);Knd(a.bb,12);Knd(a.bb,13);Knd(a.bb,14);Knd(a.bb,15);Knd(a.bb,16);Qnd(a.bb,17);Pnd(a.bb);Pnd(a.bb);a.eb=Lnd(a,16);Knd(a.eb,2);Knd(a.eb,3);Knd(a.eb,4);Knd(a.eb,5);Knd(a.eb,6);Knd(a.eb,7);Qnd(a.eb,8);Qnd(a.eb,9);a.ab=Lnd(a,17);Knd(a.ab,0);Knd(a.ab,1);a.H=Lnd(a,18);Qnd(a.H,0);Qnd(a.H,1);Qnd(a.H,2);Qnd(a.H,3);Qnd(a.H,4);Qnd(a.H,5);Pnd(a.H);a.db=Lnd(a,19);Qnd(a.db,2);a.c=Mnd(a,20);a.d=Mnd(a,21);a.e=Mnd(a,22);a.f=Mnd(a,23);a.i=Mnd(a,24);a.g=Mnd(a,25);a.j=Mnd(a,26);a.k=Mnd(a,27);a.n=Mnd(a,28);a.r=Mnd(a,29);a.s=Mnd(a,30);a.t=Mnd(a,31);a.u=Mnd(a,32);a.fb=Mnd(a,33);a.A=Mnd(a,34);a.C=Mnd(a,35);a.D=Mnd(a,36);a.F=Mnd(a,37);a.G=Mnd(a,38);a.I=Mnd(a,39);a.J=Mnd(a,40);a.L=Mnd(a,41);a.M=Mnd(a,42);a.N=Mnd(a,43);a.O=Mnd(a,44);a.P=Mnd(a,45);a.X=Mnd(a,46);a.Y=Mnd(a,47);a.Z=Mnd(a,48);a.$=Mnd(a,49);a._=Mnd(a,50);a.cb=Mnd(a,51);a.K=Mnd(a,52)} +function Y9c(){Y9c=ccb;var a,b;o8c=new Lsd(sse);F9c=new Lsd(tse);q8c=(F7c(),z7c);p8c=new Nsd($pe,q8c);new Tfd;r8c=new Nsd(_le,null);s8c=new Lsd(use);x8c=(i8c(),qqb(h8c,OC(GC(r1,1),Kie,291,0,[d8c])));w8c=new Nsd(lqe,x8c);y8c=new Nsd(Zpe,(Bcb(),false));A8c=(ead(),cad);z8c=new Nsd(cqe,A8c);F8c=(Aad(),zad);E8c=new Nsd(ype,F8c);I8c=new Nsd(Jre,false);K8c=(hbd(),fbd);J8c=new Nsd(tpe,K8c);g9c=new q0b(12);f9c=new Nsd(ame,g9c);O8c=new Nsd(Ame,false);P8c=new Nsd(xqe,false);e9c=new Nsd(Dme,false);u9c=(dcd(),ccd);t9c=new Nsd(Bme,u9c);C9c=new Lsd(uqe);D9c=new Lsd(vme);E9c=new Lsd(yme);H9c=new Lsd(zme);R8c=new s7c;Q8c=new Nsd(mqe,R8c);v8c=new Nsd(pqe,false);L8c=new Nsd(qqe,false);new Lsd(vse);T8c=new H_b;S8c=new Nsd(vqe,T8c);d9c=new Nsd(Xpe,false);new Tfd;G9c=new Nsd(wse,1);new Nsd(xse,true);meb(0);new Nsd(yse,meb(100));new Nsd(zse,false);meb(0);new Nsd(Ase,meb(4000));meb(0);new Nsd(Bse,meb(400));new Nsd(Cse,false);new Nsd(Dse,false);new Nsd(Ese,true);new Nsd(Fse,false);u8c=(Ded(),Ced);t8c=new Nsd(rse,u8c);I9c=new Nsd(Lpe,10);J9c=new Nsd(Mpe,10);K9c=new Nsd(Zle,20);L9c=new Nsd(Npe,10);M9c=new Nsd(xme,2);N9c=new Nsd(Ope,10);P9c=new Nsd(Ppe,0);Q9c=new Nsd(Spe,5);R9c=new Nsd(Qpe,1);S9c=new Nsd(Rpe,1);T9c=new Nsd(wme,20);U9c=new Nsd(Tpe,10);X9c=new Nsd(Upe,10);O9c=new Lsd(Vpe);W9c=new I_b;V9c=new Nsd(wqe,W9c);j9c=new Lsd(tqe);i9c=false;h9c=new Nsd(sqe,i9c);V8c=new q0b(5);U8c=new Nsd(dqe,V8c);X8c=(Hbd(),b=BD(gdb(B1),9),new xqb(b,BD(_Bb(b,b.length),9),0));W8c=new Nsd(Gme,X8c);m9c=(Tbd(),Qbd);l9c=new Nsd(gqe,m9c);o9c=new Lsd(hqe);p9c=new Lsd(iqe);q9c=new Lsd(jqe);n9c=new Lsd(kqe);Z8c=(a=BD(gdb(I1),9),new xqb(a,BD(_Bb(a,a.length),9),0));Y8c=new Nsd(Fme,Z8c);c9c=pqb((Idd(),Bdd));b9c=new Nsd(Eme,c9c);a9c=new f7c(0,0);_8c=new Nsd(Tme,a9c);$8c=new Nsd(bqe,false);D8c=(qad(),nad);C8c=new Nsd(nqe,D8c);B8c=new Nsd(Cme,false);new Lsd(Gse);meb(1);new Nsd(Hse,null);r9c=new Lsd(rqe);v9c=new Lsd(oqe);B9c=(Ucd(),Scd);A9c=new Nsd(Ype,B9c);s9c=new Lsd(Wpe);y9c=(rcd(),pqb(pcd));x9c=new Nsd(Hme,y9c);w9c=new Nsd(eqe,false);z9c=new Nsd(fqe,true);M8c=new Nsd(_pe,false);N8c=new Nsd(aqe,false);G8c=new Nsd($le,1);H8c=(Mad(),Kad);new Nsd(Ise,H8c);k9c=true} +function wtc(){wtc=ccb;var a,b;$sc=new Lsd(Ime);xsc=new Lsd('coordinateOrigin');itc=new Lsd('processors');wsc=new Msd('compoundNode',(Bcb(),false));Nsc=new Msd('insideConnections',false);_sc=new Lsd('originalBendpoints');atc=new Lsd('originalDummyNodePosition');btc=new Lsd('originalLabelEdge');ktc=new Lsd('representedLabels');Csc=new Lsd('endLabels');Dsc=new Lsd('endLabel.origin');Ssc=new Msd('labelSide',(rbd(),qbd));Ysc=new Msd('maxEdgeThickness',0);ltc=new Msd('reversed',false);jtc=new Lsd(Jme);Vsc=new Msd('longEdgeSource',null);Wsc=new Msd('longEdgeTarget',null);Usc=new Msd('longEdgeHasLabelDummies',false);Tsc=new Msd('longEdgeBeforeLabelDummy',false);Bsc=new Msd('edgeConstraint',(Gqc(),Eqc));Psc=new Lsd('inLayerLayoutUnit');Osc=new Msd('inLayerConstraint',(esc(),csc));Qsc=new Msd('inLayerSuccessorConstraint',new Rkb);Rsc=new Msd('inLayerSuccessorConstraintBetweenNonDummies',false);gtc=new Lsd('portDummy');ysc=new Msd('crossingHint',meb(0));Ksc=new Msd('graphProperties',(b=BD(gdb(PW),9),new xqb(b,BD(_Bb(b,b.length),9),0)));Hsc=new Msd('externalPortSide',(Ucd(),Scd));Isc=new Msd('externalPortSize',new d7c);Fsc=new Lsd('externalPortReplacedDummies');Gsc=new Lsd('externalPortReplacedDummy');Esc=new Msd('externalPortConnections',(a=BD(gdb(F1),9),new xqb(a,BD(_Bb(a,a.length),9),0)));htc=new Msd(tle,0);ssc=new Lsd('barycenterAssociates');vtc=new Lsd('TopSideComments');tsc=new Lsd('BottomSideComments');vsc=new Lsd('CommentConnectionPort');Msc=new Msd('inputCollect',false);etc=new Msd('outputCollect',false);Asc=new Msd('cyclic',false);zsc=new Lsd('crossHierarchyMap');utc=new Lsd('targetOffset');new Msd('splineLabelSize',new d7c);otc=new Lsd('spacings');ftc=new Msd('partitionConstraint',false);usc=new Lsd('breakingPoint.info');stc=new Lsd('splines.survivingEdge');rtc=new Lsd('splines.route.start');ptc=new Lsd('splines.edgeChain');dtc=new Lsd('originalPortConstraints');ntc=new Lsd('selfLoopHolder');qtc=new Lsd('splines.nsPortY');Zsc=new Lsd('modelOrder');Xsc=new Lsd('longEdgeTargetNode');Jsc=new Msd(Xne,false);mtc=new Msd(Xne,false);Lsc=new Lsd('layerConstraints.hiddenNodes');ctc=new Lsd('layerConstraints.opposidePort');ttc=new Lsd('targetNode.modelOrder')} +function jwc(){jwc=ccb;puc=(xqc(),vqc);ouc=new Nsd(Yne,puc);Guc=new Nsd(Zne,(Bcb(),false));Muc=(msc(),ksc);Luc=new Nsd($ne,Muc);cvc=new Nsd(_ne,false);dvc=new Nsd(aoe,true);Itc=new Nsd(boe,false);xvc=(BAc(),zAc);wvc=new Nsd(coe,xvc);meb(1);Fvc=new Nsd(doe,meb(7));Gvc=new Nsd(eoe,false);Huc=new Nsd(foe,false);nuc=(mqc(),iqc);muc=new Nsd(goe,nuc);bvc=(lzc(),jzc);avc=new Nsd(hoe,bvc);Tuc=(Ctc(),Btc);Suc=new Nsd(ioe,Tuc);meb(-1);Ruc=new Nsd(joe,meb(-1));meb(-1);Uuc=new Nsd(koe,meb(-1));meb(-1);Vuc=new Nsd(loe,meb(4));meb(-1);Xuc=new Nsd(moe,meb(2));_uc=(kAc(),iAc);$uc=new Nsd(noe,_uc);meb(0);Zuc=new Nsd(ooe,meb(0));Puc=new Nsd(poe,meb(Ohe));luc=(Rpc(),Ppc);kuc=new Nsd(qoe,luc);Xtc=new Nsd(roe,false);euc=new Nsd(soe,0.1);iuc=new Nsd(toe,false);meb(-1);guc=new Nsd(uoe,meb(-1));meb(-1);huc=new Nsd(voe,meb(-1));meb(0);Ytc=new Nsd(woe,meb(40));cuc=(Xrc(),Wrc);buc=new Nsd(xoe,cuc);$tc=Urc;Ztc=new Nsd(yoe,$tc);vvc=(Vzc(),Qzc);uvc=new Nsd(zoe,vvc);kvc=new Lsd(Aoe);fvc=(_qc(),Zqc);evc=new Nsd(Boe,fvc);ivc=(lrc(),irc);hvc=new Nsd(Coe,ivc);new Tfd;nvc=new Nsd(Doe,0.3);pvc=new Lsd(Eoe);rvc=(Izc(),Gzc);qvc=new Nsd(Foe,rvc);xuc=(TAc(),RAc);wuc=new Nsd(Goe,xuc);zuc=(_Ac(),$Ac);yuc=new Nsd(Hoe,zuc);Buc=(tBc(),sBc);Auc=new Nsd(Ioe,Buc);Duc=new Nsd(Joe,0.2);uuc=new Nsd(Koe,2);Bvc=new Nsd(Loe,null);Dvc=new Nsd(Moe,10);Cvc=new Nsd(Noe,10);Evc=new Nsd(Ooe,20);meb(0);yvc=new Nsd(Poe,meb(0));meb(0);zvc=new Nsd(Qoe,meb(0));meb(0);Avc=new Nsd(Roe,meb(0));Jtc=new Nsd(Soe,false);Ntc=(yrc(),wrc);Mtc=new Nsd(Toe,Ntc);Ltc=(Ipc(),Hpc);Ktc=new Nsd(Uoe,Ltc);Juc=new Nsd(Voe,false);meb(0);Iuc=new Nsd(Woe,meb(16));meb(0);Kuc=new Nsd(Xoe,meb(5));bwc=(LBc(),JBc);awc=new Nsd(Yoe,bwc);Hvc=new Nsd(Zoe,10);Kvc=new Nsd($oe,1);Tvc=(bqc(),aqc);Svc=new Nsd(_oe,Tvc);Nvc=new Lsd(ape);Qvc=meb(1);meb(0);Pvc=new Nsd(bpe,Qvc);gwc=(CBc(),zBc);fwc=new Nsd(cpe,gwc);cwc=new Lsd(dpe);Yvc=new Nsd(epe,true);Wvc=new Nsd(fpe,2);$vc=new Nsd(gpe,true);tuc=(Sqc(),Qqc);suc=new Nsd(hpe,tuc);ruc=(Apc(),wpc);quc=new Nsd(ipe,ruc);Wtc=(tAc(),rAc);Vtc=new Nsd(jpe,Wtc);Utc=new Nsd(kpe,false);Ptc=(RXb(),QXb);Otc=new Nsd(lpe,Ptc);Ttc=(xzc(),uzc);Stc=new Nsd(mpe,Ttc);Qtc=new Nsd(npe,0);Rtc=new Nsd(ope,0);Ouc=kqc;Nuc=Opc;Wuc=izc;Yuc=izc;Quc=fzc;fuc=(hbd(),ebd);juc=Ppc;duc=Ppc;_tc=Ppc;auc=ebd;lvc=Tzc;mvc=Qzc;gvc=Qzc;jvc=Qzc;ovc=Szc;tvc=Tzc;svc=Tzc;Cuc=(Aad(),yad);Euc=yad;Fuc=sBc;vuc=xad;Ivc=KBc;Jvc=IBc;Lvc=KBc;Mvc=IBc;Uvc=KBc;Vvc=IBc;Ovc=_pc;Rvc=aqc;hwc=KBc;iwc=IBc;dwc=KBc;ewc=IBc;Zvc=IBc;Xvc=IBc;_vc=IBc} +function S8b(){S8b=ccb;Y7b=new T8b('DIRECTION_PREPROCESSOR',0);V7b=new T8b('COMMENT_PREPROCESSOR',1);Z7b=new T8b('EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER',2);n8b=new T8b('INTERACTIVE_EXTERNAL_PORT_POSITIONER',3);G8b=new T8b('PARTITION_PREPROCESSOR',4);r8b=new T8b('LABEL_DUMMY_INSERTER',5);M8b=new T8b('SELF_LOOP_PREPROCESSOR',6);w8b=new T8b('LAYER_CONSTRAINT_PREPROCESSOR',7);E8b=new T8b('PARTITION_MIDPROCESSOR',8);i8b=new T8b('HIGH_DEGREE_NODE_LAYER_PROCESSOR',9);A8b=new T8b('NODE_PROMOTION',10);v8b=new T8b('LAYER_CONSTRAINT_POSTPROCESSOR',11);F8b=new T8b('PARTITION_POSTPROCESSOR',12);e8b=new T8b('HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR',13);O8b=new T8b('SEMI_INTERACTIVE_CROSSMIN_PROCESSOR',14);P7b=new T8b('BREAKING_POINT_INSERTER',15);z8b=new T8b('LONG_EDGE_SPLITTER',16);I8b=new T8b('PORT_SIDE_PROCESSOR',17);o8b=new T8b('INVERTED_PORT_PROCESSOR',18);H8b=new T8b('PORT_LIST_SORTER',19);Q8b=new T8b('SORT_BY_INPUT_ORDER_OF_MODEL',20);C8b=new T8b('NORTH_SOUTH_PORT_PREPROCESSOR',21);Q7b=new T8b('BREAKING_POINT_PROCESSOR',22);D8b=new T8b(Bne,23);R8b=new T8b(Cne,24);K8b=new T8b('SELF_LOOP_PORT_RESTORER',25);P8b=new T8b('SINGLE_EDGE_GRAPH_WRAPPER',26);p8b=new T8b('IN_LAYER_CONSTRAINT_PROCESSOR',27);b8b=new T8b('END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR',28);q8b=new T8b('LABEL_AND_NODE_SIZE_PROCESSOR',29);m8b=new T8b('INNERMOST_NODE_MARGIN_CALCULATOR',30);N8b=new T8b('SELF_LOOP_ROUTER',31);T7b=new T8b('COMMENT_NODE_MARGIN_CALCULATOR',32);_7b=new T8b('END_LABEL_PREPROCESSOR',33);t8b=new T8b('LABEL_DUMMY_SWITCHER',34);S7b=new T8b('CENTER_LABEL_MANAGEMENT_PROCESSOR',35);u8b=new T8b('LABEL_SIDE_SELECTOR',36);k8b=new T8b('HYPEREDGE_DUMMY_MERGER',37);f8b=new T8b('HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR',38);x8b=new T8b('LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR',39);h8b=new T8b('HIERARCHICAL_PORT_POSITION_PROCESSOR',40);W7b=new T8b('CONSTRAINTS_POSTPROCESSOR',41);U7b=new T8b('COMMENT_POSTPROCESSOR',42);l8b=new T8b('HYPERNODE_PROCESSOR',43);g8b=new T8b('HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER',44);y8b=new T8b('LONG_EDGE_JOINER',45);L8b=new T8b('SELF_LOOP_POSTPROCESSOR',46);R7b=new T8b('BREAKING_POINT_REMOVER',47);B8b=new T8b('NORTH_SOUTH_PORT_POSTPROCESSOR',48);j8b=new T8b('HORIZONTAL_COMPACTOR',49);s8b=new T8b('LABEL_DUMMY_REMOVER',50);c8b=new T8b('FINAL_SPLINE_BENDPOINTS_CALCULATOR',51);a8b=new T8b('END_LABEL_SORTER',52);J8b=new T8b('REVERSED_EDGE_RESTORER',53);$7b=new T8b('END_LABEL_POSTPROCESSOR',54);d8b=new T8b('HIERARCHICAL_NODE_RESIZER',55);X7b=new T8b('DIRECTION_POSTPROCESSOR',56)} +function KIc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb;cb=0;for(H=b,K=0,N=H.length;K0&&(a.a[U.p]=cb++)}}hb=0;for(I=c,L=0,O=I.length;L0){U=(sCb(Y.b>0),BD(Y.a.Xb(Y.c=--Y.b),11));X=0;for(h=new olb(U.e);h.a0){if(U.j==(Ucd(),Acd)){a.a[U.p]=hb;++hb}else{a.a[U.p]=hb+P+R;++R}}}hb+=R}W=new Lqb;o=new zsb;for(G=b,J=0,M=G.length;Jj.b&&(j.b=Z)}else if(U.i.c==bb){Zj.c&&(j.c=Z)}}}Klb(p,0,p.length,null);gb=KC(WD,oje,25,p.length,15,1);d=KC(WD,oje,25,hb+1,15,1);for(r=0;r0){A%2>0&&(e+=kb[A+1]);A=(A-1)/2|0;++kb[A]}}C=KC(nY,Uhe,362,p.length*2,0,1);for(u=0;u'?":dfb(wue,a)?"'(?<' or '(? toIndex: ',zke=', toIndex: ',Ake='Index: ',Bke=', Size: ',Cke='org.eclipse.elk.alg.common',Dke={62:1},Eke='org.eclipse.elk.alg.common.compaction',Fke='Scanline/EventHandler',Gke='org.eclipse.elk.alg.common.compaction.oned',Hke='CNode belongs to another CGroup.',Ike='ISpacingsHandler/1',Jke='The ',Kke=' instance has been finished already.',Lke='The direction ',Mke=' is not supported by the CGraph instance.',Nke='OneDimensionalCompactor',Oke='OneDimensionalCompactor/lambda$0$Type',Pke='Quadruplet',Qke='ScanlineConstraintCalculator',Rke='ScanlineConstraintCalculator/ConstraintsScanlineHandler',Ske='ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type',Tke='ScanlineConstraintCalculator/Timestamp',Uke='ScanlineConstraintCalculator/lambda$0$Type',Vke={169:1,45:1},Wke='org.eclipse.elk.alg.common.compaction.options',Xke='org.eclipse.elk.core.data',Yke='org.eclipse.elk.polyomino.traversalStrategy',Zke='org.eclipse.elk.polyomino.lowLevelSort',$ke='org.eclipse.elk.polyomino.highLevelSort',_ke='org.eclipse.elk.polyomino.fill',ale={130:1},ble='polyomino',cle='org.eclipse.elk.alg.common.networksimplex',dle={177:1,3:1,4:1},ele='org.eclipse.elk.alg.common.nodespacing',fle='org.eclipse.elk.alg.common.nodespacing.cellsystem',gle='CENTER',hle={212:1,326:1},ile={3:1,4:1,5:1,595:1},jle='LEFT',kle='RIGHT',lle='Vertical alignment cannot be null',mle='BOTTOM',nle='org.eclipse.elk.alg.common.nodespacing.internal',ole='UNDEFINED',ple=0.01,qle='org.eclipse.elk.alg.common.nodespacing.internal.algorithm',rle='LabelPlacer/lambda$0$Type',sle='LabelPlacer/lambda$1$Type',tle='portRatioOrPosition',ule='org.eclipse.elk.alg.common.overlaps',vle='DOWN',wle='org.eclipse.elk.alg.common.polyomino',xle='NORTH',yle='EAST',zle='SOUTH',Ale='WEST',Ble='org.eclipse.elk.alg.common.polyomino.structures',Cle='Direction',Dle='Grid is only of size ',Ele='. Requested point (',Fle=') is out of bounds.',Gle=' Given center based coordinates were (',Hle='org.eclipse.elk.graph.properties',Ile='IPropertyHolder',Jle={3:1,94:1,134:1},Kle='org.eclipse.elk.alg.common.spore',Lle='org.eclipse.elk.alg.common.utils',Mle={209:1},Nle='org.eclipse.elk.core',Ole='Connected Components Compaction',Ple='org.eclipse.elk.alg.disco',Qle='org.eclipse.elk.alg.disco.graph',Rle='org.eclipse.elk.alg.disco.options',Sle='CompactionStrategy',Tle='org.eclipse.elk.disco.componentCompaction.strategy',Ule='org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm',Vle='org.eclipse.elk.disco.debug.discoGraph',Wle='org.eclipse.elk.disco.debug.discoPolys',Xle='componentCompaction',Yle='org.eclipse.elk.disco',Zle='org.eclipse.elk.spacing.componentComponent',$le='org.eclipse.elk.edge.thickness',_le='org.eclipse.elk.aspectRatio',ame='org.eclipse.elk.padding',bme='org.eclipse.elk.alg.disco.transform',cme=1.5707963267948966,dme=1.7976931348623157E308,eme={3:1,4:1,5:1,192:1},fme={3:1,6:1,4:1,5:1,106:1,120:1},gme='org.eclipse.elk.alg.force',hme='ComponentsProcessor',ime='ComponentsProcessor/1',jme='org.eclipse.elk.alg.force.graph',kme='Component Layout',lme='org.eclipse.elk.alg.force.model',mme='org.eclipse.elk.force.model',nme='org.eclipse.elk.force.iterations',ome='org.eclipse.elk.force.repulsivePower',pme='org.eclipse.elk.force.temperature',qme=0.001,rme='org.eclipse.elk.force.repulsion',sme='org.eclipse.elk.alg.force.options',tme=1.600000023841858,ume='org.eclipse.elk.force',vme='org.eclipse.elk.priority',wme='org.eclipse.elk.spacing.nodeNode',xme='org.eclipse.elk.spacing.edgeLabel',yme='org.eclipse.elk.randomSeed',zme='org.eclipse.elk.separateConnectedComponents',Ame='org.eclipse.elk.interactive',Bme='org.eclipse.elk.portConstraints',Cme='org.eclipse.elk.edgeLabels.inline',Dme='org.eclipse.elk.omitNodeMicroLayout',Eme='org.eclipse.elk.nodeSize.options',Fme='org.eclipse.elk.nodeSize.constraints',Gme='org.eclipse.elk.nodeLabels.placement',Hme='org.eclipse.elk.portLabels.placement',Ime='origin',Jme='random',Kme='boundingBox.upLeft',Lme='boundingBox.lowRight',Mme='org.eclipse.elk.stress.fixed',Nme='org.eclipse.elk.stress.desiredEdgeLength',Ome='org.eclipse.elk.stress.dimension',Pme='org.eclipse.elk.stress.epsilon',Qme='org.eclipse.elk.stress.iterationLimit',Rme='org.eclipse.elk.stress',Sme='ELK Stress',Tme='org.eclipse.elk.nodeSize.minimum',Ume='org.eclipse.elk.alg.force.stress',Vme='Layered layout',Wme='org.eclipse.elk.alg.layered',Xme='org.eclipse.elk.alg.layered.compaction.components',Yme='org.eclipse.elk.alg.layered.compaction.oned',Zme='org.eclipse.elk.alg.layered.compaction.oned.algs',$me='org.eclipse.elk.alg.layered.compaction.recthull',_me='org.eclipse.elk.alg.layered.components',ane='NONE',bne={3:1,6:1,4:1,9:1,5:1,122:1},cne={3:1,6:1,4:1,5:1,141:1,106:1,120:1},dne='org.eclipse.elk.alg.layered.compound',ene={51:1},fne='org.eclipse.elk.alg.layered.graph',gne=' -> ',hne='Not supported by LGraph',ine='Port side is undefined',jne={3:1,6:1,4:1,5:1,474:1,141:1,106:1,120:1},kne={3:1,6:1,4:1,5:1,141:1,193:1,203:1,106:1,120:1},lne={3:1,6:1,4:1,5:1,141:1,1943:1,203:1,106:1,120:1},mne='([{"\' \t\r\n',nne=')]}"\' \t\r\n',one='The given string contains parts that cannot be parsed as numbers.',pne='org.eclipse.elk.core.math',qne={3:1,4:1,142:1,207:1,414:1},rne={3:1,4:1,116:1,207:1,414:1},sne='org.eclipse.elk.layered',tne='org.eclipse.elk.alg.layered.graph.transform',une='ElkGraphImporter',vne='ElkGraphImporter/lambda$0$Type',wne='ElkGraphImporter/lambda$1$Type',xne='ElkGraphImporter/lambda$2$Type',yne='ElkGraphImporter/lambda$4$Type',zne='Node margin calculation',Ane='org.eclipse.elk.alg.layered.intermediate',Bne='ONE_SIDED_GREEDY_SWITCH',Cne='TWO_SIDED_GREEDY_SWITCH',Dne='No implementation is available for the layout processor ',Ene='IntermediateProcessorStrategy',Fne="Node '",Gne='FIRST_SEPARATE',Hne='LAST_SEPARATE',Ine='Odd port side processing',Jne='org.eclipse.elk.alg.layered.intermediate.compaction',Kne='org.eclipse.elk.alg.layered.intermediate.greedyswitch',Lne='org.eclipse.elk.alg.layered.p3order.counting',Mne={225:1},Nne='org.eclipse.elk.alg.layered.intermediate.loops',One='org.eclipse.elk.alg.layered.intermediate.loops.ordering',Pne='org.eclipse.elk.alg.layered.intermediate.loops.routing',Qne='org.eclipse.elk.alg.layered.intermediate.preserveorder',Rne='org.eclipse.elk.alg.layered.intermediate.wrapping',Sne='org.eclipse.elk.alg.layered.options',Tne='INTERACTIVE',Une='DEPTH_FIRST',Vne='EDGE_LENGTH',Wne='SELF_LOOPS',Xne='firstTryWithInitialOrder',Yne='org.eclipse.elk.layered.directionCongruency',Zne='org.eclipse.elk.layered.feedbackEdges',$ne='org.eclipse.elk.layered.interactiveReferencePoint',_ne='org.eclipse.elk.layered.mergeEdges',aoe='org.eclipse.elk.layered.mergeHierarchyEdges',boe='org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides',coe='org.eclipse.elk.layered.portSortingStrategy',doe='org.eclipse.elk.layered.thoroughness',eoe='org.eclipse.elk.layered.unnecessaryBendpoints',foe='org.eclipse.elk.layered.generatePositionAndLayerIds',goe='org.eclipse.elk.layered.cycleBreaking.strategy',hoe='org.eclipse.elk.layered.layering.strategy',ioe='org.eclipse.elk.layered.layering.layerConstraint',joe='org.eclipse.elk.layered.layering.layerChoiceConstraint',koe='org.eclipse.elk.layered.layering.layerId',loe='org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth',moe='org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor',noe='org.eclipse.elk.layered.layering.nodePromotion.strategy',ooe='org.eclipse.elk.layered.layering.nodePromotion.maxIterations',poe='org.eclipse.elk.layered.layering.coffmanGraham.layerBound',qoe='org.eclipse.elk.layered.crossingMinimization.strategy',roe='org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder',soe='org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness',toe='org.eclipse.elk.layered.crossingMinimization.semiInteractive',uoe='org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint',voe='org.eclipse.elk.layered.crossingMinimization.positionId',woe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold',xoe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.type',yoe='org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type',zoe='org.eclipse.elk.layered.nodePlacement.strategy',Aoe='org.eclipse.elk.layered.nodePlacement.favorStraightEdges',Boe='org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening',Coe='org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment',Doe='org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening',Eoe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility',Foe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default',Goe='org.eclipse.elk.layered.edgeRouting.selfLoopDistribution',Hoe='org.eclipse.elk.layered.edgeRouting.selfLoopOrdering',Ioe='org.eclipse.elk.layered.edgeRouting.splines.mode',Joe='org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor',Koe='org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth',Loe='org.eclipse.elk.layered.spacing.baseValue',Moe='org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers',Noe='org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers',Ooe='org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers',Poe='org.eclipse.elk.layered.priority.direction',Qoe='org.eclipse.elk.layered.priority.shortness',Roe='org.eclipse.elk.layered.priority.straightness',Soe='org.eclipse.elk.layered.compaction.connectedComponents',Toe='org.eclipse.elk.layered.compaction.postCompaction.strategy',Uoe='org.eclipse.elk.layered.compaction.postCompaction.constraints',Voe='org.eclipse.elk.layered.highDegreeNodes.treatment',Woe='org.eclipse.elk.layered.highDegreeNodes.threshold',Xoe='org.eclipse.elk.layered.highDegreeNodes.treeHeight',Yoe='org.eclipse.elk.layered.wrapping.strategy',Zoe='org.eclipse.elk.layered.wrapping.additionalEdgeSpacing',$oe='org.eclipse.elk.layered.wrapping.correctionFactor',_oe='org.eclipse.elk.layered.wrapping.cutting.strategy',ape='org.eclipse.elk.layered.wrapping.cutting.cuts',bpe='org.eclipse.elk.layered.wrapping.cutting.msd.freedom',cpe='org.eclipse.elk.layered.wrapping.validify.strategy',dpe='org.eclipse.elk.layered.wrapping.validify.forbiddenIndices',epe='org.eclipse.elk.layered.wrapping.multiEdge.improveCuts',fpe='org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty',gpe='org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges',hpe='org.eclipse.elk.layered.edgeLabels.sideSelection',ipe='org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy',jpe='org.eclipse.elk.layered.considerModelOrder.strategy',kpe='org.eclipse.elk.layered.considerModelOrder.noModelOrder',lpe='org.eclipse.elk.layered.considerModelOrder.components',mpe='org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy',npe='org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence',ope='org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence',ppe='layering',qpe='layering.minWidth',rpe='layering.nodePromotion',spe='crossingMinimization',tpe='org.eclipse.elk.hierarchyHandling',upe='crossingMinimization.greedySwitch',vpe='nodePlacement',wpe='nodePlacement.bk',xpe='edgeRouting',ype='org.eclipse.elk.edgeRouting',zpe='spacing',Ape='priority',Bpe='compaction',Cpe='compaction.postCompaction',Dpe='Specifies whether and how post-process compaction is applied.',Epe='highDegreeNodes',Fpe='wrapping',Gpe='wrapping.cutting',Hpe='wrapping.validify',Ipe='wrapping.multiEdge',Jpe='edgeLabels',Kpe='considerModelOrder',Lpe='org.eclipse.elk.spacing.commentComment',Mpe='org.eclipse.elk.spacing.commentNode',Npe='org.eclipse.elk.spacing.edgeEdge',Ope='org.eclipse.elk.spacing.edgeNode',Ppe='org.eclipse.elk.spacing.labelLabel',Qpe='org.eclipse.elk.spacing.labelPortHorizontal',Rpe='org.eclipse.elk.spacing.labelPortVertical',Spe='org.eclipse.elk.spacing.labelNode',Tpe='org.eclipse.elk.spacing.nodeSelfLoop',Upe='org.eclipse.elk.spacing.portPort',Vpe='org.eclipse.elk.spacing.individual',Wpe='org.eclipse.elk.port.borderOffset',Xpe='org.eclipse.elk.noLayout',Ype='org.eclipse.elk.port.side',Zpe='org.eclipse.elk.debugMode',$pe='org.eclipse.elk.alignment',_pe='org.eclipse.elk.insideSelfLoops.activate',aqe='org.eclipse.elk.insideSelfLoops.yo',bqe='org.eclipse.elk.nodeSize.fixedGraphSize',cqe='org.eclipse.elk.direction',dqe='org.eclipse.elk.nodeLabels.padding',eqe='org.eclipse.elk.portLabels.nextToPortIfPossible',fqe='org.eclipse.elk.portLabels.treatAsGroup',gqe='org.eclipse.elk.portAlignment.default',hqe='org.eclipse.elk.portAlignment.north',iqe='org.eclipse.elk.portAlignment.south',jqe='org.eclipse.elk.portAlignment.west',kqe='org.eclipse.elk.portAlignment.east',lqe='org.eclipse.elk.contentAlignment',mqe='org.eclipse.elk.junctionPoints',nqe='org.eclipse.elk.edgeLabels.placement',oqe='org.eclipse.elk.port.index',pqe='org.eclipse.elk.commentBox',qqe='org.eclipse.elk.hypernode',rqe='org.eclipse.elk.port.anchor',sqe='org.eclipse.elk.partitioning.activate',tqe='org.eclipse.elk.partitioning.partition',uqe='org.eclipse.elk.position',vqe='org.eclipse.elk.margins',wqe='org.eclipse.elk.spacing.portsSurrounding',xqe='org.eclipse.elk.interactiveLayout',yqe='org.eclipse.elk.core.util',zqe={3:1,4:1,5:1,593:1},Aqe='NETWORK_SIMPLEX',Bqe={123:1,51:1},Cqe='org.eclipse.elk.alg.layered.p1cycles',Dqe='org.eclipse.elk.alg.layered.p2layers',Eqe={402:1,225:1},Fqe={832:1,3:1,4:1},Gqe='org.eclipse.elk.alg.layered.p3order',Hqe='org.eclipse.elk.alg.layered.p4nodes',Iqe={3:1,4:1,5:1,840:1},Jqe=1.0E-5,Kqe='org.eclipse.elk.alg.layered.p4nodes.bk',Lqe='org.eclipse.elk.alg.layered.p5edges',Mqe='org.eclipse.elk.alg.layered.p5edges.orthogonal',Nqe='org.eclipse.elk.alg.layered.p5edges.orthogonal.direction',Oqe=1.0E-6,Pqe='org.eclipse.elk.alg.layered.p5edges.splines',Qqe=0.09999999999999998,Rqe=1.0E-8,Sqe=4.71238898038469,Tqe=3.141592653589793,Uqe='org.eclipse.elk.alg.mrtree',Vqe='org.eclipse.elk.alg.mrtree.graph',Wqe='org.eclipse.elk.alg.mrtree.intermediate',Xqe='Set neighbors in level',Yqe='DESCENDANTS',Zqe='org.eclipse.elk.mrtree.weighting',$qe='org.eclipse.elk.mrtree.searchOrder',_qe='org.eclipse.elk.alg.mrtree.options',are='org.eclipse.elk.mrtree',bre='org.eclipse.elk.tree',cre='org.eclipse.elk.alg.radial',dre=6.283185307179586,ere=4.9E-324,fre='org.eclipse.elk.alg.radial.intermediate',gre='org.eclipse.elk.alg.radial.intermediate.compaction',hre={3:1,4:1,5:1,106:1},ire='org.eclipse.elk.alg.radial.intermediate.optimization',jre='No implementation is available for the layout option ',kre='org.eclipse.elk.alg.radial.options',lre='org.eclipse.elk.radial.orderId',mre='org.eclipse.elk.radial.radius',nre='org.eclipse.elk.radial.compactor',ore='org.eclipse.elk.radial.compactionStepSize',pre='org.eclipse.elk.radial.sorter',qre='org.eclipse.elk.radial.wedgeCriteria',rre='org.eclipse.elk.radial.optimizationCriteria',sre='org.eclipse.elk.radial',tre='org.eclipse.elk.alg.radial.p1position.wedge',ure='org.eclipse.elk.alg.radial.sorting',vre=5.497787143782138,wre=3.9269908169872414,xre=2.356194490192345,yre='org.eclipse.elk.alg.rectpacking',zre='org.eclipse.elk.alg.rectpacking.firstiteration',Are='org.eclipse.elk.alg.rectpacking.options',Bre='org.eclipse.elk.rectpacking.optimizationGoal',Cre='org.eclipse.elk.rectpacking.lastPlaceShift',Dre='org.eclipse.elk.rectpacking.currentPosition',Ere='org.eclipse.elk.rectpacking.desiredPosition',Fre='org.eclipse.elk.rectpacking.onlyFirstIteration',Gre='org.eclipse.elk.rectpacking.rowCompaction',Hre='org.eclipse.elk.rectpacking.expandToAspectRatio',Ire='org.eclipse.elk.rectpacking.targetWidth',Jre='org.eclipse.elk.expandNodes',Kre='org.eclipse.elk.rectpacking',Lre='org.eclipse.elk.alg.rectpacking.util',Mre='No implementation available for ',Nre='org.eclipse.elk.alg.spore',Ore='org.eclipse.elk.alg.spore.options',Pre='org.eclipse.elk.sporeCompaction',Qre='org.eclipse.elk.underlyingLayoutAlgorithm',Rre='org.eclipse.elk.processingOrder.treeConstruction',Sre='org.eclipse.elk.processingOrder.spanningTreeCostFunction',Tre='org.eclipse.elk.processingOrder.preferredRoot',Ure='org.eclipse.elk.processingOrder.rootSelection',Vre='org.eclipse.elk.structure.structureExtractionStrategy',Wre='org.eclipse.elk.compaction.compactionStrategy',Xre='org.eclipse.elk.compaction.orthogonal',Yre='org.eclipse.elk.overlapRemoval.maxIterations',Zre='org.eclipse.elk.overlapRemoval.runScanline',$re='processingOrder',_re='overlapRemoval',ase='org.eclipse.elk.sporeOverlap',bse='org.eclipse.elk.alg.spore.p1structure',cse='org.eclipse.elk.alg.spore.p2processingorder',dse='org.eclipse.elk.alg.spore.p3execution',ese='Invalid index: ',fse='org.eclipse.elk.core.alg',gse={331:1},hse={288:1},ise='Make sure its type is registered with the ',jse=' utility class.',kse='true',lse='false',mse="Couldn't clone property '",nse=0.05,ose='org.eclipse.elk.core.options',pse=1.2999999523162842,qse='org.eclipse.elk.box',rse='org.eclipse.elk.box.packingMode',sse='org.eclipse.elk.algorithm',tse='org.eclipse.elk.resolvedAlgorithm',use='org.eclipse.elk.bendPoints',vse='org.eclipse.elk.labelManager',wse='org.eclipse.elk.scaleFactor',xse='org.eclipse.elk.animate',yse='org.eclipse.elk.animTimeFactor',zse='org.eclipse.elk.layoutAncestors',Ase='org.eclipse.elk.maxAnimTime',Bse='org.eclipse.elk.minAnimTime',Cse='org.eclipse.elk.progressBar',Dse='org.eclipse.elk.validateGraph',Ese='org.eclipse.elk.validateOptions',Fse='org.eclipse.elk.zoomToFit',Gse='org.eclipse.elk.font.name',Hse='org.eclipse.elk.font.size',Ise='org.eclipse.elk.edge.type',Jse='partitioning',Kse='nodeLabels',Lse='portAlignment',Mse='nodeSize',Nse='port',Ose='portLabels',Pse='insideSelfLoops',Qse='org.eclipse.elk.fixed',Rse='org.eclipse.elk.random',Sse='port must have a parent node to calculate the port side',Tse='The edge needs to have exactly one edge section. Found: ',Use='org.eclipse.elk.core.util.adapters',Vse='org.eclipse.emf.ecore',Wse='org.eclipse.elk.graph',Xse='EMapPropertyHolder',Yse='ElkBendPoint',Zse='ElkGraphElement',$se='ElkConnectableShape',_se='ElkEdge',ate='ElkEdgeSection',bte='EModelElement',cte='ENamedElement',dte='ElkLabel',ete='ElkNode',fte='ElkPort',gte={92:1,90:1},hte='org.eclipse.emf.common.notify.impl',ite="The feature '",jte="' is not a valid changeable feature",kte='Expecting null',lte="' is not a valid feature",mte='The feature ID',nte=' is not a valid feature ID',ote=32768,pte={105:1,92:1,90:1,56:1,49:1,97:1},qte='org.eclipse.emf.ecore.impl',rte='org.eclipse.elk.graph.impl',ste='Recursive containment not allowed for ',tte="The datatype '",ute="' is not a valid classifier",vte="The value '",wte={190:1,3:1,4:1},xte="The class '",yte='http://www.eclipse.org/elk/ElkGraph',zte=1024,Ate='property',Bte='value',Cte='source',Dte='properties',Ete='identifier',Fte='height',Gte='width',Hte='parent',Ite='text',Jte='children',Kte='hierarchical',Lte='sources',Mte='targets',Nte='sections',Ote='bendPoints',Pte='outgoingShape',Qte='incomingShape',Rte='outgoingSections',Ste='incomingSections',Tte='org.eclipse.emf.common.util',Ute='Severe implementation error in the Json to ElkGraph importer.',Vte='id',Wte='org.eclipse.elk.graph.json',Xte='Unhandled parameter types: ',Yte='startPoint',Zte="An edge must have at least one source and one target (edge id: '",$te="').",_te='Referenced edge section does not exist: ',aue=" (edge id: '",bue='target',cue='sourcePoint',due='targetPoint',eue='group',fue='name',gue='connectableShape cannot be null',hue='edge cannot be null',iue="Passed edge is not 'simple'.",jue='org.eclipse.elk.graph.util',kue="The 'no duplicates' constraint is violated",lue='targetIndex=',mue=', size=',nue='sourceIndex=',oue={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1},pue={3:1,4:1,20:1,28:1,52:1,14:1,47:1,15:1,54:1,67:1,63:1,58:1,588:1},que='logging',rue='measureExecutionTime',sue='parser.parse.1',tue='parser.parse.2',uue='parser.next.1',vue='parser.next.2',wue='parser.next.3',xue='parser.next.4',yue='parser.factor.1',zue='parser.factor.2',Aue='parser.factor.3',Bue='parser.factor.4',Cue='parser.factor.5',Due='parser.factor.6',Eue='parser.atom.1',Fue='parser.atom.2',Gue='parser.atom.3',Hue='parser.atom.4',Iue='parser.atom.5',Jue='parser.cc.1',Kue='parser.cc.2',Lue='parser.cc.3',Mue='parser.cc.5',Nue='parser.cc.6',Oue='parser.cc.7',Pue='parser.cc.8',Que='parser.ope.1',Rue='parser.ope.2',Sue='parser.ope.3',Tue='parser.descape.1',Uue='parser.descape.2',Vue='parser.descape.3',Wue='parser.descape.4',Xue='parser.descape.5',Yue='parser.process.1',Zue='parser.quantifier.1',$ue='parser.quantifier.2',_ue='parser.quantifier.3',ave='parser.quantifier.4',bve='parser.quantifier.5',cve='org.eclipse.emf.common.notify',dve={415:1,672:1},eve={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1},fve={366:1,143:1},gve='index=',hve={3:1,4:1,5:1,126:1},ive={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,58:1},jve={3:1,6:1,4:1,5:1,192:1},kve={3:1,4:1,5:1,165:1,367:1},lve=';/?:@&=+$,',mve='invalid authority: ',nve='EAnnotation',ove='ETypedElement',pve='EStructuralFeature',qve='EAttribute',rve='EClassifier',sve='EEnumLiteral',tve='EGenericType',uve='EOperation',vve='EParameter',wve='EReference',xve='ETypeParameter',yve='org.eclipse.emf.ecore.util',zve={76:1},Ave={3:1,20:1,14:1,15:1,58:1,589:1,76:1,69:1,95:1},Bve='org.eclipse.emf.ecore.util.FeatureMap$Entry',Cve=8192,Dve=2048,Eve='byte',Fve='char',Gve='double',Hve='float',Ive='int',Jve='long',Kve='short',Lve='java.lang.Object',Mve={3:1,4:1,5:1,247:1},Nve={3:1,4:1,5:1,673:1},Ove={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,69:1},Pve={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,69:1,95:1},Qve='mixed',Rve='http:///org/eclipse/emf/ecore/util/ExtendedMetaData',Sve='kind',Tve={3:1,4:1,5:1,674:1},Uve={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1,76:1,69:1,95:1},Vve={20:1,28:1,52:1,14:1,15:1,58:1,69:1},Wve={47:1,125:1,279:1},Xve={72:1,332:1},Yve="The value of type '",Zve="' must be of type '",$ve=1316,_ve='http://www.eclipse.org/emf/2002/Ecore',awe=-32768,bwe='constraints',cwe='baseType',dwe='getEStructuralFeature',ewe='getFeatureID',fwe='feature',gwe='getOperationID',hwe='operation',iwe='defaultValue',jwe='eTypeParameters',kwe='isInstance',lwe='getEEnumLiteral',mwe='eContainingClass',nwe={55:1},owe={3:1,4:1,5:1,119:1},pwe='org.eclipse.emf.ecore.resource',qwe={92:1,90:1,591:1,1935:1},rwe='org.eclipse.emf.ecore.resource.impl',swe='unspecified',twe='simple',uwe='attribute',vwe='attributeWildcard',wwe='element',xwe='elementWildcard',ywe='collapse',zwe='itemType',Awe='namespace',Bwe='##targetNamespace',Cwe='whiteSpace',Dwe='wildcards',Ewe='http://www.eclipse.org/emf/2003/XMLType',Fwe='##any',Gwe='uninitialized',Hwe='The multiplicity constraint is violated',Iwe='org.eclipse.emf.ecore.xml.type',Jwe='ProcessingInstruction',Kwe='SimpleAnyType',Lwe='XMLTypeDocumentRoot',Mwe='org.eclipse.emf.ecore.xml.type.impl',Nwe='INF',Owe='processing',Pwe='ENTITIES_._base',Qwe='minLength',Rwe='ENTITY',Swe='NCName',Twe='IDREFS_._base',Uwe='integer',Vwe='token',Wwe='pattern',Xwe='[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*',Ywe='\\i\\c*',Zwe='[\\i-[:]][\\c-[:]]*',$we='nonPositiveInteger',_we='maxInclusive',axe='NMTOKEN',bxe='NMTOKENS_._base',cxe='nonNegativeInteger',dxe='minInclusive',exe='normalizedString',fxe='unsignedByte',gxe='unsignedInt',hxe='18446744073709551615',ixe='unsignedShort',jxe='processingInstruction',kxe='org.eclipse.emf.ecore.xml.type.internal',lxe=1114111,mxe='Internal Error: shorthands: \\u',nxe='xml:isDigit',oxe='xml:isWord',pxe='xml:isSpace',qxe='xml:isNameChar',rxe='xml:isInitialNameChar',sxe='09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29',txe='AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3',uxe='Private Use',vxe='ASSIGNED',wxe='\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF',xxe='UNASSIGNED',yxe={3:1,117:1},zxe='org.eclipse.emf.ecore.xml.type.util',Axe={3:1,4:1,5:1,368:1},Bxe='org.eclipse.xtext.xbase.lib',Cxe='Cannot add elements to a Range',Dxe='Cannot set elements in a Range',Exe='Cannot remove elements from a Range',Fxe='locale',Gxe='default',Hxe='user.agent';var _,_bb,Wbb,tbb=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;acb();bcb(1,null,{},nb);_.Fb=function ob(a){return mb(this,a)};_.Gb=function qb(){return this.gm};_.Hb=function sb(){return FCb(this)};_.Ib=function ub(){var a;return hdb(rb(this))+'@'+(a=tb(this)>>>0,a.toString(16))};_.equals=function(a){return this.Fb(a)};_.hashCode=function(){return this.Hb()};_.toString=function(){return this.Ib()};var xD,yD,zD;bcb(290,1,{290:1,2026:1},jdb);_.le=function kdb(a){var b;b=new jdb;b.i=4;a>1?(b.c=rdb(this,a-1)):(b.c=this);return b};_.me=function qdb(){fdb(this);return this.b};_.ne=function sdb(){return hdb(this)};_.oe=function udb(){return fdb(this),this.k};_.pe=function wdb(){return (this.i&4)!=0};_.qe=function xdb(){return (this.i&1)!=0};_.Ib=function Adb(){return idb(this)};_.i=0;var edb=1;var SI=mdb(Phe,'Object',1);var AI=mdb(Phe,'Class',290);bcb(1998,1,Qhe);var $D=mdb(Rhe,'Optional',1998);bcb(1170,1998,Qhe,xb);_.Fb=function yb(a){return a===this};_.Hb=function zb(){return 2040732332};_.Ib=function Ab(){return 'Optional.absent()'};_.Jb=function Bb(a){Qb(a);return wb(),vb};var vb;var YD=mdb(Rhe,'Absent',1170);bcb(628,1,{},Gb);var ZD=mdb(Rhe,'Joiner',628);var _D=odb(Rhe,'Predicate');bcb(582,1,{169:1,582:1,3:1,45:1},Yb);_.Mb=function ac(a){return Xb(this,a)};_.Lb=function Zb(a){return Xb(this,a)};_.Fb=function $b(a){var b;if(JD(a,582)){b=BD(a,582);return At(this.a,b.a)}return false};_.Hb=function _b(){return qmb(this.a)+306654252};_.Ib=function bc(){return Wb(this.a)};var aE=mdb(Rhe,'Predicates/AndPredicate',582);bcb(408,1998,{408:1,3:1},cc);_.Fb=function dc(a){var b;if(JD(a,408)){b=BD(a,408);return pb(this.a,b.a)}return false};_.Hb=function ec(){return 1502476572+tb(this.a)};_.Ib=function fc(){return Whe+this.a+')'};_.Jb=function gc(a){return new cc(Rb(a.Kb(this.a),'the Function passed to Optional.transform() must not return null.'))};var bE=mdb(Rhe,'Present',408);bcb(198,1,Yhe);_.Nb=function kc(a){Rrb(this,a)};_.Qb=function lc(){jc()};var MH=mdb(Zhe,'UnmodifiableIterator',198);bcb(1978,198,$he);_.Qb=function nc(){jc()};_.Rb=function mc(a){throw vbb(new bgb)};_.Wb=function oc(a){throw vbb(new bgb)};var NH=mdb(Zhe,'UnmodifiableListIterator',1978);bcb(386,1978,$he);_.Ob=function rc(){return this.c0};_.Pb=function tc(){if(this.c>=this.d){throw vbb(new utb)}return this.Xb(this.c++)};_.Tb=function uc(){return this.c};_.Ub=function vc(){if(this.c<=0){throw vbb(new utb)}return this.Xb(--this.c)};_.Vb=function wc(){return this.c-1};_.c=0;_.d=0;var cE=mdb(Zhe,'AbstractIndexedListIterator',386);bcb(699,198,Yhe);_.Ob=function Ac(){return xc(this)};_.Pb=function Bc(){return yc(this)};_.e=1;var dE=mdb(Zhe,'AbstractIterator',699);bcb(1986,1,{224:1});_.Zb=function Hc(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.Fb=function Ic(a){return hw(this,a)};_.Hb=function Jc(){return tb(this.Zb())};_.dc=function Kc(){return this.gc()==0};_.ec=function Lc(){return Ec(this)};_.Ib=function Mc(){return fcb(this.Zb())};var IE=mdb(Zhe,'AbstractMultimap',1986);bcb(726,1986,_he);_.$b=function Xc(){Nc(this)};_._b=function Yc(a){return Oc(this,a)};_.ac=function Zc(){return new ne(this,this.c)};_.ic=function $c(a){return this.hc()};_.bc=function _c(){return new zf(this,this.c)};_.jc=function ad(){return this.mc(this.hc())};_.kc=function bd(){return new Hd(this)};_.lc=function cd(){return Yj(this.c.vc().Nc(),new $g,64,this.d)};_.cc=function dd(a){return Qc(this,a)};_.fc=function gd(a){return Sc(this,a)};_.gc=function hd(){return this.d};_.mc=function jd(a){return mmb(),new lnb(a)};_.nc=function kd(){return new Dd(this)};_.oc=function ld(){return Yj(this.c.Cc().Nc(),new Fd,64,this.d)};_.pc=function md(a,b){return new dg(this,a,b,null)};_.d=0;var DE=mdb(Zhe,'AbstractMapBasedMultimap',726);bcb(1631,726,_he);_.hc=function pd(){return new Skb(this.a)};_.jc=function qd(){return mmb(),mmb(),jmb};_.cc=function sd(a){return BD(Qc(this,a),15)};_.fc=function ud(a){return BD(Sc(this,a),15)};_.Zb=function od(){return nd(this)};_.Fb=function rd(a){return hw(this,a)};_.qc=function td(a){return BD(Qc(this,a),15)};_.rc=function vd(a){return BD(Sc(this,a),15)};_.mc=function wd(a){return vmb(BD(a,15))};_.pc=function xd(a,b){return Vc(this,a,BD(b,15),null)};var eE=mdb(Zhe,'AbstractListMultimap',1631);bcb(732,1,aie);_.Nb=function zd(a){Rrb(this,a)};_.Ob=function Ad(){return this.c.Ob()||this.e.Ob()};_.Pb=function Bd(){var a;if(!this.e.Ob()){a=BD(this.c.Pb(),42);this.b=a.cd();this.a=BD(a.dd(),14);this.e=this.a.Kc()}return this.sc(this.b,this.e.Pb())};_.Qb=function Cd(){this.e.Qb();this.a.dc()&&this.c.Qb();--this.d.d};var mE=mdb(Zhe,'AbstractMapBasedMultimap/Itr',732);bcb(1099,732,aie,Dd);_.sc=function Ed(a,b){return b};var fE=mdb(Zhe,'AbstractMapBasedMultimap/1',1099);bcb(1100,1,{},Fd);_.Kb=function Gd(a){return BD(a,14).Nc()};var gE=mdb(Zhe,'AbstractMapBasedMultimap/1methodref$spliterator$Type',1100);bcb(1101,732,aie,Hd);_.sc=function Id(a,b){return new Wo(a,b)};var hE=mdb(Zhe,'AbstractMapBasedMultimap/2',1101);var DK=odb(bie,'Map');bcb(1967,1,cie);_.wc=function Td(a){stb(this,a)};_.yc=function $d(a,b,c){return ttb(this,a,b,c)};_.$b=function Od(){this.vc().$b()};_.tc=function Pd(a){return Jd(this,a)};_._b=function Qd(a){return !!Kd(this,a,false)};_.uc=function Rd(a){var b,c,d;for(c=this.vc().Kc();c.Ob();){b=BD(c.Pb(),42);d=b.dd();if(PD(a)===PD(d)||a!=null&&pb(a,d)){return true}}return false};_.Fb=function Sd(a){var b,c,d;if(a===this){return true}if(!JD(a,83)){return false}d=BD(a,83);if(this.gc()!=d.gc()){return false}for(c=d.vc().Kc();c.Ob();){b=BD(c.Pb(),42);if(!this.tc(b)){return false}}return true};_.xc=function Ud(a){return Wd(Kd(this,a,false))};_.Hb=function Xd(){return pmb(this.vc())};_.dc=function Yd(){return this.gc()==0};_.ec=function Zd(){return new Pib(this)};_.zc=function _d(a,b){throw vbb(new cgb('Put not supported on this map'))};_.Ac=function ae(a){Ld(this,a)};_.Bc=function be(a){return Wd(Kd(this,a,true))};_.gc=function ce(){return this.vc().gc()};_.Ib=function de(){return Md(this)};_.Cc=function ee(){return new $ib(this)};var sJ=mdb(bie,'AbstractMap',1967);bcb(1987,1967,cie);_.bc=function ge(){return new rf(this)};_.vc=function he(){return fe(this)};_.ec=function ie(){var a;a=this.g;return !a?(this.g=this.bc()):a};_.Cc=function je(){var a;a=this.i;return !a?(this.i=new Zv(this)):a};var bH=mdb(Zhe,'Maps/ViewCachingAbstractMap',1987);bcb(389,1987,cie,ne);_.xc=function se(a){return ke(this,a)};_.Bc=function ve(a){return le(this,a)};_.$b=function oe(){this.d==this.e.c?this.e.$b():ir(new mf(this))};_._b=function pe(a){return Gv(this.d,a)};_.Ec=function qe(){return new df(this)};_.Dc=function(){return this.Ec()};_.Fb=function re(a){return this===a||pb(this.d,a)};_.Hb=function te(){return tb(this.d)};_.ec=function ue(){return this.e.ec()};_.gc=function we(){return this.d.gc()};_.Ib=function xe(){return fcb(this.d)};var lE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap',389);var KI=odb(Phe,'Iterable');bcb(28,1,die);_.Jc=function Le(a){reb(this,a)};_.Lc=function Ne(){return this.Oc()};_.Nc=function Pe(){return new Kub(this,0)};_.Oc=function Qe(){return new YAb(null,this.Nc())};_.Fc=function Ge(a){throw vbb(new cgb('Add not supported on this collection'))};_.Gc=function He(a){return ye(this,a)};_.$b=function Ie(){Ae(this)};_.Hc=function Je(a){return ze(this,a,false)};_.Ic=function Ke(a){return Be(this,a)};_.dc=function Me(){return this.gc()==0};_.Mc=function Oe(a){return ze(this,a,true)};_.Pc=function Re(){return De(this)};_.Qc=function Se(a){return Ee(this,a)};_.Ib=function Te(){return Fe(this)};var dJ=mdb(bie,'AbstractCollection',28);var LK=odb(bie,'Set');bcb(eie,28,fie);_.Nc=function Ye(){return new Kub(this,1)};_.Fb=function We(a){return Ue(this,a)};_.Hb=function Xe(){return pmb(this)};var zJ=mdb(bie,'AbstractSet',eie);bcb(1970,eie,fie);var BH=mdb(Zhe,'Sets/ImprovedAbstractSet',1970);bcb(1971,1970,fie);_.$b=function $e(){this.Rc().$b()};_.Hc=function _e(a){return Ze(this,a)};_.dc=function af(){return this.Rc().dc()};_.Mc=function bf(a){var b;if(this.Hc(a)){b=BD(a,42);return this.Rc().ec().Mc(b.cd())}return false};_.gc=function cf(){return this.Rc().gc()};var WG=mdb(Zhe,'Maps/EntrySet',1971);bcb(1097,1971,fie,df);_.Hc=function ef(a){return Ck(this.a.d.vc(),a)};_.Kc=function ff(){return new mf(this.a)};_.Rc=function gf(){return this.a};_.Mc=function hf(a){var b;if(!Ck(this.a.d.vc(),a)){return false}b=BD(a,42);Tc(this.a.e,b.cd());return true};_.Nc=function jf(){return $j(this.a.d.vc().Nc(),new kf(this.a))};var jE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap/AsMapEntries',1097);bcb(1098,1,{},kf);_.Kb=function lf(a){return me(this.a,BD(a,42))};var iE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type',1098);bcb(730,1,aie,mf);_.Nb=function nf(a){Rrb(this,a)};_.Pb=function pf(){var a;return a=BD(this.b.Pb(),42),this.a=BD(a.dd(),14),me(this.c,a)};_.Ob=function of(){return this.b.Ob()};_.Qb=function qf(){Vb(!!this.a);this.b.Qb();this.c.e.d-=this.a.gc();this.a.$b();this.a=null};var kE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap/AsMapIterator',730);bcb(532,1970,fie,rf);_.$b=function sf(){this.b.$b()};_.Hc=function tf(a){return this.b._b(a)};_.Jc=function uf(a){Qb(a);this.b.wc(new Xv(a))};_.dc=function vf(){return this.b.dc()};_.Kc=function wf(){return new Mv(this.b.vc().Kc())};_.Mc=function xf(a){if(this.b._b(a)){this.b.Bc(a);return true}return false};_.gc=function yf(){return this.b.gc()};var $G=mdb(Zhe,'Maps/KeySet',532);bcb(318,532,fie,zf);_.$b=function Af(){var a;ir((a=this.b.vc().Kc(),new Hf(this,a)))};_.Ic=function Bf(a){return this.b.ec().Ic(a)};_.Fb=function Cf(a){return this===a||pb(this.b.ec(),a)};_.Hb=function Df(){return tb(this.b.ec())};_.Kc=function Ef(){var a;return a=this.b.vc().Kc(),new Hf(this,a)};_.Mc=function Ff(a){var b,c;c=0;b=BD(this.b.Bc(a),14);if(b){c=b.gc();b.$b();this.a.d-=c}return c>0};_.Nc=function Gf(){return this.b.ec().Nc()};var oE=mdb(Zhe,'AbstractMapBasedMultimap/KeySet',318);bcb(731,1,aie,Hf);_.Nb=function If(a){Rrb(this,a)};_.Ob=function Jf(){return this.c.Ob()};_.Pb=function Kf(){this.a=BD(this.c.Pb(),42);return this.a.cd()};_.Qb=function Lf(){var a;Vb(!!this.a);a=BD(this.a.dd(),14);this.c.Qb();this.b.a.d-=a.gc();a.$b();this.a=null};var nE=mdb(Zhe,'AbstractMapBasedMultimap/KeySet/1',731);bcb(491,389,{83:1,161:1},Mf);_.bc=function Nf(){return this.Sc()};_.ec=function Pf(){return this.Tc()};_.Sc=function Of(){return new Yf(this.c,this.Uc())};_.Tc=function Qf(){var a;return a=this.b,!a?(this.b=this.Sc()):a};_.Uc=function Rf(){return BD(this.d,161)};var sE=mdb(Zhe,'AbstractMapBasedMultimap/SortedAsMap',491);bcb(542,491,gie,Sf);_.bc=function Tf(){return new $f(this.a,BD(BD(this.d,161),171))};_.Sc=function Uf(){return new $f(this.a,BD(BD(this.d,161),171))};_.ec=function Vf(){var a;return a=this.b,BD(!a?(this.b=new $f(this.a,BD(BD(this.d,161),171))):a,271)};_.Tc=function Wf(){var a;return a=this.b,BD(!a?(this.b=new $f(this.a,BD(BD(this.d,161),171))):a,271)};_.Uc=function Xf(){return BD(BD(this.d,161),171)};var pE=mdb(Zhe,'AbstractMapBasedMultimap/NavigableAsMap',542);bcb(490,318,hie,Yf);_.Nc=function Zf(){return this.b.ec().Nc()};var tE=mdb(Zhe,'AbstractMapBasedMultimap/SortedKeySet',490);bcb(388,490,iie,$f);var qE=mdb(Zhe,'AbstractMapBasedMultimap/NavigableKeySet',388);bcb(541,28,die,dg);_.Fc=function eg(a){var b,c;ag(this);c=this.d.dc();b=this.d.Fc(a);if(b){++this.f.d;c&&_f(this)}return b};_.Gc=function fg(a){var b,c,d;if(a.dc()){return false}d=(ag(this),this.d.gc());b=this.d.Gc(a);if(b){c=this.d.gc();this.f.d+=c-d;d==0&&_f(this)}return b};_.$b=function gg(){var a;a=(ag(this),this.d.gc());if(a==0){return}this.d.$b();this.f.d-=a;bg(this)};_.Hc=function hg(a){ag(this);return this.d.Hc(a)};_.Ic=function ig(a){ag(this);return this.d.Ic(a)};_.Fb=function jg(a){if(a===this){return true}ag(this);return pb(this.d,a)};_.Hb=function kg(){ag(this);return tb(this.d)};_.Kc=function lg(){ag(this);return new Gg(this)};_.Mc=function mg(a){var b;ag(this);b=this.d.Mc(a);if(b){--this.f.d;bg(this)}return b};_.gc=function ng(){return cg(this)};_.Nc=function og(){return ag(this),this.d.Nc()};_.Ib=function pg(){ag(this);return fcb(this.d)};var vE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedCollection',541);var yK=odb(bie,'List');bcb(728,541,{20:1,28:1,14:1,15:1},qg);_.ad=function zg(a){ktb(this,a)};_.Nc=function Ag(){return ag(this),this.d.Nc()};_.Vc=function rg(a,b){var c;ag(this);c=this.d.dc();BD(this.d,15).Vc(a,b);++this.a.d;c&&_f(this)};_.Wc=function sg(a,b){var c,d,e;if(b.dc()){return false}e=(ag(this),this.d.gc());c=BD(this.d,15).Wc(a,b);if(c){d=this.d.gc();this.a.d+=d-e;e==0&&_f(this)}return c};_.Xb=function tg(a){ag(this);return BD(this.d,15).Xb(a)};_.Xc=function ug(a){ag(this);return BD(this.d,15).Xc(a)};_.Yc=function vg(){ag(this);return new Mg(this)};_.Zc=function wg(a){ag(this);return new Ng(this,a)};_.$c=function xg(a){var b;ag(this);b=BD(this.d,15).$c(a);--this.a.d;bg(this);return b};_._c=function yg(a,b){ag(this);return BD(this.d,15)._c(a,b)};_.bd=function Bg(a,b){ag(this);return Vc(this.a,this.e,BD(this.d,15).bd(a,b),!this.b?this:this.b)};var xE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedList',728);bcb(1096,728,{20:1,28:1,14:1,15:1,54:1},Cg);var rE=mdb(Zhe,'AbstractMapBasedMultimap/RandomAccessWrappedList',1096);bcb(620,1,aie,Gg);_.Nb=function Ig(a){Rrb(this,a)};_.Ob=function Jg(){Fg(this);return this.b.Ob()};_.Pb=function Kg(){Fg(this);return this.b.Pb()};_.Qb=function Lg(){Eg(this)};var uE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedCollection/WrappedIterator',620);bcb(729,620,jie,Mg,Ng);_.Qb=function Tg(){Eg(this)};_.Rb=function Og(a){var b;b=cg(this.a)==0;(Fg(this),BD(this.b,125)).Rb(a);++this.a.a.d;b&&_f(this.a)};_.Sb=function Pg(){return (Fg(this),BD(this.b,125)).Sb()};_.Tb=function Qg(){return (Fg(this),BD(this.b,125)).Tb()};_.Ub=function Rg(){return (Fg(this),BD(this.b,125)).Ub()};_.Vb=function Sg(){return (Fg(this),BD(this.b,125)).Vb()};_.Wb=function Ug(a){(Fg(this),BD(this.b,125)).Wb(a)};var wE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedList/WrappedListIterator',729);bcb(727,541,hie,Vg);_.Nc=function Wg(){return ag(this),this.d.Nc()};var AE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedSortedSet',727);bcb(1095,727,iie,Xg);var yE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedNavigableSet',1095);bcb(1094,541,fie,Yg);_.Nc=function Zg(){return ag(this),this.d.Nc()};var zE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedSet',1094);bcb(1103,1,{},$g);_.Kb=function _g(a){return fd(BD(a,42))};var BE=mdb(Zhe,'AbstractMapBasedMultimap/lambda$1$Type',1103);bcb(1102,1,{},ah);_.Kb=function bh(a){return new Wo(this.a,a)};var CE=mdb(Zhe,'AbstractMapBasedMultimap/lambda$2$Type',1102);var CK=odb(bie,'Map/Entry');bcb(345,1,kie);_.Fb=function dh(a){var b;if(JD(a,42)){b=BD(a,42);return Hb(this.cd(),b.cd())&&Hb(this.dd(),b.dd())}return false};_.Hb=function eh(){var a,b;a=this.cd();b=this.dd();return (a==null?0:tb(a))^(b==null?0:tb(b))};_.ed=function fh(a){throw vbb(new bgb)};_.Ib=function gh(){return this.cd()+'='+this.dd()};var EE=mdb(Zhe,lie,345);bcb(1988,28,die);_.$b=function hh(){this.fd().$b()};_.Hc=function ih(a){var b;if(JD(a,42)){b=BD(a,42);return Cc(this.fd(),b.cd(),b.dd())}return false};_.Mc=function jh(a){var b;if(JD(a,42)){b=BD(a,42);return Gc(this.fd(),b.cd(),b.dd())}return false};_.gc=function kh(){return this.fd().d};var fH=mdb(Zhe,'Multimaps/Entries',1988);bcb(733,1988,die,lh);_.Kc=function mh(){return this.a.kc()};_.fd=function nh(){return this.a};_.Nc=function oh(){return this.a.lc()};var FE=mdb(Zhe,'AbstractMultimap/Entries',733);bcb(734,733,fie,ph);_.Nc=function sh(){return this.a.lc()};_.Fb=function qh(a){return Ax(this,a)};_.Hb=function rh(){return Bx(this)};var GE=mdb(Zhe,'AbstractMultimap/EntrySet',734);bcb(735,28,die,th);_.$b=function uh(){this.a.$b()};_.Hc=function vh(a){return Dc(this.a,a)};_.Kc=function wh(){return this.a.nc()};_.gc=function xh(){return this.a.d};_.Nc=function yh(){return this.a.oc()};var HE=mdb(Zhe,'AbstractMultimap/Values',735);bcb(1989,28,{835:1,20:1,28:1,14:1});_.Jc=function Gh(a){Qb(a);Ah(this).Jc(new Xw(a))};_.Nc=function Kh(){var a;return a=Ah(this).Nc(),Yj(a,new cx,64|a.qd()&1296,this.a.d)};_.Fc=function Ch(a){zh();return true};_.Gc=function Dh(a){return Qb(this),Qb(a),JD(a,543)?Zw(BD(a,835)):!a.dc()&&fr(this,a.Kc())};_.Hc=function Eh(a){var b;return b=BD(Hv(nd(this.a),a),14),(!b?0:b.gc())>0};_.Fb=function Fh(a){return $w(this,a)};_.Hb=function Hh(){return tb(Ah(this))};_.dc=function Ih(){return Ah(this).dc()};_.Mc=function Jh(a){return Bw(this,a,1)>0};_.Ib=function Lh(){return fcb(Ah(this))};var KE=mdb(Zhe,'AbstractMultiset',1989);bcb(1991,1970,fie);_.$b=function Mh(){Nc(this.a.a)};_.Hc=function Nh(a){var b,c;if(JD(a,492)){c=BD(a,416);if(BD(c.a.dd(),14).gc()<=0){return false}b=Aw(this.a,c.a.cd());return b==BD(c.a.dd(),14).gc()}return false};_.Mc=function Oh(a){var b,c,d,e;if(JD(a,492)){c=BD(a,416);b=c.a.cd();d=BD(c.a.dd(),14).gc();if(d!=0){e=this.a;return ax(e,b,d)}}return false};var pH=mdb(Zhe,'Multisets/EntrySet',1991);bcb(1109,1991,fie,Ph);_.Kc=function Qh(){return new Lw(fe(nd(this.a.a)).Kc())};_.gc=function Rh(){return nd(this.a.a).gc()};var JE=mdb(Zhe,'AbstractMultiset/EntrySet',1109);bcb(619,726,_he);_.hc=function Uh(){return this.gd()};_.jc=function Vh(){return this.hd()};_.cc=function Yh(a){return this.jd(a)};_.fc=function $h(a){return this.kd(a)};_.Zb=function Th(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.hd=function Wh(){return mmb(),mmb(),lmb};_.Fb=function Xh(a){return hw(this,a)};_.jd=function Zh(a){return BD(Qc(this,a),21)};_.kd=function _h(a){return BD(Sc(this,a),21)};_.mc=function ai(a){return mmb(),new zob(BD(a,21))};_.pc=function bi(a,b){return new Yg(this,a,BD(b,21))};var LE=mdb(Zhe,'AbstractSetMultimap',619);bcb(1657,619,_he);_.hc=function ei(){return new Hxb(this.b)};_.gd=function fi(){return new Hxb(this.b)};_.jc=function gi(){return Ix(new Hxb(this.b))};_.hd=function hi(){return Ix(new Hxb(this.b))};_.cc=function ii(a){return BD(BD(Qc(this,a),21),84)};_.jd=function ji(a){return BD(BD(Qc(this,a),21),84)};_.fc=function ki(a){return BD(BD(Sc(this,a),21),84)};_.kd=function li(a){return BD(BD(Sc(this,a),21),84)};_.mc=function mi(a){return JD(a,271)?Ix(BD(a,271)):(mmb(),new Zob(BD(a,84)))};_.Zb=function di(){var a;return a=this.f,!a?(this.f=JD(this.c,171)?new Sf(this,BD(this.c,171)):JD(this.c,161)?new Mf(this,BD(this.c,161)):new ne(this,this.c)):a};_.pc=function ni(a,b){return JD(b,271)?new Xg(this,a,BD(b,271)):new Vg(this,a,BD(b,84))};var NE=mdb(Zhe,'AbstractSortedSetMultimap',1657);bcb(1658,1657,_he);_.Zb=function pi(){var a;return a=this.f,BD(BD(!a?(this.f=JD(this.c,171)?new Sf(this,BD(this.c,171)):JD(this.c,161)?new Mf(this,BD(this.c,161)):new ne(this,this.c)):a,161),171)};_.ec=function ri(){var a;return a=this.i,BD(BD(!a?(this.i=JD(this.c,171)?new $f(this,BD(this.c,171)):JD(this.c,161)?new Yf(this,BD(this.c,161)):new zf(this,this.c)):a,84),271)};_.bc=function qi(){return JD(this.c,171)?new $f(this,BD(this.c,171)):JD(this.c,161)?new Yf(this,BD(this.c,161)):new zf(this,this.c)};var ME=mdb(Zhe,'AbstractSortedKeySortedSetMultimap',1658);bcb(2010,1,{1947:1});_.Fb=function si(a){return zy(this,a)};_.Hb=function ti(){var a;return pmb((a=this.g,!a?(this.g=new vi(this)):a))};_.Ib=function ui(){var a;return Md((a=this.f,!a?(this.f=new Rj(this)):a))};var QE=mdb(Zhe,'AbstractTable',2010);bcb(665,eie,fie,vi);_.$b=function wi(){Pi()};_.Hc=function xi(a){var b,c;if(JD(a,468)){b=BD(a,682);c=BD(Hv(Vi(this.a),Em(b.c.e,b.b)),83);return !!c&&Ck(c.vc(),new Wo(Em(b.c.c,b.a),Mi(b.c,b.b,b.a)))}return false};_.Kc=function yi(){return Ni(this.a)};_.Mc=function zi(a){var b,c;if(JD(a,468)){b=BD(a,682);c=BD(Hv(Vi(this.a),Em(b.c.e,b.b)),83);return !!c&&Dk(c.vc(),new Wo(Em(b.c.c,b.a),Mi(b.c,b.b,b.a)))}return false};_.gc=function Ai(){return Xi(this.a)};_.Nc=function Bi(){return Oi(this.a)};var OE=mdb(Zhe,'AbstractTable/CellSet',665);bcb(1928,28,die,Ci);_.$b=function Di(){Pi()};_.Hc=function Ei(a){return Qi(this.a,a)};_.Kc=function Fi(){return Zi(this.a)};_.gc=function Gi(){return Xi(this.a)};_.Nc=function Hi(){return $i(this.a)};var PE=mdb(Zhe,'AbstractTable/Values',1928);bcb(1632,1631,_he);var RE=mdb(Zhe,'ArrayListMultimapGwtSerializationDependencies',1632);bcb(513,1632,_he,Ji,Ki);_.hc=function Li(){return new Skb(this.a)};_.a=0;var SE=mdb(Zhe,'ArrayListMultimap',513);bcb(664,2010,{664:1,1947:1,3:1},_i);var cF=mdb(Zhe,'ArrayTable',664);bcb(1924,386,$he,aj);_.Xb=function bj(a){return new hj(this.a,a)};var TE=mdb(Zhe,'ArrayTable/1',1924);bcb(1925,1,{},cj);_.ld=function dj(a){return new hj(this.a,a)};var UE=mdb(Zhe,'ArrayTable/1methodref$getCell$Type',1925);bcb(2011,1,{682:1});_.Fb=function ej(a){var b;if(a===this){return true}if(JD(a,468)){b=BD(a,682);return Hb(Em(this.c.e,this.b),Em(b.c.e,b.b))&&Hb(Em(this.c.c,this.a),Em(b.c.c,b.a))&&Hb(Mi(this.c,this.b,this.a),Mi(b.c,b.b,b.a))}return false};_.Hb=function fj(){return Hlb(OC(GC(SI,1),Uhe,1,5,[Em(this.c.e,this.b),Em(this.c.c,this.a),Mi(this.c,this.b,this.a)]))};_.Ib=function gj(){return '('+Em(this.c.e,this.b)+','+Em(this.c.c,this.a)+')='+Mi(this.c,this.b,this.a)};var JH=mdb(Zhe,'Tables/AbstractCell',2011);bcb(468,2011,{468:1,682:1},hj);_.a=0;_.b=0;_.d=0;var VE=mdb(Zhe,'ArrayTable/2',468);bcb(1927,1,{},ij);_.ld=function jj(a){return Ti(this.a,a)};var WE=mdb(Zhe,'ArrayTable/2methodref$getValue$Type',1927);bcb(1926,386,$he,kj);_.Xb=function lj(a){return Ti(this.a,a)};var XE=mdb(Zhe,'ArrayTable/3',1926);bcb(1979,1967,cie);_.$b=function nj(){ir(this.kc())};_.vc=function oj(){return new Sv(this)};_.lc=function pj(){return new Mub(this.kc(),this.gc())};var YG=mdb(Zhe,'Maps/IteratorBasedAbstractMap',1979);bcb(828,1979,cie);_.$b=function tj(){throw vbb(new bgb)};_._b=function uj(a){return sn(this.c,a)};_.kc=function vj(){return new Jj(this,this.c.b.c.gc())};_.lc=function wj(){return Zj(this.c.b.c.gc(),16,new Dj(this))};_.xc=function xj(a){var b;b=BD(tn(this.c,a),19);return !b?null:this.nd(b.a)};_.dc=function yj(){return this.c.b.c.dc()};_.ec=function zj(){return Xm(this.c)};_.zc=function Aj(a,b){var c;c=BD(tn(this.c,a),19);if(!c){throw vbb(new Wdb(this.md()+' '+a+' not in '+Xm(this.c)))}return this.od(c.a,b)};_.Bc=function Bj(a){throw vbb(new bgb)};_.gc=function Cj(){return this.c.b.c.gc()};var _E=mdb(Zhe,'ArrayTable/ArrayMap',828);bcb(1923,1,{},Dj);_.ld=function Ej(a){return qj(this.a,a)};var YE=mdb(Zhe,'ArrayTable/ArrayMap/0methodref$getEntry$Type',1923);bcb(1921,345,kie,Fj);_.cd=function Gj(){return rj(this.a,this.b)};_.dd=function Hj(){return this.a.nd(this.b)};_.ed=function Ij(a){return this.a.od(this.b,a)};_.b=0;var ZE=mdb(Zhe,'ArrayTable/ArrayMap/1',1921);bcb(1922,386,$he,Jj);_.Xb=function Kj(a){return qj(this.a,a)};var $E=mdb(Zhe,'ArrayTable/ArrayMap/2',1922);bcb(1920,828,cie,Lj);_.md=function Mj(){return 'Column'};_.nd=function Nj(a){return Mi(this.b,this.a,a)};_.od=function Oj(a,b){return Wi(this.b,this.a,a,b)};_.a=0;var bF=mdb(Zhe,'ArrayTable/Row',1920);bcb(829,828,cie,Rj);_.nd=function Tj(a){return new Lj(this.a,a)};_.zc=function Uj(a,b){return BD(b,83),Pj()};_.od=function Vj(a,b){return BD(b,83),Qj()};_.md=function Sj(){return 'Row'};var aF=mdb(Zhe,'ArrayTable/RowMap',829);bcb(1120,1,pie,_j);_.qd=function ak(){return this.a.qd()&-262};_.rd=function bk(){return this.a.rd()};_.Nb=function ck(a){this.a.Nb(new gk(a,this.b))};_.sd=function dk(a){return this.a.sd(new ek(a,this.b))};var lF=mdb(Zhe,'CollectSpliterators/1',1120);bcb(1121,1,qie,ek);_.td=function fk(a){this.a.td(this.b.Kb(a))};var dF=mdb(Zhe,'CollectSpliterators/1/lambda$0$Type',1121);bcb(1122,1,qie,gk);_.td=function hk(a){this.a.td(this.b.Kb(a))};var eF=mdb(Zhe,'CollectSpliterators/1/lambda$1$Type',1122);bcb(1123,1,pie,jk);_.qd=function kk(){return this.a};_.rd=function lk(){!!this.d&&(this.b=Deb(this.b,this.d.rd()));return Deb(this.b,0)};_.Nb=function mk(a){if(this.d){this.d.Nb(a);this.d=null}this.c.Nb(new rk(this.e,a));this.b=0};_.sd=function ok(a){while(true){if(!!this.d&&this.d.sd(a)){Kbb(this.b,rie)&&(this.b=Qbb(this.b,1));return true}else{this.d=null}if(!this.c.sd(new pk(this,this.e))){return false}}};_.a=0;_.b=0;var hF=mdb(Zhe,'CollectSpliterators/1FlatMapSpliterator',1123);bcb(1124,1,qie,pk);_.td=function qk(a){ik(this.a,this.b,a)};var fF=mdb(Zhe,'CollectSpliterators/1FlatMapSpliterator/lambda$0$Type',1124);bcb(1125,1,qie,rk);_.td=function sk(a){nk(this.b,this.a,a)};var gF=mdb(Zhe,'CollectSpliterators/1FlatMapSpliterator/lambda$1$Type',1125);bcb(1117,1,pie,tk);_.qd=function uk(){return 16464|this.b};_.rd=function vk(){return this.a.rd()};_.Nb=function wk(a){this.a.xe(new Ak(a,this.c))};_.sd=function xk(a){return this.a.ye(new yk(a,this.c))};_.b=0;var kF=mdb(Zhe,'CollectSpliterators/1WithCharacteristics',1117);bcb(1118,1,sie,yk);_.ud=function zk(a){this.a.td(this.b.ld(a))};var iF=mdb(Zhe,'CollectSpliterators/1WithCharacteristics/lambda$0$Type',1118);bcb(1119,1,sie,Ak);_.ud=function Bk(a){this.a.td(this.b.ld(a))};var jF=mdb(Zhe,'CollectSpliterators/1WithCharacteristics/lambda$1$Type',1119);bcb(245,1,tie);_.wd=function Hk(a){return this.vd(BD(a,245))};_.vd=function Gk(a){var b;if(a==(_k(),$k)){return 1}if(a==(Lk(),Kk)){return -1}b=(ex(),Fcb(this.a,a.a));if(b!=0){return b}return JD(this,519)==JD(a,519)?0:JD(this,519)?1:-1};_.zd=function Ik(){return this.a};_.Fb=function Jk(a){return Ek(this,a)};var qF=mdb(Zhe,'Cut',245);bcb(1761,245,tie,Mk);_.vd=function Nk(a){return a==this?0:1};_.xd=function Ok(a){throw vbb(new xcb)};_.yd=function Pk(a){a.a+='+\u221E)'};_.zd=function Qk(){throw vbb(new Zdb(uie))};_.Hb=function Rk(){return Zfb(),kCb(this)};_.Ad=function Sk(a){return false};_.Ib=function Tk(){return '+\u221E'};var Kk;var mF=mdb(Zhe,'Cut/AboveAll',1761);bcb(519,245,{245:1,519:1,3:1,35:1},Uk);_.xd=function Vk(a){Pfb((a.a+='(',a),this.a)};_.yd=function Wk(a){Kfb(Pfb(a,this.a),93)};_.Hb=function Xk(){return ~tb(this.a)};_.Ad=function Yk(a){return ex(),Fcb(this.a,a)<0};_.Ib=function Zk(){return '/'+this.a+'\\'};var nF=mdb(Zhe,'Cut/AboveValue',519);bcb(1760,245,tie,al);_.vd=function bl(a){return a==this?0:-1};_.xd=function cl(a){a.a+='(-\u221E'};_.yd=function dl(a){throw vbb(new xcb)};_.zd=function el(){throw vbb(new Zdb(uie))};_.Hb=function fl(){return Zfb(),kCb(this)};_.Ad=function gl(a){return true};_.Ib=function hl(){return '-\u221E'};var $k;var oF=mdb(Zhe,'Cut/BelowAll',1760);bcb(1762,245,tie,il);_.xd=function jl(a){Pfb((a.a+='[',a),this.a)};_.yd=function kl(a){Kfb(Pfb(a,this.a),41)};_.Hb=function ll(){return tb(this.a)};_.Ad=function ml(a){return ex(),Fcb(this.a,a)<=0};_.Ib=function nl(){return '\\'+this.a+'/'};var pF=mdb(Zhe,'Cut/BelowValue',1762);bcb(537,1,vie);_.Jc=function ql(a){reb(this,a)};_.Ib=function rl(){return tr(BD(Rb(this,'use Optional.orNull() instead of Optional.or(null)'),20).Kc())};var uF=mdb(Zhe,'FluentIterable',537);bcb(433,537,vie,sl);_.Kc=function tl(){return new Sr(ur(this.a.Kc(),new Sq))};var rF=mdb(Zhe,'FluentIterable/2',433);bcb(1046,537,vie,vl);_.Kc=function wl(){return ul(this)};var tF=mdb(Zhe,'FluentIterable/3',1046);bcb(708,386,$he,xl);_.Xb=function yl(a){return this.a[a].Kc()};var sF=mdb(Zhe,'FluentIterable/3/1',708);bcb(1972,1,{});_.Ib=function zl(){return fcb(this.Bd().b)};var BF=mdb(Zhe,'ForwardingObject',1972);bcb(1973,1972,wie);_.Bd=function Fl(){return this.Cd()};_.Jc=function Gl(a){reb(this,a)};_.Lc=function Jl(){return this.Oc()};_.Nc=function Ml(){return new Kub(this,0)};_.Oc=function Nl(){return new YAb(null,this.Nc())};_.Fc=function Al(a){return this.Cd(),enb()};_.Gc=function Bl(a){return this.Cd(),fnb()};_.$b=function Cl(){this.Cd(),gnb()};_.Hc=function Dl(a){return this.Cd().Hc(a)};_.Ic=function El(a){return this.Cd().Ic(a)};_.dc=function Hl(){return this.Cd().b.dc()};_.Kc=function Il(){return this.Cd().Kc()};_.Mc=function Kl(a){return this.Cd(),jnb()};_.gc=function Ll(){return this.Cd().b.gc()};_.Pc=function Ol(){return this.Cd().Pc()};_.Qc=function Pl(a){return this.Cd().Qc(a)};var vF=mdb(Zhe,'ForwardingCollection',1973);bcb(1980,28,xie);_.Kc=function Xl(){return this.Ed()};_.Fc=function Sl(a){throw vbb(new bgb)};_.Gc=function Tl(a){throw vbb(new bgb)};_.$b=function Ul(){throw vbb(new bgb)};_.Hc=function Vl(a){return a!=null&&ze(this,a,false)};_.Dd=function Wl(){switch(this.gc()){case 0:return im(),im(),hm;case 1:return im(),new my(Qb(this.Ed().Pb()));default:return new px(this,this.Pc());}};_.Mc=function Yl(a){throw vbb(new bgb)};var WF=mdb(Zhe,'ImmutableCollection',1980);bcb(712,1980,xie,Zl);_.Kc=function cm(){return vr(this.a.Kc())};_.Hc=function $l(a){return a!=null&&this.a.Hc(a)};_.Ic=function _l(a){return this.a.Ic(a)};_.dc=function am(){return this.a.dc()};_.Ed=function bm(){return vr(this.a.Kc())};_.gc=function dm(){return this.a.gc()};_.Pc=function em(){return this.a.Pc()};_.Qc=function fm(a){return this.a.Qc(a)};_.Ib=function gm(){return fcb(this.a)};var wF=mdb(Zhe,'ForwardingImmutableCollection',712);bcb(152,1980,yie);_.Kc=function sm(){return this.Ed()};_.Yc=function tm(){return this.Fd(0)};_.Zc=function vm(a){return this.Fd(a)};_.ad=function zm(a){ktb(this,a)};_.Nc=function Am(){return new Kub(this,16)};_.bd=function Cm(a,b){return this.Gd(a,b)};_.Vc=function lm(a,b){throw vbb(new bgb)};_.Wc=function mm(a,b){throw vbb(new bgb)};_.Fb=function om(a){return Ju(this,a)};_.Hb=function pm(){return Ku(this)};_.Xc=function qm(a){return a==null?-1:Lu(this,a)};_.Ed=function rm(){return this.Fd(0)};_.Fd=function um(a){return jm(this,a)};_.$c=function xm(a){throw vbb(new bgb)};_._c=function ym(a,b){throw vbb(new bgb)};_.Gd=function Bm(a,b){var c;return Dm((c=new $u(this),new Jib(c,a,b)))};var hm;var _F=mdb(Zhe,'ImmutableList',152);bcb(2006,152,yie);_.Kc=function Nm(){return vr(this.Hd().Kc())};_.bd=function Qm(a,b){return Dm(this.Hd().bd(a,b))};_.Hc=function Fm(a){return a!=null&&this.Hd().Hc(a)};_.Ic=function Gm(a){return this.Hd().Ic(a)};_.Fb=function Hm(a){return pb(this.Hd(),a)};_.Xb=function Im(a){return Em(this,a)};_.Hb=function Jm(){return tb(this.Hd())};_.Xc=function Km(a){return this.Hd().Xc(a)};_.dc=function Lm(){return this.Hd().dc()};_.Ed=function Mm(){return vr(this.Hd().Kc())};_.gc=function Om(){return this.Hd().gc()};_.Gd=function Pm(a,b){return Dm(this.Hd().bd(a,b))};_.Pc=function Rm(){return this.Hd().Qc(KC(SI,Uhe,1,this.Hd().gc(),5,1))};_.Qc=function Sm(a){return this.Hd().Qc(a)};_.Ib=function Tm(){return fcb(this.Hd())};var xF=mdb(Zhe,'ForwardingImmutableList',2006);bcb(714,1,Aie);_.vc=function cn(){return Wm(this)};_.wc=function en(a){stb(this,a)};_.ec=function jn(){return Xm(this)};_.yc=function kn(a,b,c){return ttb(this,a,b,c)};_.Cc=function rn(){return this.Ld()};_.$b=function Zm(){throw vbb(new bgb)};_._b=function $m(a){return this.xc(a)!=null};_.uc=function _m(a){return this.Ld().Hc(a)};_.Jd=function an(){return new jq(this)};_.Kd=function bn(){return new sq(this)};_.Fb=function dn(a){return Dv(this,a)};_.Hb=function gn(){return Wm(this).Hb()};_.dc=function hn(){return this.gc()==0};_.zc=function nn(a,b){return Ym()};_.Bc=function on(a){throw vbb(new bgb)};_.Ib=function pn(){return Jv(this)};_.Ld=function qn(){if(this.e){return this.e}return this.e=this.Kd()};_.c=null;_.d=null;_.e=null;var Um;var iG=mdb(Zhe,'ImmutableMap',714);bcb(715,714,Aie);_._b=function vn(a){return sn(this,a)};_.uc=function wn(a){return dob(this.b,a)};_.Id=function xn(){return Vn(new Ln(this))};_.Jd=function yn(){return Vn(gob(this.b))};_.Kd=function zn(){return Ql(),new Zl(hob(this.b))};_.Fb=function An(a){return fob(this.b,a)};_.xc=function Bn(a){return tn(this,a)};_.Hb=function Cn(){return tb(this.b.c)};_.dc=function Dn(){return this.b.c.dc()};_.gc=function En(){return this.b.c.gc()};_.Ib=function Fn(){return fcb(this.b.c)};var zF=mdb(Zhe,'ForwardingImmutableMap',715);bcb(1974,1973,Bie);_.Bd=function Gn(){return this.Md()};_.Cd=function Hn(){return this.Md()};_.Nc=function Kn(){return new Kub(this,1)};_.Fb=function In(a){return a===this||this.Md().Fb(a)};_.Hb=function Jn(){return this.Md().Hb()};var CF=mdb(Zhe,'ForwardingSet',1974);bcb(1069,1974,Bie,Ln);_.Bd=function Nn(){return eob(this.a.b)};_.Cd=function On(){return eob(this.a.b)};_.Hc=function Mn(b){if(JD(b,42)&&BD(b,42).cd()==null){return false}try{return Dob(eob(this.a.b),b)}catch(a){a=ubb(a);if(JD(a,205)){return false}else throw vbb(a)}};_.Md=function Pn(){return eob(this.a.b)};_.Qc=function Qn(a){var b;b=Eob(eob(this.a.b),a);eob(this.a.b).b.gc()=0?'+':'')+(c/60|0);b=kB($wnd.Math.abs(c)%60);return (Dpb(),Bpb)[this.q.getDay()]+' '+Cpb[this.q.getMonth()]+' '+kB(this.q.getDate())+' '+kB(this.q.getHours())+':'+kB(this.q.getMinutes())+':'+kB(this.q.getSeconds())+' GMT'+a+b+' '+this.q.getFullYear()};var $J=mdb(bie,'Date',199);bcb(1915,199,Cje,nB);_.a=false;_.b=0;_.c=0;_.d=0;_.e=0;_.f=0;_.g=false;_.i=0;_.j=0;_.k=0;_.n=0;_.o=0;_.p=0;var eI=mdb('com.google.gwt.i18n.shared.impl','DateRecord',1915);bcb(1966,1,{});_.fe=function oB(){return null};_.ge=function pB(){return null};_.he=function qB(){return null};_.ie=function rB(){return null};_.je=function sB(){return null};var nI=mdb(Dje,'JSONValue',1966);bcb(216,1966,{216:1},wB,xB);_.Fb=function yB(a){if(!JD(a,216)){return false}return qz(this.a,BD(a,216).a)};_.ee=function zB(){return DB};_.Hb=function AB(){return rz(this.a)};_.fe=function BB(){return this};_.Ib=function CB(){var a,b,c;c=new Wfb('[');for(b=0,a=this.a.length;b0&&(c.a+=',',c);Pfb(c,tB(this,b))}c.a+=']';return c.a};var fI=mdb(Dje,'JSONArray',216);bcb(483,1966,{483:1},HB);_.ee=function IB(){return LB};_.ge=function JB(){return this};_.Ib=function KB(){return Bcb(),''+this.a};_.a=false;var EB,FB;var gI=mdb(Dje,'JSONBoolean',483);bcb(985,60,Tie,MB);var hI=mdb(Dje,'JSONException',985);bcb(1023,1966,{},PB);_.ee=function QB(){return SB};_.Ib=function RB(){return Xhe};var NB;var iI=mdb(Dje,'JSONNull',1023);bcb(258,1966,{258:1},TB);_.Fb=function UB(a){if(!JD(a,258)){return false}return this.a==BD(a,258).a};_.ee=function VB(){return ZB};_.Hb=function WB(){return Hdb(this.a)};_.he=function XB(){return this};_.Ib=function YB(){return this.a+''};_.a=0;var jI=mdb(Dje,'JSONNumber',258);bcb(183,1966,{183:1},eC,fC);_.Fb=function gC(a){if(!JD(a,183)){return false}return qz(this.a,BD(a,183).a)};_.ee=function hC(){return lC};_.Hb=function iC(){return rz(this.a)};_.ie=function jC(){return this};_.Ib=function kC(){var a,b,c,d,e,f,g;g=new Wfb('{');a=true;f=$B(this,KC(ZI,nie,2,0,6,1));for(c=f,d=0,e=c.length;d=0?':'+this.c:'')+')'};_.c=0;var VI=mdb(Phe,'StackTraceElement',310);zD={3:1,475:1,35:1,2:1};var ZI=mdb(Phe,Vie,2);bcb(107,418,{475:1},Hfb,Ifb,Jfb);var WI=mdb(Phe,'StringBuffer',107);bcb(100,418,{475:1},Ufb,Vfb,Wfb);var XI=mdb(Phe,'StringBuilder',100);bcb(687,73,Mje,Xfb);var YI=mdb(Phe,'StringIndexOutOfBoundsException',687);bcb(2043,1,{});var Yfb;bcb(844,1,{},_fb);_.Kb=function agb(a){return BD(a,78).e};var $I=mdb(Phe,'Throwable/lambda$0$Type',844);bcb(41,60,{3:1,102:1,60:1,78:1,41:1},bgb,cgb);var aJ=mdb(Phe,'UnsupportedOperationException',41);bcb(240,236,{3:1,35:1,236:1,240:1},sgb,tgb);_.wd=function wgb(a){return mgb(this,BD(a,240))};_.ke=function xgb(){return Hcb(rgb(this))};_.Fb=function ygb(a){var b;if(this===a){return true}if(JD(a,240)){b=BD(a,240);return this.e==b.e&&mgb(this,b)==0}return false};_.Hb=function zgb(){var a;if(this.b!=0){return this.b}if(this.a<54){a=Cbb(this.f);this.b=Tbb(xbb(a,-1));this.b=33*this.b+Tbb(xbb(Obb(a,32),-1));this.b=17*this.b+QD(this.e);return this.b}this.b=17*Ngb(this.c)+QD(this.e);return this.b};_.Ib=function Agb(){return rgb(this)};_.a=0;_.b=0;_.d=0;_.e=0;_.f=0;var dgb,egb,fgb,ggb,hgb,igb,jgb,kgb;var bJ=mdb('java.math','BigDecimal',240);bcb(91,236,{3:1,35:1,236:1,91:1},Tgb,Ugb,Vgb,Wgb,Xgb,Ygb);_.wd=function $gb(a){return Igb(this,BD(a,91))};_.ke=function _gb(){return Hcb(shb(this,0))};_.Fb=function ahb(a){return Kgb(this,a)};_.Hb=function chb(){return Ngb(this)};_.Ib=function ehb(){return shb(this,0)};_.b=-2;_.c=0;_.d=0;_.e=0;var Bgb,Cgb,Dgb,Egb,Fgb,Ggb;var cJ=mdb('java.math','BigInteger',91);var nhb,ohb;var Bhb,Chb;bcb(488,1967,cie);_.$b=function Xhb(){Uhb(this)};_._b=function Yhb(a){return Mhb(this,a)};_.uc=function Zhb(a){return Nhb(this,a,this.g)||Nhb(this,a,this.f)};_.vc=function $hb(){return new eib(this)};_.xc=function _hb(a){return Ohb(this,a)};_.zc=function aib(a,b){return Rhb(this,a,b)};_.Bc=function bib(a){return Thb(this,a)};_.gc=function cib(){return Vhb(this)};var gJ=mdb(bie,'AbstractHashMap',488);bcb(261,eie,fie,eib);_.$b=function fib(){this.a.$b()};_.Hc=function gib(a){return dib(this,a)};_.Kc=function hib(){return new nib(this.a)};_.Mc=function iib(a){var b;if(dib(this,a)){b=BD(a,42).cd();this.a.Bc(b);return true}return false};_.gc=function jib(){return this.a.gc()};var fJ=mdb(bie,'AbstractHashMap/EntrySet',261);bcb(262,1,aie,nib);_.Nb=function oib(a){Rrb(this,a)};_.Pb=function qib(){return lib(this)};_.Ob=function pib(){return this.b};_.Qb=function rib(){mib(this)};_.b=false;var eJ=mdb(bie,'AbstractHashMap/EntrySetIterator',262);bcb(417,1,aie,vib);_.Nb=function wib(a){Rrb(this,a)};_.Ob=function xib(){return sib(this)};_.Pb=function yib(){return tib(this)};_.Qb=function zib(){uib(this)};_.b=0;_.c=-1;var hJ=mdb(bie,'AbstractList/IteratorImpl',417);bcb(96,417,jie,Bib);_.Qb=function Hib(){uib(this)};_.Rb=function Cib(a){Aib(this,a)};_.Sb=function Dib(){return this.b>0};_.Tb=function Eib(){return this.b};_.Ub=function Fib(){return sCb(this.b>0),this.a.Xb(this.c=--this.b)};_.Vb=function Gib(){return this.b-1};_.Wb=function Iib(a){yCb(this.c!=-1);this.a._c(this.c,a)};var iJ=mdb(bie,'AbstractList/ListIteratorImpl',96);bcb(219,52,Lie,Jib);_.Vc=function Kib(a,b){wCb(a,this.b);this.c.Vc(this.a+a,b);++this.b};_.Xb=function Lib(a){tCb(a,this.b);return this.c.Xb(this.a+a)};_.$c=function Mib(a){var b;tCb(a,this.b);b=this.c.$c(this.a+a);--this.b;return b};_._c=function Nib(a,b){tCb(a,this.b);return this.c._c(this.a+a,b)};_.gc=function Oib(){return this.b};_.a=0;_.b=0;var jJ=mdb(bie,'AbstractList/SubList',219);bcb(384,eie,fie,Pib);_.$b=function Qib(){this.a.$b()};_.Hc=function Rib(a){return this.a._b(a)};_.Kc=function Sib(){var a;return a=this.a.vc().Kc(),new Vib(a)};_.Mc=function Tib(a){if(this.a._b(a)){this.a.Bc(a);return true}return false};_.gc=function Uib(){return this.a.gc()};var mJ=mdb(bie,'AbstractMap/1',384);bcb(691,1,aie,Vib);_.Nb=function Wib(a){Rrb(this,a)};_.Ob=function Xib(){return this.a.Ob()};_.Pb=function Yib(){var a;return a=BD(this.a.Pb(),42),a.cd()};_.Qb=function Zib(){this.a.Qb()};var lJ=mdb(bie,'AbstractMap/1/1',691);bcb(226,28,die,$ib);_.$b=function _ib(){this.a.$b()};_.Hc=function ajb(a){return this.a.uc(a)};_.Kc=function bjb(){var a;return a=this.a.vc().Kc(),new djb(a)};_.gc=function cjb(){return this.a.gc()};var oJ=mdb(bie,'AbstractMap/2',226);bcb(294,1,aie,djb);_.Nb=function ejb(a){Rrb(this,a)};_.Ob=function fjb(){return this.a.Ob()};_.Pb=function gjb(){var a;return a=BD(this.a.Pb(),42),a.dd()};_.Qb=function hjb(){this.a.Qb()};var nJ=mdb(bie,'AbstractMap/2/1',294);bcb(484,1,{484:1,42:1});_.Fb=function jjb(a){var b;if(!JD(a,42)){return false}b=BD(a,42);return wtb(this.d,b.cd())&&wtb(this.e,b.dd())};_.cd=function kjb(){return this.d};_.dd=function ljb(){return this.e};_.Hb=function mjb(){return xtb(this.d)^xtb(this.e)};_.ed=function njb(a){return ijb(this,a)};_.Ib=function ojb(){return this.d+'='+this.e};var pJ=mdb(bie,'AbstractMap/AbstractEntry',484);bcb(383,484,{484:1,383:1,42:1},pjb);var qJ=mdb(bie,'AbstractMap/SimpleEntry',383);bcb(1984,1,_je);_.Fb=function qjb(a){var b;if(!JD(a,42)){return false}b=BD(a,42);return wtb(this.cd(),b.cd())&&wtb(this.dd(),b.dd())};_.Hb=function rjb(){return xtb(this.cd())^xtb(this.dd())};_.Ib=function sjb(){return this.cd()+'='+this.dd()};var rJ=mdb(bie,lie,1984);bcb(1992,1967,gie);_.tc=function vjb(a){return tjb(this,a)};_._b=function wjb(a){return ujb(this,a)};_.vc=function xjb(){return new Bjb(this)};_.xc=function yjb(a){var b;b=a;return Wd(Awb(this,b))};_.ec=function Ajb(){return new Gjb(this)};var wJ=mdb(bie,'AbstractNavigableMap',1992);bcb(739,eie,fie,Bjb);_.Hc=function Cjb(a){return JD(a,42)&&tjb(this.b,BD(a,42))};_.Kc=function Djb(){return new Ywb(this.b)};_.Mc=function Ejb(a){var b;if(JD(a,42)){b=BD(a,42);return Kwb(this.b,b)}return false};_.gc=function Fjb(){return this.b.c};var tJ=mdb(bie,'AbstractNavigableMap/EntrySet',739);bcb(493,eie,iie,Gjb);_.Nc=function Mjb(){return new Rub(this)};_.$b=function Hjb(){zwb(this.a)};_.Hc=function Ijb(a){return ujb(this.a,a)};_.Kc=function Jjb(){var a;return a=new Ywb((new cxb(this.a)).b),new Njb(a)};_.Mc=function Kjb(a){if(ujb(this.a,a)){Jwb(this.a,a);return true}return false};_.gc=function Ljb(){return this.a.c};var vJ=mdb(bie,'AbstractNavigableMap/NavigableKeySet',493);bcb(494,1,aie,Njb);_.Nb=function Ojb(a){Rrb(this,a)};_.Ob=function Pjb(){return sib(this.a.a)};_.Pb=function Qjb(){var a;return a=Wwb(this.a),a.cd()};_.Qb=function Rjb(){Xwb(this.a)};var uJ=mdb(bie,'AbstractNavigableMap/NavigableKeySet/1',494);bcb(2004,28,die);_.Fc=function Sjb(a){return zCb(cub(this,a)),true};_.Gc=function Tjb(a){uCb(a);mCb(a!=this,"Can't add a queue to itself");return ye(this,a)};_.$b=function Ujb(){while(dub(this)!=null);};var xJ=mdb(bie,'AbstractQueue',2004);bcb(302,28,{4:1,20:1,28:1,14:1},jkb,kkb);_.Fc=function lkb(a){return Xjb(this,a),true};_.$b=function nkb(){Yjb(this)};_.Hc=function okb(a){return Zjb(new xkb(this),a)};_.dc=function pkb(){return akb(this)};_.Kc=function qkb(){return new xkb(this)};_.Mc=function rkb(a){return dkb(new xkb(this),a)};_.gc=function skb(){return this.c-this.b&this.a.length-1};_.Nc=function tkb(){return new Kub(this,272)};_.Qc=function ukb(a){var b;b=this.c-this.b&this.a.length-1;a.lengthb&&NC(a,b,null);return a};_.b=0;_.c=0;var BJ=mdb(bie,'ArrayDeque',302);bcb(446,1,aie,xkb);_.Nb=function ykb(a){Rrb(this,a)};_.Ob=function zkb(){return this.a!=this.b};_.Pb=function Akb(){return vkb(this)};_.Qb=function Bkb(){wkb(this)};_.a=0;_.b=0;_.c=-1;var AJ=mdb(bie,'ArrayDeque/IteratorImpl',446);bcb(12,52,ake,Rkb,Skb,Tkb);_.Vc=function Ukb(a,b){Dkb(this,a,b)};_.Fc=function Vkb(a){return Ekb(this,a)};_.Wc=function Wkb(a,b){return Fkb(this,a,b)};_.Gc=function Xkb(a){return Gkb(this,a)};_.$b=function Ykb(){this.c=KC(SI,Uhe,1,0,5,1)};_.Hc=function Zkb(a){return Jkb(this,a,0)!=-1};_.Jc=function $kb(a){Hkb(this,a)};_.Xb=function _kb(a){return Ikb(this,a)};_.Xc=function alb(a){return Jkb(this,a,0)};_.dc=function blb(){return this.c.length==0};_.Kc=function clb(){return new olb(this)};_.$c=function dlb(a){return Kkb(this,a)};_.Mc=function elb(a){return Lkb(this,a)};_.Ud=function flb(a,b){Mkb(this,a,b)};_._c=function glb(a,b){return Nkb(this,a,b)};_.gc=function hlb(){return this.c.length};_.ad=function ilb(a){Okb(this,a)};_.Pc=function jlb(){return Pkb(this)};_.Qc=function klb(a){return Qkb(this,a)};var DJ=mdb(bie,'ArrayList',12);bcb(7,1,aie,olb);_.Nb=function plb(a){Rrb(this,a)};_.Ob=function qlb(){return llb(this)};_.Pb=function rlb(){return mlb(this)};_.Qb=function slb(){nlb(this)};_.a=0;_.b=-1;var CJ=mdb(bie,'ArrayList/1',7);bcb(2013,$wnd.Function,{},Ylb);_.te=function Zlb(a,b){return Kdb(a,b)};bcb(154,52,bke,amb);_.Hc=function bmb(a){return Bt(this,a)!=-1};_.Jc=function cmb(a){var b,c,d,e;uCb(a);for(c=this.a,d=0,e=c.length;d>>0,a.toString(16))};_.f=0;_.i=Qje;var PM=mdb(Gke,'CNode',57);bcb(814,1,{},zDb);var OM=mdb(Gke,'CNode/CNodeBuilder',814);var EDb;bcb(1525,1,{},GDb);_.Oe=function HDb(a,b){return 0};_.Pe=function IDb(a,b){return 0};var QM=mdb(Gke,Ike,1525);bcb(1790,1,{},JDb);_.Le=function KDb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;j=Pje;for(d=new olb(a.a.b);d.ad.d.c||d.d.c==f.d.c&&d.d.b0?a+this.n.d+this.n.a:0};_.Se=function HHb(){var a,b,c,d,e;e=0;if(this.e){this.b?(e=this.b.a):!!this.a[1][1]&&(e=this.a[1][1].Se())}else if(this.g){e=EHb(this,yHb(this,null,true))}else{for(b=(gHb(),OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])),c=0,d=b.length;c0?e+this.n.b+this.n.c:0};_.Te=function IHb(){var a,b,c,d,e;if(this.g){a=yHb(this,null,false);for(c=(gHb(),OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])),d=0,e=c.length;d0){d[0]+=this.d;c-=d[0]}if(d[2]>0){d[2]+=this.d;c-=d[2]}this.c.a=$wnd.Math.max(0,c);this.c.d=b.d+a.d+(this.c.a-c)/2;d[1]=$wnd.Math.max(d[1],c);uHb(this,eHb,b.d+a.d+d[0]-(d[1]-c)/2,d)};_.b=null;_.d=0;_.e=false;_.f=false;_.g=false;var rHb=0,sHb=0;var rN=mdb(fle,'GridContainerCell',1473);bcb(461,22,{3:1,35:1,22:1,461:1},OHb);var KHb,LHb,MHb;var sN=ndb(fle,'HorizontalLabelAlignment',461,CI,QHb,PHb);var RHb;bcb(306,212,{212:1,306:1},aIb,bIb,cIb);_.Re=function dIb(){return YHb(this)};_.Se=function eIb(){return ZHb(this)};_.a=0;_.c=false;var tN=mdb(fle,'LabelCell',306);bcb(244,326,{212:1,326:1,244:1},mIb);_.Re=function nIb(){return fIb(this)};_.Se=function oIb(){return gIb(this)};_.Te=function rIb(){hIb(this)};_.Ue=function sIb(){iIb(this)};_.b=0;_.c=0;_.d=false;var yN=mdb(fle,'StripContainerCell',244);bcb(1626,1,Oie,tIb);_.Mb=function uIb(a){return pIb(BD(a,212))};var uN=mdb(fle,'StripContainerCell/lambda$0$Type',1626);bcb(1627,1,{},vIb);_.Fe=function wIb(a){return BD(a,212).Se()};var vN=mdb(fle,'StripContainerCell/lambda$1$Type',1627);bcb(1628,1,Oie,xIb);_.Mb=function yIb(a){return qIb(BD(a,212))};var wN=mdb(fle,'StripContainerCell/lambda$2$Type',1628);bcb(1629,1,{},zIb);_.Fe=function AIb(a){return BD(a,212).Re()};var xN=mdb(fle,'StripContainerCell/lambda$3$Type',1629);bcb(462,22,{3:1,35:1,22:1,462:1},FIb);var BIb,CIb,DIb;var zN=ndb(fle,'VerticalLabelAlignment',462,CI,HIb,GIb);var IIb;bcb(789,1,{},LIb);_.c=0;_.d=0;_.k=0;_.s=0;_.t=0;_.v=false;_.w=0;_.D=false;var CN=mdb(nle,'NodeContext',789);bcb(1471,1,Dke,OIb);_.ue=function PIb(a,b){return NIb(BD(a,61),BD(b,61))};_.Fb=function QIb(a){return this===a};_.ve=function RIb(){return new tpb(this)};var AN=mdb(nle,'NodeContext/0methodref$comparePortSides$Type',1471);bcb(1472,1,Dke,SIb);_.ue=function TIb(a,b){return MIb(BD(a,111),BD(b,111))};_.Fb=function UIb(a){return this===a};_.ve=function VIb(){return new tpb(this)};var BN=mdb(nle,'NodeContext/1methodref$comparePortContexts$Type',1472);bcb(159,22,{3:1,35:1,22:1,159:1},tJb);var WIb,XIb,YIb,ZIb,$Ib,_Ib,aJb,bJb,cJb,dJb,eJb,fJb,gJb,hJb,iJb,jJb,kJb,lJb,mJb,nJb,oJb,pJb;var DN=ndb(nle,'NodeLabelLocation',159,CI,wJb,vJb);var xJb;bcb(111,1,{111:1},AJb);_.a=false;var EN=mdb(nle,'PortContext',111);bcb(1476,1,qie,TJb);_.td=function UJb(a){WHb(BD(a,306))};var FN=mdb(qle,rle,1476);bcb(1477,1,Oie,VJb);_.Mb=function WJb(a){return !!BD(a,111).c};var GN=mdb(qle,sle,1477);bcb(1478,1,qie,XJb);_.td=function YJb(a){WHb(BD(a,111).c)};var HN=mdb(qle,'LabelPlacer/lambda$2$Type',1478);var ZJb;bcb(1475,1,qie,fKb);_.td=function gKb(a){$Jb();zJb(BD(a,111))};var IN=mdb(qle,'NodeLabelAndSizeUtilities/lambda$0$Type',1475);bcb(790,1,qie,mKb);_.td=function nKb(a){kKb(this.b,this.c,this.a,BD(a,181))};_.a=false;_.c=false;var JN=mdb(qle,'NodeLabelCellCreator/lambda$0$Type',790);bcb(1474,1,qie,tKb);_.td=function uKb(a){sKb(this.a,BD(a,181))};var KN=mdb(qle,'PortContextCreator/lambda$0$Type',1474);var BKb;bcb(1829,1,{},VKb);var MN=mdb(ule,'GreedyRectangleStripOverlapRemover',1829);bcb(1830,1,Dke,XKb);_.ue=function YKb(a,b){return WKb(BD(a,222),BD(b,222))};_.Fb=function ZKb(a){return this===a};_.ve=function $Kb(){return new tpb(this)};var LN=mdb(ule,'GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type',1830);bcb(1786,1,{},fLb);_.a=5;_.e=0;var SN=mdb(ule,'RectangleStripOverlapRemover',1786);bcb(1787,1,Dke,jLb);_.ue=function kLb(a,b){return gLb(BD(a,222),BD(b,222))};_.Fb=function lLb(a){return this===a};_.ve=function mLb(){return new tpb(this)};var NN=mdb(ule,'RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type',1787);bcb(1789,1,Dke,nLb);_.ue=function oLb(a,b){return hLb(BD(a,222),BD(b,222))};_.Fb=function pLb(a){return this===a};_.ve=function qLb(){return new tpb(this)};var ON=mdb(ule,'RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type',1789);bcb(406,22,{3:1,35:1,22:1,406:1},wLb);var rLb,sLb,tLb,uLb;var PN=ndb(ule,'RectangleStripOverlapRemover/OverlapRemovalDirection',406,CI,yLb,xLb);var zLb;bcb(222,1,{222:1},BLb);var QN=mdb(ule,'RectangleStripOverlapRemover/RectangleNode',222);bcb(1788,1,qie,CLb);_.td=function DLb(a){aLb(this.a,BD(a,222))};var RN=mdb(ule,'RectangleStripOverlapRemover/lambda$1$Type',1788);bcb(1304,1,Dke,GLb);_.ue=function HLb(a,b){return FLb(BD(a,167),BD(b,167))};_.Fb=function ILb(a){return this===a};_.ve=function JLb(){return new tpb(this)};var WN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator',1304);bcb(1307,1,{},KLb);_.Kb=function LLb(a){return BD(a,324).a};var TN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type',1307);bcb(1308,1,Oie,MLb);_.Mb=function NLb(a){return BD(a,323).a};var UN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type',1308);bcb(1309,1,Oie,OLb);_.Mb=function PLb(a){return BD(a,323).a};var VN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type',1309);bcb(1302,1,Dke,RLb);_.ue=function SLb(a,b){return QLb(BD(a,167),BD(b,167))};_.Fb=function TLb(a){return this===a};_.ve=function ULb(){return new tpb(this)};var YN=mdb(wle,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator',1302);bcb(1305,1,{},VLb);_.Kb=function WLb(a){return BD(a,324).a};var XN=mdb(wle,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type',1305);bcb(767,1,Dke,YLb);_.ue=function ZLb(a,b){return XLb(BD(a,167),BD(b,167))};_.Fb=function $Lb(a){return this===a};_.ve=function _Lb(){return new tpb(this)};var ZN=mdb(wle,'PolyominoCompactor/MinNumOfExtensionsComparator',767);bcb(1300,1,Dke,bMb);_.ue=function cMb(a,b){return aMb(BD(a,321),BD(b,321))};_.Fb=function dMb(a){return this===a};_.ve=function eMb(){return new tpb(this)};var _N=mdb(wle,'PolyominoCompactor/MinPerimeterComparator',1300);bcb(1301,1,Dke,gMb);_.ue=function hMb(a,b){return fMb(BD(a,321),BD(b,321))};_.Fb=function iMb(a){return this===a};_.ve=function jMb(){return new tpb(this)};var $N=mdb(wle,'PolyominoCompactor/MinPerimeterComparatorWithShape',1301);bcb(1303,1,Dke,lMb);_.ue=function mMb(a,b){return kMb(BD(a,167),BD(b,167))};_.Fb=function nMb(a){return this===a};_.ve=function oMb(){return new tpb(this)};var bO=mdb(wle,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator',1303);bcb(1306,1,{},pMb);_.Kb=function qMb(a){return BD(a,324).a};var aO=mdb(wle,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type',1306);bcb(777,1,{},tMb);_.Ce=function uMb(a,b){return sMb(this,BD(a,46),BD(b,167))};var cO=mdb(wle,'SuccessorCombination',777);bcb(644,1,{},wMb);_.Ce=function xMb(a,b){var c;return vMb((c=BD(a,46),BD(b,167),c))};var dO=mdb(wle,'SuccessorJitter',644);bcb(643,1,{},zMb);_.Ce=function AMb(a,b){var c;return yMb((c=BD(a,46),BD(b,167),c))};var eO=mdb(wle,'SuccessorLineByLine',643);bcb(568,1,{},CMb);_.Ce=function DMb(a,b){var c;return BMb((c=BD(a,46),BD(b,167),c))};var fO=mdb(wle,'SuccessorManhattan',568);bcb(1356,1,{},FMb);_.Ce=function GMb(a,b){var c;return EMb((c=BD(a,46),BD(b,167),c))};var gO=mdb(wle,'SuccessorMaxNormWindingInMathPosSense',1356);bcb(400,1,{},JMb);_.Ce=function KMb(a,b){return HMb(this,a,b)};_.c=false;_.d=false;_.e=false;_.f=false;var iO=mdb(wle,'SuccessorQuadrantsGeneric',400);bcb(1357,1,{},LMb);_.Kb=function MMb(a){return BD(a,324).a};var hO=mdb(wle,'SuccessorQuadrantsGeneric/lambda$0$Type',1357);bcb(323,22,{3:1,35:1,22:1,323:1},SMb);_.a=false;var NMb,OMb,PMb,QMb;var jO=ndb(Ble,Cle,323,CI,UMb,TMb);var VMb;bcb(1298,1,{});_.Ib=function bNb(){var a,b,c,d,e,f;c=' ';a=meb(0);for(e=0;e=0?'b'+a+'['+fRb(this.a)+']':'b['+fRb(this.a)+']'}return 'b_'+FCb(this)};var YO=mdb(jme,'FBendpoint',559);bcb(282,134,{3:1,282:1,94:1,134:1},gRb);_.Ib=function hRb(){return fRb(this)};var ZO=mdb(jme,'FEdge',282);bcb(231,134,{3:1,231:1,94:1,134:1},kRb);var $O=mdb(jme,'FGraph',231);bcb(447,357,{3:1,447:1,357:1,94:1,134:1},mRb);_.Ib=function nRb(){return this.b==null||this.b.length==0?'l['+fRb(this.a)+']':'l_'+this.b};var _O=mdb(jme,'FLabel',447);bcb(144,357,{3:1,144:1,357:1,94:1,134:1},pRb);_.Ib=function qRb(){return oRb(this)};_.b=0;var aP=mdb(jme,'FNode',144);bcb(2003,1,{});_.bf=function vRb(a){rRb(this,a)};_.cf=function wRb(){sRb(this)};_.d=0;var cP=mdb(lme,'AbstractForceModel',2003);bcb(631,2003,{631:1},xRb);_.af=function zRb(a,b){var c,d,e,f,g;uRb(this.f,a,b);e=c7c(R6c(b.d),a.d);g=$wnd.Math.sqrt(e.a*e.a+e.b*e.b);d=$wnd.Math.max(0,g-U6c(a.e)/2-U6c(b.e)/2);c=jRb(this.e,a,b);c>0?(f=-yRb(d,this.c)*c):(f=CRb(d,this.b)*BD(vNb(a,(wSb(),oSb)),19).a);Y6c(e,f/g);return e};_.bf=function ARb(a){rRb(this,a);this.a=BD(vNb(a,(wSb(),eSb)),19).a;this.c=Edb(ED(vNb(a,uSb)));this.b=Edb(ED(vNb(a,qSb)))};_.df=function BRb(a){return a0&&(f-=ERb(d,this.a)*c);Y6c(e,f*this.b/g);return e};_.bf=function GRb(a){var b,c,d,e,f,g,h;rRb(this,a);this.b=Edb(ED(vNb(a,(wSb(),vSb))));this.c=this.b/BD(vNb(a,eSb),19).a;d=a.e.c.length;f=0;e=0;for(h=new olb(a.e);h.a0};_.a=0;_.b=0;_.c=0;var eP=mdb(lme,'FruchtermanReingoldModel',632);bcb(849,1,ale,TRb);_.Qe=function URb(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,mme),''),'Force Model'),'Determines the model for force calculation.'),MRb),(_5c(),V5c)),gP),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,nme),''),'Iterations'),'The number of iterations on the force model.'),meb(300)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ome),''),'Repulsive Power'),'Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,pme),''),'FR Temperature'),'The temperature is used as a scaling factor for particle displacements.'),qme),U5c),BI),pqb(L5c))));o4c(a,pme,mme,RRb);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,rme),''),'Eades Repulsion'),"Factor for repulsive forces in Eades' model."),5),U5c),BI),pqb(L5c))));o4c(a,rme,mme,ORb);xSb((new ySb,a))};var KRb,LRb,MRb,NRb,ORb,PRb,QRb,RRb;var fP=mdb(sme,'ForceMetaDataProvider',849);bcb(424,22,{3:1,35:1,22:1,424:1},YRb);var VRb,WRb;var gP=ndb(sme,'ForceModelStrategy',424,CI,$Rb,ZRb);var _Rb;bcb(988,1,ale,ySb);_.Qe=function zSb(a){xSb(a)};var bSb,cSb,dSb,eSb,fSb,gSb,hSb,iSb,jSb,kSb,lSb,mSb,nSb,oSb,pSb,qSb,rSb,sSb,tSb,uSb,vSb;var iP=mdb(sme,'ForceOptions',988);bcb(989,1,{},ASb);_.$e=function BSb(){var a;return a=new ZQb,a};_._e=function CSb(a){};var hP=mdb(sme,'ForceOptions/ForceFactory',989);var DSb,ESb,FSb,GSb;bcb(850,1,ale,PSb);_.Qe=function QSb(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Mme),''),'Fixed Position'),'Prevent that the node is moved by the layout algorithm.'),(Bcb(),false)),(_5c(),T5c)),wI),pqb((N5c(),K5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Nme),''),'Desired Edge Length'),'Either specified for parent nodes or for individual edges, where the latter takes higher precedence.'),100),U5c),BI),qqb(L5c,OC(GC(e1,1),Kie,175,0,[I5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ome),''),'Layout Dimension'),'Dimensions that are permitted to be altered during layout.'),KSb),V5c),oP),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Pme),''),'Stress Epsilon'),'Termination criterion for the iterative process.'),qme),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Qme),''),'Iteration Limit'),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),meb(Ohe)),X5c),JI),pqb(L5c))));cTb((new dTb,a))};var ISb,JSb,KSb,LSb,MSb,NSb;var jP=mdb(sme,'StressMetaDataProvider',850);bcb(992,1,ale,dTb);_.Qe=function eTb(a){cTb(a)};var RSb,SSb,TSb,USb,VSb,WSb,XSb,YSb,ZSb,$Sb,_Sb,aTb;var lP=mdb(sme,'StressOptions',992);bcb(993,1,{},fTb);_.$e=function gTb(){var a;return a=new iTb,a};_._e=function hTb(a){};var kP=mdb(sme,'StressOptions/StressFactory',993);bcb(1128,209,Mle,iTb);_.Ze=function jTb(a,b){var c,d,e,f,g;Odd(b,Sme,1);Ccb(DD(hkd(a,(bTb(),VSb))))?Ccb(DD(hkd(a,_Sb)))||$Cb((c=new _Cb((Pgd(),new bhd(a))),c)):WQb(new ZQb,a,Udd(b,1));e=TQb(a);d=LQb(this.a,e);for(g=d.Kc();g.Ob();){f=BD(g.Pb(),231);if(f.e.c.length<=1){continue}sTb(this.b,f);qTb(this.b);Hkb(f.d,new kTb)}e=KQb(d);SQb(e);Qdd(b)};var nP=mdb(Ume,'StressLayoutProvider',1128);bcb(1129,1,qie,kTb);_.td=function lTb(a){lRb(BD(a,447))};var mP=mdb(Ume,'StressLayoutProvider/lambda$0$Type',1129);bcb(990,1,{},tTb);_.c=0;_.e=0;_.g=0;var qP=mdb(Ume,'StressMajorization',990);bcb(379,22,{3:1,35:1,22:1,379:1},zTb);var vTb,wTb,xTb;var oP=ndb(Ume,'StressMajorization/Dimension',379,CI,BTb,ATb);var CTb;bcb(991,1,Dke,ETb);_.ue=function FTb(a,b){return uTb(this.a,BD(a,144),BD(b,144))};_.Fb=function GTb(a){return this===a};_.ve=function HTb(){return new tpb(this)};var pP=mdb(Ume,'StressMajorization/lambda$0$Type',991);bcb(1229,1,{},PTb);var tP=mdb(Wme,'ElkLayered',1229);bcb(1230,1,qie,STb);_.td=function TTb(a){QTb(BD(a,37))};var rP=mdb(Wme,'ElkLayered/lambda$0$Type',1230);bcb(1231,1,qie,UTb);_.td=function VTb(a){RTb(this.a,BD(a,37))};var sP=mdb(Wme,'ElkLayered/lambda$1$Type',1231);bcb(1263,1,{},bUb);var WTb,XTb,YTb;var xP=mdb(Wme,'GraphConfigurator',1263);bcb(759,1,qie,dUb);_.td=function eUb(a){$Tb(this.a,BD(a,10))};var uP=mdb(Wme,'GraphConfigurator/lambda$0$Type',759);bcb(760,1,{},fUb);_.Kb=function gUb(a){return ZTb(),new YAb(null,new Kub(BD(a,29).a,16))};var vP=mdb(Wme,'GraphConfigurator/lambda$1$Type',760);bcb(761,1,qie,hUb);_.td=function iUb(a){$Tb(this.a,BD(a,10))};var wP=mdb(Wme,'GraphConfigurator/lambda$2$Type',761);bcb(1127,209,Mle,jUb);_.Ze=function kUb(a,b){var c;c=U1b(new a2b,a);PD(hkd(a,(Nyc(),axc)))===PD((hbd(),ebd))?JTb(this.a,c,b):KTb(this.a,c,b);z2b(new D2b,c)};var yP=mdb(Wme,'LayeredLayoutProvider',1127);bcb(356,22,{3:1,35:1,22:1,356:1},rUb);var lUb,mUb,nUb,oUb,pUb;var zP=ndb(Wme,'LayeredPhases',356,CI,tUb,sUb);var uUb;bcb(1651,1,{},CUb);_.i=0;var wUb;var CP=mdb(Xme,'ComponentsToCGraphTransformer',1651);var hVb;bcb(1652,1,{},DUb);_.ef=function EUb(a,b){return $wnd.Math.min(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};_.ff=function FUb(a,b){return $wnd.Math.min(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};var AP=mdb(Xme,'ComponentsToCGraphTransformer/1',1652);bcb(81,1,{81:1});_.i=0;_.k=true;_.o=Qje;var IP=mdb(Yme,'CNode',81);bcb(460,81,{460:1,81:1},GUb,HUb);_.Ib=function IUb(){return ''};var BP=mdb(Xme,'ComponentsToCGraphTransformer/CRectNode',460);bcb(1623,1,{},VUb);var JUb,KUb;var FP=mdb(Xme,'OneDimensionalComponentsCompaction',1623);bcb(1624,1,{},YUb);_.Kb=function ZUb(a){return WUb(BD(a,46))};_.Fb=function $Ub(a){return this===a};var DP=mdb(Xme,'OneDimensionalComponentsCompaction/lambda$0$Type',1624);bcb(1625,1,{},_Ub);_.Kb=function aVb(a){return XUb(BD(a,46))};_.Fb=function bVb(a){return this===a};var EP=mdb(Xme,'OneDimensionalComponentsCompaction/lambda$1$Type',1625);bcb(1654,1,{},dVb);var GP=mdb(Yme,'CGraph',1654);bcb(189,1,{189:1},gVb);_.b=0;_.c=0;_.e=0;_.g=true;_.i=Qje;var HP=mdb(Yme,'CGroup',189);bcb(1653,1,{},jVb);_.ef=function kVb(a,b){return $wnd.Math.max(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};_.ff=function lVb(a,b){return $wnd.Math.max(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};var JP=mdb(Yme,Ike,1653);bcb(1655,1,{},CVb);_.d=false;var mVb;var LP=mdb(Yme,Nke,1655);bcb(1656,1,{},DVb);_.Kb=function EVb(a){return nVb(),Bcb(),BD(BD(a,46).a,81).d.e!=0?true:false};_.Fb=function FVb(a){return this===a};var KP=mdb(Yme,Oke,1656);bcb(823,1,{},IVb);_.a=false;_.b=false;_.c=false;_.d=false;var MP=mdb(Yme,Pke,823);bcb(1825,1,{},OVb);var RP=mdb(Zme,Qke,1825);var bQ=odb($me,Fke);bcb(1826,1,{369:1},SVb);_.Ke=function TVb(a){QVb(this,BD(a,466))};var OP=mdb(Zme,Rke,1826);bcb(1827,1,Dke,VVb);_.ue=function WVb(a,b){return UVb(BD(a,81),BD(b,81))};_.Fb=function XVb(a){return this===a};_.ve=function YVb(){return new tpb(this)};var NP=mdb(Zme,Ske,1827);bcb(466,1,{466:1},ZVb);_.a=false;var PP=mdb(Zme,Tke,466);bcb(1828,1,Dke,$Vb);_.ue=function _Vb(a,b){return PVb(BD(a,466),BD(b,466))};_.Fb=function aWb(a){return this===a};_.ve=function bWb(){return new tpb(this)};var QP=mdb(Zme,Uke,1828);bcb(140,1,{140:1},cWb,dWb);_.Fb=function eWb(a){var b;if(a==null){return false}if(TP!=rb(a)){return false}b=BD(a,140);return wtb(this.c,b.c)&&wtb(this.d,b.d)};_.Hb=function fWb(){return Hlb(OC(GC(SI,1),Uhe,1,5,[this.c,this.d]))};_.Ib=function gWb(){return '('+this.c+She+this.d+(this.a?'cx':'')+this.b+')'};_.a=true;_.c=0;_.d=0;var TP=mdb($me,'Point',140);bcb(405,22,{3:1,35:1,22:1,405:1},oWb);var hWb,iWb,jWb,kWb;var SP=ndb($me,'Point/Quadrant',405,CI,sWb,rWb);var tWb;bcb(1642,1,{},CWb);_.b=null;_.c=null;_.d=null;_.e=null;_.f=null;var vWb,wWb,xWb,yWb,zWb;var aQ=mdb($me,'RectilinearConvexHull',1642);bcb(574,1,{369:1},NWb);_.Ke=function OWb(a){MWb(this,BD(a,140))};_.b=0;var KWb;var VP=mdb($me,'RectilinearConvexHull/MaximalElementsEventHandler',574);bcb(1644,1,Dke,QWb);_.ue=function RWb(a,b){return PWb(ED(a),ED(b))};_.Fb=function SWb(a){return this===a};_.ve=function TWb(){return new tpb(this)};var UP=mdb($me,'RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type',1644);bcb(1643,1,{369:1},VWb);_.Ke=function WWb(a){UWb(this,BD(a,140))};_.a=0;_.b=null;_.c=null;_.d=null;_.e=null;var WP=mdb($me,'RectilinearConvexHull/RectangleEventHandler',1643);bcb(1645,1,Dke,XWb);_.ue=function YWb(a,b){return EWb(BD(a,140),BD(b,140))};_.Fb=function ZWb(a){return this===a};_.ve=function $Wb(){return new tpb(this)};var XP=mdb($me,'RectilinearConvexHull/lambda$0$Type',1645);bcb(1646,1,Dke,_Wb);_.ue=function aXb(a,b){return FWb(BD(a,140),BD(b,140))};_.Fb=function bXb(a){return this===a};_.ve=function cXb(){return new tpb(this)};var YP=mdb($me,'RectilinearConvexHull/lambda$1$Type',1646);bcb(1647,1,Dke,dXb);_.ue=function eXb(a,b){return GWb(BD(a,140),BD(b,140))};_.Fb=function fXb(a){return this===a};_.ve=function gXb(){return new tpb(this)};var ZP=mdb($me,'RectilinearConvexHull/lambda$2$Type',1647);bcb(1648,1,Dke,hXb);_.ue=function iXb(a,b){return HWb(BD(a,140),BD(b,140))};_.Fb=function jXb(a){return this===a};_.ve=function kXb(){return new tpb(this)};var $P=mdb($me,'RectilinearConvexHull/lambda$3$Type',1648);bcb(1649,1,Dke,lXb);_.ue=function mXb(a,b){return IWb(BD(a,140),BD(b,140))};_.Fb=function nXb(a){return this===a};_.ve=function oXb(){return new tpb(this)};var _P=mdb($me,'RectilinearConvexHull/lambda$4$Type',1649);bcb(1650,1,{},qXb);var cQ=mdb($me,'Scanline',1650);bcb(2005,1,{});var dQ=mdb(_me,'AbstractGraphPlacer',2005);bcb(325,1,{325:1},AXb);_.mf=function BXb(a){if(this.nf(a)){Rc(this.b,BD(vNb(a,(wtc(),Esc)),21),a);return true}else{return false}};_.nf=function CXb(a){var b,c,d,e;b=BD(vNb(a,(wtc(),Esc)),21);e=BD(Qc(wXb,b),21);for(d=e.Kc();d.Ob();){c=BD(d.Pb(),21);if(!BD(Qc(this.b,c),15).dc()){return false}}return true};var wXb;var gQ=mdb(_me,'ComponentGroup',325);bcb(765,2005,{},HXb);_.of=function IXb(a){var b,c;for(c=new olb(this.a);c.an){v=0;w+=m+e;m=0}q=g.c;uXb(g,v+q.a,w+q.b);X6c(q);c=$wnd.Math.max(c,v+s.a);m=$wnd.Math.max(m,s.b);v+=s.a+e}b.f.a=c;b.f.b=w+m;if(Ccb(DD(vNb(f,qwc)))){d=new gYb;YXb(d,a,e);for(l=a.Kc();l.Ob();){k=BD(l.Pb(),37);P6c(X6c(k.c),d.e)}P6c(X6c(b.f),d.a)}tXb(b,a)};var uQ=mdb(_me,'SimpleRowGraphPlacer',1291);bcb(1292,1,Dke,VYb);_.ue=function WYb(a,b){return UYb(BD(a,37),BD(b,37))};_.Fb=function XYb(a){return this===a};_.ve=function YYb(){return new tpb(this)};var tQ=mdb(_me,'SimpleRowGraphPlacer/1',1292);var ZYb;bcb(1262,1,Vke,dZb);_.Lb=function eZb(a){var b;return b=BD(vNb(BD(a,243).b,(Nyc(),jxc)),74),!!b&&b.b!=0};_.Fb=function fZb(a){return this===a};_.Mb=function gZb(a){var b;return b=BD(vNb(BD(a,243).b,(Nyc(),jxc)),74),!!b&&b.b!=0};var vQ=mdb(dne,'CompoundGraphPostprocessor/1',1262);bcb(1261,1,ene,wZb);_.pf=function xZb(a,b){qZb(this,BD(a,37),b)};var xQ=mdb(dne,'CompoundGraphPreprocessor',1261);bcb(441,1,{441:1},yZb);_.c=false;var wQ=mdb(dne,'CompoundGraphPreprocessor/ExternalPort',441);bcb(243,1,{243:1},BZb);_.Ib=function CZb(){return Zr(this.c)+':'+TZb(this.b)};var zQ=mdb(dne,'CrossHierarchyEdge',243);bcb(763,1,Dke,EZb);_.ue=function FZb(a,b){return DZb(this,BD(a,243),BD(b,243))};_.Fb=function GZb(a){return this===a};_.ve=function IZb(){return new tpb(this)};var yQ=mdb(dne,'CrossHierarchyEdgeComparator',763);bcb(299,134,{3:1,299:1,94:1,134:1});_.p=0;var JQ=mdb(fne,'LGraphElement',299);bcb(17,299,{3:1,17:1,299:1,94:1,134:1},UZb);_.Ib=function VZb(){return TZb(this)};var AQ=mdb(fne,'LEdge',17);bcb(37,299,{3:1,20:1,37:1,299:1,94:1,134:1},XZb);_.Jc=function YZb(a){reb(this,a)};_.Kc=function ZZb(){return new olb(this.b)};_.Ib=function $Zb(){if(this.b.c.length==0){return 'G-unlayered'+Fe(this.a)}else if(this.a.c.length==0){return 'G-layered'+Fe(this.b)}return 'G[layerless'+Fe(this.a)+', layers'+Fe(this.b)+']'};var KQ=mdb(fne,'LGraph',37);var _Zb;bcb(657,1,{});_.qf=function b$b(){return this.e.n};_.We=function c$b(a){return vNb(this.e,a)};_.rf=function d$b(){return this.e.o};_.sf=function e$b(){return this.e.p};_.Xe=function f$b(a){return wNb(this.e,a)};_.tf=function g$b(a){this.e.n.a=a.a;this.e.n.b=a.b};_.uf=function h$b(a){this.e.o.a=a.a;this.e.o.b=a.b};_.vf=function i$b(a){this.e.p=a};var BQ=mdb(fne,'LGraphAdapters/AbstractLShapeAdapter',657);bcb(577,1,{839:1},j$b);_.wf=function k$b(){var a,b;if(!this.b){this.b=Pu(this.a.b.c.length);for(b=new olb(this.a.b);b.a0&&E_b((BCb(c-1,b.length),b.charCodeAt(c-1)),nne)){--c}if(g> ',a),C0b(c));Qfb(Pfb((a.a+='[',a),c.i),']')}return a.a};_.c=true;_.d=false;var t0b,u0b,v0b,w0b,x0b,y0b;var aR=mdb(fne,'LPort',11);bcb(397,1,vie,J0b);_.Jc=function K0b(a){reb(this,a)};_.Kc=function L0b(){var a;a=new olb(this.a.e);return new M0b(a)};var RQ=mdb(fne,'LPort/1',397);bcb(1290,1,aie,M0b);_.Nb=function N0b(a){Rrb(this,a)};_.Pb=function P0b(){return BD(mlb(this.a),17).c};_.Ob=function O0b(){return llb(this.a)};_.Qb=function Q0b(){nlb(this.a)};var QQ=mdb(fne,'LPort/1/1',1290);bcb(359,1,vie,R0b);_.Jc=function S0b(a){reb(this,a)};_.Kc=function T0b(){var a;return a=new olb(this.a.g),new U0b(a)};var TQ=mdb(fne,'LPort/2',359);bcb(762,1,aie,U0b);_.Nb=function V0b(a){Rrb(this,a)};_.Pb=function X0b(){return BD(mlb(this.a),17).d};_.Ob=function W0b(){return llb(this.a)};_.Qb=function Y0b(){nlb(this.a)};var SQ=mdb(fne,'LPort/2/1',762);bcb(1283,1,vie,Z0b);_.Jc=function $0b(a){reb(this,a)};_.Kc=function _0b(){return new b1b(this)};var VQ=mdb(fne,'LPort/CombineIter',1283);bcb(201,1,aie,b1b);_.Nb=function c1b(a){Rrb(this,a)};_.Qb=function f1b(){Srb()};_.Ob=function d1b(){return a1b(this)};_.Pb=function e1b(){return llb(this.a)?mlb(this.a):mlb(this.b)};var UQ=mdb(fne,'LPort/CombineIter/1',201);bcb(1285,1,Vke,h1b);_.Lb=function i1b(a){return g1b(a)};_.Fb=function j1b(a){return this===a};_.Mb=function k1b(a){return z0b(),BD(a,11).e.c.length!=0};var WQ=mdb(fne,'LPort/lambda$0$Type',1285);bcb(1284,1,Vke,m1b);_.Lb=function n1b(a){return l1b(a)};_.Fb=function o1b(a){return this===a};_.Mb=function p1b(a){return z0b(),BD(a,11).g.c.length!=0};var XQ=mdb(fne,'LPort/lambda$1$Type',1284);bcb(1286,1,Vke,q1b);_.Lb=function r1b(a){return z0b(),BD(a,11).j==(Ucd(),Acd)};_.Fb=function s1b(a){return this===a};_.Mb=function t1b(a){return z0b(),BD(a,11).j==(Ucd(),Acd)};var YQ=mdb(fne,'LPort/lambda$2$Type',1286);bcb(1287,1,Vke,u1b);_.Lb=function v1b(a){return z0b(),BD(a,11).j==(Ucd(),zcd)};_.Fb=function w1b(a){return this===a};_.Mb=function x1b(a){return z0b(),BD(a,11).j==(Ucd(),zcd)};var ZQ=mdb(fne,'LPort/lambda$3$Type',1287);bcb(1288,1,Vke,y1b);_.Lb=function z1b(a){return z0b(),BD(a,11).j==(Ucd(),Rcd)};_.Fb=function A1b(a){return this===a};_.Mb=function B1b(a){return z0b(),BD(a,11).j==(Ucd(),Rcd)};var $Q=mdb(fne,'LPort/lambda$4$Type',1288);bcb(1289,1,Vke,C1b);_.Lb=function D1b(a){return z0b(),BD(a,11).j==(Ucd(),Tcd)};_.Fb=function E1b(a){return this===a};_.Mb=function F1b(a){return z0b(),BD(a,11).j==(Ucd(),Tcd)};var _Q=mdb(fne,'LPort/lambda$5$Type',1289);bcb(29,299,{3:1,20:1,299:1,29:1,94:1,134:1},H1b);_.Jc=function I1b(a){reb(this,a)};_.Kc=function J1b(){return new olb(this.a)};_.Ib=function K1b(){return 'L_'+Jkb(this.b.b,this,0)+Fe(this.a)};var cR=mdb(fne,'Layer',29);bcb(1342,1,{},a2b);var mR=mdb(tne,une,1342);bcb(1346,1,{},e2b);_.Kb=function f2b(a){return atd(BD(a,82))};var dR=mdb(tne,'ElkGraphImporter/0methodref$connectableShapeToNode$Type',1346);bcb(1349,1,{},g2b);_.Kb=function h2b(a){return atd(BD(a,82))};var eR=mdb(tne,'ElkGraphImporter/1methodref$connectableShapeToNode$Type',1349);bcb(1343,1,qie,i2b);_.td=function j2b(a){Q1b(this.a,BD(a,118))};var fR=mdb(tne,vne,1343);bcb(1344,1,qie,k2b);_.td=function l2b(a){Q1b(this.a,BD(a,118))};var gR=mdb(tne,wne,1344);bcb(1345,1,{},m2b);_.Kb=function n2b(a){return new YAb(null,new Kub(Old(BD(a,79)),16))};var hR=mdb(tne,xne,1345);bcb(1347,1,Oie,o2b);_.Mb=function p2b(a){return b2b(this.a,BD(a,33))};var iR=mdb(tne,yne,1347);bcb(1348,1,{},q2b);_.Kb=function r2b(a){return new YAb(null,new Kub(Nld(BD(a,79)),16))};var jR=mdb(tne,'ElkGraphImporter/lambda$5$Type',1348);bcb(1350,1,Oie,s2b);_.Mb=function t2b(a){return c2b(this.a,BD(a,33))};var kR=mdb(tne,'ElkGraphImporter/lambda$7$Type',1350);bcb(1351,1,Oie,u2b);_.Mb=function v2b(a){return d2b(BD(a,79))};var lR=mdb(tne,'ElkGraphImporter/lambda$8$Type',1351);bcb(1278,1,{},D2b);var w2b;var rR=mdb(tne,'ElkGraphLayoutTransferrer',1278);bcb(1279,1,Oie,G2b);_.Mb=function H2b(a){return E2b(this.a,BD(a,17))};var nR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$0$Type',1279);bcb(1280,1,qie,I2b);_.td=function J2b(a){x2b();Ekb(this.a,BD(a,17))};var oR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$1$Type',1280);bcb(1281,1,Oie,K2b);_.Mb=function L2b(a){return F2b(this.a,BD(a,17))};var pR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$2$Type',1281);bcb(1282,1,qie,M2b);_.td=function N2b(a){x2b();Ekb(this.a,BD(a,17))};var qR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$3$Type',1282);bcb(1485,1,ene,S2b);_.pf=function T2b(a,b){Q2b(BD(a,37),b)};var uR=mdb(Ane,'CommentNodeMarginCalculator',1485);bcb(1486,1,{},U2b);_.Kb=function V2b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var sR=mdb(Ane,'CommentNodeMarginCalculator/lambda$0$Type',1486);bcb(1487,1,qie,W2b);_.td=function X2b(a){R2b(BD(a,10))};var tR=mdb(Ane,'CommentNodeMarginCalculator/lambda$1$Type',1487);bcb(1488,1,ene,_2b);_.pf=function a3b(a,b){Z2b(BD(a,37),b)};var vR=mdb(Ane,'CommentPostprocessor',1488);bcb(1489,1,ene,e3b);_.pf=function f3b(a,b){b3b(BD(a,37),b)};var wR=mdb(Ane,'CommentPreprocessor',1489);bcb(1490,1,ene,h3b);_.pf=function i3b(a,b){g3b(BD(a,37),b)};var xR=mdb(Ane,'ConstraintsPostprocessor',1490);bcb(1491,1,ene,p3b);_.pf=function q3b(a,b){n3b(BD(a,37),b)};var yR=mdb(Ane,'EdgeAndLayerConstraintEdgeReverser',1491);bcb(1492,1,ene,t3b);_.pf=function v3b(a,b){r3b(BD(a,37),b)};var CR=mdb(Ane,'EndLabelPostprocessor',1492);bcb(1493,1,{},w3b);_.Kb=function x3b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var zR=mdb(Ane,'EndLabelPostprocessor/lambda$0$Type',1493);bcb(1494,1,Oie,y3b);_.Mb=function z3b(a){return u3b(BD(a,10))};var AR=mdb(Ane,'EndLabelPostprocessor/lambda$1$Type',1494);bcb(1495,1,qie,A3b);_.td=function B3b(a){s3b(BD(a,10))};var BR=mdb(Ane,'EndLabelPostprocessor/lambda$2$Type',1495);bcb(1496,1,ene,M3b);_.pf=function P3b(a,b){I3b(BD(a,37),b)};var JR=mdb(Ane,'EndLabelPreprocessor',1496);bcb(1497,1,{},Q3b);_.Kb=function R3b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var DR=mdb(Ane,'EndLabelPreprocessor/lambda$0$Type',1497);bcb(1498,1,qie,S3b);_.td=function T3b(a){E3b(this.a,this.b,this.c,BD(a,10))};_.a=0;_.b=0;_.c=false;var ER=mdb(Ane,'EndLabelPreprocessor/lambda$1$Type',1498);bcb(1499,1,Oie,U3b);_.Mb=function V3b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),pad))};var FR=mdb(Ane,'EndLabelPreprocessor/lambda$2$Type',1499);bcb(1500,1,qie,W3b);_.td=function X3b(a){Dsb(this.a,BD(a,70))};var GR=mdb(Ane,'EndLabelPreprocessor/lambda$3$Type',1500);bcb(1501,1,Oie,Y3b);_.Mb=function Z3b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),oad))};var HR=mdb(Ane,'EndLabelPreprocessor/lambda$4$Type',1501);bcb(1502,1,qie,$3b);_.td=function _3b(a){Dsb(this.a,BD(a,70))};var IR=mdb(Ane,'EndLabelPreprocessor/lambda$5$Type',1502);bcb(1551,1,ene,i4b);_.pf=function j4b(a,b){f4b(BD(a,37),b)};var a4b;var RR=mdb(Ane,'EndLabelSorter',1551);bcb(1552,1,Dke,l4b);_.ue=function m4b(a,b){return k4b(BD(a,456),BD(b,456))};_.Fb=function n4b(a){return this===a};_.ve=function o4b(){return new tpb(this)};var KR=mdb(Ane,'EndLabelSorter/1',1552);bcb(456,1,{456:1},p4b);var LR=mdb(Ane,'EndLabelSorter/LabelGroup',456);bcb(1553,1,{},q4b);_.Kb=function r4b(a){return b4b(),new YAb(null,new Kub(BD(a,29).a,16))};var MR=mdb(Ane,'EndLabelSorter/lambda$0$Type',1553);bcb(1554,1,Oie,s4b);_.Mb=function t4b(a){return b4b(),BD(a,10).k==(j0b(),h0b)};var NR=mdb(Ane,'EndLabelSorter/lambda$1$Type',1554);bcb(1555,1,qie,u4b);_.td=function v4b(a){g4b(BD(a,10))};var OR=mdb(Ane,'EndLabelSorter/lambda$2$Type',1555);bcb(1556,1,Oie,w4b);_.Mb=function x4b(a){return b4b(),PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),oad))};var PR=mdb(Ane,'EndLabelSorter/lambda$3$Type',1556);bcb(1557,1,Oie,y4b);_.Mb=function z4b(a){return b4b(),PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),pad))};var QR=mdb(Ane,'EndLabelSorter/lambda$4$Type',1557);bcb(1503,1,ene,L4b);_.pf=function M4b(a,b){J4b(this,BD(a,37))};_.b=0;_.c=0;var YR=mdb(Ane,'FinalSplineBendpointsCalculator',1503);bcb(1504,1,{},N4b);_.Kb=function O4b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var SR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$0$Type',1504);bcb(1505,1,{},P4b);_.Kb=function Q4b(a){return new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var TR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$1$Type',1505);bcb(1506,1,Oie,R4b);_.Mb=function S4b(a){return !OZb(BD(a,17))};var UR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$2$Type',1506);bcb(1507,1,Oie,T4b);_.Mb=function U4b(a){return wNb(BD(a,17),(wtc(),rtc))};var VR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$3$Type',1507);bcb(1508,1,qie,V4b);_.td=function W4b(a){C4b(this.a,BD(a,128))};var WR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$4$Type',1508);bcb(1509,1,qie,X4b);_.td=function Y4b(a){smb(BD(a,17).a)};var XR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$5$Type',1509);bcb(792,1,ene,u5b);_.pf=function v5b(a,b){l5b(this,BD(a,37),b)};var $R=mdb(Ane,'GraphTransformer',792);bcb(511,22,{3:1,35:1,22:1,511:1},z5b);var w5b,x5b;var ZR=ndb(Ane,'GraphTransformer/Mode',511,CI,B5b,A5b);var C5b;bcb(1510,1,ene,I5b);_.pf=function J5b(a,b){F5b(BD(a,37),b)};var _R=mdb(Ane,'HierarchicalNodeResizingProcessor',1510);bcb(1511,1,ene,Q5b);_.pf=function R5b(a,b){M5b(BD(a,37),b)};var bS=mdb(Ane,'HierarchicalPortConstraintProcessor',1511);bcb(1512,1,Dke,T5b);_.ue=function U5b(a,b){return S5b(BD(a,10),BD(b,10))};_.Fb=function V5b(a){return this===a};_.ve=function W5b(){return new tpb(this)};var aS=mdb(Ane,'HierarchicalPortConstraintProcessor/NodeComparator',1512);bcb(1513,1,ene,Z5b);_.pf=function $5b(a,b){X5b(BD(a,37),b)};var cS=mdb(Ane,'HierarchicalPortDummySizeProcessor',1513);bcb(1514,1,ene,l6b);_.pf=function m6b(a,b){e6b(this,BD(a,37),b)};_.a=0;var fS=mdb(Ane,'HierarchicalPortOrthogonalEdgeRouter',1514);bcb(1515,1,Dke,o6b);_.ue=function p6b(a,b){return n6b(BD(a,10),BD(b,10))};_.Fb=function q6b(a){return this===a};_.ve=function r6b(){return new tpb(this)};var dS=mdb(Ane,'HierarchicalPortOrthogonalEdgeRouter/1',1515);bcb(1516,1,Dke,t6b);_.ue=function u6b(a,b){return s6b(BD(a,10),BD(b,10))};_.Fb=function v6b(a){return this===a};_.ve=function w6b(){return new tpb(this)};var eS=mdb(Ane,'HierarchicalPortOrthogonalEdgeRouter/2',1516);bcb(1517,1,ene,z6b);_.pf=function A6b(a,b){y6b(BD(a,37),b)};var gS=mdb(Ane,'HierarchicalPortPositionProcessor',1517);bcb(1518,1,ene,J6b);_.pf=function K6b(a,b){I6b(this,BD(a,37))};_.a=0;_.c=0;var B6b,C6b;var kS=mdb(Ane,'HighDegreeNodeLayeringProcessor',1518);bcb(571,1,{571:1},L6b);_.b=-1;_.d=-1;var hS=mdb(Ane,'HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation',571);bcb(1519,1,{},M6b);_.Kb=function N6b(a){return D6b(),R_b(BD(a,10))};_.Fb=function O6b(a){return this===a};var iS=mdb(Ane,'HighDegreeNodeLayeringProcessor/lambda$0$Type',1519);bcb(1520,1,{},P6b);_.Kb=function Q6b(a){return D6b(),U_b(BD(a,10))};_.Fb=function R6b(a){return this===a};var jS=mdb(Ane,'HighDegreeNodeLayeringProcessor/lambda$1$Type',1520);bcb(1526,1,ene,X6b);_.pf=function Y6b(a,b){W6b(this,BD(a,37),b)};var pS=mdb(Ane,'HyperedgeDummyMerger',1526);bcb(793,1,{},Z6b);_.a=false;_.b=false;_.c=false;var lS=mdb(Ane,'HyperedgeDummyMerger/MergeState',793);bcb(1527,1,{},$6b);_.Kb=function _6b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var mS=mdb(Ane,'HyperedgeDummyMerger/lambda$0$Type',1527);bcb(1528,1,{},a7b);_.Kb=function b7b(a){return new YAb(null,new Kub(BD(a,10).j,16))};var nS=mdb(Ane,'HyperedgeDummyMerger/lambda$1$Type',1528);bcb(1529,1,qie,c7b);_.td=function d7b(a){BD(a,11).p=-1};var oS=mdb(Ane,'HyperedgeDummyMerger/lambda$2$Type',1529);bcb(1530,1,ene,g7b);_.pf=function h7b(a,b){f7b(BD(a,37),b)};var qS=mdb(Ane,'HypernodesProcessor',1530);bcb(1531,1,ene,j7b);_.pf=function k7b(a,b){i7b(BD(a,37),b)};var rS=mdb(Ane,'InLayerConstraintProcessor',1531);bcb(1532,1,ene,m7b);_.pf=function n7b(a,b){l7b(BD(a,37),b)};var sS=mdb(Ane,'InnermostNodeMarginCalculator',1532);bcb(1533,1,ene,r7b);_.pf=function w7b(a,b){q7b(this,BD(a,37))};_.a=Qje;_.b=Qje;_.c=Pje;_.d=Pje;var zS=mdb(Ane,'InteractiveExternalPortPositioner',1533);bcb(1534,1,{},x7b);_.Kb=function y7b(a){return BD(a,17).d.i};_.Fb=function z7b(a){return this===a};var tS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$0$Type',1534);bcb(1535,1,{},A7b);_.Kb=function B7b(a){return s7b(this.a,ED(a))};_.Fb=function C7b(a){return this===a};var uS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$1$Type',1535);bcb(1536,1,{},D7b);_.Kb=function E7b(a){return BD(a,17).c.i};_.Fb=function F7b(a){return this===a};var vS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$2$Type',1536);bcb(1537,1,{},G7b);_.Kb=function H7b(a){return t7b(this.a,ED(a))};_.Fb=function I7b(a){return this===a};var wS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$3$Type',1537);bcb(1538,1,{},J7b);_.Kb=function K7b(a){return u7b(this.a,ED(a))};_.Fb=function L7b(a){return this===a};var xS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$4$Type',1538);bcb(1539,1,{},M7b);_.Kb=function N7b(a){return v7b(this.a,ED(a))};_.Fb=function O7b(a){return this===a};var yS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$5$Type',1539);bcb(77,22,{3:1,35:1,22:1,77:1,234:1},T8b);_.Kf=function U8b(){switch(this.g){case 15:return new eoc;case 22:return new Aoc;case 47:return new Joc;case 28:case 35:return new uac;case 32:return new S2b;case 42:return new _2b;case 1:return new e3b;case 41:return new h3b;case 56:return new u5b((y5b(),x5b));case 0:return new u5b((y5b(),w5b));case 2:return new p3b;case 54:return new t3b;case 33:return new M3b;case 51:return new L4b;case 55:return new I5b;case 13:return new Q5b;case 38:return new Z5b;case 44:return new l6b;case 40:return new z6b;case 9:return new J6b;case 49:return new sgc;case 37:return new X6b;case 43:return new g7b;case 27:return new j7b;case 30:return new m7b;case 3:return new r7b;case 18:return new b9b;case 29:return new h9b;case 5:return new u9b;case 50:return new D9b;case 34:return new $9b;case 36:return new Iac;case 52:return new i4b;case 11:return new Sac;case 7:return new abc;case 39:return new obc;case 45:return new rbc;case 16:return new vbc;case 10:return new Fbc;case 48:return new Xbc;case 21:return new ccc;case 23:return new fGc((rGc(),pGc));case 8:return new lcc;case 12:return new tcc;case 4:return new ycc;case 19:return new Tcc;case 17:return new pdc;case 53:return new sdc;case 6:return new hec;case 25:return new wdc;case 46:return new Ndc;case 31:return new sec;case 14:return new Fec;case 26:return new ppc;case 20:return new Uec;case 24:return new fGc((rGc(),qGc));default:throw vbb(new Wdb(Dne+(this.f!=null?this.f:''+this.g)));}};var P7b,Q7b,R7b,S7b,T7b,U7b,V7b,W7b,X7b,Y7b,Z7b,$7b,_7b,a8b,b8b,c8b,d8b,e8b,f8b,g8b,h8b,i8b,j8b,k8b,l8b,m8b,n8b,o8b,p8b,q8b,r8b,s8b,t8b,u8b,v8b,w8b,x8b,y8b,z8b,A8b,B8b,C8b,D8b,E8b,F8b,G8b,H8b,I8b,J8b,K8b,L8b,M8b,N8b,O8b,P8b,Q8b,R8b;var AS=ndb(Ane,Ene,77,CI,W8b,V8b);var X8b;bcb(1540,1,ene,b9b);_.pf=function c9b(a,b){_8b(BD(a,37),b)};var BS=mdb(Ane,'InvertedPortProcessor',1540);bcb(1541,1,ene,h9b);_.pf=function i9b(a,b){g9b(BD(a,37),b)};var FS=mdb(Ane,'LabelAndNodeSizeProcessor',1541);bcb(1542,1,Oie,j9b);_.Mb=function k9b(a){return BD(a,10).k==(j0b(),h0b)};var CS=mdb(Ane,'LabelAndNodeSizeProcessor/lambda$0$Type',1542);bcb(1543,1,Oie,l9b);_.Mb=function m9b(a){return BD(a,10).k==(j0b(),e0b)};var DS=mdb(Ane,'LabelAndNodeSizeProcessor/lambda$1$Type',1543);bcb(1544,1,qie,n9b);_.td=function o9b(a){e9b(this.b,this.a,this.c,BD(a,10))};_.a=false;_.c=false;var ES=mdb(Ane,'LabelAndNodeSizeProcessor/lambda$2$Type',1544);bcb(1545,1,ene,u9b);_.pf=function v9b(a,b){s9b(BD(a,37),b)};var p9b;var HS=mdb(Ane,'LabelDummyInserter',1545);bcb(1546,1,Vke,w9b);_.Lb=function x9b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),nad))};_.Fb=function y9b(a){return this===a};_.Mb=function z9b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),nad))};var GS=mdb(Ane,'LabelDummyInserter/1',1546);bcb(1547,1,ene,D9b);_.pf=function E9b(a,b){C9b(BD(a,37),b)};var JS=mdb(Ane,'LabelDummyRemover',1547);bcb(1548,1,Oie,F9b);_.Mb=function G9b(a){return Ccb(DD(vNb(BD(a,70),(Nyc(),Pwc))))};var IS=mdb(Ane,'LabelDummyRemover/lambda$0$Type',1548);bcb(1359,1,ene,$9b);_.pf=function cac(a,b){W9b(this,BD(a,37),b)};_.a=null;var H9b;var QS=mdb(Ane,'LabelDummySwitcher',1359);bcb(286,1,{286:1},gac);_.c=0;_.d=null;_.f=0;var KS=mdb(Ane,'LabelDummySwitcher/LabelDummyInfo',286);bcb(1360,1,{},hac);_.Kb=function iac(a){return I9b(),new YAb(null,new Kub(BD(a,29).a,16))};var LS=mdb(Ane,'LabelDummySwitcher/lambda$0$Type',1360);bcb(1361,1,Oie,jac);_.Mb=function kac(a){return I9b(),BD(a,10).k==(j0b(),f0b)};var MS=mdb(Ane,'LabelDummySwitcher/lambda$1$Type',1361);bcb(1362,1,{},lac);_.Kb=function mac(a){return _9b(this.a,BD(a,10))};var NS=mdb(Ane,'LabelDummySwitcher/lambda$2$Type',1362);bcb(1363,1,qie,nac);_.td=function oac(a){aac(this.a,BD(a,286))};var OS=mdb(Ane,'LabelDummySwitcher/lambda$3$Type',1363);bcb(1364,1,Dke,pac);_.ue=function qac(a,b){return bac(BD(a,286),BD(b,286))};_.Fb=function rac(a){return this===a};_.ve=function sac(){return new tpb(this)};var PS=mdb(Ane,'LabelDummySwitcher/lambda$4$Type',1364);bcb(791,1,ene,uac);_.pf=function vac(a,b){tac(BD(a,37),b)};var RS=mdb(Ane,'LabelManagementProcessor',791);bcb(1549,1,ene,Iac);_.pf=function Jac(a,b){Cac(BD(a,37),b)};var TS=mdb(Ane,'LabelSideSelector',1549);bcb(1550,1,Oie,Kac);_.Mb=function Lac(a){return Ccb(DD(vNb(BD(a,70),(Nyc(),Pwc))))};var SS=mdb(Ane,'LabelSideSelector/lambda$0$Type',1550);bcb(1558,1,ene,Sac);_.pf=function Tac(a,b){Oac(BD(a,37),b)};var US=mdb(Ane,'LayerConstraintPostprocessor',1558);bcb(1559,1,ene,abc);_.pf=function bbc(a,b){$ac(BD(a,37),b)};var Uac;var WS=mdb(Ane,'LayerConstraintPreprocessor',1559);bcb(360,22,{3:1,35:1,22:1,360:1},ibc);var cbc,dbc,ebc,fbc;var VS=ndb(Ane,'LayerConstraintPreprocessor/HiddenNodeConnections',360,CI,kbc,jbc);var lbc;bcb(1560,1,ene,obc);_.pf=function pbc(a,b){nbc(BD(a,37),b)};var XS=mdb(Ane,'LayerSizeAndGraphHeightCalculator',1560);bcb(1561,1,ene,rbc);_.pf=function tbc(a,b){qbc(BD(a,37),b)};var YS=mdb(Ane,'LongEdgeJoiner',1561);bcb(1562,1,ene,vbc);_.pf=function xbc(a,b){ubc(BD(a,37),b)};var ZS=mdb(Ane,'LongEdgeSplitter',1562);bcb(1563,1,ene,Fbc);_.pf=function Ibc(a,b){Bbc(this,BD(a,37),b)};_.d=0;_.e=0;_.i=0;_.j=0;_.k=0;_.n=0;var bT=mdb(Ane,'NodePromotion',1563);bcb(1564,1,{},Jbc);_.Kb=function Kbc(a){return BD(a,46),Bcb(),true};_.Fb=function Lbc(a){return this===a};var $S=mdb(Ane,'NodePromotion/lambda$0$Type',1564);bcb(1565,1,{},Mbc);_.Kb=function Nbc(a){return Gbc(this.a,BD(a,46))};_.Fb=function Obc(a){return this===a};_.a=0;var _S=mdb(Ane,'NodePromotion/lambda$1$Type',1565);bcb(1566,1,{},Pbc);_.Kb=function Qbc(a){return Hbc(this.a,BD(a,46))};_.Fb=function Rbc(a){return this===a};_.a=0;var aT=mdb(Ane,'NodePromotion/lambda$2$Type',1566);bcb(1567,1,ene,Xbc);_.pf=function Ybc(a,b){Sbc(BD(a,37),b)};var cT=mdb(Ane,'NorthSouthPortPostprocessor',1567);bcb(1568,1,ene,ccc);_.pf=function ecc(a,b){acc(BD(a,37),b)};var eT=mdb(Ane,'NorthSouthPortPreprocessor',1568);bcb(1569,1,Dke,fcc);_.ue=function gcc(a,b){return dcc(BD(a,11),BD(b,11))};_.Fb=function hcc(a){return this===a};_.ve=function icc(){return new tpb(this)};var dT=mdb(Ane,'NorthSouthPortPreprocessor/lambda$0$Type',1569);bcb(1570,1,ene,lcc);_.pf=function ncc(a,b){kcc(BD(a,37),b)};var hT=mdb(Ane,'PartitionMidprocessor',1570);bcb(1571,1,Oie,occ);_.Mb=function pcc(a){return wNb(BD(a,10),(Nyc(),Nxc))};var fT=mdb(Ane,'PartitionMidprocessor/lambda$0$Type',1571);bcb(1572,1,qie,qcc);_.td=function rcc(a){mcc(this.a,BD(a,10))};var gT=mdb(Ane,'PartitionMidprocessor/lambda$1$Type',1572);bcb(1573,1,ene,tcc);_.pf=function ucc(a,b){scc(BD(a,37),b)};var iT=mdb(Ane,'PartitionPostprocessor',1573);bcb(1574,1,ene,ycc);_.pf=function zcc(a,b){wcc(BD(a,37),b)};var nT=mdb(Ane,'PartitionPreprocessor',1574);bcb(1575,1,Oie,Acc);_.Mb=function Bcc(a){return wNb(BD(a,10),(Nyc(),Nxc))};var jT=mdb(Ane,'PartitionPreprocessor/lambda$0$Type',1575);bcb(1576,1,{},Ccc);_.Kb=function Dcc(a){return new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var kT=mdb(Ane,'PartitionPreprocessor/lambda$1$Type',1576);bcb(1577,1,Oie,Ecc);_.Mb=function Fcc(a){return vcc(BD(a,17))};var lT=mdb(Ane,'PartitionPreprocessor/lambda$2$Type',1577);bcb(1578,1,qie,Gcc);_.td=function Hcc(a){xcc(BD(a,17))};var mT=mdb(Ane,'PartitionPreprocessor/lambda$3$Type',1578);bcb(1579,1,ene,Tcc);_.pf=function Xcc(a,b){Qcc(BD(a,37),b)};var Icc,Jcc,Kcc,Lcc,Mcc,Ncc;var tT=mdb(Ane,'PortListSorter',1579);bcb(1580,1,{},Zcc);_.Kb=function $cc(a){return Occ(),BD(a,11).e};var oT=mdb(Ane,'PortListSorter/lambda$0$Type',1580);bcb(1581,1,{},_cc);_.Kb=function adc(a){return Occ(),BD(a,11).g};var pT=mdb(Ane,'PortListSorter/lambda$1$Type',1581);bcb(1582,1,Dke,bdc);_.ue=function cdc(a,b){return Ucc(BD(a,11),BD(b,11))};_.Fb=function ddc(a){return this===a};_.ve=function edc(){return new tpb(this)};var qT=mdb(Ane,'PortListSorter/lambda$2$Type',1582);bcb(1583,1,Dke,fdc);_.ue=function gdc(a,b){return Vcc(BD(a,11),BD(b,11))};_.Fb=function hdc(a){return this===a};_.ve=function idc(){return new tpb(this)};var rT=mdb(Ane,'PortListSorter/lambda$3$Type',1583);bcb(1584,1,Dke,jdc);_.ue=function kdc(a,b){return Wcc(BD(a,11),BD(b,11))};_.Fb=function ldc(a){return this===a};_.ve=function mdc(){return new tpb(this)};var sT=mdb(Ane,'PortListSorter/lambda$4$Type',1584);bcb(1585,1,ene,pdc);_.pf=function qdc(a,b){ndc(BD(a,37),b)};var uT=mdb(Ane,'PortSideProcessor',1585);bcb(1586,1,ene,sdc);_.pf=function tdc(a,b){rdc(BD(a,37),b)};var vT=mdb(Ane,'ReversedEdgeRestorer',1586);bcb(1591,1,ene,wdc);_.pf=function xdc(a,b){udc(this,BD(a,37),b)};var CT=mdb(Ane,'SelfLoopPortRestorer',1591);bcb(1592,1,{},ydc);_.Kb=function zdc(a){return new YAb(null,new Kub(BD(a,29).a,16))};var wT=mdb(Ane,'SelfLoopPortRestorer/lambda$0$Type',1592);bcb(1593,1,Oie,Adc);_.Mb=function Bdc(a){return BD(a,10).k==(j0b(),h0b)};var xT=mdb(Ane,'SelfLoopPortRestorer/lambda$1$Type',1593);bcb(1594,1,Oie,Cdc);_.Mb=function Ddc(a){return wNb(BD(a,10),(wtc(),ntc))};var yT=mdb(Ane,'SelfLoopPortRestorer/lambda$2$Type',1594);bcb(1595,1,{},Edc);_.Kb=function Fdc(a){return BD(vNb(BD(a,10),(wtc(),ntc)),403)};var zT=mdb(Ane,'SelfLoopPortRestorer/lambda$3$Type',1595);bcb(1596,1,qie,Gdc);_.td=function Hdc(a){vdc(this.a,BD(a,403))};var AT=mdb(Ane,'SelfLoopPortRestorer/lambda$4$Type',1596);bcb(794,1,qie,Idc);_.td=function Jdc(a){ljc(BD(a,101))};var BT=mdb(Ane,'SelfLoopPortRestorer/lambda$5$Type',794);bcb(1597,1,ene,Ndc);_.pf=function Pdc(a,b){Kdc(BD(a,37),b)};var LT=mdb(Ane,'SelfLoopPostProcessor',1597);bcb(1598,1,{},Qdc);_.Kb=function Rdc(a){return new YAb(null,new Kub(BD(a,29).a,16))};var DT=mdb(Ane,'SelfLoopPostProcessor/lambda$0$Type',1598);bcb(1599,1,Oie,Sdc);_.Mb=function Tdc(a){return BD(a,10).k==(j0b(),h0b)};var ET=mdb(Ane,'SelfLoopPostProcessor/lambda$1$Type',1599);bcb(1600,1,Oie,Udc);_.Mb=function Vdc(a){return wNb(BD(a,10),(wtc(),ntc))};var FT=mdb(Ane,'SelfLoopPostProcessor/lambda$2$Type',1600);bcb(1601,1,qie,Wdc);_.td=function Xdc(a){Ldc(BD(a,10))};var GT=mdb(Ane,'SelfLoopPostProcessor/lambda$3$Type',1601);bcb(1602,1,{},Ydc);_.Kb=function Zdc(a){return new YAb(null,new Kub(BD(a,101).f,1))};var HT=mdb(Ane,'SelfLoopPostProcessor/lambda$4$Type',1602);bcb(1603,1,qie,$dc);_.td=function _dc(a){Mdc(this.a,BD(a,409))};var IT=mdb(Ane,'SelfLoopPostProcessor/lambda$5$Type',1603);bcb(1604,1,Oie,aec);_.Mb=function bec(a){return !!BD(a,101).i};var JT=mdb(Ane,'SelfLoopPostProcessor/lambda$6$Type',1604);bcb(1605,1,qie,cec);_.td=function dec(a){Odc(this.a,BD(a,101))};var KT=mdb(Ane,'SelfLoopPostProcessor/lambda$7$Type',1605);bcb(1587,1,ene,hec);_.pf=function iec(a,b){gec(BD(a,37),b)};var PT=mdb(Ane,'SelfLoopPreProcessor',1587);bcb(1588,1,{},jec);_.Kb=function kec(a){return new YAb(null,new Kub(BD(a,101).f,1))};var MT=mdb(Ane,'SelfLoopPreProcessor/lambda$0$Type',1588);bcb(1589,1,{},lec);_.Kb=function mec(a){return BD(a,409).a};var NT=mdb(Ane,'SelfLoopPreProcessor/lambda$1$Type',1589);bcb(1590,1,qie,nec);_.td=function oec(a){fec(BD(a,17))};var OT=mdb(Ane,'SelfLoopPreProcessor/lambda$2$Type',1590);bcb(1606,1,ene,sec);_.pf=function tec(a,b){qec(this,BD(a,37),b)};var VT=mdb(Ane,'SelfLoopRouter',1606);bcb(1607,1,{},uec);_.Kb=function vec(a){return new YAb(null,new Kub(BD(a,29).a,16))};var QT=mdb(Ane,'SelfLoopRouter/lambda$0$Type',1607);bcb(1608,1,Oie,wec);_.Mb=function xec(a){return BD(a,10).k==(j0b(),h0b)};var RT=mdb(Ane,'SelfLoopRouter/lambda$1$Type',1608);bcb(1609,1,Oie,yec);_.Mb=function zec(a){return wNb(BD(a,10),(wtc(),ntc))};var ST=mdb(Ane,'SelfLoopRouter/lambda$2$Type',1609);bcb(1610,1,{},Aec);_.Kb=function Bec(a){return BD(vNb(BD(a,10),(wtc(),ntc)),403)};var TT=mdb(Ane,'SelfLoopRouter/lambda$3$Type',1610);bcb(1611,1,qie,Cec);_.td=function Dec(a){pec(this.a,this.b,BD(a,403))};var UT=mdb(Ane,'SelfLoopRouter/lambda$4$Type',1611);bcb(1612,1,ene,Fec);_.pf=function Iec(a,b){Eec(BD(a,37),b)};var $T=mdb(Ane,'SemiInteractiveCrossMinProcessor',1612);bcb(1613,1,Oie,Jec);_.Mb=function Kec(a){return BD(a,10).k==(j0b(),h0b)};var WT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$0$Type',1613);bcb(1614,1,Oie,Lec);_.Mb=function Mec(a){return uNb(BD(a,10))._b((Nyc(),ayc))};var XT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$1$Type',1614);bcb(1615,1,Dke,Nec);_.ue=function Oec(a,b){return Gec(BD(a,10),BD(b,10))};_.Fb=function Pec(a){return this===a};_.ve=function Qec(){return new tpb(this)};var YT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$2$Type',1615);bcb(1616,1,{},Rec);_.Ce=function Sec(a,b){return Hec(BD(a,10),BD(b,10))};var ZT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$3$Type',1616);bcb(1618,1,ene,Uec);_.pf=function Yec(a,b){Tec(BD(a,37),b)};var bU=mdb(Ane,'SortByInputModelProcessor',1618);bcb(1619,1,Oie,Zec);_.Mb=function $ec(a){return BD(a,11).g.c.length!=0};var _T=mdb(Ane,'SortByInputModelProcessor/lambda$0$Type',1619);bcb(1620,1,qie,_ec);_.td=function afc(a){Wec(this.a,BD(a,11))};var aU=mdb(Ane,'SortByInputModelProcessor/lambda$1$Type',1620);bcb(1693,803,{},jfc);_.Me=function kfc(a){var b,c,d,e;this.c=a;switch(this.a.g){case 2:b=new Rkb;MAb(JAb(new YAb(null,new Kub(this.c.a.b,16)),new lgc),new ngc(this,b));nEb(this,new tfc);Hkb(b,new xfc);b.c=KC(SI,Uhe,1,0,5,1);MAb(JAb(new YAb(null,new Kub(this.c.a.b,16)),new zfc),new Bfc(b));nEb(this,new Ffc);Hkb(b,new Jfc);b.c=KC(SI,Uhe,1,0,5,1);c=Ntb($zb(OAb(new YAb(null,new Kub(this.c.a.b,16)),new Lfc(this))),new Nfc);MAb(new YAb(null,new Kub(this.c.a.a,16)),new Rfc(c,b));nEb(this,new Vfc);Hkb(b,new Zfc);b.c=KC(SI,Uhe,1,0,5,1);break;case 3:d=new Rkb;nEb(this,new lfc);e=Ntb($zb(OAb(new YAb(null,new Kub(this.c.a.b,16)),new pfc(this))),new Pfc);MAb(JAb(new YAb(null,new Kub(this.c.a.b,16)),new _fc),new bgc(e,d));nEb(this,new fgc);Hkb(d,new jgc);d.c=KC(SI,Uhe,1,0,5,1);break;default:throw vbb(new x2c);}};_.b=0;var AU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation',1693);bcb(1694,1,Vke,lfc);_.Lb=function mfc(a){return JD(BD(a,57).g,145)};_.Fb=function nfc(a){return this===a};_.Mb=function ofc(a){return JD(BD(a,57).g,145)};var cU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$0$Type',1694);bcb(1695,1,{},pfc);_.Fe=function qfc(a){return dfc(this.a,BD(a,57))};var dU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$1$Type',1695);bcb(1703,1,Pie,rfc);_.Vd=function sfc(){cfc(this.a,this.b,-1)};_.b=0;var eU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$10$Type',1703);bcb(1705,1,Vke,tfc);_.Lb=function ufc(a){return JD(BD(a,57).g,145)};_.Fb=function vfc(a){return this===a};_.Mb=function wfc(a){return JD(BD(a,57).g,145)};var fU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$11$Type',1705);bcb(1706,1,qie,xfc);_.td=function yfc(a){BD(a,365).Vd()};var gU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$12$Type',1706);bcb(1707,1,Oie,zfc);_.Mb=function Afc(a){return JD(BD(a,57).g,10)};var hU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$13$Type',1707);bcb(1709,1,qie,Bfc);_.td=function Cfc(a){efc(this.a,BD(a,57))};var iU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$14$Type',1709);bcb(1708,1,Pie,Dfc);_.Vd=function Efc(){cfc(this.b,this.a,-1)};_.a=0;var jU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$15$Type',1708);bcb(1710,1,Vke,Ffc);_.Lb=function Gfc(a){return JD(BD(a,57).g,10)};_.Fb=function Hfc(a){return this===a};_.Mb=function Ifc(a){return JD(BD(a,57).g,10)};var kU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$16$Type',1710);bcb(1711,1,qie,Jfc);_.td=function Kfc(a){BD(a,365).Vd()};var lU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$17$Type',1711);bcb(1712,1,{},Lfc);_.Fe=function Mfc(a){return ffc(this.a,BD(a,57))};var mU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$18$Type',1712);bcb(1713,1,{},Nfc);_.De=function Ofc(){return 0};var nU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$19$Type',1713);bcb(1696,1,{},Pfc);_.De=function Qfc(){return 0};var oU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$2$Type',1696);bcb(1715,1,qie,Rfc);_.td=function Sfc(a){gfc(this.a,this.b,BD(a,307))};_.a=0;var pU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$20$Type',1715);bcb(1714,1,Pie,Tfc);_.Vd=function Ufc(){bfc(this.a,this.b,-1)};_.b=0;var qU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$21$Type',1714);bcb(1716,1,Vke,Vfc);_.Lb=function Wfc(a){return BD(a,57),true};_.Fb=function Xfc(a){return this===a};_.Mb=function Yfc(a){return BD(a,57),true};var rU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$22$Type',1716);bcb(1717,1,qie,Zfc);_.td=function $fc(a){BD(a,365).Vd()};var sU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$23$Type',1717);bcb(1697,1,Oie,_fc);_.Mb=function agc(a){return JD(BD(a,57).g,10)};var tU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$3$Type',1697);bcb(1699,1,qie,bgc);_.td=function cgc(a){hfc(this.a,this.b,BD(a,57))};_.a=0;var uU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$4$Type',1699);bcb(1698,1,Pie,dgc);_.Vd=function egc(){cfc(this.b,this.a,-1)};_.a=0;var vU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$5$Type',1698);bcb(1700,1,Vke,fgc);_.Lb=function ggc(a){return BD(a,57),true};_.Fb=function hgc(a){return this===a};_.Mb=function igc(a){return BD(a,57),true};var wU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$6$Type',1700);bcb(1701,1,qie,jgc);_.td=function kgc(a){BD(a,365).Vd()};var xU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$7$Type',1701);bcb(1702,1,Oie,lgc);_.Mb=function mgc(a){return JD(BD(a,57).g,145)};var yU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$8$Type',1702);bcb(1704,1,qie,ngc);_.td=function ogc(a){ifc(this.a,this.b,BD(a,57))};var zU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$9$Type',1704);bcb(1521,1,ene,sgc);_.pf=function xgc(a,b){rgc(this,BD(a,37),b)};var pgc;var EU=mdb(Jne,'HorizontalGraphCompactor',1521);bcb(1522,1,{},ygc);_.Oe=function zgc(a,b){var c,d,e;if(vgc(a,b)){return 0}c=tgc(a);d=tgc(b);if(!!c&&c.k==(j0b(),e0b)||!!d&&d.k==(j0b(),e0b)){return 0}e=BD(vNb(this.a.a,(wtc(),otc)),304);return fBc(e,c?c.k:(j0b(),g0b),d?d.k:(j0b(),g0b))};_.Pe=function Agc(a,b){var c,d,e;if(vgc(a,b)){return 1}c=tgc(a);d=tgc(b);e=BD(vNb(this.a.a,(wtc(),otc)),304);return iBc(e,c?c.k:(j0b(),g0b),d?d.k:(j0b(),g0b))};var BU=mdb(Jne,'HorizontalGraphCompactor/1',1522);bcb(1523,1,{},Bgc);_.Ne=function Cgc(a,b){return qgc(),a.a.i==0};var CU=mdb(Jne,'HorizontalGraphCompactor/lambda$0$Type',1523);bcb(1524,1,{},Dgc);_.Ne=function Egc(a,b){return wgc(this.a,a,b)};var DU=mdb(Jne,'HorizontalGraphCompactor/lambda$1$Type',1524);bcb(1664,1,{},Ygc);var Fgc,Ggc;var cV=mdb(Jne,'LGraphToCGraphTransformer',1664);bcb(1672,1,Oie,ehc);_.Mb=function fhc(a){return a!=null};var FU=mdb(Jne,'LGraphToCGraphTransformer/0methodref$nonNull$Type',1672);bcb(1665,1,{},ghc);_.Kb=function hhc(a){return Hgc(),fcb(vNb(BD(BD(a,57).g,10),(wtc(),$sc)))};var GU=mdb(Jne,'LGraphToCGraphTransformer/lambda$0$Type',1665);bcb(1666,1,{},ihc);_.Kb=function jhc(a){return Hgc(),gic(BD(BD(a,57).g,145))};var HU=mdb(Jne,'LGraphToCGraphTransformer/lambda$1$Type',1666);bcb(1675,1,Oie,khc);_.Mb=function lhc(a){return Hgc(),JD(BD(a,57).g,10)};var IU=mdb(Jne,'LGraphToCGraphTransformer/lambda$10$Type',1675);bcb(1676,1,qie,mhc);_.td=function nhc(a){Zgc(BD(a,57))};var JU=mdb(Jne,'LGraphToCGraphTransformer/lambda$11$Type',1676);bcb(1677,1,Oie,ohc);_.Mb=function phc(a){return Hgc(),JD(BD(a,57).g,145)};var KU=mdb(Jne,'LGraphToCGraphTransformer/lambda$12$Type',1677);bcb(1681,1,qie,qhc);_.td=function rhc(a){$gc(BD(a,57))};var LU=mdb(Jne,'LGraphToCGraphTransformer/lambda$13$Type',1681);bcb(1678,1,qie,shc);_.td=function thc(a){_gc(this.a,BD(a,8))};_.a=0;var MU=mdb(Jne,'LGraphToCGraphTransformer/lambda$14$Type',1678);bcb(1679,1,qie,uhc);_.td=function vhc(a){ahc(this.a,BD(a,110))};_.a=0;var NU=mdb(Jne,'LGraphToCGraphTransformer/lambda$15$Type',1679);bcb(1680,1,qie,whc);_.td=function xhc(a){bhc(this.a,BD(a,8))};_.a=0;var OU=mdb(Jne,'LGraphToCGraphTransformer/lambda$16$Type',1680);bcb(1682,1,{},yhc);_.Kb=function zhc(a){return Hgc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var PU=mdb(Jne,'LGraphToCGraphTransformer/lambda$17$Type',1682);bcb(1683,1,Oie,Ahc);_.Mb=function Bhc(a){return Hgc(),OZb(BD(a,17))};var QU=mdb(Jne,'LGraphToCGraphTransformer/lambda$18$Type',1683);bcb(1684,1,qie,Chc);_.td=function Dhc(a){Qgc(this.a,BD(a,17))};var RU=mdb(Jne,'LGraphToCGraphTransformer/lambda$19$Type',1684);bcb(1668,1,qie,Ehc);_.td=function Fhc(a){Rgc(this.a,BD(a,145))};var SU=mdb(Jne,'LGraphToCGraphTransformer/lambda$2$Type',1668);bcb(1685,1,{},Ghc);_.Kb=function Hhc(a){return Hgc(),new YAb(null,new Kub(BD(a,29).a,16))};var TU=mdb(Jne,'LGraphToCGraphTransformer/lambda$20$Type',1685);bcb(1686,1,{},Ihc);_.Kb=function Jhc(a){return Hgc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var UU=mdb(Jne,'LGraphToCGraphTransformer/lambda$21$Type',1686);bcb(1687,1,{},Khc);_.Kb=function Lhc(a){return Hgc(),BD(vNb(BD(a,17),(wtc(),rtc)),15)};var VU=mdb(Jne,'LGraphToCGraphTransformer/lambda$22$Type',1687);bcb(1688,1,Oie,Mhc);_.Mb=function Nhc(a){return chc(BD(a,15))};var WU=mdb(Jne,'LGraphToCGraphTransformer/lambda$23$Type',1688);bcb(1689,1,qie,Ohc);_.td=function Phc(a){Jgc(this.a,BD(a,15))};var XU=mdb(Jne,'LGraphToCGraphTransformer/lambda$24$Type',1689);bcb(1667,1,qie,Qhc);_.td=function Rhc(a){Sgc(this.a,this.b,BD(a,145))};var YU=mdb(Jne,'LGraphToCGraphTransformer/lambda$3$Type',1667);bcb(1669,1,{},Shc);_.Kb=function Thc(a){return Hgc(),new YAb(null,new Kub(BD(a,29).a,16))};var ZU=mdb(Jne,'LGraphToCGraphTransformer/lambda$4$Type',1669);bcb(1670,1,{},Uhc);_.Kb=function Vhc(a){return Hgc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var $U=mdb(Jne,'LGraphToCGraphTransformer/lambda$5$Type',1670);bcb(1671,1,{},Whc);_.Kb=function Xhc(a){return Hgc(),BD(vNb(BD(a,17),(wtc(),rtc)),15)};var _U=mdb(Jne,'LGraphToCGraphTransformer/lambda$6$Type',1671);bcb(1673,1,qie,Yhc);_.td=function Zhc(a){dhc(this.a,BD(a,15))};var aV=mdb(Jne,'LGraphToCGraphTransformer/lambda$8$Type',1673);bcb(1674,1,qie,$hc);_.td=function _hc(a){Tgc(this.a,this.b,BD(a,145))};var bV=mdb(Jne,'LGraphToCGraphTransformer/lambda$9$Type',1674);bcb(1663,1,{},dic);_.Le=function eic(a){var b,c,d,e,f;this.a=a;this.d=new KFb;this.c=KC(jN,Uhe,121,this.a.a.a.c.length,0,1);this.b=0;for(c=new olb(this.a.a.a);c.a=p){Ekb(f,meb(k));s=$wnd.Math.max(s,t[k-1]-l);h+=o;q+=t[k-1]-q;l=t[k-1];o=i[k]}o=$wnd.Math.max(o,i[k]);++k}h+=o}n=$wnd.Math.min(1/s,1/b.b/h);if(n>d){d=n;c=f}}return c};_.Wf=function mpc(){return false};var CW=mdb(Rne,'MSDCutIndexHeuristic',802);bcb(1617,1,ene,ppc);_.pf=function qpc(a,b){opc(BD(a,37),b)};var DW=mdb(Rne,'SingleEdgeGraphWrapper',1617);bcb(227,22,{3:1,35:1,22:1,227:1},Bpc);var upc,vpc,wpc,xpc,ypc,zpc;var EW=ndb(Sne,'CenterEdgeLabelPlacementStrategy',227,CI,Dpc,Cpc);var Epc;bcb(422,22,{3:1,35:1,22:1,422:1},Jpc);var Gpc,Hpc;var FW=ndb(Sne,'ConstraintCalculationStrategy',422,CI,Lpc,Kpc);var Mpc;bcb(314,22,{3:1,35:1,22:1,314:1,246:1,234:1},Tpc);_.Kf=function Vpc(){return Spc(this)};_.Xf=function Upc(){return Spc(this)};var Opc,Ppc,Qpc;var GW=ndb(Sne,'CrossingMinimizationStrategy',314,CI,Xpc,Wpc);var Ypc;bcb(337,22,{3:1,35:1,22:1,337:1},cqc);var $pc,_pc,aqc;var HW=ndb(Sne,'CuttingStrategy',337,CI,eqc,dqc);var fqc;bcb(335,22,{3:1,35:1,22:1,335:1,246:1,234:1},oqc);_.Kf=function qqc(){return nqc(this)};_.Xf=function pqc(){return nqc(this)};var hqc,iqc,jqc,kqc,lqc;var IW=ndb(Sne,'CycleBreakingStrategy',335,CI,sqc,rqc);var tqc;bcb(419,22,{3:1,35:1,22:1,419:1},yqc);var vqc,wqc;var JW=ndb(Sne,'DirectionCongruency',419,CI,Aqc,zqc);var Bqc;bcb(450,22,{3:1,35:1,22:1,450:1},Hqc);var Dqc,Eqc,Fqc;var KW=ndb(Sne,'EdgeConstraint',450,CI,Jqc,Iqc);var Kqc;bcb(276,22,{3:1,35:1,22:1,276:1},Uqc);var Mqc,Nqc,Oqc,Pqc,Qqc,Rqc;var LW=ndb(Sne,'EdgeLabelSideSelection',276,CI,Wqc,Vqc);var Xqc;bcb(479,22,{3:1,35:1,22:1,479:1},arc);var Zqc,$qc;var MW=ndb(Sne,'EdgeStraighteningStrategy',479,CI,crc,brc);var drc;bcb(274,22,{3:1,35:1,22:1,274:1},mrc);var frc,grc,hrc,irc,jrc,krc;var NW=ndb(Sne,'FixedAlignment',274,CI,orc,nrc);var prc;bcb(275,22,{3:1,35:1,22:1,275:1},zrc);var rrc,trc,urc,vrc,wrc,xrc;var OW=ndb(Sne,'GraphCompactionStrategy',275,CI,Brc,Arc);var Crc;bcb(256,22,{3:1,35:1,22:1,256:1},Prc);var Erc,Frc,Grc,Hrc,Irc,Jrc,Krc,Lrc,Mrc,Nrc;var PW=ndb(Sne,'GraphProperties',256,CI,Rrc,Qrc);var Src;bcb(292,22,{3:1,35:1,22:1,292:1},Yrc);var Urc,Vrc,Wrc;var QW=ndb(Sne,'GreedySwitchType',292,CI,$rc,Zrc);var _rc;bcb(303,22,{3:1,35:1,22:1,303:1},fsc);var bsc,csc,dsc;var RW=ndb(Sne,'InLayerConstraint',303,CI,hsc,gsc);var isc;bcb(420,22,{3:1,35:1,22:1,420:1},nsc);var ksc,lsc;var SW=ndb(Sne,'InteractiveReferencePoint',420,CI,psc,osc);var qsc;var ssc,tsc,usc,vsc,wsc,xsc,ysc,zsc,Asc,Bsc,Csc,Dsc,Esc,Fsc,Gsc,Hsc,Isc,Jsc,Ksc,Lsc,Msc,Nsc,Osc,Psc,Qsc,Rsc,Ssc,Tsc,Usc,Vsc,Wsc,Xsc,Ysc,Zsc,$sc,_sc,atc,btc,ctc,dtc,etc,ftc,gtc,htc,itc,jtc,ktc,ltc,mtc,ntc,otc,ptc,qtc,rtc,stc,ttc,utc,vtc;bcb(163,22,{3:1,35:1,22:1,163:1},Dtc);var xtc,ytc,ztc,Atc,Btc;var TW=ndb(Sne,'LayerConstraint',163,CI,Ftc,Etc);var Gtc;bcb(848,1,ale,kwc);_.Qe=function lwc(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Yne),''),'Direction Congruency'),'Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other.'),puc),(_5c(),V5c)),JW),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zne),''),'Feedback Edges'),'Whether feedback edges should be highlighted by routing around the nodes.'),(Bcb(),false)),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$ne),''),'Interactive Reference Point'),'Determines which point of a node is considered by interactive layout phases.'),Muc),V5c),SW),pqb(L5c))));o4c(a,$ne,goe,Ouc);o4c(a,$ne,qoe,Nuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,_ne),''),'Merge Edges'),'Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,aoe),''),'Merge Hierarchy-Crossing Edges'),'If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port.'),true),T5c),wI),pqb(L5c))));t4c(a,new p5c(C5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,boe),''),'Allow Non-Flow Ports To Switch Sides'),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),false),T5c),wI),pqb(M5c)),OC(GC(ZI,1),nie,2,6,['org.eclipse.elk.layered.northOrSouthPort']))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,coe),''),'Port Sorting Strategy'),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),xvc),V5c),cX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,doe),''),'Thoroughness'),'How much effort should be spent to produce a nice layout.'),meb(7)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,eoe),''),'Add Unnecessary Bendpoints'),'Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,foe),''),'Generate Position and Layer IDs'),'If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,goe),'cycleBreaking'),'Cycle Breaking Strategy'),'Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right).'),nuc),V5c),IW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,hoe),ppe),'Node Layering Strategy'),'Strategy for node layering.'),bvc),V5c),YW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ioe),ppe),'Layer Constraint'),'Determines a constraint on the placement of the node regarding the layering.'),Tuc),V5c),TW),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,joe),ppe),'Layer Choice Constraint'),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,koe),ppe),'Layer ID'),'Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,loe),qpe),'Upper Bound On Width [MinWidth Layerer]'),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),meb(4)),X5c),JI),pqb(L5c))));o4c(a,loe,hoe,Wuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,moe),qpe),'Upper Layer Estimation Scaling Factor [MinWidth Layerer]'),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),meb(2)),X5c),JI),pqb(L5c))));o4c(a,moe,hoe,Yuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,noe),rpe),'Node Promotion Strategy'),'Reduces number of dummy nodes after layering phase (if possible).'),_uc),V5c),aX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ooe),rpe),'Max Node Promotion Iterations'),'Limits the number of iterations for node promotion.'),meb(0)),X5c),JI),pqb(L5c))));o4c(a,ooe,noe,null);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,poe),'layering.coffmanGraham'),'Layer Bound'),'The maximum number of nodes allowed per layer.'),meb(Ohe)),X5c),JI),pqb(L5c))));o4c(a,poe,hoe,Quc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,qoe),spe),'Crossing Minimization Strategy'),'Strategy for crossing minimization.'),luc),V5c),GW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,roe),spe),'Force Node Model Order'),'The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,soe),spe),'Hierarchical Sweepiness'),'How likely it is to use cross-hierarchy (1) vs bottom-up (-1).'),0.1),U5c),BI),pqb(L5c))));o4c(a,soe,tpe,fuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,toe),spe),'Semi-Interactive Crossing Minimization'),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),false),T5c),wI),pqb(L5c))));o4c(a,toe,qoe,juc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,uoe),spe),'Position Choice Constraint'),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,voe),spe),'Position ID'),'Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,woe),upe),'Greedy Switch Activation Threshold'),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),meb(40)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xoe),upe),'Greedy Switch Crossing Minimization'),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),cuc),V5c),QW),pqb(L5c))));o4c(a,xoe,qoe,duc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,yoe),'crossingMinimization.greedySwitchHierarchical'),'Greedy Switch Crossing Minimization (hierarchical)'),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),$tc),V5c),QW),pqb(L5c))));o4c(a,yoe,qoe,_tc);o4c(a,yoe,tpe,auc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,zoe),vpe),'Node Placement Strategy'),'Strategy for node placement.'),vvc),V5c),_W),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Aoe),vpe),'Favor Straight Edges Over Balancing'),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),T5c),wI),pqb(L5c))));o4c(a,Aoe,zoe,lvc);o4c(a,Aoe,zoe,mvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Boe),wpe),'BK Edge Straightening'),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),fvc),V5c),MW),pqb(L5c))));o4c(a,Boe,zoe,gvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Coe),wpe),'BK Fixed Alignment'),'Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four.'),ivc),V5c),NW),pqb(L5c))));o4c(a,Coe,zoe,jvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Doe),'nodePlacement.linearSegments'),'Linear Segments Deflection Dampening'),'Dampens the movement of nodes to keep the diagram from getting too large.'),0.3),U5c),BI),pqb(L5c))));o4c(a,Doe,zoe,ovc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Eoe),'nodePlacement.networkSimplex'),'Node Flexibility'),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),V5c),$W),pqb(K5c))));o4c(a,Eoe,zoe,tvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Foe),'nodePlacement.networkSimplex.nodeFlexibility'),'Node Flexibility Default'),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),rvc),V5c),$W),pqb(L5c))));o4c(a,Foe,zoe,svc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Goe),xpe),'Self-Loop Distribution'),'Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE.'),xuc),V5c),eX),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Hoe),xpe),'Self-Loop Ordering'),'Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE.'),zuc),V5c),fX),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ioe),'edgeRouting.splines'),'Spline Routing Mode'),'Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes.'),Buc),V5c),hX),pqb(L5c))));o4c(a,Ioe,ype,Cuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Joe),'edgeRouting.splines.sloppy'),'Sloppy Spline Layer Spacing Factor'),'Spacing factor for routing area between layers when using sloppy spline routing.'),0.2),U5c),BI),pqb(L5c))));o4c(a,Joe,ype,Euc);o4c(a,Joe,Ioe,Fuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Koe),'edgeRouting.polyline'),'Sloped Edge Zone Width'),'Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer.'),2),U5c),BI),pqb(L5c))));o4c(a,Koe,ype,vuc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Loe),zpe),'Spacing Base Value'),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Moe),zpe),'Edge Node Between Layers Spacing'),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Noe),zpe),'Edge Edge Between Layer Spacing'),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ooe),zpe),'Node Node Between Layers Spacing'),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Poe),Ape),'Direction Priority'),'Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase.'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Qoe),Ape),'Shortness Priority'),'Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase.'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Roe),Ape),'Straightness Priority'),'Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement.'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Soe),Bpe),Ole),'Tries to further compact components (disconnected sub-graphs).'),false),T5c),wI),pqb(L5c))));o4c(a,Soe,zme,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Toe),Cpe),'Post Compaction Strategy'),Dpe),Ntc),V5c),OW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Uoe),Cpe),'Post Compaction Constraint Calculation'),Dpe),Ltc),V5c),FW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Voe),Epe),'High Degree Node Treatment'),'Makes room around high degree nodes to place leafs and trees.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Woe),Epe),'High Degree Node Threshold'),'Whether a node is considered to have a high degree.'),meb(16)),X5c),JI),pqb(L5c))));o4c(a,Woe,Voe,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Xoe),Epe),'High Degree Node Maximum Tree Height'),'Maximum height of a subtree connected to a high degree node to be moved to separate layers.'),meb(5)),X5c),JI),pqb(L5c))));o4c(a,Xoe,Voe,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Yoe),Fpe),'Graph Wrapping Strategy'),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),bwc),V5c),jX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zoe),Fpe),'Additional Wrapped Edges Spacing'),'To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing.'),10),U5c),BI),pqb(L5c))));o4c(a,Zoe,Yoe,Ivc);o4c(a,Zoe,Yoe,Jvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$oe),Fpe),'Correction Factor for Wrapping'),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),U5c),BI),pqb(L5c))));o4c(a,$oe,Yoe,Lvc);o4c(a,$oe,Yoe,Mvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,_oe),Gpe),'Cutting Strategy'),'The strategy by which the layer indexes are determined at which the layering crumbles into chunks.'),Tvc),V5c),HW),pqb(L5c))));o4c(a,_oe,Yoe,Uvc);o4c(a,_oe,Yoe,Vvc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,ape),Gpe),'Manually Specified Cuts'),'Allows the user to specify her own cuts for a certain graph.'),Y5c),yK),pqb(L5c))));o4c(a,ape,_oe,Ovc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,bpe),'wrapping.cutting.msd'),'MSD Freedom'),'The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts.'),Qvc),X5c),JI),pqb(L5c))));o4c(a,bpe,_oe,Rvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,cpe),Hpe),'Validification Strategy'),'When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed.'),gwc),V5c),iX),pqb(L5c))));o4c(a,cpe,Yoe,hwc);o4c(a,cpe,Yoe,iwc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,dpe),Hpe),'Valid Indices for Wrapping'),null),Y5c),yK),pqb(L5c))));o4c(a,dpe,Yoe,dwc);o4c(a,dpe,Yoe,ewc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,epe),Ipe),'Improve Cuts'),'For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought.'),true),T5c),wI),pqb(L5c))));o4c(a,epe,Yoe,Zvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,fpe),Ipe),'Distance Penalty When Improving Cuts'),null),2),U5c),BI),pqb(L5c))));o4c(a,fpe,Yoe,Xvc);o4c(a,fpe,epe,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,gpe),Ipe),'Improve Wrapped Edges'),'The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges.'),true),T5c),wI),pqb(L5c))));o4c(a,gpe,Yoe,_vc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,hpe),Jpe),'Edge Label Side Selection'),'Method to decide on edge label sides.'),tuc),V5c),LW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ipe),Jpe),'Edge Center Label Placement Strategy'),'Determines in which layer center labels of long edges should be placed.'),ruc),V5c),EW),qqb(L5c,OC(GC(e1,1),Kie,175,0,[J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,jpe),Kpe),'Consider Model Order'),'Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.'),Wtc),V5c),bX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,kpe),Kpe),'No Model Order'),'Set on a node to not set a model order for this node even though it is a real node.'),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,lpe),Kpe),'Consider Model Order for Components'),'If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected.'),Ptc),V5c),hQ),pqb(L5c))));o4c(a,lpe,zme,null);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,mpe),Kpe),'Long Edge Ordering Strategy'),'Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout.'),Ttc),V5c),ZW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,npe),Kpe),'Crossing Counter Node Order Influence'),'Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0).'),0),U5c),BI),pqb(L5c))));o4c(a,npe,jpe,null);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ope),Kpe),'Crossing Counter Port Order Influence'),'Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0).'),0),U5c),BI),pqb(L5c))));o4c(a,ope,jpe,null);Oyc((new Pyc,a))};var Itc,Jtc,Ktc,Ltc,Mtc,Ntc,Otc,Ptc,Qtc,Rtc,Stc,Ttc,Utc,Vtc,Wtc,Xtc,Ytc,Ztc,$tc,_tc,auc,buc,cuc,duc,euc,fuc,guc,huc,iuc,juc,kuc,luc,muc,nuc,ouc,puc,quc,ruc,suc,tuc,uuc,vuc,wuc,xuc,yuc,zuc,Auc,Buc,Cuc,Duc,Euc,Fuc,Guc,Huc,Iuc,Juc,Kuc,Luc,Muc,Nuc,Ouc,Puc,Quc,Ruc,Suc,Tuc,Uuc,Vuc,Wuc,Xuc,Yuc,Zuc,$uc,_uc,avc,bvc,cvc,dvc,evc,fvc,gvc,hvc,ivc,jvc,kvc,lvc,mvc,nvc,ovc,pvc,qvc,rvc,svc,tvc,uvc,vvc,wvc,xvc,yvc,zvc,Avc,Bvc,Cvc,Dvc,Evc,Fvc,Gvc,Hvc,Ivc,Jvc,Kvc,Lvc,Mvc,Nvc,Ovc,Pvc,Qvc,Rvc,Svc,Tvc,Uvc,Vvc,Wvc,Xvc,Yvc,Zvc,$vc,_vc,awc,bwc,cwc,dwc,ewc,fwc,gwc,hwc,iwc;var UW=mdb(Sne,'LayeredMetaDataProvider',848);bcb(986,1,ale,Pyc);_.Qe=function Qyc(a){Oyc(a)};var mwc,nwc,owc,pwc,qwc,rwc,swc,twc,uwc,vwc,wwc,xwc,ywc,zwc,Awc,Bwc,Cwc,Dwc,Ewc,Fwc,Gwc,Hwc,Iwc,Jwc,Kwc,Lwc,Mwc,Nwc,Owc,Pwc,Qwc,Rwc,Swc,Twc,Uwc,Vwc,Wwc,Xwc,Ywc,Zwc,$wc,_wc,axc,bxc,cxc,dxc,exc,fxc,gxc,hxc,ixc,jxc,kxc,lxc,mxc,nxc,oxc,pxc,qxc,rxc,sxc,txc,uxc,vxc,wxc,xxc,yxc,zxc,Axc,Bxc,Cxc,Dxc,Exc,Fxc,Gxc,Hxc,Ixc,Jxc,Kxc,Lxc,Mxc,Nxc,Oxc,Pxc,Qxc,Rxc,Sxc,Txc,Uxc,Vxc,Wxc,Xxc,Yxc,Zxc,$xc,_xc,ayc,byc,cyc,dyc,eyc,fyc,gyc,hyc,iyc,jyc,kyc,lyc,myc,nyc,oyc,pyc,qyc,ryc,syc,tyc,uyc,vyc,wyc,xyc,yyc,zyc,Ayc,Byc,Cyc,Dyc,Eyc,Fyc,Gyc,Hyc,Iyc,Jyc,Kyc,Lyc,Myc;var WW=mdb(Sne,'LayeredOptions',986);bcb(987,1,{},Ryc);_.$e=function Syc(){var a;return a=new jUb,a};_._e=function Tyc(a){};var VW=mdb(Sne,'LayeredOptions/LayeredFactory',987);bcb(1372,1,{});_.a=0;var Uyc;var $1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder',1372);bcb(779,1372,{},ezc);var bzc,czc;var XW=mdb(Sne,'LayeredSpacings/LayeredSpacingsBuilder',779);bcb(313,22,{3:1,35:1,22:1,313:1,246:1,234:1},nzc);_.Kf=function pzc(){return mzc(this)};_.Xf=function ozc(){return mzc(this)};var fzc,gzc,hzc,izc,jzc,kzc;var YW=ndb(Sne,'LayeringStrategy',313,CI,rzc,qzc);var szc;bcb(378,22,{3:1,35:1,22:1,378:1},zzc);var uzc,vzc,wzc;var ZW=ndb(Sne,'LongEdgeOrderingStrategy',378,CI,Bzc,Azc);var Czc;bcb(197,22,{3:1,35:1,22:1,197:1},Kzc);var Ezc,Fzc,Gzc,Hzc;var $W=ndb(Sne,'NodeFlexibility',197,CI,Nzc,Mzc);var Ozc;bcb(315,22,{3:1,35:1,22:1,315:1,246:1,234:1},Xzc);_.Kf=function Zzc(){return Wzc(this)};_.Xf=function Yzc(){return Wzc(this)};var Qzc,Rzc,Szc,Tzc,Uzc;var _W=ndb(Sne,'NodePlacementStrategy',315,CI,_zc,$zc);var aAc;bcb(260,22,{3:1,35:1,22:1,260:1},lAc);var cAc,dAc,eAc,fAc,gAc,hAc,iAc,jAc;var aX=ndb(Sne,'NodePromotionStrategy',260,CI,nAc,mAc);var oAc;bcb(339,22,{3:1,35:1,22:1,339:1},uAc);var qAc,rAc,sAc;var bX=ndb(Sne,'OrderingStrategy',339,CI,wAc,vAc);var xAc;bcb(421,22,{3:1,35:1,22:1,421:1},CAc);var zAc,AAc;var cX=ndb(Sne,'PortSortingStrategy',421,CI,EAc,DAc);var FAc;bcb(452,22,{3:1,35:1,22:1,452:1},LAc);var HAc,IAc,JAc;var dX=ndb(Sne,'PortType',452,CI,NAc,MAc);var OAc;bcb(375,22,{3:1,35:1,22:1,375:1},UAc);var QAc,RAc,SAc;var eX=ndb(Sne,'SelfLoopDistributionStrategy',375,CI,WAc,VAc);var XAc;bcb(376,22,{3:1,35:1,22:1,376:1},aBc);var ZAc,$Ac;var fX=ndb(Sne,'SelfLoopOrderingStrategy',376,CI,cBc,bBc);var dBc;bcb(304,1,{304:1},oBc);var gX=mdb(Sne,'Spacings',304);bcb(336,22,{3:1,35:1,22:1,336:1},uBc);var qBc,rBc,sBc;var hX=ndb(Sne,'SplineRoutingMode',336,CI,wBc,vBc);var xBc;bcb(338,22,{3:1,35:1,22:1,338:1},DBc);var zBc,ABc,BBc;var iX=ndb(Sne,'ValidifyStrategy',338,CI,FBc,EBc);var GBc;bcb(377,22,{3:1,35:1,22:1,377:1},MBc);var IBc,JBc,KBc;var jX=ndb(Sne,'WrappingStrategy',377,CI,OBc,NBc);var PBc;bcb(1383,1,Bqe,VBc);_.Yf=function WBc(a){return BD(a,37),RBc};_.pf=function XBc(a,b){UBc(this,BD(a,37),b)};var RBc;var kX=mdb(Cqe,'DepthFirstCycleBreaker',1383);bcb(782,1,Bqe,aCc);_.Yf=function cCc(a){return BD(a,37),YBc};_.pf=function dCc(a,b){$Bc(this,BD(a,37),b)};_.Zf=function bCc(a){return BD(Ikb(a,Bub(this.d,a.c.length)),10)};var YBc;var lX=mdb(Cqe,'GreedyCycleBreaker',782);bcb(1386,782,Bqe,eCc);_.Zf=function fCc(a){var b,c,d,e;e=null;b=Ohe;for(d=new olb(a);d.a1){Ccb(DD(vNb(Q_b((tCb(0,a.c.length),BD(a.c[0],10))),(Nyc(),Awc))))?YGc(a,this.d,BD(this,660)):(mmb(),Okb(a,this.d));PEc(this.e,a)}};_.Sf=function DEc(a,b,c,d){var e,f,g,h,i,j,k;if(b!=sEc(c,a.length)){f=a[b-(c?1:-1)];UDc(this.f,f,c?(KAc(),IAc):(KAc(),HAc))}e=a[b][0];k=!d||e.k==(j0b(),e0b);j=Ou(a[b]);this.ag(j,k,false,c);g=0;for(i=new olb(j);i.a');a0?(RHc(this.a,a[b-1],a[b]),undefined):!c&&b1){Ccb(DD(vNb(Q_b((tCb(0,a.c.length),BD(a.c[0],10))),(Nyc(),Awc))))?YGc(a,this.d,this):(mmb(),Okb(a,this.d));Ccb(DD(vNb(Q_b((tCb(0,a.c.length),BD(a.c[0],10))),Awc)))||PEc(this.e,a)}};var YX=mdb(Gqe,'ModelOrderBarycenterHeuristic',660);bcb(1803,1,Dke,$Gc);_.ue=function _Gc(a,b){return VGc(this.a,BD(a,10),BD(b,10))};_.Fb=function aHc(a){return this===a};_.ve=function bHc(){return new tpb(this)};var XX=mdb(Gqe,'ModelOrderBarycenterHeuristic/lambda$0$Type',1803);bcb(1403,1,Bqe,fHc);_.Yf=function gHc(a){var b;return BD(a,37),b=k3c(cHc),e3c(b,(qUb(),nUb),(S8b(),H8b)),b};_.pf=function hHc(a,b){eHc((BD(a,37),b))};var cHc;var ZX=mdb(Gqe,'NoCrossingMinimizer',1403);bcb(796,402,Eqe,iHc);_.$f=function jHc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;l=this.g;switch(c.g){case 1:{e=0;f=0;for(k=new olb(a.j);k.a1&&(e.j==(Ucd(),zcd)?(this.b[a]=true):e.j==Tcd&&a>0&&(this.b[a-1]=true))};_.f=0;var aY=mdb(Lne,'AllCrossingsCounter',1798);bcb(587,1,{},BHc);_.b=0;_.d=0;var bY=mdb(Lne,'BinaryIndexedTree',587);bcb(524,1,{},dIc);var DHc,EHc;var lY=mdb(Lne,'CrossingsCounter',524);bcb(1906,1,Dke,hIc);_.ue=function iIc(a,b){return YHc(this.a,BD(a,11),BD(b,11))};_.Fb=function jIc(a){return this===a};_.ve=function kIc(){return new tpb(this)};var cY=mdb(Lne,'CrossingsCounter/lambda$0$Type',1906);bcb(1907,1,Dke,lIc);_.ue=function mIc(a,b){return ZHc(this.a,BD(a,11),BD(b,11))};_.Fb=function nIc(a){return this===a};_.ve=function oIc(){return new tpb(this)};var dY=mdb(Lne,'CrossingsCounter/lambda$1$Type',1907);bcb(1908,1,Dke,pIc);_.ue=function qIc(a,b){return $Hc(this.a,BD(a,11),BD(b,11))};_.Fb=function rIc(a){return this===a};_.ve=function sIc(){return new tpb(this)};var eY=mdb(Lne,'CrossingsCounter/lambda$2$Type',1908);bcb(1909,1,Dke,tIc);_.ue=function uIc(a,b){return _Hc(this.a,BD(a,11),BD(b,11))};_.Fb=function vIc(a){return this===a};_.ve=function wIc(){return new tpb(this)};var fY=mdb(Lne,'CrossingsCounter/lambda$3$Type',1909);bcb(1910,1,qie,xIc);_.td=function yIc(a){eIc(this.a,BD(a,11))};var gY=mdb(Lne,'CrossingsCounter/lambda$4$Type',1910);bcb(1911,1,Oie,zIc);_.Mb=function AIc(a){return fIc(this.a,BD(a,11))};var hY=mdb(Lne,'CrossingsCounter/lambda$5$Type',1911);bcb(1912,1,qie,CIc);_.td=function DIc(a){BIc(this,a)};var iY=mdb(Lne,'CrossingsCounter/lambda$6$Type',1912);bcb(1913,1,qie,EIc);_.td=function FIc(a){var b;FHc();Wjb(this.b,(b=this.a,BD(a,11),b))};var jY=mdb(Lne,'CrossingsCounter/lambda$7$Type',1913);bcb(826,1,Vke,GIc);_.Lb=function HIc(a){return FHc(),wNb(BD(a,11),(wtc(),gtc))};_.Fb=function IIc(a){return this===a};_.Mb=function JIc(a){return FHc(),wNb(BD(a,11),(wtc(),gtc))};var kY=mdb(Lne,'CrossingsCounter/lambda$8$Type',826);bcb(1905,1,{},LIc);var pY=mdb(Lne,'HyperedgeCrossingsCounter',1905);bcb(467,1,{35:1,467:1},NIc);_.wd=function OIc(a){return MIc(this,BD(a,467))};_.b=0;_.c=0;_.e=0;_.f=0;var oY=mdb(Lne,'HyperedgeCrossingsCounter/Hyperedge',467);bcb(362,1,{35:1,362:1},QIc);_.wd=function RIc(a){return PIc(this,BD(a,362))};_.b=0;_.c=0;var nY=mdb(Lne,'HyperedgeCrossingsCounter/HyperedgeCorner',362);bcb(523,22,{3:1,35:1,22:1,523:1},VIc);var SIc,TIc;var mY=ndb(Lne,'HyperedgeCrossingsCounter/HyperedgeCorner/Type',523,CI,XIc,WIc);var YIc;bcb(1405,1,Bqe,dJc);_.Yf=function eJc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?_Ic:null};_.pf=function fJc(a,b){cJc(this,BD(a,37),b)};var _Ic;var rY=mdb(Hqe,'InteractiveNodePlacer',1405);bcb(1406,1,Bqe,tJc);_.Yf=function uJc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?gJc:null};_.pf=function vJc(a,b){rJc(this,BD(a,37),b)};var gJc,hJc,iJc;var tY=mdb(Hqe,'LinearSegmentsNodePlacer',1406);bcb(257,1,{35:1,257:1},zJc);_.wd=function AJc(a){return wJc(this,BD(a,257))};_.Fb=function BJc(a){var b;if(JD(a,257)){b=BD(a,257);return this.b==b.b}return false};_.Hb=function CJc(){return this.b};_.Ib=function DJc(){return 'ls'+Fe(this.e)};_.a=0;_.b=0;_.c=-1;_.d=-1;_.g=0;var sY=mdb(Hqe,'LinearSegmentsNodePlacer/LinearSegment',257);bcb(1408,1,Bqe,$Jc);_.Yf=function _Jc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?EJc:null};_.pf=function hKc(a,b){WJc(this,BD(a,37),b)};_.b=0;_.g=0;var EJc;var dZ=mdb(Hqe,'NetworkSimplexPlacer',1408);bcb(1427,1,Dke,iKc);_.ue=function jKc(a,b){return beb(BD(a,19).a,BD(b,19).a)};_.Fb=function kKc(a){return this===a};_.ve=function lKc(){return new tpb(this)};var uY=mdb(Hqe,'NetworkSimplexPlacer/0methodref$compare$Type',1427);bcb(1429,1,Dke,mKc);_.ue=function nKc(a,b){return beb(BD(a,19).a,BD(b,19).a)};_.Fb=function oKc(a){return this===a};_.ve=function pKc(){return new tpb(this)};var vY=mdb(Hqe,'NetworkSimplexPlacer/1methodref$compare$Type',1429);bcb(649,1,{649:1},qKc);var wY=mdb(Hqe,'NetworkSimplexPlacer/EdgeRep',649);bcb(401,1,{401:1},rKc);_.b=false;var xY=mdb(Hqe,'NetworkSimplexPlacer/NodeRep',401);bcb(508,12,{3:1,4:1,20:1,28:1,52:1,12:1,14:1,15:1,54:1,508:1},vKc);var CY=mdb(Hqe,'NetworkSimplexPlacer/Path',508);bcb(1409,1,{},wKc);_.Kb=function xKc(a){return BD(a,17).d.i.k};var yY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$0$Type',1409);bcb(1410,1,Oie,yKc);_.Mb=function zKc(a){return BD(a,267)==(j0b(),g0b)};var zY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$1$Type',1410);bcb(1411,1,{},AKc);_.Kb=function BKc(a){return BD(a,17).d.i};var AY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$2$Type',1411);bcb(1412,1,Oie,CKc);_.Mb=function DKc(a){return eLc(Lzc(BD(a,10)))};var BY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$3$Type',1412);bcb(1413,1,Oie,EKc);_.Mb=function FKc(a){return dKc(BD(a,11))};var DY=mdb(Hqe,'NetworkSimplexPlacer/lambda$0$Type',1413);bcb(1414,1,qie,GKc);_.td=function HKc(a){LJc(this.a,this.b,BD(a,11))};var EY=mdb(Hqe,'NetworkSimplexPlacer/lambda$1$Type',1414);bcb(1423,1,qie,IKc);_.td=function JKc(a){MJc(this.a,BD(a,17))};var FY=mdb(Hqe,'NetworkSimplexPlacer/lambda$10$Type',1423);bcb(1424,1,{},KKc);_.Kb=function LKc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var GY=mdb(Hqe,'NetworkSimplexPlacer/lambda$11$Type',1424);bcb(1425,1,qie,MKc);_.td=function NKc(a){NJc(this.a,BD(a,10))};var HY=mdb(Hqe,'NetworkSimplexPlacer/lambda$12$Type',1425);bcb(1426,1,{},OKc);_.Kb=function PKc(a){return FJc(),meb(BD(a,121).e)};var IY=mdb(Hqe,'NetworkSimplexPlacer/lambda$13$Type',1426);bcb(1428,1,{},QKc);_.Kb=function RKc(a){return FJc(),meb(BD(a,121).e)};var JY=mdb(Hqe,'NetworkSimplexPlacer/lambda$15$Type',1428);bcb(1430,1,Oie,SKc);_.Mb=function TKc(a){return FJc(),BD(a,401).c.k==(j0b(),h0b)};var KY=mdb(Hqe,'NetworkSimplexPlacer/lambda$17$Type',1430);bcb(1431,1,Oie,UKc);_.Mb=function VKc(a){return FJc(),BD(a,401).c.j.c.length>1};var LY=mdb(Hqe,'NetworkSimplexPlacer/lambda$18$Type',1431);bcb(1432,1,qie,WKc);_.td=function XKc(a){eKc(this.c,this.b,this.d,this.a,BD(a,401))};_.c=0;_.d=0;var MY=mdb(Hqe,'NetworkSimplexPlacer/lambda$19$Type',1432);bcb(1415,1,{},YKc);_.Kb=function ZKc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var NY=mdb(Hqe,'NetworkSimplexPlacer/lambda$2$Type',1415);bcb(1433,1,qie,$Kc);_.td=function _Kc(a){fKc(this.a,BD(a,11))};_.a=0;var OY=mdb(Hqe,'NetworkSimplexPlacer/lambda$20$Type',1433);bcb(1434,1,{},aLc);_.Kb=function bLc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var PY=mdb(Hqe,'NetworkSimplexPlacer/lambda$21$Type',1434);bcb(1435,1,qie,cLc);_.td=function dLc(a){OJc(this.a,BD(a,10))};var QY=mdb(Hqe,'NetworkSimplexPlacer/lambda$22$Type',1435);bcb(1436,1,Oie,fLc);_.Mb=function gLc(a){return eLc(a)};var RY=mdb(Hqe,'NetworkSimplexPlacer/lambda$23$Type',1436);bcb(1437,1,{},hLc);_.Kb=function iLc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var SY=mdb(Hqe,'NetworkSimplexPlacer/lambda$24$Type',1437);bcb(1438,1,Oie,jLc);_.Mb=function kLc(a){return PJc(this.a,BD(a,10))};var TY=mdb(Hqe,'NetworkSimplexPlacer/lambda$25$Type',1438);bcb(1439,1,qie,lLc);_.td=function mLc(a){QJc(this.a,this.b,BD(a,10))};var UY=mdb(Hqe,'NetworkSimplexPlacer/lambda$26$Type',1439);bcb(1440,1,Oie,nLc);_.Mb=function oLc(a){return FJc(),!OZb(BD(a,17))};var VY=mdb(Hqe,'NetworkSimplexPlacer/lambda$27$Type',1440);bcb(1441,1,Oie,pLc);_.Mb=function qLc(a){return FJc(),!OZb(BD(a,17))};var WY=mdb(Hqe,'NetworkSimplexPlacer/lambda$28$Type',1441);bcb(1442,1,{},rLc);_.Ce=function sLc(a,b){return RJc(this.a,BD(a,29),BD(b,29))};var XY=mdb(Hqe,'NetworkSimplexPlacer/lambda$29$Type',1442);bcb(1416,1,{},tLc);_.Kb=function uLc(a){return FJc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var YY=mdb(Hqe,'NetworkSimplexPlacer/lambda$3$Type',1416);bcb(1417,1,Oie,vLc);_.Mb=function wLc(a){return FJc(),cKc(BD(a,17))};var ZY=mdb(Hqe,'NetworkSimplexPlacer/lambda$4$Type',1417);bcb(1418,1,qie,xLc);_.td=function yLc(a){XJc(this.a,BD(a,17))};var $Y=mdb(Hqe,'NetworkSimplexPlacer/lambda$5$Type',1418);bcb(1419,1,{},zLc);_.Kb=function ALc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var _Y=mdb(Hqe,'NetworkSimplexPlacer/lambda$6$Type',1419);bcb(1420,1,Oie,BLc);_.Mb=function CLc(a){return FJc(),BD(a,10).k==(j0b(),h0b)};var aZ=mdb(Hqe,'NetworkSimplexPlacer/lambda$7$Type',1420);bcb(1421,1,{},DLc);_.Kb=function ELc(a){return FJc(),new YAb(null,new Lub(new Sr(ur(O_b(BD(a,10)).a.Kc(),new Sq))))};var bZ=mdb(Hqe,'NetworkSimplexPlacer/lambda$8$Type',1421);bcb(1422,1,Oie,FLc);_.Mb=function GLc(a){return FJc(),NZb(BD(a,17))};var cZ=mdb(Hqe,'NetworkSimplexPlacer/lambda$9$Type',1422);bcb(1404,1,Bqe,KLc);_.Yf=function LLc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?HLc:null};_.pf=function MLc(a,b){JLc(BD(a,37),b)};var HLc;var eZ=mdb(Hqe,'SimpleNodePlacer',1404);bcb(180,1,{180:1},ULc);_.Ib=function VLc(){var a;a='';this.c==(YLc(),XLc)?(a+=kle):this.c==WLc&&(a+=jle);this.o==(eMc(),cMc)?(a+=vle):this.o==dMc?(a+='UP'):(a+='BALANCED');return a};var hZ=mdb(Kqe,'BKAlignedLayout',180);bcb(516,22,{3:1,35:1,22:1,516:1},ZLc);var WLc,XLc;var fZ=ndb(Kqe,'BKAlignedLayout/HDirection',516,CI,_Lc,$Lc);var aMc;bcb(515,22,{3:1,35:1,22:1,515:1},fMc);var cMc,dMc;var gZ=ndb(Kqe,'BKAlignedLayout/VDirection',515,CI,hMc,gMc);var iMc;bcb(1634,1,{},mMc);var iZ=mdb(Kqe,'BKAligner',1634);bcb(1637,1,{},rMc);var lZ=mdb(Kqe,'BKCompactor',1637);bcb(654,1,{654:1},sMc);_.a=0;var jZ=mdb(Kqe,'BKCompactor/ClassEdge',654);bcb(458,1,{458:1},uMc);_.a=null;_.b=0;var kZ=mdb(Kqe,'BKCompactor/ClassNode',458);bcb(1407,1,Bqe,CMc);_.Yf=function GMc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?vMc:null};_.pf=function HMc(a,b){BMc(this,BD(a,37),b)};_.d=false;var vMc;var mZ=mdb(Kqe,'BKNodePlacer',1407);bcb(1635,1,{},JMc);_.d=0;var oZ=mdb(Kqe,'NeighborhoodInformation',1635);bcb(1636,1,Dke,OMc);_.ue=function PMc(a,b){return NMc(this,BD(a,46),BD(b,46))};_.Fb=function QMc(a){return this===a};_.ve=function RMc(){return new tpb(this)};var nZ=mdb(Kqe,'NeighborhoodInformation/NeighborComparator',1636);bcb(808,1,{});var sZ=mdb(Kqe,'ThresholdStrategy',808);bcb(1763,808,{},WMc);_.bg=function XMc(a,b,c){return this.a.o==(eMc(),dMc)?Pje:Qje};_.cg=function YMc(){};var pZ=mdb(Kqe,'ThresholdStrategy/NullThresholdStrategy',1763);bcb(579,1,{579:1},ZMc);_.c=false;_.d=false;var qZ=mdb(Kqe,'ThresholdStrategy/Postprocessable',579);bcb(1764,808,{},bNc);_.bg=function cNc(a,b,c){var d,e,f;e=b==c;d=this.a.a[c.p]==b;if(!(e||d)){return a}f=a;if(this.a.c==(YLc(),XLc)){e&&(f=$Mc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=$Mc(this,c,false))}else{e&&(f=$Mc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=$Mc(this,c,false))}return f};_.cg=function dNc(){var a,b,c,d,e;while(this.d.b!=0){e=BD(Ksb(this.d),579);d=_Mc(this,e);if(!d.a){continue}a=d.a;c=Ccb(this.a.f[this.a.g[e.b.p].p]);if(!c&&!OZb(a)&&a.c.i.c==a.d.i.c){continue}b=aNc(this,e);b||swb(this.e,e)}while(this.e.a.c.length!=0){aNc(this,BD(rwb(this.e),579))}};var rZ=mdb(Kqe,'ThresholdStrategy/SimpleThresholdStrategy',1764);bcb(635,1,{635:1,246:1,234:1},hNc);_.Kf=function jNc(){return gNc(this)};_.Xf=function iNc(){return gNc(this)};var eNc;var tZ=mdb(Lqe,'EdgeRouterFactory',635);bcb(1458,1,Bqe,wNc);_.Yf=function xNc(a){return uNc(BD(a,37))};_.pf=function yNc(a,b){vNc(BD(a,37),b)};var lNc,mNc,nNc,oNc,pNc,qNc,rNc,sNc;var uZ=mdb(Lqe,'OrthogonalEdgeRouter',1458);bcb(1451,1,Bqe,NNc);_.Yf=function ONc(a){return INc(BD(a,37))};_.pf=function PNc(a,b){KNc(this,BD(a,37),b)};var zNc,ANc,BNc,CNc,DNc,ENc;var wZ=mdb(Lqe,'PolylineEdgeRouter',1451);bcb(1452,1,Vke,RNc);_.Lb=function SNc(a){return QNc(BD(a,10))};_.Fb=function TNc(a){return this===a};_.Mb=function UNc(a){return QNc(BD(a,10))};var vZ=mdb(Lqe,'PolylineEdgeRouter/1',1452);bcb(1809,1,Oie,ZNc);_.Mb=function $Nc(a){return BD(a,129).c==(HOc(),FOc)};var xZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$0$Type',1809);bcb(1810,1,{},_Nc);_.Ge=function aOc(a){return BD(a,129).d};var yZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$1$Type',1810);bcb(1811,1,Oie,bOc);_.Mb=function cOc(a){return BD(a,129).c==(HOc(),FOc)};var zZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$2$Type',1811);bcb(1812,1,{},dOc);_.Ge=function eOc(a){return BD(a,129).d};var AZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$3$Type',1812);bcb(1813,1,{},fOc);_.Ge=function gOc(a){return BD(a,129).d};var BZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$4$Type',1813);bcb(1814,1,{},hOc);_.Ge=function iOc(a){return BD(a,129).d};var CZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$5$Type',1814);bcb(112,1,{35:1,112:1},uOc);_.wd=function vOc(a){return kOc(this,BD(a,112))};_.Fb=function wOc(a){var b;if(JD(a,112)){b=BD(a,112);return this.g==b.g}return false};_.Hb=function xOc(){return this.g};_.Ib=function zOc(){var a,b,c,d;a=new Wfb('{');d=new olb(this.n);while(d.a'+this.b+' ('+Yr(this.c)+')'};_.d=0;var EZ=mdb(Mqe,'HyperEdgeSegmentDependency',129);bcb(520,22,{3:1,35:1,22:1,520:1},IOc);var FOc,GOc;var DZ=ndb(Mqe,'HyperEdgeSegmentDependency/DependencyType',520,CI,KOc,JOc);var LOc;bcb(1815,1,{},ZOc);var MZ=mdb(Mqe,'HyperEdgeSegmentSplitter',1815);bcb(1816,1,{},aPc);_.a=0;_.b=0;var FZ=mdb(Mqe,'HyperEdgeSegmentSplitter/AreaRating',1816);bcb(329,1,{329:1},bPc);_.a=0;_.b=0;_.c=0;var GZ=mdb(Mqe,'HyperEdgeSegmentSplitter/FreeArea',329);bcb(1817,1,Dke,cPc);_.ue=function dPc(a,b){return _Oc(BD(a,112),BD(b,112))};_.Fb=function ePc(a){return this===a};_.ve=function fPc(){return new tpb(this)};var HZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$0$Type',1817);bcb(1818,1,qie,gPc);_.td=function hPc(a){TOc(this.a,this.d,this.c,this.b,BD(a,112))};_.b=0;var IZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$1$Type',1818);bcb(1819,1,{},iPc);_.Kb=function jPc(a){return new YAb(null,new Kub(BD(a,112).e,16))};var JZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$2$Type',1819);bcb(1820,1,{},kPc);_.Kb=function lPc(a){return new YAb(null,new Kub(BD(a,112).j,16))};var KZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$3$Type',1820);bcb(1821,1,{},mPc);_.Fe=function nPc(a){return Edb(ED(a))};var LZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$4$Type',1821);bcb(655,1,{},tPc);_.a=0;_.b=0;_.c=0;var QZ=mdb(Mqe,'OrthogonalRoutingGenerator',655);bcb(1638,1,{},xPc);_.Kb=function yPc(a){return new YAb(null,new Kub(BD(a,112).e,16))};var OZ=mdb(Mqe,'OrthogonalRoutingGenerator/lambda$0$Type',1638);bcb(1639,1,{},zPc);_.Kb=function APc(a){return new YAb(null,new Kub(BD(a,112).j,16))};var PZ=mdb(Mqe,'OrthogonalRoutingGenerator/lambda$1$Type',1639);bcb(661,1,{});var RZ=mdb(Nqe,'BaseRoutingDirectionStrategy',661);bcb(1807,661,{},EPc);_.dg=function FPc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new olb(a.n);j.aqme){f=k;e=a;d=new f7c(l,f);Dsb(g.a,d);BPc(this,g,e,d,false);m=a.r;if(m){n=Edb(ED(Ut(m.e,0)));d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false);f=b+m.o*c;e=m;d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false)}d=new f7c(p,f);Dsb(g.a,d);BPc(this,g,e,d,false)}}}}};_.eg=function GPc(a){return a.i.n.a+a.n.a+a.a.a};_.fg=function HPc(){return Ucd(),Rcd};_.gg=function IPc(){return Ucd(),Acd};var SZ=mdb(Nqe,'NorthToSouthRoutingStrategy',1807);bcb(1808,661,{},JPc);_.dg=function KPc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b-a.o*c;for(j=new olb(a.n);j.aqme){f=k;e=a;d=new f7c(l,f);Dsb(g.a,d);BPc(this,g,e,d,false);m=a.r;if(m){n=Edb(ED(Ut(m.e,0)));d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false);f=b-m.o*c;e=m;d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false)}d=new f7c(p,f);Dsb(g.a,d);BPc(this,g,e,d,false)}}}}};_.eg=function LPc(a){return a.i.n.a+a.n.a+a.a.a};_.fg=function MPc(){return Ucd(),Acd};_.gg=function NPc(){return Ucd(),Rcd};var TZ=mdb(Nqe,'SouthToNorthRoutingStrategy',1808);bcb(1806,661,{},OPc);_.dg=function PPc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new olb(a.n);j.aqme){f=k;e=a;d=new f7c(f,l);Dsb(g.a,d);BPc(this,g,e,d,true);m=a.r;if(m){n=Edb(ED(Ut(m.e,0)));d=new f7c(f,n);Dsb(g.a,d);BPc(this,g,e,d,true);f=b+m.o*c;e=m;d=new f7c(f,n);Dsb(g.a,d);BPc(this,g,e,d,true)}d=new f7c(f,p);Dsb(g.a,d);BPc(this,g,e,d,true)}}}}};_.eg=function QPc(a){return a.i.n.b+a.n.b+a.a.b};_.fg=function RPc(){return Ucd(),zcd};_.gg=function SPc(){return Ucd(),Tcd};var UZ=mdb(Nqe,'WestToEastRoutingStrategy',1806);bcb(813,1,{},YPc);_.Ib=function ZPc(){return Fe(this.a)};_.b=0;_.c=false;_.d=false;_.f=0;var WZ=mdb(Pqe,'NubSpline',813);bcb(407,1,{407:1},aQc,bQc);var VZ=mdb(Pqe,'NubSpline/PolarCP',407);bcb(1453,1,Bqe,vQc);_.Yf=function xQc(a){return qQc(BD(a,37))};_.pf=function yQc(a,b){uQc(this,BD(a,37),b)};var cQc,dQc,eQc,fQc,gQc;var b$=mdb(Pqe,'SplineEdgeRouter',1453);bcb(268,1,{268:1},BQc);_.Ib=function CQc(){return this.a+' ->('+this.c+') '+this.b};_.c=0;var XZ=mdb(Pqe,'SplineEdgeRouter/Dependency',268);bcb(455,22,{3:1,35:1,22:1,455:1},GQc);var DQc,EQc;var YZ=ndb(Pqe,'SplineEdgeRouter/SideToProcess',455,CI,IQc,HQc);var JQc;bcb(1454,1,Oie,LQc);_.Mb=function MQc(a){return hQc(),!BD(a,128).o};var ZZ=mdb(Pqe,'SplineEdgeRouter/lambda$0$Type',1454);bcb(1455,1,{},NQc);_.Ge=function OQc(a){return hQc(),BD(a,128).v+1};var $Z=mdb(Pqe,'SplineEdgeRouter/lambda$1$Type',1455);bcb(1456,1,qie,PQc);_.td=function QQc(a){sQc(this.a,this.b,BD(a,46))};var _Z=mdb(Pqe,'SplineEdgeRouter/lambda$2$Type',1456);bcb(1457,1,qie,RQc);_.td=function SQc(a){tQc(this.a,this.b,BD(a,46))};var a$=mdb(Pqe,'SplineEdgeRouter/lambda$3$Type',1457);bcb(128,1,{35:1,128:1},YQc,ZQc);_.wd=function $Qc(a){return WQc(this,BD(a,128))};_.b=0;_.e=false;_.f=0;_.g=0;_.j=false;_.k=false;_.n=0;_.o=false;_.p=false;_.q=false;_.s=0;_.u=0;_.v=0;_.F=0;var d$=mdb(Pqe,'SplineSegment',128);bcb(459,1,{459:1},_Qc);_.a=0;_.b=false;_.c=false;_.d=false;_.e=false;_.f=0;var c$=mdb(Pqe,'SplineSegment/EdgeInformation',459);bcb(1234,1,{},hRc);var f$=mdb(Uqe,hme,1234);bcb(1235,1,Dke,jRc);_.ue=function kRc(a,b){return iRc(BD(a,135),BD(b,135))};_.Fb=function lRc(a){return this===a};_.ve=function mRc(){return new tpb(this)};var e$=mdb(Uqe,ime,1235);bcb(1233,1,{},tRc);var g$=mdb(Uqe,'MrTree',1233);bcb(393,22,{3:1,35:1,22:1,393:1,246:1,234:1},ARc);_.Kf=function CRc(){return zRc(this)};_.Xf=function BRc(){return zRc(this)};var uRc,vRc,wRc,xRc;var h$=ndb(Uqe,'TreeLayoutPhases',393,CI,ERc,DRc);var FRc;bcb(1130,209,Mle,HRc);_.Ze=function IRc(a,b){var c,d,e,f,g,h,i;Ccb(DD(hkd(a,(JTc(),ATc))))||$Cb((c=new _Cb((Pgd(),new bhd(a))),c));g=(h=new SRc,tNb(h,a),yNb(h,(mTc(),dTc),a),i=new Lqb,pRc(a,h,i),oRc(a,h,i),h);f=gRc(this.a,g);for(e=new olb(f);e.a'+WRc(this.c):'e_'+tb(this)};var l$=mdb(Vqe,'TEdge',188);bcb(135,134,{3:1,135:1,94:1,134:1},SRc);_.Ib=function TRc(){var a,b,c,d,e;e=null;for(d=Jsb(this.b,0);d.b!=d.d.c;){c=BD(Xsb(d),86);e+=(c.c==null||c.c.length==0?'n_'+c.g:'n_'+c.c)+'\n'}for(b=Jsb(this.a,0);b.b!=b.d.c;){a=BD(Xsb(b),188);e+=(!!a.b&&!!a.c?WRc(a.b)+'->'+WRc(a.c):'e_'+tb(a))+'\n'}return e};var n$=mdb(Vqe,'TGraph',135);bcb(633,502,{3:1,502:1,633:1,94:1,134:1});var r$=mdb(Vqe,'TShape',633);bcb(86,633,{3:1,502:1,86:1,633:1,94:1,134:1},XRc);_.Ib=function YRc(){return WRc(this)};var q$=mdb(Vqe,'TNode',86);bcb(255,1,vie,ZRc);_.Jc=function $Rc(a){reb(this,a)};_.Kc=function _Rc(){var a;return a=Jsb(this.a.d,0),new aSc(a)};var p$=mdb(Vqe,'TNode/2',255);bcb(358,1,aie,aSc);_.Nb=function bSc(a){Rrb(this,a)};_.Pb=function dSc(){return BD(Xsb(this.a),188).c};_.Ob=function cSc(){return Wsb(this.a)};_.Qb=function eSc(){Zsb(this.a)};var o$=mdb(Vqe,'TNode/2/1',358);bcb(1840,1,ene,hSc);_.pf=function jSc(a,b){gSc(this,BD(a,135),b)};var s$=mdb(Wqe,'FanProcessor',1840);bcb(327,22,{3:1,35:1,22:1,327:1,234:1},rSc);_.Kf=function sSc(){switch(this.g){case 0:return new QSc;case 1:return new hSc;case 2:return new GSc;case 3:return new zSc;case 4:return new NSc;case 5:return new TSc;default:throw vbb(new Wdb(Dne+(this.f!=null?this.f:''+this.g)));}};var kSc,lSc,mSc,nSc,oSc,pSc;var t$=ndb(Wqe,Ene,327,CI,uSc,tSc);var vSc;bcb(1843,1,ene,zSc);_.pf=function ASc(a,b){xSc(this,BD(a,135),b)};_.a=0;var v$=mdb(Wqe,'LevelHeightProcessor',1843);bcb(1844,1,vie,BSc);_.Jc=function CSc(a){reb(this,a)};_.Kc=function DSc(){return mmb(),Emb(),Dmb};var u$=mdb(Wqe,'LevelHeightProcessor/1',1844);bcb(1841,1,ene,GSc);_.pf=function HSc(a,b){ESc(this,BD(a,135),b)};_.a=0;var x$=mdb(Wqe,'NeighborsProcessor',1841);bcb(1842,1,vie,ISc);_.Jc=function JSc(a){reb(this,a)};_.Kc=function KSc(){return mmb(),Emb(),Dmb};var w$=mdb(Wqe,'NeighborsProcessor/1',1842);bcb(1845,1,ene,NSc);_.pf=function OSc(a,b){LSc(this,BD(a,135),b)};_.a=0;var y$=mdb(Wqe,'NodePositionProcessor',1845);bcb(1839,1,ene,QSc);_.pf=function RSc(a,b){PSc(this,BD(a,135))};var z$=mdb(Wqe,'RootProcessor',1839);bcb(1846,1,ene,TSc);_.pf=function USc(a,b){SSc(BD(a,135))};var A$=mdb(Wqe,'Untreeifyer',1846);var VSc,WSc,XSc,YSc,ZSc,$Sc,_Sc,aTc,bTc,cTc,dTc,eTc,fTc,gTc,hTc,iTc,jTc,kTc,lTc;bcb(851,1,ale,sTc);_.Qe=function tTc(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zqe),''),'Weighting of Nodes'),'Which weighting to use when computing a node order.'),qTc),(_5c(),V5c)),E$),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$qe),''),'Search Order'),'Which search order to use when computing a spanning tree.'),oTc),V5c),F$),pqb(L5c))));KTc((new LTc,a))};var nTc,oTc,pTc,qTc;var B$=mdb(_qe,'MrTreeMetaDataProvider',851);bcb(994,1,ale,LTc);_.Qe=function MTc(a){KTc(a)};var uTc,vTc,wTc,xTc,yTc,zTc,ATc,BTc,CTc,DTc,ETc,FTc,GTc,HTc,ITc;var D$=mdb(_qe,'MrTreeOptions',994);bcb(995,1,{},NTc);_.$e=function OTc(){var a;return a=new HRc,a};_._e=function PTc(a){};var C$=mdb(_qe,'MrTreeOptions/MrtreeFactory',995);bcb(480,22,{3:1,35:1,22:1,480:1},TTc);var QTc,RTc;var E$=ndb(_qe,'OrderWeighting',480,CI,VTc,UTc);var WTc;bcb(425,22,{3:1,35:1,22:1,425:1},_Tc);var YTc,ZTc;var F$=ndb(_qe,'TreeifyingOrder',425,CI,bUc,aUc);var cUc;bcb(1459,1,Bqe,lUc);_.Yf=function mUc(a){return BD(a,135),eUc};_.pf=function nUc(a,b){kUc(this,BD(a,135),b)};var eUc;var G$=mdb('org.eclipse.elk.alg.mrtree.p1treeify','DFSTreeifyer',1459);bcb(1460,1,Bqe,sUc);_.Yf=function tUc(a){return BD(a,135),oUc};_.pf=function uUc(a,b){rUc(this,BD(a,135),b)};var oUc;var H$=mdb('org.eclipse.elk.alg.mrtree.p2order','NodeOrderer',1460);bcb(1461,1,Bqe,CUc);_.Yf=function DUc(a){return BD(a,135),vUc};_.pf=function EUc(a,b){AUc(this,BD(a,135),b)};_.a=0;var vUc;var I$=mdb('org.eclipse.elk.alg.mrtree.p3place','NodePlacer',1461);bcb(1462,1,Bqe,IUc);_.Yf=function JUc(a){return BD(a,135),FUc};_.pf=function KUc(a,b){HUc(BD(a,135),b)};var FUc;var J$=mdb('org.eclipse.elk.alg.mrtree.p4route','EdgeRouter',1462);var LUc;bcb(495,22,{3:1,35:1,22:1,495:1,246:1,234:1},RUc);_.Kf=function TUc(){return QUc(this)};_.Xf=function SUc(){return QUc(this)};var NUc,OUc;var K$=ndb(cre,'RadialLayoutPhases',495,CI,VUc,UUc);var WUc;bcb(1131,209,Mle,ZUc);_.Ze=function $Uc(a,b){var c,d,e,f,g,h;c=YUc(this,a);Odd(b,'Radial layout',c.c.length);Ccb(DD(hkd(a,(ZWc(),QWc))))||$Cb((d=new _Cb((Pgd(),new bhd(a))),d));h=aVc(a);jkd(a,(MUc(),LUc),h);if(!h){throw vbb(new Wdb('The given graph is not a tree!'))}e=Edb(ED(hkd(a,VWc)));e==0&&(e=_Uc(a));jkd(a,VWc,e);for(g=new olb(YUc(this,a));g.a0&&j7c((BCb(c-1,b.length),b.charCodeAt(c-1)),nne)){--c}if(e>=c){throw vbb(new Wdb('The given string does not contain any numbers.'))}f=mfb(b.substr(e,c-e),',|;|\r|\n');if(f.length!=2){throw vbb(new Wdb('Exactly two numbers are expected, '+f.length+' were found.'))}try{this.a=Hcb(ufb(f[0]));this.b=Hcb(ufb(f[1]))}catch(a){a=ubb(a);if(JD(a,127)){d=a;throw vbb(new Wdb(one+d))}else throw vbb(a)}};_.Ib=function m7c(){return '('+this.a+','+this.b+')'};_.a=0;_.b=0;var m1=mdb(pne,'KVector',8);bcb(74,68,{3:1,4:1,20:1,28:1,52:1,14:1,68:1,15:1,74:1,414:1},s7c,t7c,u7c);_.Pc=function x7c(){return r7c(this)};_.Jf=function v7c(b){var c,d,e,f,g,h;e=mfb(b,',|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n');Osb(this);try{d=0;g=0;f=0;h=0;while(d0){g%2==0?(f=Hcb(e[d])):(h=Hcb(e[d]));g>0&&g%2!=0&&Dsb(this,new f7c(f,h));++g}++d}}catch(a){a=ubb(a);if(JD(a,127)){c=a;throw vbb(new Wdb('The given string does not match the expected format for vectors.'+c))}else throw vbb(a)}};_.Ib=function y7c(){var a,b,c;a=new Wfb('(');b=Jsb(this,0);while(b.b!=b.d.c){c=BD(Xsb(b),8);Qfb(a,c.a+','+c.b);b.b!=b.d.c&&(a.a+='; ',a)}return (a.a+=')',a).a};var l1=mdb(pne,'KVectorChain',74);bcb(248,22,{3:1,35:1,22:1,248:1},G7c);var z7c,A7c,B7c,C7c,D7c,E7c;var o1=ndb(ose,'Alignment',248,CI,I7c,H7c);var J7c;bcb(979,1,ale,Z7c);_.Qe=function $7c(a){Y7c(a)};var L7c,M7c,N7c,O7c,P7c,Q7c,R7c,S7c,T7c,U7c,V7c,W7c;var q1=mdb(ose,'BoxLayouterOptions',979);bcb(980,1,{},_7c);_.$e=function a8c(){var a;return a=new ged,a};_._e=function b8c(a){};var p1=mdb(ose,'BoxLayouterOptions/BoxFactory',980);bcb(291,22,{3:1,35:1,22:1,291:1},j8c);var c8c,d8c,e8c,f8c,g8c,h8c;var r1=ndb(ose,'ContentAlignment',291,CI,l8c,k8c);var m8c;bcb(684,1,ale,Z9c);_.Qe=function $9c(a){t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,sse),''),'Layout Algorithm'),'Select a specific layout algorithm.'),(_5c(),Z5c)),ZI),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,tse),''),'Resolved Layout Algorithm'),'Meta data associated with the selected algorithm.'),Y5c),E0),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$pe),''),'Alignment'),'Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.'),q8c),V5c),o1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,_le),''),'Aspect Ratio'),'The desired aspect ratio of the drawing, that is the quotient of width by height.'),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,use),''),'Bend Points'),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Y5c),l1),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,lqe),''),'Content Alignment'),'Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.'),x8c),W5c),r1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zpe),''),'Debug Mode'),'Whether additional debug information shall be generated.'),(Bcb(),false)),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,cqe),''),Cle),'Overall direction of edges: horizontal (right / left) or vertical (down / up).'),A8c),V5c),t1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ype),''),'Edge Routing'),'What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.'),F8c),V5c),v1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Jre),''),'Expand Nodes'),'If active, nodes are expanded to fill the area of their parent.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,tpe),''),'Hierarchy Handling'),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),K8c),V5c),z1),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ame),''),'Padding'),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),g9c),Y5c),j1),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ame),''),'Interactive'),'Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xqe),''),'interactive Layout'),'Whether the graph should be changeable interactively and by setting constraints'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Dme),''),'Omit Node Micro Layout'),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Bme),''),'Port Constraints'),'Defines constraints of the position of the ports of a node.'),u9c),V5c),D1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,uqe),''),'Position'),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Y5c),m1),qqb(K5c,OC(GC(e1,1),Kie,175,0,[M5c,J5c])))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,vme),''),'Priority'),'Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.'),X5c),JI),qqb(K5c,OC(GC(e1,1),Kie,175,0,[I5c])))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,yme),''),'Randomization Seed'),'Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).'),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,zme),''),'Separate Connected Components'),'Whether each connected component should be processed separately.'),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,mqe),''),'Junction Points'),'This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.'),R8c),Y5c),l1),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,pqe),''),'Comment Box'),'Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.'),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,qqe),''),'Hypernode'),'Whether the node should be handled as a hypernode.'),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,vse),''),'Label Manager'),"Label managers can shorten labels upon a layout algorithm's request."),Y5c),h1),qqb(L5c,OC(GC(e1,1),Kie,175,0,[J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,vqe),''),'Margins'),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),T8c),Y5c),i1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Xpe),''),'No Layout'),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),false),T5c),wI),qqb(K5c,OC(GC(e1,1),Kie,175,0,[I5c,M5c,J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,wse),''),'Scale Factor'),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),U5c),BI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xse),''),'Animate'),'Whether the shift from the old layout to the new computed layout shall be animated.'),true),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,yse),''),'Animation Time Factor'),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),meb(100)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,zse),''),'Layout Ancestors'),'Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ase),''),'Maximal Animation Time'),'The maximal time for animations, in milliseconds.'),meb(4000)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Bse),''),'Minimal Animation Time'),'The minimal time for animations, in milliseconds.'),meb(400)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Cse),''),'Progress Bar'),'Whether a progress bar shall be displayed during layout computations.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Dse),''),'Validate Graph'),'Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ese),''),'Validate Options'),'Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),true),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Fse),''),'Zoom to Fit'),'Whether the zoom level shall be set to view the whole diagram after layout.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,rse),'box'),'Box Layout Mode'),'Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.'),u8c),V5c),O1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Lpe),zpe),'Comment Comment Spacing'),'Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Mpe),zpe),'Comment Node Spacing'),'Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zle),zpe),'Components Spacing'),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Npe),zpe),'Edge Spacing'),'Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xme),zpe),'Edge Label Spacing'),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ope),zpe),'Edge Node Spacing'),'Spacing to be preserved between nodes and edges.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ppe),zpe),'Label Spacing'),'Determines the amount of space to be left between two labels of the same graph element.'),0),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Spe),zpe),'Label Node Spacing'),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Qpe),zpe),'Horizontal spacing between Label and Port'),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Rpe),zpe),'Vertical spacing between Label and Port'),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,wme),zpe),'Node Spacing'),'The minimal distance to be preserved between each two nodes.'),20),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Tpe),zpe),'Node Self Loop Spacing'),'Spacing to be preserved between a node and its self loops.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Upe),zpe),'Port Spacing'),'Spacing between pairs of ports of the same node.'),10),U5c),BI),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Vpe),zpe),'Individual Spacing'),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),Y5c),i2),qqb(K5c,OC(GC(e1,1),Kie,175,0,[I5c,M5c,J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,wqe),zpe),'Additional Port Space'),'Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.'),W9c),Y5c),i1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,tqe),Jse),'Layout Partition'),'Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).'),X5c),JI),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));o4c(a,tqe,sqe,k9c);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,sqe),Jse),'Layout Partitioning'),'Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.'),i9c),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,dqe),Kse),'Node Label Padding'),'Define padding for node labels that are placed inside of a node.'),V8c),Y5c),j1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Gme),Kse),'Node Label Placement'),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),X8c),W5c),B1),qqb(K5c,OC(GC(e1,1),Kie,175,0,[J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,gqe),Lse),'Port Alignment'),'Defines the default port distribution for a node. May be overridden for each side individually.'),m9c),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,hqe),Lse),'Port Alignment (North)'),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,iqe),Lse),'Port Alignment (South)'),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,jqe),Lse),'Port Alignment (West)'),"Defines how ports on the western side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,kqe),Lse),'Port Alignment (East)'),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Fme),Mse),'Node Size Constraints'),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),Z8c),W5c),I1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Eme),Mse),'Node Size Options'),'Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.'),c9c),W5c),J1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Tme),Mse),'Node Size Minimum'),'The minimal size to which a node can be reduced.'),a9c),Y5c),m1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,bqe),Mse),'Fixed Graph Size'),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,nqe),Jpe),'Edge Label Placement'),'Gives a hint on where to put edge labels.'),D8c),V5c),u1),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Cme),Jpe),'Inline Edge Labels'),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),false),T5c),wI),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Gse),'font'),'Font Name'),'Font name used for a label.'),Z5c),ZI),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Hse),'font'),'Font Size'),'Font size used for a label.'),X5c),JI),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,rqe),Nse),'Port Anchor Offset'),'The offset to the port position where connections shall be attached.'),Y5c),m1),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,oqe),Nse),'Port Index'),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),X5c),JI),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ype),Nse),'Port Side'),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),B9c),V5c),F1),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Wpe),Nse),'Port Border Offset'),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),U5c),BI),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Hme),Ose),'Port Label Placement'),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),y9c),W5c),E1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,eqe),Ose),'Port Labels Next to Port'),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,fqe),Ose),'Treat Port Labels as Group'),'If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.'),true),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,_pe),Pse),'Activate Inside Self Loops'),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,aqe),Pse),'Inside Self Loop'),'Whether a self loop should be routed inside a node instead of around that node.'),false),T5c),wI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$le),'edge'),'Edge Thickness'),'The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.'),1),U5c),BI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ise),'edge'),'Edge Type'),'The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.'),H8c),V5c),w1),pqb(I5c))));s4c(a,new W3c(b4c(d4c(c4c(new e4c,sne),'Layered'),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,'org.eclipse.elk.orthogonal'),'Orthogonal'),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,ume),'Force'),'Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,'org.eclipse.elk.circle'),'Circle'),'Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,bre),'Tree'),'Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,'org.eclipse.elk.planar'),'Planar'),'Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,sre),'Radial'),'Radial layout algorithms usually position the nodes of the graph on concentric circles.')));$ad((new _ad,a));Y7c((new Z7c,a));jdd((new kdd,a))};var o8c,p8c,q8c,r8c,s8c,t8c,u8c,v8c,w8c,x8c,y8c,z8c,A8c,B8c,C8c,D8c,E8c,F8c,G8c,H8c,I8c,J8c,K8c,L8c,M8c,N8c,O8c,P8c,Q8c,R8c,S8c,T8c,U8c,V8c,W8c,X8c,Y8c,Z8c,$8c,_8c,a9c,b9c,c9c,d9c,e9c,f9c,g9c,h9c,i9c,j9c,k9c,l9c,m9c,n9c,o9c,p9c,q9c,r9c,s9c,t9c,u9c,v9c,w9c,x9c,y9c,z9c,A9c,B9c,C9c,D9c,E9c,F9c,G9c,H9c,I9c,J9c,K9c,L9c,M9c,N9c,O9c,P9c,Q9c,R9c,S9c,T9c,U9c,V9c,W9c,X9c;var s1=mdb(ose,'CoreOptions',684);bcb(103,22,{3:1,35:1,22:1,103:1},iad);var _9c,aad,bad,cad,dad;var t1=ndb(ose,Cle,103,CI,kad,jad);var lad;bcb(272,22,{3:1,35:1,22:1,272:1},rad);var nad,oad,pad;var u1=ndb(ose,'EdgeLabelPlacement',272,CI,tad,sad);var uad;bcb(218,22,{3:1,35:1,22:1,218:1},Bad);var wad,xad,yad,zad;var v1=ndb(ose,'EdgeRouting',218,CI,Dad,Cad);var Ead;bcb(312,22,{3:1,35:1,22:1,312:1},Nad);var Gad,Had,Iad,Jad,Kad,Lad;var w1=ndb(ose,'EdgeType',312,CI,Pad,Oad);var Qad;bcb(977,1,ale,_ad);_.Qe=function abd(a){$ad(a)};var Sad,Tad,Uad,Vad,Wad,Xad,Yad;var y1=mdb(ose,'FixedLayouterOptions',977);bcb(978,1,{},bbd);_.$e=function cbd(){var a;return a=new Zfd,a};_._e=function dbd(a){};var x1=mdb(ose,'FixedLayouterOptions/FixedFactory',978);bcb(334,22,{3:1,35:1,22:1,334:1},ibd);var ebd,fbd,gbd;var z1=ndb(ose,'HierarchyHandling',334,CI,kbd,jbd);var lbd;bcb(285,22,{3:1,35:1,22:1,285:1},tbd);var nbd,obd,pbd,qbd;var A1=ndb(ose,'LabelSide',285,CI,vbd,ubd);var wbd;bcb(93,22,{3:1,35:1,22:1,93:1},Ibd);var ybd,zbd,Abd,Bbd,Cbd,Dbd,Ebd,Fbd,Gbd;var B1=ndb(ose,'NodeLabelPlacement',93,CI,Lbd,Kbd);var Mbd;bcb(249,22,{3:1,35:1,22:1,249:1},Ubd);var Obd,Pbd,Qbd,Rbd,Sbd;var C1=ndb(ose,'PortAlignment',249,CI,Wbd,Vbd);var Xbd;bcb(98,22,{3:1,35:1,22:1,98:1},gcd);var Zbd,$bd,_bd,acd,bcd,ccd;var D1=ndb(ose,'PortConstraints',98,CI,icd,hcd);var jcd;bcb(273,22,{3:1,35:1,22:1,273:1},scd);var lcd,mcd,ncd,ocd,pcd,qcd;var E1=ndb(ose,'PortLabelPlacement',273,CI,wcd,vcd);var xcd;bcb(61,22,{3:1,35:1,22:1,61:1},Ycd);var zcd,Acd,Bcd,Ccd,Dcd,Ecd,Fcd,Gcd,Hcd,Icd,Jcd,Kcd,Lcd,Mcd,Ncd,Ocd,Pcd,Qcd,Rcd,Scd,Tcd;var F1=ndb(ose,'PortSide',61,CI,_cd,$cd);var bdd;bcb(981,1,ale,kdd);_.Qe=function ldd(a){jdd(a)};var ddd,edd,fdd,gdd,hdd;var H1=mdb(ose,'RandomLayouterOptions',981);bcb(982,1,{},mdd);_.$e=function ndd(){var a;return a=new Mgd,a};_._e=function odd(a){};var G1=mdb(ose,'RandomLayouterOptions/RandomFactory',982);bcb(374,22,{3:1,35:1,22:1,374:1},udd);var pdd,qdd,rdd,sdd;var I1=ndb(ose,'SizeConstraint',374,CI,wdd,vdd);var xdd;bcb(259,22,{3:1,35:1,22:1,259:1},Jdd);var zdd,Add,Bdd,Cdd,Ddd,Edd,Fdd,Gdd,Hdd;var J1=ndb(ose,'SizeOptions',259,CI,Ldd,Kdd);var Mdd;bcb(370,1,{1949:1},Zdd);_.b=false;_.c=0;_.d=-1;_.e=null;_.f=null;_.g=-1;_.j=false;_.k=false;_.n=false;_.o=0;_.q=0;_.r=0;var L1=mdb(yqe,'BasicProgressMonitor',370);bcb(972,209,Mle,ged);_.Ze=function ked(a,b){var c,d,e,f,g,h,i,j,k;Odd(b,'Box layout',2);e=Gdb(ED(hkd(a,(X7c(),W7c))));f=BD(hkd(a,T7c),116);c=Ccb(DD(hkd(a,O7c)));d=Ccb(DD(hkd(a,P7c)));switch(BD(hkd(a,M7c),311).g){case 0:g=(h=new Tkb((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a)),mmb(),Okb(h,new med(d)),h);i=rfd(a);j=ED(hkd(a,L7c));(j==null||(uCb(j),j)<=0)&&(j=1.3);k=ded(g,e,f,i.a,i.b,c,(uCb(j),j));Afd(a,k.a,k.b,false,true);break;default:eed(a,e,f,c);}Qdd(b)};var S1=mdb(yqe,'BoxLayoutProvider',972);bcb(973,1,Dke,med);_.ue=function ned(a,b){return led(this,BD(a,33),BD(b,33))};_.Fb=function oed(a){return this===a};_.ve=function ped(){return new tpb(this)};_.a=false;var M1=mdb(yqe,'BoxLayoutProvider/1',973);bcb(157,1,{157:1},wed,xed);_.Ib=function yed(){return this.c?_od(this.c):Fe(this.b)};var N1=mdb(yqe,'BoxLayoutProvider/Group',157);bcb(311,22,{3:1,35:1,22:1,311:1},Eed);var zed,Aed,Bed,Ced;var O1=ndb(yqe,'BoxLayoutProvider/PackingMode',311,CI,Ged,Fed);var Hed;bcb(974,1,Dke,Jed);_.ue=function Ked(a,b){return hed(BD(a,157),BD(b,157))};_.Fb=function Led(a){return this===a};_.ve=function Med(){return new tpb(this)};var P1=mdb(yqe,'BoxLayoutProvider/lambda$0$Type',974);bcb(975,1,Dke,Ned);_.ue=function Oed(a,b){return ied(BD(a,157),BD(b,157))};_.Fb=function Ped(a){return this===a};_.ve=function Qed(){return new tpb(this)};var Q1=mdb(yqe,'BoxLayoutProvider/lambda$1$Type',975);bcb(976,1,Dke,Red);_.ue=function Sed(a,b){return jed(BD(a,157),BD(b,157))};_.Fb=function Ted(a){return this===a};_.ve=function Ued(){return new tpb(this)};var R1=mdb(yqe,'BoxLayoutProvider/lambda$2$Type',976);bcb(1365,1,{831:1},Ved);_.qg=function Wed(a,b){return Vyc(),!JD(b,160)||h2c((Y1c(),X1c,BD(a,160)),b)};var T1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type',1365);bcb(1366,1,qie,Xed);_.td=function Yed(a){Yyc(this.a,BD(a,146))};var U1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type',1366);bcb(1367,1,qie,Zed);_.td=function $ed(a){BD(a,94);Vyc()};var V1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type',1367);bcb(1371,1,qie,_ed);_.td=function afd(a){Zyc(this.a,BD(a,94))};var W1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type',1371);bcb(1369,1,Oie,bfd);_.Mb=function cfd(a){return $yc(this.a,this.b,BD(a,146))};var X1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type',1369);bcb(1368,1,Oie,dfd);_.Mb=function efd(a){return azc(this.a,this.b,BD(a,831))};var Y1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type',1368);bcb(1370,1,qie,ffd);_.td=function gfd(a){_yc(this.a,this.b,BD(a,146))};var Z1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type',1370);bcb(935,1,{},Hfd);_.Kb=function Ifd(a){return Gfd(a)};_.Fb=function Jfd(a){return this===a};var _1=mdb(yqe,'ElkUtil/lambda$0$Type',935);bcb(936,1,qie,Kfd);_.td=function Lfd(a){ufd(this.a,this.b,BD(a,79))};_.a=0;_.b=0;var a2=mdb(yqe,'ElkUtil/lambda$1$Type',936);bcb(937,1,qie,Mfd);_.td=function Nfd(a){vfd(this.a,this.b,BD(a,202))};_.a=0;_.b=0;var b2=mdb(yqe,'ElkUtil/lambda$2$Type',937);bcb(938,1,qie,Ofd);_.td=function Pfd(a){wfd(this.a,this.b,BD(a,137))};_.a=0;_.b=0;var c2=mdb(yqe,'ElkUtil/lambda$3$Type',938);bcb(939,1,qie,Qfd);_.td=function Rfd(a){xfd(this.a,BD(a,469))};var d2=mdb(yqe,'ElkUtil/lambda$4$Type',939);bcb(342,1,{35:1,342:1},Tfd);_.wd=function Ufd(a){return Sfd(this,BD(a,236))};_.Fb=function Vfd(a){var b;if(JD(a,342)){b=BD(a,342);return this.a==b.a}return false};_.Hb=function Wfd(){return QD(this.a)};_.Ib=function Xfd(){return this.a+' (exclusive)'};_.a=0;var e2=mdb(yqe,'ExclusiveBounds/ExclusiveLowerBound',342);bcb(1138,209,Mle,Zfd);_.Ze=function $fd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;Odd(b,'Fixed Layout',1);f=BD(hkd(a,(Y9c(),E8c)),218);l=0;m=0;for(s=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));s.e!=s.i.gc();){q=BD(Dyd(s),33);B=BD(hkd(q,(Zad(),Yad)),8);if(B){bld(q,B.a,B.b);if(BD(hkd(q,Tad),174).Hc((tdd(),pdd))){n=BD(hkd(q,Vad),8);n.a>0&&n.b>0&&Afd(q,n.a,n.b,true,true)}}l=$wnd.Math.max(l,q.i+q.g);m=$wnd.Math.max(m,q.j+q.f);for(j=new Fyd((!q.n&&(q.n=new cUd(D2,q,1,7)),q.n));j.e!=j.i.gc();){h=BD(Dyd(j),137);B=BD(hkd(h,Yad),8);!!B&&bld(h,B.a,B.b);l=$wnd.Math.max(l,q.i+h.i+h.g);m=$wnd.Math.max(m,q.j+h.j+h.f)}for(v=new Fyd((!q.c&&(q.c=new cUd(F2,q,9,9)),q.c));v.e!=v.i.gc();){u=BD(Dyd(v),118);B=BD(hkd(u,Yad),8);!!B&&bld(u,B.a,B.b);w=q.i+u.i;A=q.j+u.j;l=$wnd.Math.max(l,w+u.g);m=$wnd.Math.max(m,A+u.f);for(i=new Fyd((!u.n&&(u.n=new cUd(D2,u,1,7)),u.n));i.e!=i.i.gc();){h=BD(Dyd(i),137);B=BD(hkd(h,Yad),8);!!B&&bld(h,B.a,B.b);l=$wnd.Math.max(l,w+h.i+h.g);m=$wnd.Math.max(m,A+h.j+h.f)}}for(e=new Sr(ur(_sd(q).a.Kc(),new Sq));Qr(e);){c=BD(Rr(e),79);k=Yfd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}for(d=new Sr(ur($sd(q).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),79);if(Xod(jtd(c))!=a){k=Yfd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}}}if(f==(Aad(),wad)){for(r=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));r.e!=r.i.gc();){q=BD(Dyd(r),33);for(d=new Sr(ur(_sd(q).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),79);g=pfd(c);g.b==0?jkd(c,Q8c,null):jkd(c,Q8c,g)}}}if(!Ccb(DD(hkd(a,(Zad(),Uad))))){t=BD(hkd(a,Wad),116);p=l+t.b+t.c;o=m+t.d+t.a;Afd(a,p,o,true,true)}Qdd(b)};var f2=mdb(yqe,'FixedLayoutProvider',1138);bcb(373,134,{3:1,414:1,373:1,94:1,134:1},_fd,agd);_.Jf=function dgd(b){var c,d,e,f,g,h,i,j,k;if(!b){return}try{j=mfb(b,';,;');for(g=j,h=0,i=g.length;h>16&aje|b^d<<16};_.Kc=function zgd(){return new Bgd(this)};_.Ib=function Agd(){return this.a==null&&this.b==null?'pair(null,null)':this.a==null?'pair(null,'+fcb(this.b)+')':this.b==null?'pair('+fcb(this.a)+',null)':'pair('+fcb(this.a)+','+fcb(this.b)+')'};var n2=mdb(yqe,'Pair',46);bcb(983,1,aie,Bgd);_.Nb=function Cgd(a){Rrb(this,a)};_.Ob=function Dgd(){return !this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)};_.Pb=function Egd(){if(!this.c&&!this.b&&this.a.a!=null){this.b=true;return this.a.a}else if(!this.c&&this.a.b!=null){this.c=true;return this.a.b}throw vbb(new utb)};_.Qb=function Fgd(){this.c&&this.a.b!=null?(this.a.b=null):this.b&&this.a.a!=null&&(this.a.a=null);throw vbb(new Ydb)};_.b=false;_.c=false;var m2=mdb(yqe,'Pair/1',983);bcb(448,1,{448:1},Ggd);_.Fb=function Hgd(a){return wtb(this.a,BD(a,448).a)&&wtb(this.c,BD(a,448).c)&&wtb(this.d,BD(a,448).d)&&wtb(this.b,BD(a,448).b)};_.Hb=function Igd(){return Hlb(OC(GC(SI,1),Uhe,1,5,[this.a,this.c,this.d,this.b]))};_.Ib=function Jgd(){return '('+this.a+She+this.c+She+this.d+She+this.b+')'};var o2=mdb(yqe,'Quadruple',448);bcb(1126,209,Mle,Mgd);_.Ze=function Ngd(a,b){var c,d,e,f,g;Odd(b,'Random Layout',1);if((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a).i==0){Qdd(b);return}f=BD(hkd(a,(idd(),gdd)),19);!!f&&f.a!=0?(e=new Hub(f.a)):(e=new Gub);c=Gdb(ED(hkd(a,ddd)));g=Gdb(ED(hkd(a,hdd)));d=BD(hkd(a,edd),116);Lgd(a,e,c,g,d);Qdd(b)};var p2=mdb(yqe,'RandomLayoutProvider',1126);var Ogd;bcb(553,1,{});_.qf=function Sgd(){return new f7c(this.f.i,this.f.j)};_.We=function Tgd(a){if(Jsd(a,(Y9c(),s9c))){return hkd(this.f,Qgd)}return hkd(this.f,a)};_.rf=function Ugd(){return new f7c(this.f.g,this.f.f)};_.sf=function Vgd(){return this.g};_.Xe=function Wgd(a){return ikd(this.f,a)};_.tf=function Xgd(a){dld(this.f,a.a);eld(this.f,a.b)};_.uf=function Ygd(a){cld(this.f,a.a);ald(this.f,a.b)};_.vf=function Zgd(a){this.g=a};_.g=0;var Qgd;var q2=mdb(Use,'ElkGraphAdapters/AbstractElkGraphElementAdapter',553);bcb(554,1,{839:1},$gd);_.wf=function _gd(){var a,b;if(!this.b){this.b=Qu(Kkd(this.a).i);for(b=new Fyd(Kkd(this.a));b.e!=b.i.gc();){a=BD(Dyd(b),137);Ekb(this.b,new dhd(a))}}return this.b};_.b=null;var r2=mdb(Use,'ElkGraphAdapters/ElkEdgeAdapter',554);bcb(301,553,{},bhd);_.xf=function chd(){return ahd(this)};_.a=null;var s2=mdb(Use,'ElkGraphAdapters/ElkGraphAdapter',301);bcb(630,553,{181:1},dhd);var t2=mdb(Use,'ElkGraphAdapters/ElkLabelAdapter',630);bcb(629,553,{680:1},hhd);_.wf=function khd(){return ehd(this)};_.Af=function lhd(){var a;return a=BD(hkd(this.f,(Y9c(),S8c)),142),!a&&(a=new H_b),a};_.Cf=function nhd(){return fhd(this)};_.Ef=function phd(a){var b;b=new K_b(a);jkd(this.f,(Y9c(),S8c),b)};_.Ff=function qhd(a){jkd(this.f,(Y9c(),f9c),new r0b(a))};_.yf=function ihd(){return this.d};_.zf=function jhd(){var a,b;if(!this.a){this.a=new Rkb;for(b=new Sr(ur($sd(BD(this.f,33)).a.Kc(),new Sq));Qr(b);){a=BD(Rr(b),79);Ekb(this.a,new $gd(a))}}return this.a};_.Bf=function mhd(){var a,b;if(!this.c){this.c=new Rkb;for(b=new Sr(ur(_sd(BD(this.f,33)).a.Kc(),new Sq));Qr(b);){a=BD(Rr(b),79);Ekb(this.c,new $gd(a))}}return this.c};_.Df=function ohd(){return Vod(BD(this.f,33)).i!=0||Ccb(DD(BD(this.f,33).We((Y9c(),M8c))))};_.Gf=function rhd(){ghd(this,(Pgd(),Ogd))};_.a=null;_.b=null;_.c=null;_.d=null;_.e=null;var u2=mdb(Use,'ElkGraphAdapters/ElkNodeAdapter',629);bcb(1266,553,{838:1},thd);_.wf=function vhd(){return shd(this)};_.zf=function uhd(){var a,b;if(!this.a){this.a=Pu(BD(this.f,118).xg().i);for(b=new Fyd(BD(this.f,118).xg());b.e!=b.i.gc();){a=BD(Dyd(b),79);Ekb(this.a,new $gd(a))}}return this.a};_.Bf=function whd(){var a,b;if(!this.c){this.c=Pu(BD(this.f,118).yg().i);for(b=new Fyd(BD(this.f,118).yg());b.e!=b.i.gc();){a=BD(Dyd(b),79);Ekb(this.c,new $gd(a))}}return this.c};_.Hf=function xhd(){return BD(BD(this.f,118).We((Y9c(),A9c)),61)};_.If=function yhd(){var a,b,c,d,e,f,g,h;d=mpd(BD(this.f,118));for(c=new Fyd(BD(this.f,118).yg());c.e!=c.i.gc();){a=BD(Dyd(c),79);for(h=new Fyd((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c));h.e!=h.i.gc();){g=BD(Dyd(h),82);if(ntd(atd(g),d)){return true}else if(atd(g)==d&&Ccb(DD(hkd(a,(Y9c(),N8c))))){return true}}}for(b=new Fyd(BD(this.f,118).xg());b.e!=b.i.gc();){a=BD(Dyd(b),79);for(f=new Fyd((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b));f.e!=f.i.gc();){e=BD(Dyd(f),82);if(ntd(atd(e),d)){return true}}}return false};_.a=null;_.b=null;_.c=null;var v2=mdb(Use,'ElkGraphAdapters/ElkPortAdapter',1266);bcb(1267,1,Dke,Ahd);_.ue=function Bhd(a,b){return zhd(BD(a,118),BD(b,118))};_.Fb=function Chd(a){return this===a};_.ve=function Dhd(){return new tpb(this)};var w2=mdb(Use,'ElkGraphAdapters/PortComparator',1267);var m5=odb(Vse,'EObject');var x2=odb(Wse,Xse);var y2=odb(Wse,Yse);var C2=odb(Wse,Zse);var G2=odb(Wse,'ElkShape');var z2=odb(Wse,$se);var B2=odb(Wse,_se);var A2=odb(Wse,ate);var k5=odb(Vse,bte);var i5=odb(Vse,'EFactory');var Ehd;var l5=odb(Vse,cte);var o5=odb(Vse,'EPackage');var Ghd;var Ihd,Jhd,Khd,Lhd,Mhd,Nhd,Ohd,Phd,Qhd,Rhd,Shd;var D2=odb(Wse,dte);var E2=odb(Wse,ete);var F2=odb(Wse,fte);bcb(90,1,gte);_.Jg=function Vhd(){this.Kg();return null};_.Kg=function Whd(){return null};_.Lg=function Xhd(){return this.Kg(),false};_.Mg=function Yhd(){return false};_.Ng=function Zhd(a){Uhd(this,a)};var b4=mdb(hte,'BasicNotifierImpl',90);bcb(97,90,pte);_.nh=function fjd(){return oid(this)};_.Og=function Fid(a,b){return a};_.Pg=function Gid(){throw vbb(new bgb)};_.Qg=function Hid(a){var b;return b=zUd(BD(XKd(this.Tg(),this.Vg()),18)),this.eh().ih(this,b.n,b.f,a)};_.Rg=function Iid(a,b){throw vbb(new bgb)};_.Sg=function Jid(a,b,c){return _hd(this,a,b,c)};_.Tg=function Kid(){var a;if(this.Pg()){a=this.Pg().ck();if(a){return a}}return this.zh()};_.Ug=function Lid(){return aid(this)};_.Vg=function Mid(){throw vbb(new bgb)};_.Wg=function Oid(){var a,b;b=this.ph().dk();!b&&this.Pg().ik(b=(nRd(),a=pNd(TKd(this.Tg())),a==null?mRd:new qRd(this,a)));return b};_.Xg=function Qid(a,b){return a};_.Yg=function Rid(a){var b;b=a.Gj();return !b?bLd(this.Tg(),a):a.aj()};_.Zg=function Sid(){var a;a=this.Pg();return !a?null:a.fk()};_.$g=function Tid(){return !this.Pg()?null:this.Pg().ck()};_._g=function Uid(a,b,c){return fid(this,a,b,c)};_.ah=function Vid(a){return gid(this,a)};_.bh=function Wid(a,b){return hid(this,a,b)};_.dh=function Xid(){var a;a=this.Pg();return !!a&&a.gk()};_.eh=function Yid(){throw vbb(new bgb)};_.fh=function Zid(){return jid(this)};_.gh=function $id(a,b,c,d){return kid(this,a,b,d)};_.hh=function _id(a,b,c){var d;return d=BD(XKd(this.Tg(),b),66),d.Nj().Qj(this,this.yh(),b-this.Ah(),a,c)};_.ih=function ajd(a,b,c,d){return lid(this,a,b,d)};_.jh=function bjd(a,b,c){var d;return d=BD(XKd(this.Tg(),b),66),d.Nj().Rj(this,this.yh(),b-this.Ah(),a,c)};_.kh=function cjd(){return !!this.Pg()&&!!this.Pg().ek()};_.lh=function djd(a){return mid(this,a)};_.mh=function ejd(a){return nid(this,a)};_.oh=function gjd(a){return rid(this,a)};_.ph=function hjd(){throw vbb(new bgb)};_.qh=function ijd(){return !this.Pg()?null:this.Pg().ek()};_.rh=function jjd(){return jid(this)};_.sh=function kjd(a,b){yid(this,a,b)};_.th=function ljd(a){this.ph().hk(a)};_.uh=function mjd(a){this.ph().kk(a)};_.vh=function njd(a){this.ph().jk(a)};_.wh=function ojd(a,b){var c,d,e,f;f=this.Zg();if(!!f&&!!a){b=Txd(f.Vk(),this,b);f.Zk(this)}d=this.eh();if(d){if((Nid(this,this.eh(),this.Vg()).Bb&Tje)!=0){e=d.fh();!!e&&(!a?e.Yk(this):!f&&e.Zk(this))}else{b=(c=this.Vg(),c>=0?this.Qg(b):this.eh().ih(this,-1-c,null,b));b=this.Sg(null,-1,b)}}this.uh(a);return b};_.xh=function pjd(a){var b,c,d,e,f,g,h,i;c=this.Tg();f=bLd(c,a);b=this.Ah();if(f>=b){return BD(a,66).Nj().Uj(this,this.yh(),f-b)}else if(f<=-1){g=e1d((O6d(),M6d),c,a);if(g){Q6d();BD(g,66).Oj()||(g=_1d(q1d(M6d,g)));e=(d=this.Yg(g),BD(d>=0?this._g(d,true,true):sid(this,g,true),153));i=g.Zj();if(i>1||i==-1){return BD(BD(e,215).hl(a,false),76)}}else{throw vbb(new Wdb(ite+a.ne()+lte))}}else if(a.$j()){return d=this.Yg(a),BD(d>=0?this._g(d,false,true):sid(this,a,false),76)}h=new nGd(this,a);return h};_.yh=function qjd(){return Aid(this)};_.zh=function rjd(){return (NFd(),MFd).S};_.Ah=function sjd(){return aLd(this.zh())};_.Bh=function tjd(a){Cid(this,a)};_.Ib=function ujd(){return Eid(this)};var B5=mdb(qte,'BasicEObjectImpl',97);var zFd;bcb(114,97,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1});_.Ch=function Djd(a){var b;b=xjd(this);return b[a]};_.Dh=function Ejd(a,b){var c;c=xjd(this);NC(c,a,b)};_.Eh=function Fjd(a){var b;b=xjd(this);NC(b,a,null)};_.Jg=function Gjd(){return BD(Ajd(this,4),126)};_.Kg=function Hjd(){throw vbb(new bgb)};_.Lg=function Ijd(){return (this.Db&4)!=0};_.Pg=function Jjd(){throw vbb(new bgb)};_.Fh=function Kjd(a){Cjd(this,2,a)};_.Rg=function Ljd(a,b){this.Db=b<<16|this.Db&255;this.Fh(a)};_.Tg=function Mjd(){return wjd(this)};_.Vg=function Njd(){return this.Db>>16};_.Wg=function Ojd(){var a,b;return nRd(),b=pNd(TKd((a=BD(Ajd(this,16),26),!a?this.zh():a))),b==null?(null,mRd):new qRd(this,b)};_.Mg=function Pjd(){return (this.Db&1)==0};_.Zg=function Qjd(){return BD(Ajd(this,128),1935)};_.$g=function Rjd(){return BD(Ajd(this,16),26)};_.dh=function Sjd(){return (this.Db&32)!=0};_.eh=function Tjd(){return BD(Ajd(this,2),49)};_.kh=function Ujd(){return (this.Db&64)!=0};_.ph=function Vjd(){throw vbb(new bgb)};_.qh=function Wjd(){return BD(Ajd(this,64),281)};_.th=function Xjd(a){Cjd(this,16,a)};_.uh=function Yjd(a){Cjd(this,128,a)};_.vh=function Zjd(a){Cjd(this,64,a)};_.yh=function $jd(){return yjd(this)};_.Db=0;var s8=mdb(qte,'MinimalEObjectImpl',114);bcb(115,114,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_.Fh=function _jd(a){this.Cb=a};_.eh=function akd(){return this.Cb};var r8=mdb(qte,'MinimalEObjectImpl/Container',115);bcb(1985,115,{105:1,413:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function kkd(a,b,c){return bkd(this,a,b,c)};_.jh=function lkd(a,b,c){return ckd(this,a,b,c)};_.lh=function mkd(a){return dkd(this,a)};_.sh=function nkd(a,b){ekd(this,a,b)};_.zh=function okd(){return Thd(),Shd};_.Bh=function pkd(a){fkd(this,a)};_.Ve=function qkd(){return gkd(this)};_.We=function rkd(a){return hkd(this,a)};_.Xe=function skd(a){return ikd(this,a)};_.Ye=function tkd(a,b){return jkd(this,a,b)};var H2=mdb(rte,'EMapPropertyHolderImpl',1985);bcb(567,115,{105:1,469:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},xkd);_._g=function ykd(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return fid(this,a,b,c)};_.lh=function zkd(a){switch(a){case 0:return this.a!=0;case 1:return this.b!=0;}return mid(this,a)};_.sh=function Akd(a,b){switch(a){case 0:vkd(this,Edb(ED(b)));return;case 1:wkd(this,Edb(ED(b)));return;}yid(this,a,b)};_.zh=function Bkd(){return Thd(),Ihd};_.Bh=function Ckd(a){switch(a){case 0:vkd(this,0);return;case 1:wkd(this,0);return;}Cid(this,a)};_.Ib=function Dkd(){var a;if((this.Db&64)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (x: ';Bfb(a,this.a);a.a+=', y: ';Bfb(a,this.b);a.a+=')';return a.a};_.a=0;_.b=0;var I2=mdb(rte,'ElkBendPointImpl',567);bcb(723,1985,{105:1,413:1,160:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function Nkd(a,b,c){return Ekd(this,a,b,c)};_.hh=function Okd(a,b,c){return Fkd(this,a,b,c)};_.jh=function Pkd(a,b,c){return Gkd(this,a,b,c)};_.lh=function Qkd(a){return Hkd(this,a)};_.sh=function Rkd(a,b){Ikd(this,a,b)};_.zh=function Skd(){return Thd(),Mhd};_.Bh=function Tkd(a){Jkd(this,a)};_.zg=function Ukd(){return this.k};_.Ag=function Vkd(){return Kkd(this)};_.Ib=function Wkd(){return Mkd(this)};_.k=null;var M2=mdb(rte,'ElkGraphElementImpl',723);bcb(724,723,{105:1,413:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function gld(a,b,c){return Xkd(this,a,b,c)};_.lh=function hld(a){return Ykd(this,a)};_.sh=function ild(a,b){Zkd(this,a,b)};_.zh=function jld(){return Thd(),Rhd};_.Bh=function kld(a){$kd(this,a)};_.Bg=function lld(){return this.f};_.Cg=function mld(){return this.g};_.Dg=function nld(){return this.i};_.Eg=function old(){return this.j};_.Fg=function pld(a,b){_kd(this,a,b)};_.Gg=function qld(a,b){bld(this,a,b)};_.Hg=function rld(a){dld(this,a)};_.Ig=function sld(a){eld(this,a)};_.Ib=function tld(){return fld(this)};_.f=0;_.g=0;_.i=0;_.j=0;var T2=mdb(rte,'ElkShapeImpl',724);bcb(725,724,{105:1,413:1,82:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function Bld(a,b,c){return uld(this,a,b,c)};_.hh=function Cld(a,b,c){return vld(this,a,b,c)};_.jh=function Dld(a,b,c){return wld(this,a,b,c)};_.lh=function Eld(a){return xld(this,a)};_.sh=function Fld(a,b){yld(this,a,b)};_.zh=function Gld(){return Thd(),Jhd};_.Bh=function Hld(a){zld(this,a)};_.xg=function Ild(){return !this.d&&(this.d=new y5d(B2,this,8,5)),this.d};_.yg=function Jld(){return !this.e&&(this.e=new y5d(B2,this,7,4)),this.e};var J2=mdb(rte,'ElkConnectableShapeImpl',725);bcb(352,723,{105:1,413:1,79:1,160:1,352:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Tld);_.Qg=function Uld(a){return Lld(this,a)};_._g=function Vld(a,b,c){switch(a){case 3:return Mld(this);case 4:return !this.b&&(this.b=new y5d(z2,this,4,7)),this.b;case 5:return !this.c&&(this.c=new y5d(z2,this,5,8)),this.c;case 6:return !this.a&&(this.a=new cUd(A2,this,6,6)),this.a;case 7:return Bcb(),!this.b&&(this.b=new y5d(z2,this,4,7)),this.b.i<=1&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i<=1)?false:true;case 8:return Bcb(),Pld(this)?true:false;case 9:return Bcb(),Qld(this)?true:false;case 10:return Bcb(),!this.b&&(this.b=new y5d(z2,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i!=0)?true:false;}return Ekd(this,a,b,c)};_.hh=function Wld(a,b,c){var d;switch(b){case 3:!!this.Cb&&(c=(d=this.Db>>16,d>=0?Lld(this,c):this.Cb.ih(this,-1-d,null,c)));return Kld(this,BD(a,33),c);case 4:return !this.b&&(this.b=new y5d(z2,this,4,7)),Sxd(this.b,a,c);case 5:return !this.c&&(this.c=new y5d(z2,this,5,8)),Sxd(this.c,a,c);case 6:return !this.a&&(this.a=new cUd(A2,this,6,6)),Sxd(this.a,a,c);}return Fkd(this,a,b,c)};_.jh=function Xld(a,b,c){switch(b){case 3:return Kld(this,null,c);case 4:return !this.b&&(this.b=new y5d(z2,this,4,7)),Txd(this.b,a,c);case 5:return !this.c&&(this.c=new y5d(z2,this,5,8)),Txd(this.c,a,c);case 6:return !this.a&&(this.a=new cUd(A2,this,6,6)),Txd(this.a,a,c);}return Gkd(this,a,b,c)};_.lh=function Yld(a){switch(a){case 3:return !!Mld(this);case 4:return !!this.b&&this.b.i!=0;case 5:return !!this.c&&this.c.i!=0;case 6:return !!this.a&&this.a.i!=0;case 7:return !this.b&&(this.b=new y5d(z2,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i<=1));case 8:return Pld(this);case 9:return Qld(this);case 10:return !this.b&&(this.b=new y5d(z2,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i!=0);}return Hkd(this,a)};_.sh=function Zld(a,b){switch(a){case 3:Rld(this,BD(b,33));return;case 4:!this.b&&(this.b=new y5d(z2,this,4,7));Uxd(this.b);!this.b&&(this.b=new y5d(z2,this,4,7));ytd(this.b,BD(b,14));return;case 5:!this.c&&(this.c=new y5d(z2,this,5,8));Uxd(this.c);!this.c&&(this.c=new y5d(z2,this,5,8));ytd(this.c,BD(b,14));return;case 6:!this.a&&(this.a=new cUd(A2,this,6,6));Uxd(this.a);!this.a&&(this.a=new cUd(A2,this,6,6));ytd(this.a,BD(b,14));return;}Ikd(this,a,b)};_.zh=function $ld(){return Thd(),Khd};_.Bh=function _ld(a){switch(a){case 3:Rld(this,null);return;case 4:!this.b&&(this.b=new y5d(z2,this,4,7));Uxd(this.b);return;case 5:!this.c&&(this.c=new y5d(z2,this,5,8));Uxd(this.c);return;case 6:!this.a&&(this.a=new cUd(A2,this,6,6));Uxd(this.a);return;}Jkd(this,a)};_.Ib=function amd(){return Sld(this)};var K2=mdb(rte,'ElkEdgeImpl',352);bcb(439,1985,{105:1,413:1,202:1,439:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},rmd);_.Qg=function smd(a){return cmd(this,a)};_._g=function tmd(a,b,c){switch(a){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return !this.a&&(this.a=new xMd(y2,this,5)),this.a;case 6:return fmd(this);case 7:if(b)return emd(this);return this.i;case 8:if(b)return dmd(this);return this.f;case 9:return !this.g&&(this.g=new y5d(A2,this,9,10)),this.g;case 10:return !this.e&&(this.e=new y5d(A2,this,10,9)),this.e;case 11:return this.d;}return bkd(this,a,b,c)};_.hh=function umd(a,b,c){var d,e,f;switch(b){case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?cmd(this,c):this.Cb.ih(this,-1-e,null,c)));return bmd(this,BD(a,79),c);case 9:return !this.g&&(this.g=new y5d(A2,this,9,10)),Sxd(this.g,a,c);case 10:return !this.e&&(this.e=new y5d(A2,this,10,9)),Sxd(this.e,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(Thd(),Lhd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((Thd(),Lhd)),a,c)};_.jh=function vmd(a,b,c){switch(b){case 5:return !this.a&&(this.a=new xMd(y2,this,5)),Txd(this.a,a,c);case 6:return bmd(this,null,c);case 9:return !this.g&&(this.g=new y5d(A2,this,9,10)),Txd(this.g,a,c);case 10:return !this.e&&(this.e=new y5d(A2,this,10,9)),Txd(this.e,a,c);}return ckd(this,a,b,c)};_.lh=function wmd(a){switch(a){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return !!this.a&&this.a.i!=0;case 6:return !!fmd(this);case 7:return !!this.i;case 8:return !!this.f;case 9:return !!this.g&&this.g.i!=0;case 10:return !!this.e&&this.e.i!=0;case 11:return this.d!=null;}return dkd(this,a)};_.sh=function xmd(a,b){switch(a){case 1:omd(this,Edb(ED(b)));return;case 2:pmd(this,Edb(ED(b)));return;case 3:hmd(this,Edb(ED(b)));return;case 4:imd(this,Edb(ED(b)));return;case 5:!this.a&&(this.a=new xMd(y2,this,5));Uxd(this.a);!this.a&&(this.a=new xMd(y2,this,5));ytd(this.a,BD(b,14));return;case 6:mmd(this,BD(b,79));return;case 7:lmd(this,BD(b,82));return;case 8:kmd(this,BD(b,82));return;case 9:!this.g&&(this.g=new y5d(A2,this,9,10));Uxd(this.g);!this.g&&(this.g=new y5d(A2,this,9,10));ytd(this.g,BD(b,14));return;case 10:!this.e&&(this.e=new y5d(A2,this,10,9));Uxd(this.e);!this.e&&(this.e=new y5d(A2,this,10,9));ytd(this.e,BD(b,14));return;case 11:jmd(this,GD(b));return;}ekd(this,a,b)};_.zh=function ymd(){return Thd(),Lhd};_.Bh=function zmd(a){switch(a){case 1:omd(this,0);return;case 2:pmd(this,0);return;case 3:hmd(this,0);return;case 4:imd(this,0);return;case 5:!this.a&&(this.a=new xMd(y2,this,5));Uxd(this.a);return;case 6:mmd(this,null);return;case 7:lmd(this,null);return;case 8:kmd(this,null);return;case 9:!this.g&&(this.g=new y5d(A2,this,9,10));Uxd(this.g);return;case 10:!this.e&&(this.e=new y5d(A2,this,10,9));Uxd(this.e);return;case 11:jmd(this,null);return;}fkd(this,a)};_.Ib=function Amd(){return qmd(this)};_.b=0;_.c=0;_.d=null;_.j=0;_.k=0;var L2=mdb(rte,'ElkEdgeSectionImpl',439);bcb(150,115,{105:1,92:1,90:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1});_._g=function Emd(a,b,c){var d;if(a==0){return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.hh=function Fmd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c)}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Qj(this,yjd(this),b-aLd(this.zh()),a,c)};_.jh=function Gmd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c)}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function Hmd(a){var b;if(a==0){return !!this.Ab&&this.Ab.i!=0}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.oh=function Imd(a){return Bmd(this,a)};_.sh=function Jmd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.uh=function Kmd(a){Cjd(this,128,a)};_.zh=function Lmd(){return jGd(),ZFd};_.Bh=function Mmd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.Gh=function Nmd(){this.Bb|=1};_.Hh=function Omd(a){return Dmd(this,a)};_.Bb=0;var f6=mdb(qte,'EModelElementImpl',150);bcb(704,150,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},$md);_.Ih=function _md(a,b){return Vmd(this,a,b)};_.Jh=function and(a){var b,c,d,e,f;if(this.a!=bKd(a)||(a.Bb&256)!=0){throw vbb(new Wdb(xte+a.zb+ute))}for(d=_Kd(a);VKd(d.a).i!=0;){c=BD(nOd(d,0,(b=BD(qud(VKd(d.a),0),87),f=b.c,JD(f,88)?BD(f,26):(jGd(),_Fd))),26);if(dKd(c)){e=bKd(c).Nh().Jh(c);BD(e,49).th(a);return e}d=_Kd(c)}return (a.D!=null?a.D:a.B)=='java.util.Map$Entry'?new lHd(a):new _Gd(a)};_.Kh=function bnd(a,b){return Wmd(this,a,b)};_._g=function cnd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.a;}return bid(this,a-aLd((jGd(),WFd)),XKd((d=BD(Ajd(this,16),26),!d?WFd:d),a),b,c)};_.hh=function dnd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 1:!!this.a&&(c=BD(this.a,49).ih(this,4,o5,c));return Tmd(this,BD(a,235),c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),WFd):d),b),66),e.Nj().Qj(this,yjd(this),b-aLd((jGd(),WFd)),a,c)};_.jh=function end(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 1:return Tmd(this,null,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),WFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),WFd)),a,c)};_.lh=function fnd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return !!this.a;}return cid(this,a-aLd((jGd(),WFd)),XKd((b=BD(Ajd(this,16),26),!b?WFd:b),a))};_.sh=function gnd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:Ymd(this,BD(b,235));return;}did(this,a-aLd((jGd(),WFd)),XKd((c=BD(Ajd(this,16),26),!c?WFd:c),a),b)};_.zh=function hnd(){return jGd(),WFd};_.Bh=function ind(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:Ymd(this,null);return;}eid(this,a-aLd((jGd(),WFd)),XKd((b=BD(Ajd(this,16),26),!b?WFd:b),a))};var Pmd,Qmd,Rmd;var d6=mdb(qte,'EFactoryImpl',704);bcb(zte,704,{105:1,2014:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},knd);_.Ih=function lnd(a,b){switch(a.yj()){case 12:return BD(b,146).tg();case 13:return fcb(b);default:throw vbb(new Wdb(tte+a.ne()+ute));}};_.Jh=function mnd(a){var b,c,d,e,f,g,h,i;switch(a.G==-1&&(a.G=(b=bKd(a),b?HLd(b.Mh(),a):-1)),a.G){case 4:return f=new Jod,f;case 6:return g=new apd,g;case 7:return h=new ppd,h;case 8:return d=new Tld,d;case 9:return c=new xkd,c;case 10:return e=new rmd,e;case 11:return i=new Bpd,i;default:throw vbb(new Wdb(xte+a.zb+ute));}};_.Kh=function nnd(a,b){switch(a.yj()){case 13:case 12:return null;default:throw vbb(new Wdb(tte+a.ne()+ute));}};var N2=mdb(rte,'ElkGraphFactoryImpl',zte);bcb(438,150,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1});_.Wg=function rnd(){var a,b;b=(a=BD(Ajd(this,16),26),pNd(TKd(!a?this.zh():a)));return b==null?(nRd(),nRd(),mRd):new GRd(this,b)};_._g=function snd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.ne();}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.lh=function tnd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function und(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:this.Lh(GD(b));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function vnd(){return jGd(),$Fd};_.Bh=function wnd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:this.Lh(null);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.ne=function xnd(){return this.zb};_.Lh=function ynd(a){pnd(this,a)};_.Ib=function znd(){return qnd(this)};_.zb=null;var j6=mdb(qte,'ENamedElementImpl',438);bcb(179,438,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},eod);_.Qg=function god(a){return Snd(this,a)};_._g=function hod(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return !this.rb&&(this.rb=new jUd(this,d5,this)),this.rb;case 6:return !this.vb&&(this.vb=new gUd(o5,this,6,7)),this.vb;case 7:if(b)return this.Db>>16==7?BD(this.Cb,235):null;return Ind(this);}return bid(this,a-aLd((jGd(),cGd)),XKd((d=BD(Ajd(this,16),26),!d?cGd:d),a),b,c)};_.hh=function iod(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 4:!!this.sb&&(c=BD(this.sb,49).ih(this,1,i5,c));return Jnd(this,BD(a,471),c);case 5:return !this.rb&&(this.rb=new jUd(this,d5,this)),Sxd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new gUd(o5,this,6,7)),Sxd(this.vb,a,c);case 7:!!this.Cb&&(c=(e=this.Db>>16,e>=0?Snd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,7,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),cGd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),cGd)),a,c)};_.jh=function jod(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 4:return Jnd(this,null,c);case 5:return !this.rb&&(this.rb=new jUd(this,d5,this)),Txd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new gUd(o5,this,6,7)),Txd(this.vb,a,c);case 7:return _hd(this,null,7,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),cGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),cGd)),a,c)};_.lh=function kod(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return !!this.sb;case 5:return !!this.rb&&this.rb.i!=0;case 6:return !!this.vb&&this.vb.i!=0;case 7:return !!Ind(this);}return cid(this,a-aLd((jGd(),cGd)),XKd((b=BD(Ajd(this,16),26),!b?cGd:b),a))};_.oh=function lod(a){var b;b=Und(this,a);return b?b:Bmd(this,a)};_.sh=function mod(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:dod(this,GD(b));return;case 3:cod(this,GD(b));return;case 4:bod(this,BD(b,471));return;case 5:!this.rb&&(this.rb=new jUd(this,d5,this));Uxd(this.rb);!this.rb&&(this.rb=new jUd(this,d5,this));ytd(this.rb,BD(b,14));return;case 6:!this.vb&&(this.vb=new gUd(o5,this,6,7));Uxd(this.vb);!this.vb&&(this.vb=new gUd(o5,this,6,7));ytd(this.vb,BD(b,14));return;}did(this,a-aLd((jGd(),cGd)),XKd((c=BD(Ajd(this,16),26),!c?cGd:c),a),b)};_.vh=function nod(a){var b,c;if(!!a&&!!this.rb){for(c=new Fyd(this.rb);c.e!=c.i.gc();){b=Dyd(c);JD(b,351)&&(BD(b,351).w=null)}}Cjd(this,64,a)};_.zh=function ood(){return jGd(),cGd};_.Bh=function pod(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:dod(this,null);return;case 3:cod(this,null);return;case 4:bod(this,null);return;case 5:!this.rb&&(this.rb=new jUd(this,d5,this));Uxd(this.rb);return;case 6:!this.vb&&(this.vb=new gUd(o5,this,6,7));Uxd(this.vb);return;}eid(this,a-aLd((jGd(),cGd)),XKd((b=BD(Ajd(this,16),26),!b?cGd:b),a))};_.Gh=function qod(){Tnd(this)};_.Mh=function rod(){return !this.rb&&(this.rb=new jUd(this,d5,this)),this.rb};_.Nh=function sod(){return this.sb};_.Oh=function tod(){return this.ub};_.Ph=function uod(){return this.xb};_.Qh=function vod(){return this.yb};_.Rh=function wod(a){this.ub=a};_.Ib=function xod(){var a;if((this.Db&64)!=0)return qnd(this);a=new Jfb(qnd(this));a.a+=' (nsURI: ';Efb(a,this.yb);a.a+=', nsPrefix: ';Efb(a,this.xb);a.a+=')';return a.a};_.xb=null;_.yb=null;var And;var t6=mdb(qte,'EPackageImpl',179);bcb(555,179,{105:1,2016:1,555:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},Bod);_.q=false;_.r=false;var yod=false;var O2=mdb(rte,'ElkGraphPackageImpl',555);bcb(354,724,{105:1,413:1,160:1,137:1,470:1,354:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Jod);_.Qg=function Kod(a){return Eod(this,a)};_._g=function Lod(a,b,c){switch(a){case 7:return Fod(this);case 8:return this.a;}return Xkd(this,a,b,c)};_.hh=function Mod(a,b,c){var d;switch(b){case 7:!!this.Cb&&(c=(d=this.Db>>16,d>=0?Eod(this,c):this.Cb.ih(this,-1-d,null,c)));return Dod(this,BD(a,160),c);}return Fkd(this,a,b,c)};_.jh=function Nod(a,b,c){if(b==7){return Dod(this,null,c)}return Gkd(this,a,b,c)};_.lh=function Ood(a){switch(a){case 7:return !!Fod(this);case 8:return !dfb('',this.a);}return Ykd(this,a)};_.sh=function Pod(a,b){switch(a){case 7:God(this,BD(b,160));return;case 8:Hod(this,GD(b));return;}Zkd(this,a,b)};_.zh=function Qod(){return Thd(),Nhd};_.Bh=function Rod(a){switch(a){case 7:God(this,null);return;case 8:Hod(this,'');return;}$kd(this,a)};_.Ib=function Sod(){return Iod(this)};_.a='';var P2=mdb(rte,'ElkLabelImpl',354);bcb(239,725,{105:1,413:1,82:1,160:1,33:1,470:1,239:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},apd);_.Qg=function bpd(a){return Uod(this,a)};_._g=function cpd(a,b,c){switch(a){case 9:return !this.c&&(this.c=new cUd(F2,this,9,9)),this.c;case 10:return !this.a&&(this.a=new cUd(E2,this,10,11)),this.a;case 11:return Xod(this);case 12:return !this.b&&(this.b=new cUd(B2,this,12,3)),this.b;case 13:return Bcb(),!this.a&&(this.a=new cUd(E2,this,10,11)),this.a.i>0?true:false;}return uld(this,a,b,c)};_.hh=function dpd(a,b,c){var d;switch(b){case 9:return !this.c&&(this.c=new cUd(F2,this,9,9)),Sxd(this.c,a,c);case 10:return !this.a&&(this.a=new cUd(E2,this,10,11)),Sxd(this.a,a,c);case 11:!!this.Cb&&(c=(d=this.Db>>16,d>=0?Uod(this,c):this.Cb.ih(this,-1-d,null,c)));return Tod(this,BD(a,33),c);case 12:return !this.b&&(this.b=new cUd(B2,this,12,3)),Sxd(this.b,a,c);}return vld(this,a,b,c)};_.jh=function epd(a,b,c){switch(b){case 9:return !this.c&&(this.c=new cUd(F2,this,9,9)),Txd(this.c,a,c);case 10:return !this.a&&(this.a=new cUd(E2,this,10,11)),Txd(this.a,a,c);case 11:return Tod(this,null,c);case 12:return !this.b&&(this.b=new cUd(B2,this,12,3)),Txd(this.b,a,c);}return wld(this,a,b,c)};_.lh=function fpd(a){switch(a){case 9:return !!this.c&&this.c.i!=0;case 10:return !!this.a&&this.a.i!=0;case 11:return !!Xod(this);case 12:return !!this.b&&this.b.i!=0;case 13:return !this.a&&(this.a=new cUd(E2,this,10,11)),this.a.i>0;}return xld(this,a)};_.sh=function gpd(a,b){switch(a){case 9:!this.c&&(this.c=new cUd(F2,this,9,9));Uxd(this.c);!this.c&&(this.c=new cUd(F2,this,9,9));ytd(this.c,BD(b,14));return;case 10:!this.a&&(this.a=new cUd(E2,this,10,11));Uxd(this.a);!this.a&&(this.a=new cUd(E2,this,10,11));ytd(this.a,BD(b,14));return;case 11:$od(this,BD(b,33));return;case 12:!this.b&&(this.b=new cUd(B2,this,12,3));Uxd(this.b);!this.b&&(this.b=new cUd(B2,this,12,3));ytd(this.b,BD(b,14));return;}yld(this,a,b)};_.zh=function hpd(){return Thd(),Ohd};_.Bh=function ipd(a){switch(a){case 9:!this.c&&(this.c=new cUd(F2,this,9,9));Uxd(this.c);return;case 10:!this.a&&(this.a=new cUd(E2,this,10,11));Uxd(this.a);return;case 11:$od(this,null);return;case 12:!this.b&&(this.b=new cUd(B2,this,12,3));Uxd(this.b);return;}zld(this,a)};_.Ib=function jpd(){return _od(this)};var Q2=mdb(rte,'ElkNodeImpl',239);bcb(186,725,{105:1,413:1,82:1,160:1,118:1,470:1,186:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},ppd);_.Qg=function qpd(a){return lpd(this,a)};_._g=function rpd(a,b,c){if(a==9){return mpd(this)}return uld(this,a,b,c)};_.hh=function spd(a,b,c){var d;switch(b){case 9:!!this.Cb&&(c=(d=this.Db>>16,d>=0?lpd(this,c):this.Cb.ih(this,-1-d,null,c)));return kpd(this,BD(a,33),c);}return vld(this,a,b,c)};_.jh=function tpd(a,b,c){if(b==9){return kpd(this,null,c)}return wld(this,a,b,c)};_.lh=function upd(a){if(a==9){return !!mpd(this)}return xld(this,a)};_.sh=function vpd(a,b){switch(a){case 9:npd(this,BD(b,33));return;}yld(this,a,b)};_.zh=function wpd(){return Thd(),Phd};_.Bh=function xpd(a){switch(a){case 9:npd(this,null);return;}zld(this,a)};_.Ib=function ypd(){return opd(this)};var R2=mdb(rte,'ElkPortImpl',186);var J4=odb(Tte,'BasicEMap/Entry');bcb(1092,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,114:1,115:1},Bpd);_.Fb=function Hpd(a){return this===a};_.cd=function Jpd(){return this.b};_.Hb=function Lpd(){return FCb(this)};_.Uh=function Npd(a){zpd(this,BD(a,146))};_._g=function Cpd(a,b,c){switch(a){case 0:return this.b;case 1:return this.c;}return fid(this,a,b,c)};_.lh=function Dpd(a){switch(a){case 0:return !!this.b;case 1:return this.c!=null;}return mid(this,a)};_.sh=function Epd(a,b){switch(a){case 0:zpd(this,BD(b,146));return;case 1:Apd(this,b);return;}yid(this,a,b)};_.zh=function Fpd(){return Thd(),Qhd};_.Bh=function Gpd(a){switch(a){case 0:zpd(this,null);return;case 1:Apd(this,null);return;}Cid(this,a)};_.Sh=function Ipd(){var a;if(this.a==-1){a=this.b;this.a=!a?0:tb(a)}return this.a};_.dd=function Kpd(){return this.c};_.Th=function Mpd(a){this.a=a};_.ed=function Opd(a){var b;b=this.c;Apd(this,a);return b};_.Ib=function Ppd(){var a;if((this.Db&64)!=0)return Eid(this);a=new Ufb;Qfb(Qfb(Qfb(a,this.b?this.b.tg():Xhe),gne),xfb(this.c));return a.a};_.a=-1;_.c=null;var S2=mdb(rte,'ElkPropertyToValueMapEntryImpl',1092);bcb(984,1,{},bqd);var U2=mdb(Wte,'JsonAdapter',984);bcb(210,60,Tie,cqd);var V2=mdb(Wte,'JsonImportException',210);bcb(857,1,{},ird);var J3=mdb(Wte,'JsonImporter',857);bcb(891,1,{},jrd);var W2=mdb(Wte,'JsonImporter/lambda$0$Type',891);bcb(892,1,{},krd);var X2=mdb(Wte,'JsonImporter/lambda$1$Type',892);bcb(900,1,{},lrd);var Y2=mdb(Wte,'JsonImporter/lambda$10$Type',900);bcb(902,1,{},mrd);var Z2=mdb(Wte,'JsonImporter/lambda$11$Type',902);bcb(903,1,{},nrd);var $2=mdb(Wte,'JsonImporter/lambda$12$Type',903);bcb(909,1,{},ord);var _2=mdb(Wte,'JsonImporter/lambda$13$Type',909);bcb(908,1,{},prd);var a3=mdb(Wte,'JsonImporter/lambda$14$Type',908);bcb(904,1,{},qrd);var b3=mdb(Wte,'JsonImporter/lambda$15$Type',904);bcb(905,1,{},rrd);var c3=mdb(Wte,'JsonImporter/lambda$16$Type',905);bcb(906,1,{},srd);var d3=mdb(Wte,'JsonImporter/lambda$17$Type',906);bcb(907,1,{},trd);var e3=mdb(Wte,'JsonImporter/lambda$18$Type',907);bcb(912,1,{},urd);var f3=mdb(Wte,'JsonImporter/lambda$19$Type',912);bcb(893,1,{},vrd);var g3=mdb(Wte,'JsonImporter/lambda$2$Type',893);bcb(910,1,{},wrd);var h3=mdb(Wte,'JsonImporter/lambda$20$Type',910);bcb(911,1,{},xrd);var i3=mdb(Wte,'JsonImporter/lambda$21$Type',911);bcb(915,1,{},yrd);var j3=mdb(Wte,'JsonImporter/lambda$22$Type',915);bcb(913,1,{},zrd);var k3=mdb(Wte,'JsonImporter/lambda$23$Type',913);bcb(914,1,{},Ard);var l3=mdb(Wte,'JsonImporter/lambda$24$Type',914);bcb(917,1,{},Brd);var m3=mdb(Wte,'JsonImporter/lambda$25$Type',917);bcb(916,1,{},Crd);var n3=mdb(Wte,'JsonImporter/lambda$26$Type',916);bcb(918,1,qie,Drd);_.td=function Erd(a){Bqd(this.b,this.a,GD(a))};var o3=mdb(Wte,'JsonImporter/lambda$27$Type',918);bcb(919,1,qie,Frd);_.td=function Grd(a){Cqd(this.b,this.a,GD(a))};var p3=mdb(Wte,'JsonImporter/lambda$28$Type',919);bcb(920,1,{},Hrd);var q3=mdb(Wte,'JsonImporter/lambda$29$Type',920);bcb(896,1,{},Ird);var r3=mdb(Wte,'JsonImporter/lambda$3$Type',896);bcb(921,1,{},Jrd);var s3=mdb(Wte,'JsonImporter/lambda$30$Type',921);bcb(922,1,{},Krd);var t3=mdb(Wte,'JsonImporter/lambda$31$Type',922);bcb(923,1,{},Lrd);var u3=mdb(Wte,'JsonImporter/lambda$32$Type',923);bcb(924,1,{},Mrd);var v3=mdb(Wte,'JsonImporter/lambda$33$Type',924);bcb(925,1,{},Nrd);var w3=mdb(Wte,'JsonImporter/lambda$34$Type',925);bcb(859,1,{},Prd);var x3=mdb(Wte,'JsonImporter/lambda$35$Type',859);bcb(929,1,{},Rrd);var y3=mdb(Wte,'JsonImporter/lambda$36$Type',929);bcb(926,1,qie,Srd);_.td=function Trd(a){Lqd(this.a,BD(a,469))};var z3=mdb(Wte,'JsonImporter/lambda$37$Type',926);bcb(927,1,qie,Urd);_.td=function Vrd(a){Mqd(this.a,this.b,BD(a,202))};var A3=mdb(Wte,'JsonImporter/lambda$38$Type',927);bcb(928,1,qie,Wrd);_.td=function Xrd(a){Nqd(this.a,this.b,BD(a,202))};var B3=mdb(Wte,'JsonImporter/lambda$39$Type',928);bcb(894,1,{},Yrd);var C3=mdb(Wte,'JsonImporter/lambda$4$Type',894);bcb(930,1,qie,Zrd);_.td=function $rd(a){Oqd(this.a,BD(a,8))};var D3=mdb(Wte,'JsonImporter/lambda$40$Type',930);bcb(895,1,{},_rd);var E3=mdb(Wte,'JsonImporter/lambda$5$Type',895);bcb(899,1,{},asd);var F3=mdb(Wte,'JsonImporter/lambda$6$Type',899);bcb(897,1,{},bsd);var G3=mdb(Wte,'JsonImporter/lambda$7$Type',897);bcb(898,1,{},csd);var H3=mdb(Wte,'JsonImporter/lambda$8$Type',898);bcb(901,1,{},dsd);var I3=mdb(Wte,'JsonImporter/lambda$9$Type',901);bcb(948,1,qie,msd);_.td=function nsd(a){Qpd(this.a,new yC(GD(a)))};var K3=mdb(Wte,'JsonMetaDataConverter/lambda$0$Type',948);bcb(949,1,qie,osd);_.td=function psd(a){isd(this.a,BD(a,237))};var L3=mdb(Wte,'JsonMetaDataConverter/lambda$1$Type',949);bcb(950,1,qie,qsd);_.td=function rsd(a){jsd(this.a,BD(a,149))};var M3=mdb(Wte,'JsonMetaDataConverter/lambda$2$Type',950);bcb(951,1,qie,ssd);_.td=function tsd(a){ksd(this.a,BD(a,175))};var N3=mdb(Wte,'JsonMetaDataConverter/lambda$3$Type',951);bcb(237,22,{3:1,35:1,22:1,237:1},Dsd);var usd,vsd,wsd,xsd,ysd,zsd,Asd,Bsd;var O3=ndb(Hle,'GraphFeature',237,CI,Fsd,Esd);var Gsd;bcb(13,1,{35:1,146:1},Lsd,Msd,Nsd,Osd);_.wd=function Psd(a){return Isd(this,BD(a,146))};_.Fb=function Qsd(a){return Jsd(this,a)};_.wg=function Rsd(){return Ksd(this)};_.tg=function Ssd(){return this.b};_.Hb=function Tsd(){return LCb(this.b)};_.Ib=function Usd(){return this.b};var T3=mdb(Hle,'Property',13);bcb(818,1,Dke,Wsd);_.ue=function Xsd(a,b){return Vsd(this,BD(a,94),BD(b,94))};_.Fb=function Ysd(a){return this===a};_.ve=function Zsd(){return new tpb(this)};var S3=mdb(Hle,'PropertyHolderComparator',818);bcb(695,1,aie,qtd);_.Nb=function rtd(a){Rrb(this,a)};_.Pb=function ttd(){return ptd(this)};_.Qb=function utd(){Srb()};_.Ob=function std(){return !!this.a};var U3=mdb(jue,'ElkGraphUtil/AncestorIterator',695);var T4=odb(Tte,'EList');bcb(67,52,{20:1,28:1,52:1,14:1,15:1,67:1,58:1});_.Vc=function Jtd(a,b){vtd(this,a,b)};_.Fc=function Ktd(a){return wtd(this,a)};_.Wc=function Ltd(a,b){return xtd(this,a,b)};_.Gc=function Mtd(a){return ytd(this,a)};_.Zh=function Ntd(){return new $yd(this)};_.$h=function Otd(){return new bzd(this)};_._h=function Ptd(a){return ztd(this,a)};_.ai=function Qtd(){return true};_.bi=function Rtd(a,b){};_.ci=function Std(){};_.di=function Ttd(a,b){Atd(this,a,b)};_.ei=function Utd(a,b,c){};_.fi=function Vtd(a,b){};_.gi=function Wtd(a,b,c){};_.Fb=function Xtd(a){return Btd(this,a)};_.Hb=function Ytd(){return Etd(this)};_.hi=function Ztd(){return false};_.Kc=function $td(){return new Fyd(this)};_.Yc=function _td(){return new Oyd(this)};_.Zc=function aud(a){var b;b=this.gc();if(a<0||a>b)throw vbb(new Cyd(a,b));return new Pyd(this,a)};_.ji=function bud(a,b){this.ii(a,this.Xc(b))};_.Mc=function cud(a){return Ftd(this,a)};_.li=function dud(a,b){return b};_._c=function eud(a,b){return Gtd(this,a,b)};_.Ib=function fud(){return Htd(this)};_.ni=function gud(){return true};_.oi=function hud(a,b){return Itd(this,b)};var p4=mdb(Tte,'AbstractEList',67);bcb(63,67,oue,yud,zud,Aud);_.Vh=function Bud(a,b){return iud(this,a,b)};_.Wh=function Cud(a){return jud(this,a)};_.Xh=function Dud(a,b){kud(this,a,b)};_.Yh=function Eud(a){lud(this,a)};_.pi=function Fud(a){return nud(this,a)};_.$b=function Gud(){oud(this)};_.Hc=function Hud(a){return pud(this,a)};_.Xb=function Iud(a){return qud(this,a)};_.qi=function Jud(a){var b,c,d;++this.j;c=this.g==null?0:this.g.length;if(a>c){d=this.g;b=c+(c/2|0)+4;b=0){this.$c(b);return true}else{return false}};_.mi=function lwd(a,b){return this.Ui(a,this.oi(a,b))};_.gc=function mwd(){return this.Vi()};_.Pc=function nwd(){return this.Wi()};_.Qc=function owd(a){return this.Xi(a)};_.Ib=function pwd(){return this.Yi()};var M4=mdb(Tte,'DelegatingEList',1995);bcb(1996,1995,eve);_.Vh=function xwd(a,b){return qwd(this,a,b)};_.Wh=function ywd(a){return this.Vh(this.Vi(),a)};_.Xh=function zwd(a,b){rwd(this,a,b)};_.Yh=function Awd(a){swd(this,a)};_.ai=function Bwd(){return !this.bj()};_.$b=function Cwd(){vwd(this)};_.Zi=function Dwd(a,b,c,d,e){return new Cxd(this,a,b,c,d,e)};_.$i=function Ewd(a){Uhd(this.Ai(),a)};_._i=function Fwd(){return null};_.aj=function Gwd(){return -1};_.Ai=function Hwd(){return null};_.bj=function Iwd(){return false};_.cj=function Jwd(a,b){return b};_.dj=function Kwd(a,b){return b};_.ej=function Lwd(){return false};_.fj=function Mwd(){return !this.Ri()};_.ii=function Nwd(a,b){var c,d;if(this.ej()){d=this.fj();c=Dvd(this,a,b);this.$i(this.Zi(7,meb(b),c,a,d));return c}else{return Dvd(this,a,b)}};_.$c=function Owd(a){var b,c,d,e;if(this.ej()){c=null;d=this.fj();b=this.Zi(4,e=Evd(this,a),null,a,d);if(this.bj()&&!!e){c=this.dj(e,c);if(!c){this.$i(b)}else{c.Ei(b);c.Fi()}}else{if(!c){this.$i(b)}else{c.Ei(b);c.Fi()}}return e}else{e=Evd(this,a);if(this.bj()&&!!e){c=this.dj(e,null);!!c&&c.Fi()}return e}};_.mi=function Pwd(a,b){return wwd(this,a,b)};var d4=mdb(hte,'DelegatingNotifyingListImpl',1996);bcb(143,1,fve);_.Ei=function pxd(a){return Qwd(this,a)};_.Fi=function qxd(){Rwd(this)};_.xi=function rxd(){return this.d};_._i=function sxd(){return null};_.gj=function txd(){return null};_.yi=function uxd(a){return -1};_.zi=function vxd(){return $wd(this)};_.Ai=function wxd(){return null};_.Bi=function xxd(){return hxd(this)};_.Ci=function yxd(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o};_.hj=function zxd(){return false};_.Di=function Axd(a){var b,c,d,e,f,g,h,i,j,k,l;switch(this.d){case 1:case 2:{e=a.xi();switch(e){case 1:case 2:{f=a.Ai();if(PD(f)===PD(this.Ai())&&this.yi(null)==a.yi(null)){this.g=a.zi();a.xi()==1&&(this.d=1);return true}}}}case 4:{e=a.xi();switch(e){case 4:{f=a.Ai();if(PD(f)===PD(this.Ai())&&this.yi(null)==a.yi(null)){j=jxd(this);i=this.o<0?this.o<-2?-2-this.o-1:-1:this.o;g=a.Ci();this.d=6;l=new zud(2);if(i<=g){wtd(l,this.n);wtd(l,a.Bi());this.g=OC(GC(WD,1),oje,25,15,[this.o=i,g+1])}else{wtd(l,a.Bi());wtd(l,this.n);this.g=OC(GC(WD,1),oje,25,15,[this.o=g,i])}this.n=l;j||(this.o=-2-this.o-1);return true}break}}break}case 6:{e=a.xi();switch(e){case 4:{f=a.Ai();if(PD(f)===PD(this.Ai())&&this.yi(null)==a.yi(null)){j=jxd(this);g=a.Ci();k=BD(this.g,48);d=KC(WD,oje,25,k.length+1,15,1);b=0;while(b>>0,b.toString(16)));d.a+=' (eventType: ';switch(this.d){case 1:{d.a+='SET';break}case 2:{d.a+='UNSET';break}case 3:{d.a+='ADD';break}case 5:{d.a+='ADD_MANY';break}case 4:{d.a+='REMOVE';break}case 6:{d.a+='REMOVE_MANY';break}case 7:{d.a+='MOVE';break}case 8:{d.a+='REMOVING_ADAPTER';break}case 9:{d.a+='RESOLVE';break}default:{Cfb(d,this.d);break}}ixd(this)&&(d.a+=', touch: true',d);d.a+=', position: ';Cfb(d,this.o<0?this.o<-2?-2-this.o-1:-1:this.o);d.a+=', notifier: ';Dfb(d,this.Ai());d.a+=', feature: ';Dfb(d,this._i());d.a+=', oldValue: ';Dfb(d,hxd(this));d.a+=', newValue: ';if(this.d==6&&JD(this.g,48)){c=BD(this.g,48);d.a+='[';for(a=0;a10){if(!this.b||this.c.j!=this.a){this.b=new Vqb(this);this.a=this.j}return Rqb(this.b,a)}else{return pud(this,a)}};_.ni=function Byd(){return true};_.a=0;var j4=mdb(Tte,'AbstractEList/1',953);bcb(295,73,Mje,Cyd);var k4=mdb(Tte,'AbstractEList/BasicIndexOutOfBoundsException',295);bcb(40,1,aie,Fyd);_.Nb=function Iyd(a){Rrb(this,a)};_.mj=function Gyd(){if(this.i.j!=this.f){throw vbb(new Apb)}};_.nj=function Hyd(){return Dyd(this)};_.Ob=function Jyd(){return this.e!=this.i.gc()};_.Pb=function Kyd(){return this.nj()};_.Qb=function Lyd(){Eyd(this)};_.e=0;_.f=0;_.g=-1;var l4=mdb(Tte,'AbstractEList/EIterator',40);bcb(278,40,jie,Oyd,Pyd);_.Qb=function Xyd(){Eyd(this)};_.Rb=function Qyd(a){Myd(this,a)};_.oj=function Ryd(){var b;try{b=this.d.Xb(--this.e);this.mj();this.g=this.e;return b}catch(a){a=ubb(a);if(JD(a,73)){this.mj();throw vbb(new utb)}else throw vbb(a)}};_.pj=function Syd(a){Nyd(this,a)};_.Sb=function Tyd(){return this.e!=0};_.Tb=function Uyd(){return this.e};_.Ub=function Vyd(){return this.oj()};_.Vb=function Wyd(){return this.e-1};_.Wb=function Yyd(a){this.pj(a)};var m4=mdb(Tte,'AbstractEList/EListIterator',278);bcb(341,40,aie,$yd);_.nj=function _yd(){return Zyd(this)};_.Qb=function azd(){throw vbb(new bgb)};var n4=mdb(Tte,'AbstractEList/NonResolvingEIterator',341);bcb(385,278,jie,bzd,czd);_.Rb=function dzd(a){throw vbb(new bgb)};_.nj=function ezd(){var b;try{b=this.c.ki(this.e);this.mj();this.g=this.e++;return b}catch(a){a=ubb(a);if(JD(a,73)){this.mj();throw vbb(new utb)}else throw vbb(a)}};_.oj=function fzd(){var b;try{b=this.c.ki(--this.e);this.mj();this.g=this.e;return b}catch(a){a=ubb(a);if(JD(a,73)){this.mj();throw vbb(new utb)}else throw vbb(a)}};_.Qb=function gzd(){throw vbb(new bgb)};_.Wb=function hzd(a){throw vbb(new bgb)};var o4=mdb(Tte,'AbstractEList/NonResolvingEListIterator',385);bcb(1982,67,ive);_.Vh=function pzd(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=b.gc();if(e!=0){j=BD(Ajd(this.a,4),126);k=j==null?0:j.length;m=k+e;d=nzd(this,m);l=k-a;l>0&&$fb(j,a,d,a+e,l);i=b.Kc();for(g=0;gc)throw vbb(new Cyd(a,c));return new Yzd(this,a)};_.$b=function wzd(){var a,b;++this.j;a=BD(Ajd(this.a,4),126);b=a==null?0:a.length;b0d(this,null);Atd(this,b,a)};_.Hc=function xzd(a){var b,c,d,e,f;b=BD(Ajd(this.a,4),126);if(b!=null){if(a!=null){for(d=b,e=0,f=d.length;e=c)throw vbb(new Cyd(a,c));return b[a]};_.Xc=function zzd(a){var b,c,d;b=BD(Ajd(this.a,4),126);if(b!=null){if(a!=null){for(c=0,d=b.length;cc)throw vbb(new Cyd(a,c));return new Qzd(this,a)};_.ii=function Ezd(a,b){var c,d,e;c=mzd(this);e=c==null?0:c.length;if(a>=e)throw vbb(new qcb(lue+a+mue+e));if(b>=e)throw vbb(new qcb(nue+b+mue+e));d=c[b];if(a!=b){a0&&$fb(a,0,b,0,c);return b};_.Qc=function Kzd(a){var b,c,d;b=BD(Ajd(this.a,4),126);d=b==null?0:b.length;if(d>0){if(a.lengthd&&NC(a,d,null);return a};var jzd;var v4=mdb(Tte,'ArrayDelegatingEList',1982);bcb(1038,40,aie,Lzd);_.mj=function Mzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};_.Qb=function Nzd(){Eyd(this);this.a=BD(Ajd(this.b.a,4),126)};var r4=mdb(Tte,'ArrayDelegatingEList/EIterator',1038);bcb(706,278,jie,Pzd,Qzd);_.mj=function Rzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};_.pj=function Szd(a){Nyd(this,a);this.a=BD(Ajd(this.b.a,4),126)};_.Qb=function Tzd(){Eyd(this);this.a=BD(Ajd(this.b.a,4),126)};var s4=mdb(Tte,'ArrayDelegatingEList/EListIterator',706);bcb(1039,341,aie,Uzd);_.mj=function Vzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};var t4=mdb(Tte,'ArrayDelegatingEList/NonResolvingEIterator',1039);bcb(707,385,jie,Xzd,Yzd);_.mj=function Zzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};var u4=mdb(Tte,'ArrayDelegatingEList/NonResolvingEListIterator',707);bcb(606,295,Mje,$zd);var w4=mdb(Tte,'BasicEList/BasicIndexOutOfBoundsException',606);bcb(696,63,oue,_zd);_.Vc=function aAd(a,b){throw vbb(new bgb)};_.Fc=function bAd(a){throw vbb(new bgb)};_.Wc=function cAd(a,b){throw vbb(new bgb)};_.Gc=function dAd(a){throw vbb(new bgb)};_.$b=function eAd(){throw vbb(new bgb)};_.qi=function fAd(a){throw vbb(new bgb)};_.Kc=function gAd(){return this.Zh()};_.Yc=function hAd(){return this.$h()};_.Zc=function iAd(a){return this._h(a)};_.ii=function jAd(a,b){throw vbb(new bgb)};_.ji=function kAd(a,b){throw vbb(new bgb)};_.$c=function lAd(a){throw vbb(new bgb)};_.Mc=function mAd(a){throw vbb(new bgb)};_._c=function nAd(a,b){throw vbb(new bgb)};var x4=mdb(Tte,'BasicEList/UnmodifiableEList',696);bcb(705,1,{3:1,20:1,14:1,15:1,58:1,589:1});_.Vc=function OAd(a,b){oAd(this,a,BD(b,42))};_.Fc=function PAd(a){return pAd(this,BD(a,42))};_.Jc=function XAd(a){reb(this,a)};_.Xb=function YAd(a){return BD(qud(this.c,a),133)};_.ii=function fBd(a,b){return BD(this.c.ii(a,b),42)};_.ji=function gBd(a,b){GAd(this,a,BD(b,42))};_.Lc=function jBd(){return new YAb(null,new Kub(this,16))};_.$c=function kBd(a){return BD(this.c.$c(a),42)};_._c=function mBd(a,b){return MAd(this,a,BD(b,42))};_.ad=function oBd(a){ktb(this,a)};_.Nc=function pBd(){return new Kub(this,16)};_.Oc=function qBd(){return new YAb(null,new Kub(this,16))};_.Wc=function QAd(a,b){return this.c.Wc(a,b)};_.Gc=function RAd(a){return this.c.Gc(a)};_.$b=function SAd(){this.c.$b()};_.Hc=function TAd(a){return this.c.Hc(a)};_.Ic=function UAd(a){return Be(this.c,a)};_.qj=function VAd(){var a,b,c;if(this.d==null){this.d=KC(y4,jve,63,2*this.f+1,0,1);c=this.e;this.f=0;for(b=this.c.Kc();b.e!=b.i.gc();){a=BD(b.nj(),133);uAd(this,a)}this.e=c}};_.Fb=function WAd(a){return zAd(this,a)};_.Hb=function ZAd(){return Etd(this.c)};_.Xc=function $Ad(a){return this.c.Xc(a)};_.rj=function _Ad(){this.c=new yBd(this)};_.dc=function aBd(){return this.f==0};_.Kc=function bBd(){return this.c.Kc()};_.Yc=function cBd(){return this.c.Yc()};_.Zc=function dBd(a){return this.c.Zc(a)};_.sj=function eBd(){return FAd(this)};_.tj=function hBd(a,b,c){return new zCd(a,b,c)};_.uj=function iBd(){return new EBd};_.Mc=function lBd(a){return JAd(this,a)};_.gc=function nBd(){return this.f};_.bd=function rBd(a,b){return new Jib(this.c,a,b)};_.Pc=function sBd(){return this.c.Pc()};_.Qc=function tBd(a){return this.c.Qc(a)};_.Ib=function uBd(){return Htd(this.c)};_.e=0;_.f=0;var L4=mdb(Tte,'BasicEMap',705);bcb(1033,63,oue,yBd);_.bi=function zBd(a,b){vBd(this,BD(b,133))};_.ei=function BBd(a,b,c){var d;++(d=this,BD(b,133),d).a.e};_.fi=function CBd(a,b){wBd(this,BD(b,133))};_.gi=function DBd(a,b,c){xBd(this,BD(b,133),BD(c,133))};_.di=function ABd(a,b){tAd(this.a)};var z4=mdb(Tte,'BasicEMap/1',1033);bcb(1034,63,oue,EBd);_.ri=function FBd(a){return KC(I4,kve,612,a,0,1)};var A4=mdb(Tte,'BasicEMap/2',1034);bcb(1035,eie,fie,GBd);_.$b=function HBd(){this.a.c.$b()};_.Hc=function IBd(a){return qAd(this.a,a)};_.Kc=function JBd(){return this.a.f==0?(LCd(),KCd.a):new dCd(this.a)};_.Mc=function KBd(a){var b;b=this.a.f;LAd(this.a,a);return this.a.f!=b};_.gc=function LBd(){return this.a.f};var B4=mdb(Tte,'BasicEMap/3',1035);bcb(1036,28,die,MBd);_.$b=function NBd(){this.a.c.$b()};_.Hc=function OBd(a){return rAd(this.a,a)};_.Kc=function PBd(){return this.a.f==0?(LCd(),KCd.a):new fCd(this.a)};_.gc=function QBd(){return this.a.f};var C4=mdb(Tte,'BasicEMap/4',1036);bcb(1037,eie,fie,SBd);_.$b=function TBd(){this.a.c.$b()};_.Hc=function UBd(a){var b,c,d,e,f,g,h,i,j;if(this.a.f>0&&JD(a,42)){this.a.qj();i=BD(a,42);h=i.cd();e=h==null?0:tb(h);f=DAd(this.a,e);b=this.a.d[f];if(b){c=BD(b.g,367);j=b.i;for(g=0;g'+this.c};_.a=0;var I4=mdb(Tte,'BasicEMap/EntryImpl',612);bcb(536,1,{},JCd);var K4=mdb(Tte,'BasicEMap/View',536);var KCd;bcb(768,1,{});_.Fb=function ZCd(a){return At((mmb(),jmb),a)};_.Hb=function $Cd(){return qmb((mmb(),jmb))};_.Ib=function _Cd(){return Fe((mmb(),jmb))};var Q4=mdb(Tte,'ECollections/BasicEmptyUnmodifiableEList',768);bcb(1312,1,jie,aDd);_.Nb=function cDd(a){Rrb(this,a)};_.Rb=function bDd(a){throw vbb(new bgb)};_.Ob=function dDd(){return false};_.Sb=function eDd(){return false};_.Pb=function fDd(){throw vbb(new utb)};_.Tb=function gDd(){return 0};_.Ub=function hDd(){throw vbb(new utb)};_.Vb=function iDd(){return -1};_.Qb=function jDd(){throw vbb(new bgb)};_.Wb=function kDd(a){throw vbb(new bgb)};var P4=mdb(Tte,'ECollections/BasicEmptyUnmodifiableEList/1',1312);bcb(1310,768,{20:1,14:1,15:1,58:1},lDd);_.Vc=function mDd(a,b){OCd()};_.Fc=function nDd(a){return PCd()};_.Wc=function oDd(a,b){return QCd()};_.Gc=function pDd(a){return RCd()};_.$b=function qDd(){SCd()};_.Hc=function rDd(a){return false};_.Ic=function sDd(a){return false};_.Jc=function tDd(a){reb(this,a)};_.Xb=function uDd(a){return wmb((mmb(),jmb,a)),null};_.Xc=function vDd(a){return -1};_.dc=function wDd(){return true};_.Kc=function xDd(){return this.a};_.Yc=function yDd(){return this.a};_.Zc=function zDd(a){return this.a};_.ii=function ADd(a,b){return TCd()};_.ji=function BDd(a,b){UCd()};_.Lc=function CDd(){return new YAb(null,new Kub(this,16))};_.$c=function DDd(a){return VCd()};_.Mc=function EDd(a){return WCd()};_._c=function FDd(a,b){return XCd()};_.gc=function GDd(){return 0};_.ad=function HDd(a){ktb(this,a)};_.Nc=function IDd(){return new Kub(this,16)};_.Oc=function JDd(){return new YAb(null,new Kub(this,16))};_.bd=function KDd(a,b){return mmb(),new Jib(jmb,a,b)};_.Pc=function LDd(){return De((mmb(),jmb))};_.Qc=function MDd(a){return mmb(),Ee(jmb,a)};var R4=mdb(Tte,'ECollections/EmptyUnmodifiableEList',1310);bcb(1311,768,{20:1,14:1,15:1,58:1,589:1},NDd);_.Vc=function ODd(a,b){OCd()};_.Fc=function PDd(a){return PCd()};_.Wc=function QDd(a,b){return QCd()};_.Gc=function RDd(a){return RCd()};_.$b=function SDd(){SCd()};_.Hc=function TDd(a){return false};_.Ic=function UDd(a){return false};_.Jc=function VDd(a){reb(this,a)};_.Xb=function WDd(a){return wmb((mmb(),jmb,a)),null};_.Xc=function XDd(a){return -1};_.dc=function YDd(){return true};_.Kc=function ZDd(){return this.a};_.Yc=function $Dd(){return this.a};_.Zc=function _Dd(a){return this.a};_.ii=function bEd(a,b){return TCd()};_.ji=function cEd(a,b){UCd()};_.Lc=function dEd(){return new YAb(null,new Kub(this,16))};_.$c=function eEd(a){return VCd()};_.Mc=function fEd(a){return WCd()};_._c=function gEd(a,b){return XCd()};_.gc=function hEd(){return 0};_.ad=function iEd(a){ktb(this,a)};_.Nc=function jEd(){return new Kub(this,16)};_.Oc=function kEd(){return new YAb(null,new Kub(this,16))};_.bd=function lEd(a,b){return mmb(),new Jib(jmb,a,b)};_.Pc=function mEd(){return De((mmb(),jmb))};_.Qc=function nEd(a){return mmb(),Ee(jmb,a)};_.sj=function aEd(){return mmb(),mmb(),kmb};var S4=mdb(Tte,'ECollections/EmptyUnmodifiableEMap',1311);var U4=odb(Tte,'Enumerator');var oEd;bcb(281,1,{281:1},NEd);_.Fb=function REd(a){var b;if(this===a)return true;if(!JD(a,281))return false;b=BD(a,281);return this.f==b.f&&TEd(this.i,b.i)&&SEd(this.a,(this.f&256)!=0?(b.f&256)!=0?b.a:null:(b.f&256)!=0?null:b.a)&&SEd(this.d,b.d)&&SEd(this.g,b.g)&&SEd(this.e,b.e)&&KEd(this,b)};_.Hb=function WEd(){return this.f};_.Ib=function cFd(){return LEd(this)};_.f=0;var sEd=0,tEd=0,uEd=0,vEd=0,wEd=0,xEd=0,yEd=0,zEd=0,AEd=0,BEd,CEd=0,DEd=0,EEd=0,FEd=0,GEd,HEd;var Z4=mdb(Tte,'URI',281);bcb(1091,43,fke,mFd);_.zc=function nFd(a,b){return BD(Shb(this,GD(a),BD(b,281)),281)};var Y4=mdb(Tte,'URI/URICache',1091);bcb(497,63,oue,oFd,pFd);_.hi=function qFd(){return true};var $4=mdb(Tte,'UniqueEList',497);bcb(581,60,Tie,rFd);var _4=mdb(Tte,'WrappedException',581);var a5=odb(Vse,nve);var v5=odb(Vse,ove);var t5=odb(Vse,pve);var b5=odb(Vse,qve);var d5=odb(Vse,rve);var c5=odb(Vse,'EClass');var f5=odb(Vse,'EDataType');var sFd;bcb(1183,43,fke,vFd);_.xc=function wFd(a){return ND(a)?Phb(this,a):Wd(irb(this.f,a))};var e5=mdb(Vse,'EDataType/Internal/ConversionDelegate/Factory/Registry/Impl',1183);var h5=odb(Vse,'EEnum');var g5=odb(Vse,sve);var j5=odb(Vse,tve);var n5=odb(Vse,uve);var xFd;var p5=odb(Vse,vve);var q5=odb(Vse,wve);bcb(1029,1,{},BFd);_.Ib=function CFd(){return 'NIL'};var r5=mdb(Vse,'EStructuralFeature/Internal/DynamicValueHolder/1',1029);var DFd;bcb(1028,43,fke,GFd);_.xc=function HFd(a){return ND(a)?Phb(this,a):Wd(irb(this.f,a))};var s5=mdb(Vse,'EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl',1028);var u5=odb(Vse,xve);var w5=odb(Vse,'EValidator/PatternMatcher');var IFd;var KFd;var MFd;var OFd,PFd,QFd,RFd,SFd,TFd,UFd,VFd,WFd,XFd,YFd,ZFd,$Fd,_Fd,aGd,bGd,cGd,dGd,eGd,fGd,gGd,hGd,iGd;var E9=odb(yve,'FeatureMap/Entry');bcb(535,1,{72:1},kGd);_.ak=function lGd(){return this.a};_.dd=function mGd(){return this.b};var x5=mdb(qte,'BasicEObjectImpl/1',535);bcb(1027,1,zve,nGd);_.Wj=function oGd(a){return hid(this.a,this.b,a)};_.fj=function pGd(){return nid(this.a,this.b)};_.Wb=function qGd(a){zid(this.a,this.b,a)};_.Xj=function rGd(){Did(this.a,this.b)};var y5=mdb(qte,'BasicEObjectImpl/4',1027);bcb(1983,1,{108:1});_.bk=function uGd(a){this.e=a==0?sGd:KC(SI,Uhe,1,a,5,1)};_.Ch=function vGd(a){return this.e[a]};_.Dh=function wGd(a,b){this.e[a]=b};_.Eh=function xGd(a){this.e[a]=null};_.ck=function yGd(){return this.c};_.dk=function zGd(){throw vbb(new bgb)};_.ek=function AGd(){throw vbb(new bgb)};_.fk=function BGd(){return this.d};_.gk=function CGd(){return this.e!=null};_.hk=function DGd(a){this.c=a};_.ik=function EGd(a){throw vbb(new bgb)};_.jk=function FGd(a){throw vbb(new bgb)};_.kk=function GGd(a){this.d=a};var sGd;var z5=mdb(qte,'BasicEObjectImpl/EPropertiesHolderBaseImpl',1983);bcb(185,1983,{108:1},HGd);_.dk=function IGd(){return this.a};_.ek=function JGd(){return this.b};_.ik=function KGd(a){this.a=a};_.jk=function LGd(a){this.b=a};var A5=mdb(qte,'BasicEObjectImpl/EPropertiesHolderImpl',185);bcb(506,97,pte,MGd);_.Kg=function NGd(){return this.f};_.Pg=function OGd(){return this.k};_.Rg=function PGd(a,b){this.g=a;this.i=b};_.Tg=function QGd(){return (this.j&2)==0?this.zh():this.ph().ck()};_.Vg=function RGd(){return this.i};_.Mg=function SGd(){return (this.j&1)!=0};_.eh=function TGd(){return this.g};_.kh=function UGd(){return (this.j&4)!=0};_.ph=function VGd(){return !this.k&&(this.k=new HGd),this.k};_.th=function WGd(a){this.ph().hk(a);a?(this.j|=2):(this.j&=-3)};_.vh=function XGd(a){this.ph().jk(a);a?(this.j|=4):(this.j&=-5)};_.zh=function YGd(){return (NFd(),MFd).S};_.i=0;_.j=1;var l6=mdb(qte,'EObjectImpl',506);bcb(780,506,{105:1,92:1,90:1,56:1,108:1,49:1,97:1},_Gd);_.Ch=function aHd(a){return this.e[a]};_.Dh=function bHd(a,b){this.e[a]=b};_.Eh=function cHd(a){this.e[a]=null};_.Tg=function dHd(){return this.d};_.Yg=function eHd(a){return bLd(this.d,a)};_.$g=function fHd(){return this.d};_.dh=function gHd(){return this.e!=null};_.ph=function hHd(){!this.k&&(this.k=new vHd);return this.k};_.th=function iHd(a){this.d=a};_.yh=function jHd(){var a;if(this.e==null){a=aLd(this.d);this.e=a==0?ZGd:KC(SI,Uhe,1,a,5,1)}return this};_.Ah=function kHd(){return 0};var ZGd;var E5=mdb(qte,'DynamicEObjectImpl',780);bcb(1376,780,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1},lHd);_.Fb=function nHd(a){return this===a};_.Hb=function rHd(){return FCb(this)};_.th=function mHd(a){this.d=a;this.b=YKd(a,'key');this.c=YKd(a,Bte)};_.Sh=function oHd(){var a;if(this.a==-1){a=iid(this,this.b);this.a=a==null?0:tb(a)}return this.a};_.cd=function pHd(){return iid(this,this.b)};_.dd=function qHd(){return iid(this,this.c)};_.Th=function sHd(a){this.a=a};_.Uh=function tHd(a){zid(this,this.b,a)};_.ed=function uHd(a){var b;b=iid(this,this.c);zid(this,this.c,a);return b};_.a=0;var C5=mdb(qte,'DynamicEObjectImpl/BasicEMapEntry',1376);bcb(1377,1,{108:1},vHd);_.bk=function wHd(a){throw vbb(new bgb)};_.Ch=function xHd(a){throw vbb(new bgb)};_.Dh=function yHd(a,b){throw vbb(new bgb)};_.Eh=function zHd(a){throw vbb(new bgb)};_.ck=function AHd(){throw vbb(new bgb)};_.dk=function BHd(){return this.a};_.ek=function CHd(){return this.b};_.fk=function DHd(){return this.c};_.gk=function EHd(){throw vbb(new bgb)};_.hk=function FHd(a){throw vbb(new bgb)};_.ik=function GHd(a){this.a=a};_.jk=function HHd(a){this.b=a};_.kk=function IHd(a){this.c=a};var D5=mdb(qte,'DynamicEObjectImpl/DynamicEPropertiesHolderImpl',1377);bcb(510,150,{105:1,92:1,90:1,590:1,147:1,56:1,108:1,49:1,97:1,510:1,150:1,114:1,115:1},RHd);_.Qg=function SHd(a){return KHd(this,a)};_._g=function THd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.d;case 2:return c?(!this.b&&(this.b=new sId((jGd(),fGd),x6,this)),this.b):(!this.b&&(this.b=new sId((jGd(),fGd),x6,this)),FAd(this.b));case 3:return MHd(this);case 4:return !this.a&&(this.a=new xMd(m5,this,4)),this.a;case 5:return !this.c&&(this.c=new _4d(m5,this,5)),this.c;}return bid(this,a-aLd((jGd(),OFd)),XKd((d=BD(Ajd(this,16),26),!d?OFd:d),a),b,c)};_.hh=function UHd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 3:!!this.Cb&&(c=(e=this.Db>>16,e>=0?KHd(this,c):this.Cb.ih(this,-1-e,null,c)));return JHd(this,BD(a,147),c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),OFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),OFd)),a,c)};_.jh=function VHd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 2:return !this.b&&(this.b=new sId((jGd(),fGd),x6,this)),bId(this.b,a,c);case 3:return JHd(this,null,c);case 4:return !this.a&&(this.a=new xMd(m5,this,4)),Txd(this.a,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),OFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),OFd)),a,c)};_.lh=function WHd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return !!this.b&&this.b.f!=0;case 3:return !!MHd(this);case 4:return !!this.a&&this.a.i!=0;case 5:return !!this.c&&this.c.i!=0;}return cid(this,a-aLd((jGd(),OFd)),XKd((b=BD(Ajd(this,16),26),!b?OFd:b),a))};_.sh=function XHd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:OHd(this,GD(b));return;case 2:!this.b&&(this.b=new sId((jGd(),fGd),x6,this));cId(this.b,b);return;case 3:NHd(this,BD(b,147));return;case 4:!this.a&&(this.a=new xMd(m5,this,4));Uxd(this.a);!this.a&&(this.a=new xMd(m5,this,4));ytd(this.a,BD(b,14));return;case 5:!this.c&&(this.c=new _4d(m5,this,5));Uxd(this.c);!this.c&&(this.c=new _4d(m5,this,5));ytd(this.c,BD(b,14));return;}did(this,a-aLd((jGd(),OFd)),XKd((c=BD(Ajd(this,16),26),!c?OFd:c),a),b)};_.zh=function YHd(){return jGd(),OFd};_.Bh=function ZHd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:PHd(this,null);return;case 2:!this.b&&(this.b=new sId((jGd(),fGd),x6,this));this.b.c.$b();return;case 3:NHd(this,null);return;case 4:!this.a&&(this.a=new xMd(m5,this,4));Uxd(this.a);return;case 5:!this.c&&(this.c=new _4d(m5,this,5));Uxd(this.c);return;}eid(this,a-aLd((jGd(),OFd)),XKd((b=BD(Ajd(this,16),26),!b?OFd:b),a))};_.Ib=function $Hd(){return QHd(this)};_.d=null;var G5=mdb(qte,'EAnnotationImpl',510);bcb(151,705,Ave,dId);_.Xh=function eId(a,b){_Hd(this,a,BD(b,42))};_.lk=function fId(a,b){return aId(this,BD(a,42),b)};_.pi=function gId(a){return BD(BD(this.c,69).pi(a),133)};_.Zh=function hId(){return BD(this.c,69).Zh()};_.$h=function iId(){return BD(this.c,69).$h()};_._h=function jId(a){return BD(this.c,69)._h(a)};_.mk=function kId(a,b){return bId(this,a,b)};_.Wj=function lId(a){return BD(this.c,76).Wj(a)};_.rj=function mId(){};_.fj=function nId(){return BD(this.c,76).fj()};_.tj=function oId(a,b,c){var d;d=BD(bKd(this.b).Nh().Jh(this.b),133);d.Th(a);d.Uh(b);d.ed(c);return d};_.uj=function pId(){return new W5d(this)};_.Wb=function qId(a){cId(this,a)};_.Xj=function rId(){BD(this.c,76).Xj()};var y9=mdb(yve,'EcoreEMap',151);bcb(158,151,Ave,sId);_.qj=function tId(){var a,b,c,d,e,f;if(this.d==null){f=KC(y4,jve,63,2*this.f+1,0,1);for(c=this.c.Kc();c.e!=c.i.gc();){b=BD(c.nj(),133);d=b.Sh();e=(d&Ohe)%f.length;a=f[e];!a&&(a=f[e]=new W5d(this));a.Fc(b)}this.d=f}};var F5=mdb(qte,'EAnnotationImpl/1',158);bcb(284,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,472:1,49:1,97:1,150:1,284:1,114:1,115:1});_._g=function GId(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),this.$j()?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.jh=function HId(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function IId(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function JId(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:this.Lh(GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:this.ok(BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function KId(){return jGd(),hGd};_.Bh=function LId(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:this.Lh(null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:this.ok(1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.Gh=function MId(){wId(this);this.Bb|=1};_.Yj=function NId(){return wId(this)};_.Zj=function OId(){return this.t};_.$j=function PId(){var a;return a=this.t,a>1||a==-1};_.hi=function QId(){return (this.Bb&512)!=0};_.nk=function RId(a,b){return zId(this,a,b)};_.ok=function SId(a){DId(this,a)};_.Ib=function TId(){return EId(this)};_.s=0;_.t=1;var v7=mdb(qte,'ETypedElementImpl',284);bcb(449,284,{105:1,92:1,90:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,449:1,284:1,114:1,115:1,677:1});_.Qg=function iJd(a){return UId(this,a)};_._g=function jJd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),this.$j()?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return Bcb(),(this.Bb&zte)!=0?true:false;case 11:return Bcb(),(this.Bb&Dve)!=0?true:false;case 12:return Bcb(),(this.Bb&Rje)!=0?true:false;case 13:return this.j;case 14:return VId(this);case 15:return Bcb(),(this.Bb&Cve)!=0?true:false;case 16:return Bcb(),(this.Bb&oie)!=0?true:false;case 17:return WId(this);}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.hh=function kJd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 17:!!this.Cb&&(c=(e=this.Db>>16,e>=0?UId(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,17,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),f.Nj().Qj(this,yjd(this),b-aLd(this.zh()),a,c)};_.jh=function lJd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);case 17:return _hd(this,null,17,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function mJd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return (this.Bb&zte)==0;case 11:return (this.Bb&Dve)!=0;case 12:return (this.Bb&Rje)!=0;case 13:return this.j!=null;case 14:return VId(this)!=null;case 15:return (this.Bb&Cve)!=0;case 16:return (this.Bb&oie)!=0;case 17:return !!WId(this);}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function nJd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:cJd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:this.ok(BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 10:ZId(this,Ccb(DD(b)));return;case 11:fJd(this,Ccb(DD(b)));return;case 12:dJd(this,Ccb(DD(b)));return;case 13:$Id(this,GD(b));return;case 15:eJd(this,Ccb(DD(b)));return;case 16:aJd(this,Ccb(DD(b)));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function oJd(){return jGd(),gGd};_.Bh=function pJd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),4);pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:this.ok(1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 10:ZId(this,true);return;case 11:fJd(this,false);return;case 12:dJd(this,false);return;case 13:this.i=null;_Id(this,null);return;case 15:eJd(this,false);return;case 16:aJd(this,false);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.Gh=function qJd(){a2d(q1d((O6d(),M6d),this));wId(this);this.Bb|=1};_.Gj=function rJd(){return this.f};_.zj=function sJd(){return VId(this)};_.Hj=function tJd(){return WId(this)};_.Lj=function uJd(){return null};_.pk=function vJd(){return this.k};_.aj=function wJd(){return this.n};_.Mj=function xJd(){return XId(this)};_.Nj=function yJd(){var a,b,c,d,e,f,g,h,i;if(!this.p){c=WId(this);(c.i==null&&TKd(c),c.i).length;d=this.Lj();!!d&&aLd(WId(d));e=wId(this);g=e.Bj();a=!g?null:(g.i&1)!=0?g==sbb?wI:g==WD?JI:g==VD?FI:g==UD?BI:g==XD?MI:g==rbb?UI:g==SD?xI:yI:g;b=VId(this);h=e.zj();n6d(this);(this.Bb&oie)!=0&&(!!(f=t1d((O6d(),M6d),c))&&f!=this||!!(f=_1d(q1d(M6d,this))))?(this.p=new zVd(this,f)):this.$j()?this.rk()?!d?(this.Bb&Cve)!=0?!a?this.sk()?(this.p=new KVd(42,this)):(this.p=new KVd(0,this)):a==CK?(this.p=new IVd(50,J4,this)):this.sk()?(this.p=new IVd(43,a,this)):(this.p=new IVd(1,a,this)):!a?this.sk()?(this.p=new KVd(44,this)):(this.p=new KVd(2,this)):a==CK?(this.p=new IVd(41,J4,this)):this.sk()?(this.p=new IVd(45,a,this)):(this.p=new IVd(3,a,this)):(this.Bb&Cve)!=0?!a?this.sk()?(this.p=new LVd(46,this,d)):(this.p=new LVd(4,this,d)):this.sk()?(this.p=new JVd(47,a,this,d)):(this.p=new JVd(5,a,this,d)):!a?this.sk()?(this.p=new LVd(48,this,d)):(this.p=new LVd(6,this,d)):this.sk()?(this.p=new JVd(49,a,this,d)):(this.p=new JVd(7,a,this,d)):JD(e,148)?a==E9?(this.p=new KVd(40,this)):(this.Bb&512)!=0?(this.Bb&Cve)!=0?!a?(this.p=new KVd(8,this)):(this.p=new IVd(9,a,this)):!a?(this.p=new KVd(10,this)):(this.p=new IVd(11,a,this)):(this.Bb&Cve)!=0?!a?(this.p=new KVd(12,this)):(this.p=new IVd(13,a,this)):!a?(this.p=new KVd(14,this)):(this.p=new IVd(15,a,this)):!d?this.sk()?(this.Bb&Cve)!=0?!a?(this.p=new KVd(16,this)):(this.p=new IVd(17,a,this)):!a?(this.p=new KVd(18,this)):(this.p=new IVd(19,a,this)):(this.Bb&Cve)!=0?!a?(this.p=new KVd(20,this)):(this.p=new IVd(21,a,this)):!a?(this.p=new KVd(22,this)):(this.p=new IVd(23,a,this)):(i=d.t,i>1||i==-1?this.sk()?(this.Bb&Cve)!=0?!a?(this.p=new LVd(24,this,d)):(this.p=new JVd(25,a,this,d)):!a?(this.p=new LVd(26,this,d)):(this.p=new JVd(27,a,this,d)):(this.Bb&Cve)!=0?!a?(this.p=new LVd(28,this,d)):(this.p=new JVd(29,a,this,d)):!a?(this.p=new LVd(30,this,d)):(this.p=new JVd(31,a,this,d)):this.sk()?(this.Bb&Cve)!=0?!a?(this.p=new LVd(32,this,d)):(this.p=new JVd(33,a,this,d)):!a?(this.p=new LVd(34,this,d)):(this.p=new JVd(35,a,this,d)):(this.Bb&Cve)!=0?!a?(this.p=new LVd(36,this,d)):(this.p=new JVd(37,a,this,d)):!a?(this.p=new LVd(38,this,d)):(this.p=new JVd(39,a,this,d))):this.qk()?this.sk()?(this.p=new kWd(BD(e,26),this,d)):(this.p=new cWd(BD(e,26),this,d)):JD(e,148)?a==E9?(this.p=new KVd(40,this)):(this.Bb&Cve)!=0?!a?(this.p=new jXd(BD(e,148),b,h,this)):(this.p=new lXd(b,h,this,(CWd(),g==WD?yWd:g==sbb?tWd:g==XD?zWd:g==VD?xWd:g==UD?wWd:g==rbb?BWd:g==SD?uWd:g==TD?vWd:AWd))):!a?(this.p=new cXd(BD(e,148),b,h,this)):(this.p=new eXd(b,h,this,(CWd(),g==WD?yWd:g==sbb?tWd:g==XD?zWd:g==VD?xWd:g==UD?wWd:g==rbb?BWd:g==SD?uWd:g==TD?vWd:AWd))):this.rk()?!d?(this.Bb&Cve)!=0?this.sk()?(this.p=new FXd(BD(e,26),this)):(this.p=new DXd(BD(e,26),this)):this.sk()?(this.p=new BXd(BD(e,26),this)):(this.p=new zXd(BD(e,26),this)):(this.Bb&Cve)!=0?this.sk()?(this.p=new NXd(BD(e,26),this,d)):(this.p=new LXd(BD(e,26),this,d)):this.sk()?(this.p=new JXd(BD(e,26),this,d)):(this.p=new HXd(BD(e,26),this,d)):this.sk()?!d?(this.Bb&Cve)!=0?(this.p=new RXd(BD(e,26),this)):(this.p=new PXd(BD(e,26),this)):(this.Bb&Cve)!=0?(this.p=new VXd(BD(e,26),this,d)):(this.p=new TXd(BD(e,26),this,d)):!d?(this.Bb&Cve)!=0?(this.p=new XXd(BD(e,26),this)):(this.p=new nXd(BD(e,26),this)):(this.Bb&Cve)!=0?(this.p=new _Xd(BD(e,26),this,d)):(this.p=new ZXd(BD(e,26),this,d))}return this.p};_.Ij=function zJd(){return (this.Bb&zte)!=0};_.qk=function AJd(){return false};_.rk=function BJd(){return false};_.Jj=function CJd(){return (this.Bb&oie)!=0};_.Oj=function DJd(){return YId(this)};_.sk=function EJd(){return false};_.Kj=function FJd(){return (this.Bb&Cve)!=0};_.tk=function GJd(a){this.k=a};_.Lh=function HJd(a){cJd(this,a)};_.Ib=function IJd(){return gJd(this)};_.e=false;_.n=0;var n7=mdb(qte,'EStructuralFeatureImpl',449);bcb(322,449,{105:1,92:1,90:1,34:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,322:1,150:1,449:1,284:1,114:1,115:1,677:1},OJd);_._g=function PJd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),LJd(this)?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return Bcb(),(this.Bb&zte)!=0?true:false;case 11:return Bcb(),(this.Bb&Dve)!=0?true:false;case 12:return Bcb(),(this.Bb&Rje)!=0?true:false;case 13:return this.j;case 14:return VId(this);case 15:return Bcb(),(this.Bb&Cve)!=0?true:false;case 16:return Bcb(),(this.Bb&oie)!=0?true:false;case 17:return WId(this);case 18:return Bcb(),(this.Bb&ote)!=0?true:false;case 19:if(b)return KJd(this);return JJd(this);}return bid(this,a-aLd((jGd(),PFd)),XKd((d=BD(Ajd(this,16),26),!d?PFd:d),a),b,c)};_.lh=function QJd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return LJd(this);case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return (this.Bb&zte)==0;case 11:return (this.Bb&Dve)!=0;case 12:return (this.Bb&Rje)!=0;case 13:return this.j!=null;case 14:return VId(this)!=null;case 15:return (this.Bb&Cve)!=0;case 16:return (this.Bb&oie)!=0;case 17:return !!WId(this);case 18:return (this.Bb&ote)!=0;case 19:return !!JJd(this);}return cid(this,a-aLd((jGd(),PFd)),XKd((b=BD(Ajd(this,16),26),!b?PFd:b),a))};_.sh=function RJd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:cJd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:NJd(this,BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 10:ZId(this,Ccb(DD(b)));return;case 11:fJd(this,Ccb(DD(b)));return;case 12:dJd(this,Ccb(DD(b)));return;case 13:$Id(this,GD(b));return;case 15:eJd(this,Ccb(DD(b)));return;case 16:aJd(this,Ccb(DD(b)));return;case 18:MJd(this,Ccb(DD(b)));return;}did(this,a-aLd((jGd(),PFd)),XKd((c=BD(Ajd(this,16),26),!c?PFd:c),a),b)};_.zh=function SJd(){return jGd(),PFd};_.Bh=function TJd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),4);pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:this.b=0;DId(this,1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 10:ZId(this,true);return;case 11:fJd(this,false);return;case 12:dJd(this,false);return;case 13:this.i=null;_Id(this,null);return;case 15:eJd(this,false);return;case 16:aJd(this,false);return;case 18:MJd(this,false);return;}eid(this,a-aLd((jGd(),PFd)),XKd((b=BD(Ajd(this,16),26),!b?PFd:b),a))};_.Gh=function UJd(){KJd(this);a2d(q1d((O6d(),M6d),this));wId(this);this.Bb|=1};_.$j=function VJd(){return LJd(this)};_.nk=function WJd(a,b){this.b=0;this.a=null;return zId(this,a,b)};_.ok=function XJd(a){NJd(this,a)};_.Ib=function YJd(){var a;if((this.Db&64)!=0)return gJd(this);a=new Jfb(gJd(this));a.a+=' (iD: ';Ffb(a,(this.Bb&ote)!=0);a.a+=')';return a.a};_.b=0;var H5=mdb(qte,'EAttributeImpl',322);bcb(351,438,{105:1,92:1,90:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,351:1,150:1,114:1,115:1,676:1});_.uk=function nKd(a){return a.Tg()==this};_.Qg=function oKd(a){return aKd(this,a)};_.Rg=function pKd(a,b){this.w=null;this.Db=b<<16|this.Db&255;this.Cb=a};_._g=function qKd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return dKd(this);case 4:return this.zj();case 5:return this.F;case 6:if(b)return bKd(this);return ZJd(this);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),this.A;}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.hh=function rKd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?aKd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,6,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),f.Nj().Qj(this,yjd(this),b-aLd(this.zh()),a,c)};_.jh=function sKd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 6:return _hd(this,null,6,c);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),Txd(this.A,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function tKd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!dKd(this);case 4:return this.zj()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!ZJd(this);case 7:return !!this.A&&this.A.i!=0;}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function uKd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:lKd(this,GD(b));return;case 2:iKd(this,GD(b));return;case 5:kKd(this,GD(b));return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);!this.A&&(this.A=new K4d(u5,this,7));ytd(this.A,BD(b,14));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function vKd(){return jGd(),RFd};_.Bh=function wKd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,179)&&(BD(this.Cb,179).tb=null);pnd(this,null);return;case 2:$Jd(this,null);_Jd(this,this.D);return;case 5:kKd(this,null);return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.yj=function xKd(){var a;return this.G==-1&&(this.G=(a=bKd(this),a?HLd(a.Mh(),this):-1)),this.G};_.zj=function yKd(){return null};_.Aj=function zKd(){return bKd(this)};_.vk=function AKd(){return this.v};_.Bj=function BKd(){return dKd(this)};_.Cj=function CKd(){return this.D!=null?this.D:this.B};_.Dj=function DKd(){return this.F};_.wj=function EKd(a){return fKd(this,a)};_.wk=function FKd(a){this.v=a};_.xk=function GKd(a){gKd(this,a)};_.yk=function HKd(a){this.C=a};_.Lh=function IKd(a){lKd(this,a)};_.Ib=function JKd(){return mKd(this)};_.C=null;_.D=null;_.G=-1;var Z5=mdb(qte,'EClassifierImpl',351);bcb(88,351,{105:1,92:1,90:1,26:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,88:1,351:1,150:1,473:1,114:1,115:1,676:1},hLd);_.uk=function iLd(a){return dLd(this,a.Tg())};_._g=function jLd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return dKd(this);case 4:return null;case 5:return this.F;case 6:if(b)return bKd(this);return ZJd(this);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),this.A;case 8:return Bcb(),(this.Bb&256)!=0?true:false;case 9:return Bcb(),(this.Bb&512)!=0?true:false;case 10:return _Kd(this);case 11:return !this.q&&(this.q=new cUd(n5,this,11,10)),this.q;case 12:return OKd(this);case 13:return SKd(this);case 14:return SKd(this),this.r;case 15:return OKd(this),this.k;case 16:return PKd(this);case 17:return RKd(this);case 18:return TKd(this);case 19:return UKd(this);case 20:return OKd(this),this.o;case 21:return !this.s&&(this.s=new cUd(t5,this,21,17)),this.s;case 22:return VKd(this);case 23:return QKd(this);}return bid(this,a-aLd((jGd(),QFd)),XKd((d=BD(Ajd(this,16),26),!d?QFd:d),a),b,c)};_.hh=function kLd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?aKd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,6,c);case 11:return !this.q&&(this.q=new cUd(n5,this,11,10)),Sxd(this.q,a,c);case 21:return !this.s&&(this.s=new cUd(t5,this,21,17)),Sxd(this.s,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),QFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),QFd)),a,c)};_.jh=function lLd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 6:return _hd(this,null,6,c);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),Txd(this.A,a,c);case 11:return !this.q&&(this.q=new cUd(n5,this,11,10)),Txd(this.q,a,c);case 21:return !this.s&&(this.s=new cUd(t5,this,21,17)),Txd(this.s,a,c);case 22:return Txd(VKd(this),a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),QFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),QFd)),a,c)};_.lh=function mLd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!dKd(this);case 4:return false;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!ZJd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)!=0;case 9:return (this.Bb&512)!=0;case 10:return !!this.u&&VKd(this.u.a).i!=0&&!(!!this.n&&FMd(this.n));case 11:return !!this.q&&this.q.i!=0;case 12:return OKd(this).i!=0;case 13:return SKd(this).i!=0;case 14:return SKd(this),this.r.i!=0;case 15:return OKd(this),this.k.i!=0;case 16:return PKd(this).i!=0;case 17:return RKd(this).i!=0;case 18:return TKd(this).i!=0;case 19:return UKd(this).i!=0;case 20:return OKd(this),!!this.o;case 21:return !!this.s&&this.s.i!=0;case 22:return !!this.n&&FMd(this.n);case 23:return QKd(this).i!=0;}return cid(this,a-aLd((jGd(),QFd)),XKd((b=BD(Ajd(this,16),26),!b?QFd:b),a))};_.oh=function nLd(a){var b;b=this.i==null||!!this.q&&this.q.i!=0?null:YKd(this,a);return b?b:Bmd(this,a)};_.sh=function oLd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:lKd(this,GD(b));return;case 2:iKd(this,GD(b));return;case 5:kKd(this,GD(b));return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);!this.A&&(this.A=new K4d(u5,this,7));ytd(this.A,BD(b,14));return;case 8:eLd(this,Ccb(DD(b)));return;case 9:fLd(this,Ccb(DD(b)));return;case 10:vwd(_Kd(this));ytd(_Kd(this),BD(b,14));return;case 11:!this.q&&(this.q=new cUd(n5,this,11,10));Uxd(this.q);!this.q&&(this.q=new cUd(n5,this,11,10));ytd(this.q,BD(b,14));return;case 21:!this.s&&(this.s=new cUd(t5,this,21,17));Uxd(this.s);!this.s&&(this.s=new cUd(t5,this,21,17));ytd(this.s,BD(b,14));return;case 22:Uxd(VKd(this));ytd(VKd(this),BD(b,14));return;}did(this,a-aLd((jGd(),QFd)),XKd((c=BD(Ajd(this,16),26),!c?QFd:c),a),b)};_.zh=function pLd(){return jGd(),QFd};_.Bh=function qLd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,179)&&(BD(this.Cb,179).tb=null);pnd(this,null);return;case 2:$Jd(this,null);_Jd(this,this.D);return;case 5:kKd(this,null);return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);return;case 8:eLd(this,false);return;case 9:fLd(this,false);return;case 10:!!this.u&&vwd(this.u);return;case 11:!this.q&&(this.q=new cUd(n5,this,11,10));Uxd(this.q);return;case 21:!this.s&&(this.s=new cUd(t5,this,21,17));Uxd(this.s);return;case 22:!!this.n&&Uxd(this.n);return;}eid(this,a-aLd((jGd(),QFd)),XKd((b=BD(Ajd(this,16),26),!b?QFd:b),a))};_.Gh=function rLd(){var a,b;OKd(this);SKd(this);PKd(this);RKd(this);TKd(this);UKd(this);QKd(this);oud(SMd($Kd(this)));if(this.s){for(a=0,b=this.s.i;a=0;--b){qud(this,b)}}return xud(this,a)};_.Xj=function nMd(){Uxd(this)};_.oi=function oMd(a,b){return LLd(this,a,b)};var t9=mdb(yve,'EcoreEList',622);bcb(496,622,Pve,pMd);_.ai=function qMd(){return false};_.aj=function rMd(){return this.c};_.bj=function sMd(){return false};_.Fk=function tMd(){return true};_.hi=function uMd(){return true};_.li=function vMd(a,b){return b};_.ni=function wMd(){return false};_.c=0;var d9=mdb(yve,'EObjectEList',496);bcb(85,496,Pve,xMd);_.bj=function yMd(){return true};_.Dk=function zMd(){return false};_.rk=function AMd(){return true};var Z8=mdb(yve,'EObjectContainmentEList',85);bcb(545,85,Pve,BMd);_.ci=function CMd(){this.b=true};_.fj=function DMd(){return this.b};_.Xj=function EMd(){var a;Uxd(this);if(oid(this.e)){a=this.b;this.b=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.b=false}};_.b=false;var Y8=mdb(yve,'EObjectContainmentEList/Unsettable',545);bcb(1140,545,Pve,JMd);_.ii=function NMd(a,b){var c,d;return c=BD(Wxd(this,a,b),87),oid(this.e)&&GLd(this,new ESd(this.a,7,(jGd(),SFd),meb(b),(d=c.c,JD(d,88)?BD(d,26):_Fd),a)),c};_.jj=function OMd(a,b){return GMd(this,BD(a,87),b)};_.kj=function PMd(a,b){return HMd(this,BD(a,87),b)};_.lj=function QMd(a,b,c){return IMd(this,BD(a,87),BD(b,87),c)};_.Zi=function KMd(a,b,c,d,e){switch(a){case 3:{return FLd(this,a,b,c,d,this.i>1)}case 5:{return FLd(this,a,b,c,d,this.i-BD(c,15).gc()>0)}default:{return new pSd(this.e,a,this.c,b,c,d,true)}}};_.ij=function LMd(){return true};_.fj=function MMd(){return FMd(this)};_.Xj=function RMd(){Uxd(this)};var N5=mdb(qte,'EClassImpl/1',1140);bcb(1154,1153,dve);_.ui=function VMd(a){var b,c,d,e,f,g,h;c=a.xi();if(c!=8){d=UMd(a);if(d==0){switch(c){case 1:case 9:{h=a.Bi();if(h!=null){b=$Kd(BD(h,473));!b.c&&(b.c=new xYd);Ftd(b.c,a.Ai())}g=a.zi();if(g!=null){e=BD(g,473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);wtd(b.c,BD(a.Ai(),26))}}break}case 3:{g=a.zi();if(g!=null){e=BD(g,473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);wtd(b.c,BD(a.Ai(),26))}}break}case 5:{g=a.zi();if(g!=null){for(f=BD(g,14).Kc();f.Ob();){e=BD(f.Pb(),473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);wtd(b.c,BD(a.Ai(),26))}}}break}case 4:{h=a.Bi();if(h!=null){e=BD(h,473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);Ftd(b.c,a.Ai())}}break}case 6:{h=a.Bi();if(h!=null){for(f=BD(h,14).Kc();f.Ob();){e=BD(f.Pb(),473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);Ftd(b.c,a.Ai())}}}break}}}this.Hk(d)}};_.Hk=function WMd(a){TMd(this,a)};_.b=63;var p7=mdb(qte,'ESuperAdapter',1154);bcb(1155,1154,dve,YMd);_.Hk=function ZMd(a){XMd(this,a)};var I5=mdb(qte,'EClassImpl/10',1155);bcb(1144,696,Pve);_.Vh=function $Md(a,b){return iud(this,a,b)};_.Wh=function _Md(a){return jud(this,a)};_.Xh=function aNd(a,b){kud(this,a,b)};_.Yh=function bNd(a){lud(this,a)};_.pi=function dNd(a){return nud(this,a)};_.mi=function lNd(a,b){return uud(this,a,b)};_.lk=function cNd(a,b){throw vbb(new bgb)};_.Zh=function eNd(){return new $yd(this)};_.$h=function fNd(){return new bzd(this)};_._h=function gNd(a){return ztd(this,a)};_.mk=function hNd(a,b){throw vbb(new bgb)};_.Wj=function iNd(a){return this};_.fj=function jNd(){return this.i!=0};_.Wb=function kNd(a){throw vbb(new bgb)};_.Xj=function mNd(){throw vbb(new bgb)};var s9=mdb(yve,'EcoreEList/UnmodifiableEList',1144);bcb(319,1144,Pve,nNd);_.ni=function oNd(){return false};var r9=mdb(yve,'EcoreEList/UnmodifiableEList/FastCompare',319);bcb(1147,319,Pve,rNd);_.Xc=function sNd(a){var b,c,d;if(JD(a,170)){b=BD(a,170);c=b.aj();if(c!=-1){for(d=this.i;c4){if(this.wj(a)){if(this.rk()){d=BD(a,49);c=d.Ug();h=c==this.b&&(this.Dk()?d.Og(d.Vg(),BD(XKd(wjd(this.b),this.aj()).Yj(),26).Bj())==zUd(BD(XKd(wjd(this.b),this.aj()),18)).n:-1-d.Vg()==this.aj());if(this.Ek()&&!h&&!c&&!!d.Zg()){for(e=0;e1||d==-1)}else{return false}};_.Dk=function COd(){var a,b,c;b=XKd(wjd(this.b),this.aj());if(JD(b,99)){a=BD(b,18);c=zUd(a);return !!c}else{return false}};_.Ek=function DOd(){var a,b;b=XKd(wjd(this.b),this.aj());if(JD(b,99)){a=BD(b,18);return (a.Bb&Tje)!=0}else{return false}};_.Xc=function EOd(a){var b,c,d,e;d=this.Qi(a);if(d>=0)return d;if(this.Fk()){for(c=0,e=this.Vi();c=0;--a){nOd(this,a,this.Oi(a))}}return this.Wi()};_.Qc=function QOd(a){var b;if(this.Ek()){for(b=this.Vi()-1;b>=0;--b){nOd(this,b,this.Oi(b))}}return this.Xi(a)};_.Xj=function ROd(){vwd(this)};_.oi=function SOd(a,b){return pOd(this,a,b)};var K8=mdb(yve,'DelegatingEcoreEList',742);bcb(1150,742,Uve,YOd);_.Hi=function _Od(a,b){TOd(this,a,BD(b,26))};_.Ii=function aPd(a){UOd(this,BD(a,26))};_.Oi=function gPd(a){var b,c;return b=BD(qud(VKd(this.a),a),87),c=b.c,JD(c,88)?BD(c,26):(jGd(),_Fd)};_.Ti=function lPd(a){var b,c;return b=BD(Xxd(VKd(this.a),a),87),c=b.c,JD(c,88)?BD(c,26):(jGd(),_Fd)};_.Ui=function mPd(a,b){return WOd(this,a,BD(b,26))};_.ai=function ZOd(){return false};_.Zi=function $Od(a,b,c,d,e){return null};_.Ji=function bPd(){return new EPd(this)};_.Ki=function cPd(){Uxd(VKd(this.a))};_.Li=function dPd(a){return VOd(this,a)};_.Mi=function ePd(a){var b,c;for(c=a.Kc();c.Ob();){b=c.Pb();if(!VOd(this,b)){return false}}return true};_.Ni=function fPd(a){var b,c,d;if(JD(a,15)){d=BD(a,15);if(d.gc()==VKd(this.a).i){for(b=d.Kc(),c=new Fyd(this);b.Ob();){if(PD(b.Pb())!==PD(Dyd(c))){return false}}return true}}return false};_.Pi=function hPd(){var a,b,c,d,e;c=1;for(b=new Fyd(VKd(this.a));b.e!=b.i.gc();){a=BD(Dyd(b),87);d=(e=a.c,JD(e,88)?BD(e,26):(jGd(),_Fd));c=31*c+(!d?0:FCb(d))}return c};_.Qi=function iPd(a){var b,c,d,e;d=0;for(c=new Fyd(VKd(this.a));c.e!=c.i.gc();){b=BD(Dyd(c),87);if(PD(a)===PD((e=b.c,JD(e,88)?BD(e,26):(jGd(),_Fd)))){return d}++d}return -1};_.Ri=function jPd(){return VKd(this.a).i==0};_.Si=function kPd(){return null};_.Vi=function nPd(){return VKd(this.a).i};_.Wi=function oPd(){var a,b,c,d,e,f;f=VKd(this.a).i;e=KC(SI,Uhe,1,f,5,1);c=0;for(b=new Fyd(VKd(this.a));b.e!=b.i.gc();){a=BD(Dyd(b),87);e[c++]=(d=a.c,JD(d,88)?BD(d,26):(jGd(),_Fd))}return e};_.Xi=function pPd(a){var b,c,d,e,f,g,h;h=VKd(this.a).i;if(a.lengthh&&NC(a,h,null);d=0;for(c=new Fyd(VKd(this.a));c.e!=c.i.gc();){b=BD(Dyd(c),87);f=(g=b.c,JD(g,88)?BD(g,26):(jGd(),_Fd));NC(a,d++,f)}return a};_.Yi=function qPd(){var a,b,c,d,e;e=new Hfb;e.a+='[';a=VKd(this.a);for(b=0,d=VKd(this.a).i;b>16,e>=0?aKd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,6,c);case 9:return !this.a&&(this.a=new cUd(g5,this,9,5)),Sxd(this.a,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),UFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),UFd)),a,c)};_.jh=function dQd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 6:return _hd(this,null,6,c);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),Txd(this.A,a,c);case 9:return !this.a&&(this.a=new cUd(g5,this,9,5)),Txd(this.a,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),UFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),UFd)),a,c)};_.lh=function eQd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!dKd(this);case 4:return !!$Pd(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!ZJd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)==0;case 9:return !!this.a&&this.a.i!=0;}return cid(this,a-aLd((jGd(),UFd)),XKd((b=BD(Ajd(this,16),26),!b?UFd:b),a))};_.sh=function fQd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:lKd(this,GD(b));return;case 2:iKd(this,GD(b));return;case 5:kKd(this,GD(b));return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);!this.A&&(this.A=new K4d(u5,this,7));ytd(this.A,BD(b,14));return;case 8:LPd(this,Ccb(DD(b)));return;case 9:!this.a&&(this.a=new cUd(g5,this,9,5));Uxd(this.a);!this.a&&(this.a=new cUd(g5,this,9,5));ytd(this.a,BD(b,14));return;}did(this,a-aLd((jGd(),UFd)),XKd((c=BD(Ajd(this,16),26),!c?UFd:c),a),b)};_.zh=function gQd(){return jGd(),UFd};_.Bh=function hQd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,179)&&(BD(this.Cb,179).tb=null);pnd(this,null);return;case 2:$Jd(this,null);_Jd(this,this.D);return;case 5:kKd(this,null);return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);return;case 8:LPd(this,true);return;case 9:!this.a&&(this.a=new cUd(g5,this,9,5));Uxd(this.a);return;}eid(this,a-aLd((jGd(),UFd)),XKd((b=BD(Ajd(this,16),26),!b?UFd:b),a))};_.Gh=function iQd(){var a,b;if(this.a){for(a=0,b=this.a.i;a>16==5?BD(this.Cb,671):null;}return bid(this,a-aLd((jGd(),VFd)),XKd((d=BD(Ajd(this,16),26),!d?VFd:d),a),b,c)};_.hh=function uQd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 5:!!this.Cb&&(c=(e=this.Db>>16,e>=0?mQd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,5,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),VFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),VFd)),a,c)};_.jh=function vQd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 5:return _hd(this,null,5,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),VFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),VFd)),a,c)};_.lh=function wQd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return !!this.b;case 4:return this.c!=null;case 5:return !!(this.Db>>16==5?BD(this.Cb,671):null);}return cid(this,a-aLd((jGd(),VFd)),XKd((b=BD(Ajd(this,16),26),!b?VFd:b),a))};_.sh=function xQd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:qQd(this,BD(b,19).a);return;case 3:oQd(this,BD(b,1940));return;case 4:pQd(this,GD(b));return;}did(this,a-aLd((jGd(),VFd)),XKd((c=BD(Ajd(this,16),26),!c?VFd:c),a),b)};_.zh=function yQd(){return jGd(),VFd};_.Bh=function zQd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:qQd(this,0);return;case 3:oQd(this,null);return;case 4:pQd(this,null);return;}eid(this,a-aLd((jGd(),VFd)),XKd((b=BD(Ajd(this,16),26),!b?VFd:b),a))};_.Ib=function BQd(){var a;return a=this.c,a==null?this.zb:a};_.b=null;_.c=null;_.d=0;var a6=mdb(qte,'EEnumLiteralImpl',573);var c6=odb(qte,'EFactoryImpl/InternalEDateTimeFormat');bcb(489,1,{2015:1},EQd);var b6=mdb(qte,'EFactoryImpl/1ClientInternalEDateTimeFormat',489);bcb(241,115,{105:1,92:1,90:1,87:1,56:1,108:1,49:1,97:1,241:1,114:1,115:1},UQd);_.Sg=function VQd(a,b,c){var d;c=_hd(this,a,b,c);if(!!this.e&&JD(a,170)){d=MQd(this,this.e);d!=this.c&&(c=QQd(this,d,c))}return c};_._g=function WQd(a,b,c){var d;switch(a){case 0:return this.f;case 1:return !this.d&&(this.d=new xMd(j5,this,1)),this.d;case 2:if(b)return KQd(this);return this.c;case 3:return this.b;case 4:return this.e;case 5:if(b)return JQd(this);return this.a;}return bid(this,a-aLd((jGd(),XFd)),XKd((d=BD(Ajd(this,16),26),!d?XFd:d),a),b,c)};_.jh=function XQd(a,b,c){var d,e;switch(b){case 0:return IQd(this,null,c);case 1:return !this.d&&(this.d=new xMd(j5,this,1)),Txd(this.d,a,c);case 3:return GQd(this,null,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),XFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),XFd)),a,c)};_.lh=function YQd(a){var b;switch(a){case 0:return !!this.f;case 1:return !!this.d&&this.d.i!=0;case 2:return !!this.c;case 3:return !!this.b;case 4:return !!this.e;case 5:return !!this.a;}return cid(this,a-aLd((jGd(),XFd)),XKd((b=BD(Ajd(this,16),26),!b?XFd:b),a))};_.sh=function ZQd(a,b){var c;switch(a){case 0:SQd(this,BD(b,87));return;case 1:!this.d&&(this.d=new xMd(j5,this,1));Uxd(this.d);!this.d&&(this.d=new xMd(j5,this,1));ytd(this.d,BD(b,14));return;case 3:PQd(this,BD(b,87));return;case 4:RQd(this,BD(b,836));return;case 5:NQd(this,BD(b,138));return;}did(this,a-aLd((jGd(),XFd)),XKd((c=BD(Ajd(this,16),26),!c?XFd:c),a),b)};_.zh=function $Qd(){return jGd(),XFd};_.Bh=function _Qd(a){var b;switch(a){case 0:SQd(this,null);return;case 1:!this.d&&(this.d=new xMd(j5,this,1));Uxd(this.d);return;case 3:PQd(this,null);return;case 4:RQd(this,null);return;case 5:NQd(this,null);return;}eid(this,a-aLd((jGd(),XFd)),XKd((b=BD(Ajd(this,16),26),!b?XFd:b),a))};_.Ib=function aRd(){var a;a=new Wfb(Eid(this));a.a+=' (expression: ';TQd(this,a);a.a+=')';return a.a};var FQd;var e6=mdb(qte,'EGenericTypeImpl',241);bcb(1969,1964,Vve);_.Xh=function cRd(a,b){bRd(this,a,b)};_.lk=function dRd(a,b){bRd(this,this.gc(),a);return b};_.pi=function eRd(a){return Ut(this.Gi(),a)};_.Zh=function fRd(){return this.$h()};_.Gi=function gRd(){return new O0d(this)};_.$h=function hRd(){return this._h(0)};_._h=function iRd(a){return this.Gi().Zc(a)};_.mk=function jRd(a,b){ze(this,a,true);return b};_.ii=function kRd(a,b){var c,d;d=Vt(this,b);c=this.Zc(a);c.Rb(d);return d};_.ji=function lRd(a,b){var c;ze(this,b,true);c=this.Zc(a);c.Rb(b)};var B8=mdb(yve,'AbstractSequentialInternalEList',1969);bcb(486,1969,Vve,qRd);_.pi=function rRd(a){return Ut(this.Gi(),a)};_.Zh=function sRd(){if(this.b==null){return LRd(),LRd(),KRd}return this.Jk()};_.Gi=function tRd(){return new w4d(this.a,this.b)};_.$h=function uRd(){if(this.b==null){return LRd(),LRd(),KRd}return this.Jk()};_._h=function vRd(a){var b,c;if(this.b==null){if(a<0||a>1){throw vbb(new qcb(gve+a+', size=0'))}return LRd(),LRd(),KRd}c=this.Jk();for(b=0;b0){b=this.c[--this.d];if((!this.e||b.Gj()!=x2||b.aj()!=0)&&(!this.Mk()||this.b.mh(b))){f=this.b.bh(b,this.Lk());this.f=(Q6d(),BD(b,66).Oj());if(this.f||b.$j()){if(this.Lk()){d=BD(f,15);this.k=d}else{d=BD(f,69);this.k=this.j=d}if(JD(this.k,54)){this.o=this.k.gc();this.n=this.o}else{this.p=!this.j?this.k.Zc(this.k.gc()):this.j._h(this.k.gc())}if(!this.p?PRd(this):QRd(this,this.p)){e=!this.p?!this.j?this.k.Xb(--this.n):this.j.pi(--this.n):this.p.Ub();if(this.f){a=BD(e,72);a.ak();c=a.dd();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}else if(f!=null){this.k=null;this.p=null;c=f;this.i=c;this.g=-2;return true}}}this.k=null;this.p=null;this.g=-1;return false}else{e=!this.p?!this.j?this.k.Xb(--this.n):this.j.pi(--this.n):this.p.Ub();if(this.f){a=BD(e,72);a.ak();c=a.dd();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}}};_.Pb=function XRd(){return MRd(this)};_.Tb=function YRd(){return this.a};_.Ub=function ZRd(){var a;if(this.g<-1||this.Sb()){--this.a;this.g=0;a=this.i;this.Sb();return a}else{throw vbb(new utb)}};_.Vb=function $Rd(){return this.a-1};_.Qb=function _Rd(){throw vbb(new bgb)};_.Lk=function aSd(){return false};_.Wb=function bSd(a){throw vbb(new bgb)};_.Mk=function cSd(){return true};_.a=0;_.d=0;_.f=false;_.g=0;_.n=0;_.o=0;var KRd;var P8=mdb(yve,'EContentsEList/FeatureIteratorImpl',279);bcb(697,279,Wve,dSd);_.Lk=function eSd(){return true};var Q8=mdb(yve,'EContentsEList/ResolvingFeatureIteratorImpl',697);bcb(1157,697,Wve,fSd);_.Mk=function gSd(){return false};var g6=mdb(qte,'ENamedElementImpl/1/1',1157);bcb(1158,279,Wve,hSd);_.Mk=function iSd(){return false};var h6=mdb(qte,'ENamedElementImpl/1/2',1158);bcb(36,143,fve,lSd,mSd,nSd,oSd,pSd,qSd,rSd,sSd,tSd,uSd,vSd,wSd,xSd,ySd,zSd,ASd,BSd,CSd,DSd,ESd,FSd,GSd,HSd,ISd,JSd);_._i=function KSd(){return kSd(this)};_.gj=function LSd(){var a;a=kSd(this);if(a){return a.zj()}return null};_.yi=function MSd(a){this.b==-1&&!!this.a&&(this.b=this.c.Xg(this.a.aj(),this.a.Gj()));return this.c.Og(this.b,a)};_.Ai=function NSd(){return this.c};_.hj=function OSd(){var a;a=kSd(this);if(a){return a.Kj()}return false};_.b=-1;var k6=mdb(qte,'ENotificationImpl',36);bcb(399,284,{105:1,92:1,90:1,147:1,191:1,56:1,59:1,108:1,472:1,49:1,97:1,150:1,399:1,284:1,114:1,115:1},SSd);_.Qg=function TSd(a){return PSd(this,a)};_._g=function USd(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),f=this.t,f>1||f==-1?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?BD(this.Cb,26):null;case 11:return !this.d&&(this.d=new K4d(u5,this,11)),this.d;case 12:return !this.c&&(this.c=new cUd(p5,this,12,10)),this.c;case 13:return !this.a&&(this.a=new fTd(this,this)),this.a;case 14:return QSd(this);}return bid(this,a-aLd((jGd(),aGd)),XKd((d=BD(Ajd(this,16),26),!d?aGd:d),a),b,c)};_.hh=function VSd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?PSd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,10,c);case 12:return !this.c&&(this.c=new cUd(p5,this,12,10)),Sxd(this.c,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),aGd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),aGd)),a,c)};_.jh=function WSd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);case 10:return _hd(this,null,10,c);case 11:return !this.d&&(this.d=new K4d(u5,this,11)),Txd(this.d,a,c);case 12:return !this.c&&(this.c=new cUd(p5,this,12,10)),Txd(this.c,a,c);case 14:return Txd(QSd(this),a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),aGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),aGd)),a,c)};_.lh=function XSd(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return !!(this.Db>>16==10?BD(this.Cb,26):null);case 11:return !!this.d&&this.d.i!=0;case 12:return !!this.c&&this.c.i!=0;case 13:return !!this.a&&QSd(this.a.a).i!=0&&!(!!this.b&&QTd(this.b));case 14:return !!this.b&&QTd(this.b);}return cid(this,a-aLd((jGd(),aGd)),XKd((b=BD(Ajd(this,16),26),!b?aGd:b),a))};_.sh=function YSd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:DId(this,BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 11:!this.d&&(this.d=new K4d(u5,this,11));Uxd(this.d);!this.d&&(this.d=new K4d(u5,this,11));ytd(this.d,BD(b,14));return;case 12:!this.c&&(this.c=new cUd(p5,this,12,10));Uxd(this.c);!this.c&&(this.c=new cUd(p5,this,12,10));ytd(this.c,BD(b,14));return;case 13:!this.a&&(this.a=new fTd(this,this));vwd(this.a);!this.a&&(this.a=new fTd(this,this));ytd(this.a,BD(b,14));return;case 14:Uxd(QSd(this));ytd(QSd(this),BD(b,14));return;}did(this,a-aLd((jGd(),aGd)),XKd((c=BD(Ajd(this,16),26),!c?aGd:c),a),b)};_.zh=function ZSd(){return jGd(),aGd};_.Bh=function $Sd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:DId(this,1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 11:!this.d&&(this.d=new K4d(u5,this,11));Uxd(this.d);return;case 12:!this.c&&(this.c=new cUd(p5,this,12,10));Uxd(this.c);return;case 13:!!this.a&&vwd(this.a);return;case 14:!!this.b&&Uxd(this.b);return;}eid(this,a-aLd((jGd(),aGd)),XKd((b=BD(Ajd(this,16),26),!b?aGd:b),a))};_.Gh=function _Sd(){var a,b;if(this.c){for(a=0,b=this.c.i;ah&&NC(a,h,null);d=0;for(c=new Fyd(QSd(this.a));c.e!=c.i.gc();){b=BD(Dyd(c),87);f=(g=b.c,g?g:(jGd(),YFd));NC(a,d++,f)}return a};_.Yi=function zTd(){var a,b,c,d,e;e=new Hfb;e.a+='[';a=QSd(this.a);for(b=0,d=QSd(this.a).i;b1)}case 5:{return FLd(this,a,b,c,d,this.i-BD(c,15).gc()>0)}default:{return new pSd(this.e,a,this.c,b,c,d,true)}}};_.ij=function WTd(){return true};_.fj=function XTd(){return QTd(this)};_.Xj=function aUd(){Uxd(this)};var o6=mdb(qte,'EOperationImpl/2',1341);bcb(498,1,{1938:1,498:1},bUd);var q6=mdb(qte,'EPackageImpl/1',498);bcb(16,85,Pve,cUd);_.zk=function dUd(){return this.d};_.Ak=function eUd(){return this.b};_.Dk=function fUd(){return true};_.b=0;var b9=mdb(yve,'EObjectContainmentWithInverseEList',16);bcb(353,16,Pve,gUd);_.Ek=function hUd(){return true};_.li=function iUd(a,b){return ILd(this,a,BD(b,56))};var $8=mdb(yve,'EObjectContainmentWithInverseEList/Resolving',353);bcb(298,353,Pve,jUd);_.ci=function kUd(){this.a.tb=null};var r6=mdb(qte,'EPackageImpl/2',298);bcb(1228,1,{},lUd);var s6=mdb(qte,'EPackageImpl/3',1228);bcb(718,43,fke,oUd);_._b=function pUd(a){return ND(a)?Qhb(this,a):!!irb(this.f,a)};var u6=mdb(qte,'EPackageRegistryImpl',718);bcb(509,284,{105:1,92:1,90:1,147:1,191:1,56:1,2017:1,108:1,472:1,49:1,97:1,150:1,509:1,284:1,114:1,115:1},rUd);_.Qg=function sUd(a){return qUd(this,a)};_._g=function tUd(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),f=this.t,f>1||f==-1?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?BD(this.Cb,59):null;}return bid(this,a-aLd((jGd(),dGd)),XKd((d=BD(Ajd(this,16),26),!d?dGd:d),a),b,c)};_.hh=function uUd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?qUd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,10,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),dGd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),dGd)),a,c)};_.jh=function vUd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);case 10:return _hd(this,null,10,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),dGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),dGd)),a,c)};_.lh=function wUd(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return !!(this.Db>>16==10?BD(this.Cb,59):null);}return cid(this,a-aLd((jGd(),dGd)),XKd((b=BD(Ajd(this,16),26),!b?dGd:b),a))};_.zh=function xUd(){return jGd(),dGd};var v6=mdb(qte,'EParameterImpl',509);bcb(99,449,{105:1,92:1,90:1,147:1,191:1,56:1,18:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,99:1,449:1,284:1,114:1,115:1,677:1},FUd);_._g=function GUd(a,b,c){var d,e,f,g;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),g=this.t,g>1||g==-1?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return Bcb(),(this.Bb&zte)!=0?true:false;case 11:return Bcb(),(this.Bb&Dve)!=0?true:false;case 12:return Bcb(),(this.Bb&Rje)!=0?true:false;case 13:return this.j;case 14:return VId(this);case 15:return Bcb(),(this.Bb&Cve)!=0?true:false;case 16:return Bcb(),(this.Bb&oie)!=0?true:false;case 17:return WId(this);case 18:return Bcb(),(this.Bb&ote)!=0?true:false;case 19:return Bcb(),f=zUd(this),!!f&&(f.Bb&ote)!=0?true:false;case 20:return Bcb(),(this.Bb&Tje)!=0?true:false;case 21:if(b)return zUd(this);return this.b;case 22:if(b)return AUd(this);return yUd(this);case 23:return !this.a&&(this.a=new _4d(b5,this,23)),this.a;}return bid(this,a-aLd((jGd(),eGd)),XKd((d=BD(Ajd(this,16),26),!d?eGd:d),a),b,c)};_.lh=function HUd(a){var b,c,d,e;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return e=this.t,e>1||e==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return (this.Bb&zte)==0;case 11:return (this.Bb&Dve)!=0;case 12:return (this.Bb&Rje)!=0;case 13:return this.j!=null;case 14:return VId(this)!=null;case 15:return (this.Bb&Cve)!=0;case 16:return (this.Bb&oie)!=0;case 17:return !!WId(this);case 18:return (this.Bb&ote)!=0;case 19:return d=zUd(this),!!d&&(d.Bb&ote)!=0;case 20:return (this.Bb&Tje)==0;case 21:return !!this.b;case 22:return !!yUd(this);case 23:return !!this.a&&this.a.i!=0;}return cid(this,a-aLd((jGd(),eGd)),XKd((b=BD(Ajd(this,16),26),!b?eGd:b),a))};_.sh=function IUd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:cJd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:DId(this,BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 10:ZId(this,Ccb(DD(b)));return;case 11:fJd(this,Ccb(DD(b)));return;case 12:dJd(this,Ccb(DD(b)));return;case 13:$Id(this,GD(b));return;case 15:eJd(this,Ccb(DD(b)));return;case 16:aJd(this,Ccb(DD(b)));return;case 18:BUd(this,Ccb(DD(b)));return;case 20:EUd(this,Ccb(DD(b)));return;case 21:DUd(this,BD(b,18));return;case 23:!this.a&&(this.a=new _4d(b5,this,23));Uxd(this.a);!this.a&&(this.a=new _4d(b5,this,23));ytd(this.a,BD(b,14));return;}did(this,a-aLd((jGd(),eGd)),XKd((c=BD(Ajd(this,16),26),!c?eGd:c),a),b)};_.zh=function JUd(){return jGd(),eGd};_.Bh=function KUd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),4);pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:DId(this,1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 10:ZId(this,true);return;case 11:fJd(this,false);return;case 12:dJd(this,false);return;case 13:this.i=null;_Id(this,null);return;case 15:eJd(this,false);return;case 16:aJd(this,false);return;case 18:CUd(this,false);JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),2);return;case 20:EUd(this,true);return;case 21:DUd(this,null);return;case 23:!this.a&&(this.a=new _4d(b5,this,23));Uxd(this.a);return;}eid(this,a-aLd((jGd(),eGd)),XKd((b=BD(Ajd(this,16),26),!b?eGd:b),a))};_.Gh=function LUd(){AUd(this);a2d(q1d((O6d(),M6d),this));wId(this);this.Bb|=1};_.Lj=function MUd(){return zUd(this)};_.qk=function NUd(){var a;return a=zUd(this),!!a&&(a.Bb&ote)!=0};_.rk=function OUd(){return (this.Bb&ote)!=0};_.sk=function PUd(){return (this.Bb&Tje)!=0};_.nk=function QUd(a,b){this.c=null;return zId(this,a,b)};_.Ib=function RUd(){var a;if((this.Db&64)!=0)return gJd(this);a=new Jfb(gJd(this));a.a+=' (containment: ';Ffb(a,(this.Bb&ote)!=0);a.a+=', resolveProxies: ';Ffb(a,(this.Bb&Tje)!=0);a.a+=')';return a.a};var w6=mdb(qte,'EReferenceImpl',99);bcb(548,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,548:1,114:1,115:1},XUd);_.Fb=function bVd(a){return this===a};_.cd=function dVd(){return this.b};_.dd=function eVd(){return this.c};_.Hb=function fVd(){return FCb(this)};_.Uh=function hVd(a){SUd(this,GD(a))};_.ed=function iVd(a){return WUd(this,GD(a))};_._g=function YUd(a,b,c){var d;switch(a){case 0:return this.b;case 1:return this.c;}return bid(this,a-aLd((jGd(),fGd)),XKd((d=BD(Ajd(this,16),26),!d?fGd:d),a),b,c)};_.lh=function ZUd(a){var b;switch(a){case 0:return this.b!=null;case 1:return this.c!=null;}return cid(this,a-aLd((jGd(),fGd)),XKd((b=BD(Ajd(this,16),26),!b?fGd:b),a))};_.sh=function $Ud(a,b){var c;switch(a){case 0:TUd(this,GD(b));return;case 1:VUd(this,GD(b));return;}did(this,a-aLd((jGd(),fGd)),XKd((c=BD(Ajd(this,16),26),!c?fGd:c),a),b)};_.zh=function _Ud(){return jGd(),fGd};_.Bh=function aVd(a){var b;switch(a){case 0:UUd(this,null);return;case 1:VUd(this,null);return;}eid(this,a-aLd((jGd(),fGd)),XKd((b=BD(Ajd(this,16),26),!b?fGd:b),a))};_.Sh=function cVd(){var a;if(this.a==-1){a=this.b;this.a=a==null?0:LCb(a)}return this.a};_.Th=function gVd(a){this.a=a};_.Ib=function jVd(){var a;if((this.Db&64)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (key: ';Efb(a,this.b);a.a+=', value: ';Efb(a,this.c);a.a+=')';return a.a};_.a=-1;_.b=null;_.c=null;var x6=mdb(qte,'EStringToStringMapEntryImpl',548);var D9=odb(yve,'FeatureMap/Entry/Internal');bcb(565,1,Xve);_.Ok=function mVd(a){return this.Pk(BD(a,49))};_.Pk=function nVd(a){return this.Ok(a)};_.Fb=function oVd(a){var b,c;if(this===a){return true}else if(JD(a,72)){b=BD(a,72);if(b.ak()==this.c){c=this.dd();return c==null?b.dd()==null:pb(c,b.dd())}else{return false}}else{return false}};_.ak=function pVd(){return this.c};_.Hb=function qVd(){var a;a=this.dd();return tb(this.c)^(a==null?0:tb(a))};_.Ib=function rVd(){var a,b;a=this.c;b=bKd(a.Hj()).Ph();a.ne();return (b!=null&&b.length!=0?b+':'+a.ne():a.ne())+'='+this.dd()};var y6=mdb(qte,'EStructuralFeatureImpl/BasicFeatureMapEntry',565);bcb(776,565,Xve,uVd);_.Pk=function vVd(a){return new uVd(this.c,a)};_.dd=function wVd(){return this.a};_.Qk=function xVd(a,b,c){return sVd(this,a,this.a,b,c)};_.Rk=function yVd(a,b,c){return tVd(this,a,this.a,b,c)};var z6=mdb(qte,'EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry',776);bcb(1314,1,{},zVd);_.Pj=function AVd(a,b,c,d,e){var f;f=BD(gid(a,this.b),215);return f.nl(this.a).Wj(d)};_.Qj=function BVd(a,b,c,d,e){var f;f=BD(gid(a,this.b),215);return f.el(this.a,d,e)};_.Rj=function CVd(a,b,c,d,e){var f;f=BD(gid(a,this.b),215);return f.fl(this.a,d,e)};_.Sj=function DVd(a,b,c){var d;d=BD(gid(a,this.b),215);return d.nl(this.a).fj()};_.Tj=function EVd(a,b,c,d){var e;e=BD(gid(a,this.b),215);e.nl(this.a).Wb(d)};_.Uj=function FVd(a,b,c){return BD(gid(a,this.b),215).nl(this.a)};_.Vj=function GVd(a,b,c){var d;d=BD(gid(a,this.b),215);d.nl(this.a).Xj()};var A6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator',1314);bcb(89,1,{},IVd,JVd,KVd,LVd);_.Pj=function MVd(a,b,c,d,e){var f;f=b.Ch(c);f==null&&b.Dh(c,f=HVd(this,a));if(!e){switch(this.e){case 50:case 41:return BD(f,589).sj();case 40:return BD(f,215).kl();}}return f};_.Qj=function NVd(a,b,c,d,e){var f,g;g=b.Ch(c);g==null&&b.Dh(c,g=HVd(this,a));f=BD(g,69).lk(d,e);return f};_.Rj=function OVd(a,b,c,d,e){var f;f=b.Ch(c);f!=null&&(e=BD(f,69).mk(d,e));return e};_.Sj=function PVd(a,b,c){var d;d=b.Ch(c);return d!=null&&BD(d,76).fj()};_.Tj=function QVd(a,b,c,d){var e;e=BD(b.Ch(c),76);!e&&b.Dh(c,e=HVd(this,a));e.Wb(d)};_.Uj=function RVd(a,b,c){var d,e;e=b.Ch(c);e==null&&b.Dh(c,e=HVd(this,a));if(JD(e,76)){return BD(e,76)}else{d=BD(b.Ch(c),15);return new iYd(d)}};_.Vj=function SVd(a,b,c){var d;d=BD(b.Ch(c),76);!d&&b.Dh(c,d=HVd(this,a));d.Xj()};_.b=0;_.e=0;var B6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateMany',89);bcb(504,1,{});_.Qj=function WVd(a,b,c,d,e){throw vbb(new bgb)};_.Rj=function XVd(a,b,c,d,e){throw vbb(new bgb)};_.Uj=function YVd(a,b,c){return new ZVd(this,a,b,c)};var TVd;var i7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingle',504);bcb(1331,1,zve,ZVd);_.Wj=function $Vd(a){return this.a.Pj(this.c,this.d,this.b,a,true)};_.fj=function _Vd(){return this.a.Sj(this.c,this.d,this.b)};_.Wb=function aWd(a){this.a.Tj(this.c,this.d,this.b,a)};_.Xj=function bWd(){this.a.Vj(this.c,this.d,this.b)};_.b=0;var C6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingle/1',1331);bcb(769,504,{},cWd);_.Pj=function dWd(a,b,c,d,e){return Nid(a,a.eh(),a.Vg())==this.b?this.sk()&&d?aid(a):a.eh():null};_.Qj=function eWd(a,b,c,d,e){var f,g;!!a.eh()&&(e=(f=a.Vg(),f>=0?a.Qg(e):a.eh().ih(a,-1-f,null,e)));g=bLd(a.Tg(),this.e);return a.Sg(d,g,e)};_.Rj=function fWd(a,b,c,d,e){var f;f=bLd(a.Tg(),this.e);return a.Sg(null,f,e)};_.Sj=function gWd(a,b,c){var d;d=bLd(a.Tg(),this.e);return !!a.eh()&&a.Vg()==d};_.Tj=function hWd(a,b,c,d){var e,f,g,h,i;if(d!=null&&!fKd(this.a,d)){throw vbb(new Cdb(Yve+(JD(d,56)?gLd(BD(d,56).Tg()):idb(rb(d)))+Zve+this.a+"'"))}e=a.eh();g=bLd(a.Tg(),this.e);if(PD(d)!==PD(e)||a.Vg()!=g&&d!=null){if(p6d(a,BD(d,56)))throw vbb(new Wdb(ste+a.Ib()));i=null;!!e&&(i=(f=a.Vg(),f>=0?a.Qg(i):a.eh().ih(a,-1-f,null,i)));h=BD(d,49);!!h&&(i=h.gh(a,bLd(h.Tg(),this.b),null,i));i=a.Sg(h,g,i);!!i&&i.Fi()}else{a.Lg()&&a.Mg()&&Uhd(a,new nSd(a,1,g,d,d))}};_.Vj=function iWd(a,b,c){var d,e,f,g;d=a.eh();if(d){g=(e=a.Vg(),e>=0?a.Qg(null):a.eh().ih(a,-1-e,null,null));f=bLd(a.Tg(),this.e);g=a.Sg(null,f,g);!!g&&g.Fi()}else{a.Lg()&&a.Mg()&&Uhd(a,new DSd(a,1,this.e,null,null))}};_.sk=function jWd(){return false};var E6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainer',769);bcb(1315,769,{},kWd);_.sk=function lWd(){return true};var D6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving',1315);bcb(563,504,{});_.Pj=function oWd(a,b,c,d,e){var f;return f=b.Ch(c),f==null?this.b:PD(f)===PD(TVd)?null:f};_.Sj=function pWd(a,b,c){var d;d=b.Ch(c);return d!=null&&(PD(d)===PD(TVd)||!pb(d,this.b))};_.Tj=function qWd(a,b,c,d){var e,f;if(a.Lg()&&a.Mg()){e=(f=b.Ch(c),f==null?this.b:PD(f)===PD(TVd)?null:f);if(d==null){if(this.c!=null){b.Dh(c,null);d=this.b}else this.b!=null?b.Dh(c,TVd):b.Dh(c,null)}else{this.Sk(d);b.Dh(c,d)}Uhd(a,this.d.Tk(a,1,this.e,e,d))}else{if(d==null){this.c!=null?b.Dh(c,null):this.b!=null?b.Dh(c,TVd):b.Dh(c,null)}else{this.Sk(d);b.Dh(c,d)}}};_.Vj=function rWd(a,b,c){var d,e;if(a.Lg()&&a.Mg()){d=(e=b.Ch(c),e==null?this.b:PD(e)===PD(TVd)?null:e);b.Eh(c);Uhd(a,this.d.Tk(a,1,this.e,d,this.b))}else{b.Eh(c)}};_.Sk=function sWd(a){throw vbb(new Bdb)};var T6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData',563);bcb($ve,1,{},DWd);_.Tk=function EWd(a,b,c,d,e){return new DSd(a,b,c,d,e)};_.Uk=function FWd(a,b,c,d,e,f){return new FSd(a,b,c,d,e,f)};var tWd,uWd,vWd,wWd,xWd,yWd,zWd,AWd,BWd;var N6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator',$ve);bcb(1332,$ve,{},GWd);_.Tk=function HWd(a,b,c,d,e){return new ISd(a,b,c,Ccb(DD(d)),Ccb(DD(e)))};_.Uk=function IWd(a,b,c,d,e,f){return new JSd(a,b,c,Ccb(DD(d)),Ccb(DD(e)),f)};var F6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1',1332);bcb(1333,$ve,{},JWd);_.Tk=function KWd(a,b,c,d,e){return new rSd(a,b,c,BD(d,217).a,BD(e,217).a)};_.Uk=function LWd(a,b,c,d,e,f){return new sSd(a,b,c,BD(d,217).a,BD(e,217).a,f)};var G6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2',1333);bcb(1334,$ve,{},MWd);_.Tk=function NWd(a,b,c,d,e){return new tSd(a,b,c,BD(d,172).a,BD(e,172).a)};_.Uk=function OWd(a,b,c,d,e,f){return new uSd(a,b,c,BD(d,172).a,BD(e,172).a,f)};var H6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3',1334);bcb(1335,$ve,{},PWd);_.Tk=function QWd(a,b,c,d,e){return new vSd(a,b,c,Edb(ED(d)),Edb(ED(e)))};_.Uk=function RWd(a,b,c,d,e,f){return new wSd(a,b,c,Edb(ED(d)),Edb(ED(e)),f)};var I6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4',1335);bcb(1336,$ve,{},SWd);_.Tk=function TWd(a,b,c,d,e){return new xSd(a,b,c,BD(d,155).a,BD(e,155).a)};_.Uk=function UWd(a,b,c,d,e,f){return new ySd(a,b,c,BD(d,155).a,BD(e,155).a,f)};var J6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5',1336);bcb(1337,$ve,{},VWd);_.Tk=function WWd(a,b,c,d,e){return new zSd(a,b,c,BD(d,19).a,BD(e,19).a)};_.Uk=function XWd(a,b,c,d,e,f){return new ASd(a,b,c,BD(d,19).a,BD(e,19).a,f)};var K6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6',1337);bcb(1338,$ve,{},YWd);_.Tk=function ZWd(a,b,c,d,e){return new BSd(a,b,c,BD(d,162).a,BD(e,162).a)};_.Uk=function $Wd(a,b,c,d,e,f){return new CSd(a,b,c,BD(d,162).a,BD(e,162).a,f)};var L6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7',1338);bcb(1339,$ve,{},_Wd);_.Tk=function aXd(a,b,c,d,e){return new GSd(a,b,c,BD(d,184).a,BD(e,184).a)};_.Uk=function bXd(a,b,c,d,e,f){return new HSd(a,b,c,BD(d,184).a,BD(e,184).a,f)};var M6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8',1339);bcb(1317,563,{},cXd);_.Sk=function dXd(a){if(!this.a.wj(a)){throw vbb(new Cdb(Yve+rb(a)+Zve+this.a+"'"))}};var O6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic',1317);bcb(1318,563,{},eXd);_.Sk=function fXd(a){};var P6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic',1318);bcb(770,563,{});_.Sj=function gXd(a,b,c){var d;d=b.Ch(c);return d!=null};_.Tj=function hXd(a,b,c,d){var e,f;if(a.Lg()&&a.Mg()){e=true;f=b.Ch(c);if(f==null){e=false;f=this.b}else PD(f)===PD(TVd)&&(f=null);if(d==null){if(this.c!=null){b.Dh(c,null);d=this.b}else{b.Dh(c,TVd)}}else{this.Sk(d);b.Dh(c,d)}Uhd(a,this.d.Uk(a,1,this.e,f,d,!e))}else{if(d==null){this.c!=null?b.Dh(c,null):b.Dh(c,TVd)}else{this.Sk(d);b.Dh(c,d)}}};_.Vj=function iXd(a,b,c){var d,e;if(a.Lg()&&a.Mg()){d=true;e=b.Ch(c);if(e==null){d=false;e=this.b}else PD(e)===PD(TVd)&&(e=null);b.Eh(c);Uhd(a,this.d.Uk(a,2,this.e,e,this.b,d))}else{b.Eh(c)}};var S6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable',770);bcb(1319,770,{},jXd);_.Sk=function kXd(a){if(!this.a.wj(a)){throw vbb(new Cdb(Yve+rb(a)+Zve+this.a+"'"))}};var Q6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic',1319);bcb(1320,770,{},lXd);_.Sk=function mXd(a){};var R6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic',1320);bcb(398,504,{},nXd);_.Pj=function pXd(a,b,c,d,e){var f,g,h,i,j;j=b.Ch(c);if(this.Kj()&&PD(j)===PD(TVd)){return null}else if(this.sk()&&d&&j!=null){h=BD(j,49);if(h.kh()){i=xid(a,h);if(h!=i){if(!fKd(this.a,i)){throw vbb(new Cdb(Yve+rb(i)+Zve+this.a+"'"))}b.Dh(c,j=i);if(this.rk()){f=BD(i,49);g=h.ih(a,!this.b?-1-bLd(a.Tg(),this.e):bLd(h.Tg(),this.b),null,null);!f.eh()&&(g=f.gh(a,!this.b?-1-bLd(a.Tg(),this.e):bLd(f.Tg(),this.b),null,g));!!g&&g.Fi()}a.Lg()&&a.Mg()&&Uhd(a,new DSd(a,9,this.e,h,i))}}return j}else{return j}};_.Qj=function qXd(a,b,c,d,e){var f,g;g=b.Ch(c);PD(g)===PD(TVd)&&(g=null);b.Dh(c,d);if(this.bj()){if(PD(g)!==PD(d)&&g!=null){f=BD(g,49);e=f.ih(a,bLd(f.Tg(),this.b),null,e)}}else this.rk()&&g!=null&&(e=BD(g,49).ih(a,-1-bLd(a.Tg(),this.e),null,e));if(a.Lg()&&a.Mg()){!e&&(e=new Ixd(4));e.Ei(new DSd(a,1,this.e,g,d))}return e};_.Rj=function rXd(a,b,c,d,e){var f;f=b.Ch(c);PD(f)===PD(TVd)&&(f=null);b.Eh(c);if(a.Lg()&&a.Mg()){!e&&(e=new Ixd(4));this.Kj()?e.Ei(new DSd(a,2,this.e,f,null)):e.Ei(new DSd(a,1,this.e,f,null))}return e};_.Sj=function sXd(a,b,c){var d;d=b.Ch(c);return d!=null};_.Tj=function tXd(a,b,c,d){var e,f,g,h,i;if(d!=null&&!fKd(this.a,d)){throw vbb(new Cdb(Yve+(JD(d,56)?gLd(BD(d,56).Tg()):idb(rb(d)))+Zve+this.a+"'"))}i=b.Ch(c);h=i!=null;this.Kj()&&PD(i)===PD(TVd)&&(i=null);g=null;if(this.bj()){if(PD(i)!==PD(d)){if(i!=null){e=BD(i,49);g=e.ih(a,bLd(e.Tg(),this.b),null,g)}if(d!=null){e=BD(d,49);g=e.gh(a,bLd(e.Tg(),this.b),null,g)}}}else if(this.rk()){if(PD(i)!==PD(d)){i!=null&&(g=BD(i,49).ih(a,-1-bLd(a.Tg(),this.e),null,g));d!=null&&(g=BD(d,49).gh(a,-1-bLd(a.Tg(),this.e),null,g))}}d==null&&this.Kj()?b.Dh(c,TVd):b.Dh(c,d);if(a.Lg()&&a.Mg()){f=new FSd(a,1,this.e,i,d,this.Kj()&&!h);if(!g){Uhd(a,f)}else{g.Ei(f);g.Fi()}}else !!g&&g.Fi()};_.Vj=function uXd(a,b,c){var d,e,f,g,h;h=b.Ch(c);g=h!=null;this.Kj()&&PD(h)===PD(TVd)&&(h=null);f=null;if(h!=null){if(this.bj()){d=BD(h,49);f=d.ih(a,bLd(d.Tg(),this.b),null,f)}else this.rk()&&(f=BD(h,49).ih(a,-1-bLd(a.Tg(),this.e),null,f))}b.Eh(c);if(a.Lg()&&a.Mg()){e=new FSd(a,this.Kj()?2:1,this.e,h,null,g);if(!f){Uhd(a,e)}else{f.Ei(e);f.Fi()}}else !!f&&f.Fi()};_.bj=function vXd(){return false};_.rk=function wXd(){return false};_.sk=function xXd(){return false};_.Kj=function yXd(){return false};var h7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObject',398);bcb(564,398,{},zXd);_.rk=function AXd(){return true};var _6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment',564);bcb(1323,564,{},BXd);_.sk=function CXd(){return true};var U6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving',1323);bcb(772,564,{},DXd);_.Kj=function EXd(){return true};var W6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable',772);bcb(1325,772,{},FXd);_.sk=function GXd(){return true};var V6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving',1325);bcb(640,564,{},HXd);_.bj=function IXd(){return true};var $6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse',640);bcb(1324,640,{},JXd);_.sk=function KXd(){return true};var X6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving',1324);bcb(773,640,{},LXd);_.Kj=function MXd(){return true};var Z6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable',773);bcb(1326,773,{},NXd);_.sk=function OXd(){return true};var Y6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving',1326);bcb(641,398,{},PXd);_.sk=function QXd(){return true};var d7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving',641);bcb(1327,641,{},RXd);_.Kj=function SXd(){return true};var a7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable',1327);bcb(774,641,{},TXd);_.bj=function UXd(){return true};var c7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse',774);bcb(1328,774,{},VXd);_.Kj=function WXd(){return true};var b7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable',1328);bcb(1321,398,{},XXd);_.Kj=function YXd(){return true};var e7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable',1321);bcb(771,398,{},ZXd);_.bj=function $Xd(){return true};var g7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse',771);bcb(1322,771,{},_Xd);_.Kj=function aYd(){return true};var f7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable',1322);bcb(775,565,Xve,dYd);_.Pk=function eYd(a){return new dYd(this.a,this.c,a)};_.dd=function fYd(){return this.b};_.Qk=function gYd(a,b,c){return bYd(this,a,this.b,c)};_.Rk=function hYd(a,b,c){return cYd(this,a,this.b,c)};var j7=mdb(qte,'EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry',775);bcb(1329,1,zve,iYd);_.Wj=function jYd(a){return this.a};_.fj=function kYd(){return JD(this.a,95)?BD(this.a,95).fj():!this.a.dc()};_.Wb=function lYd(a){this.a.$b();this.a.Gc(BD(a,15))};_.Xj=function mYd(){JD(this.a,95)?BD(this.a,95).Xj():this.a.$b()};var k7=mdb(qte,'EStructuralFeatureImpl/SettingMany',1329);bcb(1330,565,Xve,nYd);_.Ok=function oYd(a){return new sYd((Q8d(),P8d),this.b.Ih(this.a,a))};_.dd=function pYd(){return null};_.Qk=function qYd(a,b,c){return c};_.Rk=function rYd(a,b,c){return c};var l7=mdb(qte,'EStructuralFeatureImpl/SimpleContentFeatureMapEntry',1330);bcb(642,565,Xve,sYd);_.Ok=function tYd(a){return new sYd(this.c,a)};_.dd=function uYd(){return this.a};_.Qk=function vYd(a,b,c){return c};_.Rk=function wYd(a,b,c){return c};var m7=mdb(qte,'EStructuralFeatureImpl/SimpleFeatureMapEntry',642);bcb(391,497,oue,xYd);_.ri=function yYd(a){return KC(c5,Uhe,26,a,0,1)};_.ni=function zYd(){return false};var o7=mdb(qte,'ESuperAdapter/1',391);bcb(444,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,836:1,49:1,97:1,150:1,444:1,114:1,115:1},BYd);_._g=function CYd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return !this.a&&(this.a=new KYd(this,j5,this)),this.a;}return bid(this,a-aLd((jGd(),iGd)),XKd((d=BD(Ajd(this,16),26),!d?iGd:d),a),b,c)};_.jh=function DYd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 2:return !this.a&&(this.a=new KYd(this,j5,this)),Txd(this.a,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),iGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),iGd)),a,c)};_.lh=function EYd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return !!this.a&&this.a.i!=0;}return cid(this,a-aLd((jGd(),iGd)),XKd((b=BD(Ajd(this,16),26),!b?iGd:b),a))};_.sh=function FYd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:!this.a&&(this.a=new KYd(this,j5,this));Uxd(this.a);!this.a&&(this.a=new KYd(this,j5,this));ytd(this.a,BD(b,14));return;}did(this,a-aLd((jGd(),iGd)),XKd((c=BD(Ajd(this,16),26),!c?iGd:c),a),b)};_.zh=function GYd(){return jGd(),iGd};_.Bh=function HYd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:!this.a&&(this.a=new KYd(this,j5,this));Uxd(this.a);return;}eid(this,a-aLd((jGd(),iGd)),XKd((b=BD(Ajd(this,16),26),!b?iGd:b),a))};var u7=mdb(qte,'ETypeParameterImpl',444);bcb(445,85,Pve,KYd);_.cj=function LYd(a,b){return IYd(this,BD(a,87),b)};_.dj=function MYd(a,b){return JYd(this,BD(a,87),b)};var q7=mdb(qte,'ETypeParameterImpl/1',445);bcb(634,43,fke,NYd);_.ec=function OYd(){return new RYd(this)};var t7=mdb(qte,'ETypeParameterImpl/2',634);bcb(556,eie,fie,RYd);_.Fc=function SYd(a){return PYd(this,BD(a,87))};_.Gc=function TYd(a){var b,c,d;d=false;for(c=a.Kc();c.Ob();){b=BD(c.Pb(),87);Rhb(this.a,b,'')==null&&(d=true)}return d};_.$b=function UYd(){Uhb(this.a)};_.Hc=function VYd(a){return Mhb(this.a,a)};_.Kc=function WYd(){var a;return a=new nib((new eib(this.a)).a),new ZYd(a)};_.Mc=function XYd(a){return QYd(this,a)};_.gc=function YYd(){return Vhb(this.a)};var s7=mdb(qte,'ETypeParameterImpl/2/1',556);bcb(557,1,aie,ZYd);_.Nb=function $Yd(a){Rrb(this,a)};_.Pb=function aZd(){return BD(lib(this.a).cd(),87)};_.Ob=function _Yd(){return this.a.b};_.Qb=function bZd(){mib(this.a)};var r7=mdb(qte,'ETypeParameterImpl/2/1/1',557);bcb(1276,43,fke,cZd);_._b=function dZd(a){return ND(a)?Qhb(this,a):!!irb(this.f,a)};_.xc=function eZd(a){var b,c;b=ND(a)?Phb(this,a):Wd(irb(this.f,a));if(JD(b,837)){c=BD(b,837);b=c._j();Rhb(this,BD(a,235),b);return b}else return b!=null?b:a==null?(g5d(),f5d):null};var w7=mdb(qte,'EValidatorRegistryImpl',1276);bcb(1313,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,1941:1,49:1,97:1,150:1,114:1,115:1},mZd);_.Ih=function nZd(a,b){switch(a.yj()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return b==null?null:fcb(b);case 25:return gZd(b);case 27:return hZd(b);case 28:return iZd(b);case 29:return b==null?null:CQd(Pmd[0],BD(b,199));case 41:return b==null?'':hdb(BD(b,290));case 42:return fcb(b);case 50:return GD(b);default:throw vbb(new Wdb(tte+a.ne()+ute));}};_.Jh=function oZd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;switch(a.G==-1&&(a.G=(m=bKd(a),m?HLd(m.Mh(),a):-1)),a.G){case 0:return c=new OJd,c;case 1:return b=new RHd,b;case 2:return d=new hLd,d;case 4:return e=new MPd,e;case 5:return f=new aQd,f;case 6:return g=new rQd,g;case 7:return h=new $md,h;case 10:return j=new MGd,j;case 11:return k=new SSd,k;case 12:return l=new eod,l;case 13:return n=new rUd,n;case 14:return o=new FUd,o;case 17:return p=new XUd,p;case 18:return i=new UQd,i;case 19:return q=new BYd,q;default:throw vbb(new Wdb(xte+a.zb+ute));}};_.Kh=function pZd(a,b){switch(a.yj()){case 20:return b==null?null:new tgb(b);case 21:return b==null?null:new Ygb(b);case 23:case 22:return b==null?null:fZd(b);case 26:case 24:return b==null?null:Scb(Icb(b,-128,127)<<24>>24);case 25:return Xmd(b);case 27:return jZd(b);case 28:return kZd(b);case 29:return lZd(b);case 32:case 31:return b==null?null:Hcb(b);case 38:case 37:return b==null?null:new Odb(b);case 40:case 39:return b==null?null:meb(Icb(b,Rie,Ohe));case 41:return null;case 42:return b==null?null:null;case 44:case 43:return b==null?null:Aeb(Jcb(b));case 49:case 48:return b==null?null:Web(Icb(b,awe,32767)<<16>>16);case 50:return b;default:throw vbb(new Wdb(tte+a.ne()+ute));}};var x7=mdb(qte,'EcoreFactoryImpl',1313);bcb(547,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,1939:1,49:1,97:1,150:1,179:1,547:1,114:1,115:1,675:1},AZd);_.gb=false;_.hb=false;var rZd,sZd=false;var o8=mdb(qte,'EcorePackageImpl',547);bcb(1184,1,{837:1},EZd);_._j=function FZd(){return I6d(),H6d};var I7=mdb(qte,'EcorePackageImpl/1',1184);bcb(1193,1,nwe,GZd);_.wj=function HZd(a){return JD(a,147)};_.xj=function IZd(a){return KC(k5,Uhe,147,a,0,1)};var y7=mdb(qte,'EcorePackageImpl/10',1193);bcb(1194,1,nwe,JZd);_.wj=function KZd(a){return JD(a,191)};_.xj=function LZd(a){return KC(l5,Uhe,191,a,0,1)};var z7=mdb(qte,'EcorePackageImpl/11',1194);bcb(1195,1,nwe,MZd);_.wj=function NZd(a){return JD(a,56)};_.xj=function OZd(a){return KC(m5,Uhe,56,a,0,1)};var A7=mdb(qte,'EcorePackageImpl/12',1195);bcb(1196,1,nwe,PZd);_.wj=function QZd(a){return JD(a,399)};_.xj=function RZd(a){return KC(n5,Nve,59,a,0,1)};var B7=mdb(qte,'EcorePackageImpl/13',1196);bcb(1197,1,nwe,SZd);_.wj=function TZd(a){return JD(a,235)};_.xj=function UZd(a){return KC(o5,Uhe,235,a,0,1)};var C7=mdb(qte,'EcorePackageImpl/14',1197);bcb(1198,1,nwe,VZd);_.wj=function WZd(a){return JD(a,509)};_.xj=function XZd(a){return KC(p5,Uhe,2017,a,0,1)};var D7=mdb(qte,'EcorePackageImpl/15',1198);bcb(1199,1,nwe,YZd);_.wj=function ZZd(a){return JD(a,99)};_.xj=function $Zd(a){return KC(q5,Mve,18,a,0,1)};var E7=mdb(qte,'EcorePackageImpl/16',1199);bcb(1200,1,nwe,_Zd);_.wj=function a$d(a){return JD(a,170)};_.xj=function b$d(a){return KC(t5,Mve,170,a,0,1)};var F7=mdb(qte,'EcorePackageImpl/17',1200);bcb(1201,1,nwe,c$d);_.wj=function d$d(a){return JD(a,472)};_.xj=function e$d(a){return KC(v5,Uhe,472,a,0,1)};var G7=mdb(qte,'EcorePackageImpl/18',1201);bcb(1202,1,nwe,f$d);_.wj=function g$d(a){return JD(a,548)};_.xj=function h$d(a){return KC(x6,kve,548,a,0,1)};var H7=mdb(qte,'EcorePackageImpl/19',1202);bcb(1185,1,nwe,i$d);_.wj=function j$d(a){return JD(a,322)};_.xj=function k$d(a){return KC(b5,Mve,34,a,0,1)};var T7=mdb(qte,'EcorePackageImpl/2',1185);bcb(1203,1,nwe,l$d);_.wj=function m$d(a){return JD(a,241)};_.xj=function n$d(a){return KC(j5,Tve,87,a,0,1)};var J7=mdb(qte,'EcorePackageImpl/20',1203);bcb(1204,1,nwe,o$d);_.wj=function p$d(a){return JD(a,444)};_.xj=function q$d(a){return KC(u5,Uhe,836,a,0,1)};var K7=mdb(qte,'EcorePackageImpl/21',1204);bcb(1205,1,nwe,r$d);_.wj=function s$d(a){return KD(a)};_.xj=function t$d(a){return KC(wI,nie,476,a,8,1)};var L7=mdb(qte,'EcorePackageImpl/22',1205);bcb(1206,1,nwe,u$d);_.wj=function v$d(a){return JD(a,190)};_.xj=function w$d(a){return KC(SD,nie,190,a,0,2)};var M7=mdb(qte,'EcorePackageImpl/23',1206);bcb(1207,1,nwe,x$d);_.wj=function y$d(a){return JD(a,217)};_.xj=function z$d(a){return KC(xI,nie,217,a,0,1)};var N7=mdb(qte,'EcorePackageImpl/24',1207);bcb(1208,1,nwe,A$d);_.wj=function B$d(a){return JD(a,172)};_.xj=function C$d(a){return KC(yI,nie,172,a,0,1)};var O7=mdb(qte,'EcorePackageImpl/25',1208);bcb(1209,1,nwe,D$d);_.wj=function E$d(a){return JD(a,199)};_.xj=function F$d(a){return KC($J,nie,199,a,0,1)};var P7=mdb(qte,'EcorePackageImpl/26',1209);bcb(1210,1,nwe,G$d);_.wj=function H$d(a){return false};_.xj=function I$d(a){return KC(O4,Uhe,2110,a,0,1)};var Q7=mdb(qte,'EcorePackageImpl/27',1210);bcb(1211,1,nwe,J$d);_.wj=function K$d(a){return LD(a)};_.xj=function L$d(a){return KC(BI,nie,333,a,7,1)};var R7=mdb(qte,'EcorePackageImpl/28',1211);bcb(1212,1,nwe,M$d);_.wj=function N$d(a){return JD(a,58)};_.xj=function O$d(a){return KC(T4,eme,58,a,0,1)};var S7=mdb(qte,'EcorePackageImpl/29',1212);bcb(1186,1,nwe,P$d);_.wj=function Q$d(a){return JD(a,510)};_.xj=function R$d(a){return KC(a5,{3:1,4:1,5:1,1934:1},590,a,0,1)};var c8=mdb(qte,'EcorePackageImpl/3',1186);bcb(1213,1,nwe,S$d);_.wj=function T$d(a){return JD(a,573)};_.xj=function U$d(a){return KC(U4,Uhe,1940,a,0,1)};var U7=mdb(qte,'EcorePackageImpl/30',1213);bcb(1214,1,nwe,V$d);_.wj=function W$d(a){return JD(a,153)};_.xj=function X$d(a){return KC(O9,eme,153,a,0,1)};var V7=mdb(qte,'EcorePackageImpl/31',1214);bcb(1215,1,nwe,Y$d);_.wj=function Z$d(a){return JD(a,72)};_.xj=function $$d(a){return KC(E9,owe,72,a,0,1)};var W7=mdb(qte,'EcorePackageImpl/32',1215);bcb(1216,1,nwe,_$d);_.wj=function a_d(a){return JD(a,155)};_.xj=function b_d(a){return KC(FI,nie,155,a,0,1)};var X7=mdb(qte,'EcorePackageImpl/33',1216);bcb(1217,1,nwe,c_d);_.wj=function d_d(a){return JD(a,19)};_.xj=function e_d(a){return KC(JI,nie,19,a,0,1)};var Y7=mdb(qte,'EcorePackageImpl/34',1217);bcb(1218,1,nwe,f_d);_.wj=function g_d(a){return JD(a,290)};_.xj=function h_d(a){return KC(AI,Uhe,290,a,0,1)};var Z7=mdb(qte,'EcorePackageImpl/35',1218);bcb(1219,1,nwe,i_d);_.wj=function j_d(a){return JD(a,162)};_.xj=function k_d(a){return KC(MI,nie,162,a,0,1)};var $7=mdb(qte,'EcorePackageImpl/36',1219);bcb(1220,1,nwe,l_d);_.wj=function m_d(a){return JD(a,83)};_.xj=function n_d(a){return KC(DK,Uhe,83,a,0,1)};var _7=mdb(qte,'EcorePackageImpl/37',1220);bcb(1221,1,nwe,o_d);_.wj=function p_d(a){return JD(a,591)};_.xj=function q_d(a){return KC(v8,Uhe,591,a,0,1)};var a8=mdb(qte,'EcorePackageImpl/38',1221);bcb(1222,1,nwe,r_d);_.wj=function s_d(a){return false};_.xj=function t_d(a){return KC(u8,Uhe,2111,a,0,1)};var b8=mdb(qte,'EcorePackageImpl/39',1222);bcb(1187,1,nwe,u_d);_.wj=function v_d(a){return JD(a,88)};_.xj=function w_d(a){return KC(c5,Uhe,26,a,0,1)};var i8=mdb(qte,'EcorePackageImpl/4',1187);bcb(1223,1,nwe,x_d);_.wj=function y_d(a){return JD(a,184)};_.xj=function z_d(a){return KC(UI,nie,184,a,0,1)};var d8=mdb(qte,'EcorePackageImpl/40',1223);bcb(1224,1,nwe,A_d);_.wj=function B_d(a){return ND(a)};_.xj=function C_d(a){return KC(ZI,nie,2,a,6,1)};var e8=mdb(qte,'EcorePackageImpl/41',1224);bcb(1225,1,nwe,D_d);_.wj=function E_d(a){return JD(a,588)};_.xj=function F_d(a){return KC(X4,Uhe,588,a,0,1)};var f8=mdb(qte,'EcorePackageImpl/42',1225);bcb(1226,1,nwe,G_d);_.wj=function H_d(a){return false};_.xj=function I_d(a){return KC(V4,nie,2112,a,0,1)};var g8=mdb(qte,'EcorePackageImpl/43',1226);bcb(1227,1,nwe,J_d);_.wj=function K_d(a){return JD(a,42)};_.xj=function L_d(a){return KC(CK,zie,42,a,0,1)};var h8=mdb(qte,'EcorePackageImpl/44',1227);bcb(1188,1,nwe,M_d);_.wj=function N_d(a){return JD(a,138)};_.xj=function O_d(a){return KC(d5,Uhe,138,a,0,1)};var j8=mdb(qte,'EcorePackageImpl/5',1188);bcb(1189,1,nwe,P_d);_.wj=function Q_d(a){return JD(a,148)};_.xj=function R_d(a){return KC(f5,Uhe,148,a,0,1)};var k8=mdb(qte,'EcorePackageImpl/6',1189);bcb(1190,1,nwe,S_d);_.wj=function T_d(a){return JD(a,457)};_.xj=function U_d(a){return KC(h5,Uhe,671,a,0,1)};var l8=mdb(qte,'EcorePackageImpl/7',1190);bcb(1191,1,nwe,V_d);_.wj=function W_d(a){return JD(a,573)};_.xj=function X_d(a){return KC(g5,Uhe,678,a,0,1)};var m8=mdb(qte,'EcorePackageImpl/8',1191);bcb(1192,1,nwe,Y_d);_.wj=function Z_d(a){return JD(a,471)};_.xj=function $_d(a){return KC(i5,Uhe,471,a,0,1)};var n8=mdb(qte,'EcorePackageImpl/9',1192);bcb(1025,1982,ive,c0d);_.bi=function d0d(a,b){__d(this,BD(b,415))};_.fi=function e0d(a,b){a0d(this,a,BD(b,415))};var q8=mdb(qte,'MinimalEObjectImpl/1ArrayDelegatingAdapterList',1025);bcb(1026,143,fve,f0d);_.Ai=function g0d(){return this.a.a};var p8=mdb(qte,'MinimalEObjectImpl/1ArrayDelegatingAdapterList/1',1026);bcb(1053,1052,{},i0d);var t8=mdb('org.eclipse.emf.ecore.plugin','EcorePlugin',1053);var v8=odb(pwe,'Resource');bcb(781,1378,qwe);_.Yk=function m0d(a){};_.Zk=function n0d(a){};_.Vk=function o0d(){return !this.a&&(this.a=new z0d(this)),this.a};_.Wk=function p0d(a){var b,c,d,e,f;d=a.length;if(d>0){BCb(0,a.length);if(a.charCodeAt(0)==47){f=new Skb(4);e=1;for(b=1;b0&&(a=a.substr(0,c))}}}return k0d(this,a)};_.Xk=function q0d(){return this.c};_.Ib=function r0d(){var a;return hdb(this.gm)+'@'+(a=tb(this)>>>0,a.toString(16))+" uri='"+this.d+"'"};_.b=false;var z8=mdb(rwe,'ResourceImpl',781);bcb(1379,781,qwe,s0d);var w8=mdb(rwe,'BinaryResourceImpl',1379);bcb(1169,694,pue);_.si=function v0d(a){return JD(a,56)?t0d(this,BD(a,56)):JD(a,591)?new Fyd(BD(a,591).Vk()):PD(a)===PD(this.f)?BD(a,14).Kc():(LCd(),KCd.a)};_.Ob=function w0d(){return u0d(this)};_.a=false;var z9=mdb(yve,'EcoreUtil/ContentTreeIterator',1169);bcb(1380,1169,pue,x0d);_.si=function y0d(a){return PD(a)===PD(this.f)?BD(a,15).Kc():new C6d(BD(a,56))};var x8=mdb(rwe,'ResourceImpl/5',1380);bcb(648,1994,Ove,z0d);_.Hc=function A0d(a){return this.i<=4?pud(this,a):JD(a,49)&&BD(a,49).Zg()==this.a};_.bi=function B0d(a,b){a==this.i-1&&(this.a.b||(this.a.b=true,null))};_.di=function C0d(a,b){a==0?this.a.b||(this.a.b=true,null):Atd(this,a,b)};_.fi=function D0d(a,b){};_.gi=function E0d(a,b,c){};_.aj=function F0d(){return 2};_.Ai=function G0d(){return this.a};_.bj=function H0d(){return true};_.cj=function I0d(a,b){var c;c=BD(a,49);b=c.wh(this.a,b);return b};_.dj=function J0d(a,b){var c;c=BD(a,49);return c.wh(null,b)};_.ej=function K0d(){return false};_.hi=function L0d(){return true};_.ri=function M0d(a){return KC(m5,Uhe,56,a,0,1)};_.ni=function N0d(){return false};var y8=mdb(rwe,'ResourceImpl/ContentsEList',648);bcb(957,1964,Lie,O0d);_.Zc=function P0d(a){return this.a._h(a)};_.gc=function Q0d(){return this.a.gc()};var A8=mdb(yve,'AbstractSequentialInternalEList/1',957);var K6d,L6d,M6d,N6d;bcb(624,1,{},y1d);var R0d,S0d;var G8=mdb(yve,'BasicExtendedMetaData',624);bcb(1160,1,{},C1d);_.$k=function D1d(){return null};_._k=function E1d(){this.a==-2&&A1d(this,W0d(this.d,this.b));return this.a};_.al=function F1d(){return null};_.bl=function G1d(){return mmb(),mmb(),jmb};_.ne=function H1d(){this.c==Gwe&&B1d(this,_0d(this.d,this.b));return this.c};_.cl=function I1d(){return 0};_.a=-2;_.c=Gwe;var C8=mdb(yve,'BasicExtendedMetaData/EClassExtendedMetaDataImpl',1160);bcb(1161,1,{},O1d);_.$k=function P1d(){this.a==(T0d(),R0d)&&J1d(this,V0d(this.f,this.b));return this.a};_._k=function Q1d(){return 0};_.al=function R1d(){this.c==(T0d(),R0d)&&K1d(this,Z0d(this.f,this.b));return this.c};_.bl=function S1d(){!this.d&&L1d(this,$0d(this.f,this.b));return this.d};_.ne=function T1d(){this.e==Gwe&&M1d(this,_0d(this.f,this.b));return this.e};_.cl=function U1d(){this.g==-2&&N1d(this,c1d(this.f,this.b));return this.g};_.e=Gwe;_.g=-2;var D8=mdb(yve,'BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl',1161);bcb(1159,1,{},Y1d);_.b=false;_.c=false;var E8=mdb(yve,'BasicExtendedMetaData/EPackageExtendedMetaDataImpl',1159);bcb(1162,1,{},j2d);_.c=-2;_.e=Gwe;_.f=Gwe;var F8=mdb(yve,'BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl',1162);bcb(585,622,Pve,k2d);_.aj=function l2d(){return this.c};_.Fk=function m2d(){return false};_.li=function n2d(a,b){return b};_.c=0;var T8=mdb(yve,'EDataTypeEList',585);var O9=odb(yve,'FeatureMap');bcb(75,585,{3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},u3d);_.Vc=function v3d(a,b){o2d(this,a,BD(b,72))};_.Fc=function w3d(a){return r2d(this,BD(a,72))};_.Yh=function B3d(a){w2d(this,BD(a,72))};_.cj=function M3d(a,b){return O2d(this,BD(a,72),b)};_.dj=function N3d(a,b){return Q2d(this,BD(a,72),b)};_.ii=function P3d(a,b){return W2d(this,a,b)};_.li=function R3d(a,b){return _2d(this,a,BD(b,72))};_._c=function T3d(a,b){return c3d(this,a,BD(b,72))};_.jj=function X3d(a,b){return i3d(this,BD(a,72),b)};_.kj=function Y3d(a,b){return k3d(this,BD(a,72),b)};_.lj=function Z3d(a,b,c){return l3d(this,BD(a,72),BD(b,72),c)};_.oi=function _3d(a,b){return t3d(this,a,BD(b,72))};_.dl=function x3d(a,b){return q2d(this,a,b)};_.Wc=function y3d(a,b){var c,d,e,f,g,h,i,j,k;j=new zud(b.gc());for(e=b.Kc();e.Ob();){d=BD(e.Pb(),72);f=d.ak();if(T6d(this.e,f)){(!f.hi()||!E2d(this,f,d.dd())&&!pud(j,d))&&wtd(j,d)}else{k=S6d(this.e.Tg(),f);c=BD(this.g,119);g=true;for(h=0;h=0){b=a[this.c];if(this.k.rl(b.ak())){this.j=this.f?b:b.dd();this.i=-2;return true}}this.i=-1;this.g=-1;return false};var H8=mdb(yve,'BasicFeatureMap/FeatureEIterator',410);bcb(662,410,jie,s4d);_.Lk=function t4d(){return true};var I8=mdb(yve,'BasicFeatureMap/ResolvingFeatureEIterator',662);bcb(955,486,Vve,u4d);_.Gi=function v4d(){return this};var M8=mdb(yve,'EContentsEList/1',955);bcb(956,486,Vve,w4d);_.Lk=function x4d(){return false};var N8=mdb(yve,'EContentsEList/2',956);bcb(954,279,Wve,y4d);_.Nk=function z4d(a){};_.Ob=function A4d(){return false};_.Sb=function B4d(){return false};var O8=mdb(yve,'EContentsEList/FeatureIteratorImpl/1',954);bcb(825,585,Pve,C4d);_.ci=function D4d(){this.a=true};_.fj=function E4d(){return this.a};_.Xj=function F4d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var S8=mdb(yve,'EDataTypeEList/Unsettable',825);bcb(1849,585,Pve,G4d);_.hi=function H4d(){return true};var V8=mdb(yve,'EDataTypeUniqueEList',1849);bcb(1850,825,Pve,I4d);_.hi=function J4d(){return true};var U8=mdb(yve,'EDataTypeUniqueEList/Unsettable',1850);bcb(139,85,Pve,K4d);_.Ek=function L4d(){return true};_.li=function M4d(a,b){return ILd(this,a,BD(b,56))};var W8=mdb(yve,'EObjectContainmentEList/Resolving',139);bcb(1163,545,Pve,N4d);_.Ek=function O4d(){return true};_.li=function P4d(a,b){return ILd(this,a,BD(b,56))};var X8=mdb(yve,'EObjectContainmentEList/Unsettable/Resolving',1163);bcb(748,16,Pve,Q4d);_.ci=function R4d(){this.a=true};_.fj=function S4d(){return this.a};_.Xj=function T4d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var a9=mdb(yve,'EObjectContainmentWithInverseEList/Unsettable',748);bcb(1173,748,Pve,U4d);_.Ek=function V4d(){return true};_.li=function W4d(a,b){return ILd(this,a,BD(b,56))};var _8=mdb(yve,'EObjectContainmentWithInverseEList/Unsettable/Resolving',1173);bcb(743,496,Pve,X4d);_.ci=function Y4d(){this.a=true};_.fj=function Z4d(){return this.a};_.Xj=function $4d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var c9=mdb(yve,'EObjectEList/Unsettable',743);bcb(328,496,Pve,_4d);_.Ek=function a5d(){return true};_.li=function b5d(a,b){return ILd(this,a,BD(b,56))};var f9=mdb(yve,'EObjectResolvingEList',328);bcb(1641,743,Pve,c5d);_.Ek=function d5d(){return true};_.li=function e5d(a,b){return ILd(this,a,BD(b,56))};var e9=mdb(yve,'EObjectResolvingEList/Unsettable',1641);bcb(1381,1,{},h5d);var f5d;var g9=mdb(yve,'EObjectValidator',1381);bcb(546,496,Pve,i5d);_.zk=function j5d(){return this.d};_.Ak=function k5d(){return this.b};_.bj=function l5d(){return true};_.Dk=function m5d(){return true};_.b=0;var k9=mdb(yve,'EObjectWithInverseEList',546);bcb(1176,546,Pve,n5d);_.Ck=function o5d(){return true};var h9=mdb(yve,'EObjectWithInverseEList/ManyInverse',1176);bcb(625,546,Pve,p5d);_.ci=function q5d(){this.a=true};_.fj=function r5d(){return this.a};_.Xj=function s5d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var j9=mdb(yve,'EObjectWithInverseEList/Unsettable',625);bcb(1175,625,Pve,t5d);_.Ck=function u5d(){return true};var i9=mdb(yve,'EObjectWithInverseEList/Unsettable/ManyInverse',1175);bcb(749,546,Pve,v5d);_.Ek=function w5d(){return true};_.li=function x5d(a,b){return ILd(this,a,BD(b,56))};var o9=mdb(yve,'EObjectWithInverseResolvingEList',749);bcb(31,749,Pve,y5d);_.Ck=function z5d(){return true};var l9=mdb(yve,'EObjectWithInverseResolvingEList/ManyInverse',31);bcb(750,625,Pve,A5d);_.Ek=function B5d(){return true};_.li=function C5d(a,b){return ILd(this,a,BD(b,56))};var n9=mdb(yve,'EObjectWithInverseResolvingEList/Unsettable',750);bcb(1174,750,Pve,D5d);_.Ck=function E5d(){return true};var m9=mdb(yve,'EObjectWithInverseResolvingEList/Unsettable/ManyInverse',1174);bcb(1164,622,Pve);_.ai=function F5d(){return (this.b&1792)==0};_.ci=function G5d(){this.b|=1};_.Bk=function H5d(){return (this.b&4)!=0};_.bj=function I5d(){return (this.b&40)!=0};_.Ck=function J5d(){return (this.b&16)!=0};_.Dk=function K5d(){return (this.b&8)!=0};_.Ek=function L5d(){return (this.b&Dve)!=0};_.rk=function M5d(){return (this.b&32)!=0};_.Fk=function N5d(){return (this.b&zte)!=0};_.wj=function O5d(a){return !this.d?this.ak().Yj().wj(a):qEd(this.d,a)};_.fj=function P5d(){return (this.b&2)!=0?(this.b&1)!=0:this.i!=0};_.hi=function Q5d(){return (this.b&128)!=0};_.Xj=function S5d(){var a;Uxd(this);if((this.b&2)!=0){if(oid(this.e)){a=(this.b&1)!=0;this.b&=-2;GLd(this,new qSd(this.e,2,bLd(this.e.Tg(),this.ak()),a,false))}else{this.b&=-2}}};_.ni=function T5d(){return (this.b&1536)==0};_.b=0;var q9=mdb(yve,'EcoreEList/Generic',1164);bcb(1165,1164,Pve,U5d);_.ak=function V5d(){return this.a};var p9=mdb(yve,'EcoreEList/Dynamic',1165);bcb(747,63,oue,W5d);_.ri=function X5d(a){return izd(this.a.a,a)};var u9=mdb(yve,'EcoreEMap/1',747);bcb(746,85,Pve,Y5d);_.bi=function Z5d(a,b){uAd(this.b,BD(b,133))};_.di=function $5d(a,b){tAd(this.b)};_.ei=function _5d(a,b,c){var d;++(d=this.b,BD(b,133),d).e};_.fi=function a6d(a,b){vAd(this.b,BD(b,133))};_.gi=function b6d(a,b,c){vAd(this.b,BD(c,133));PD(c)===PD(b)&&BD(c,133).Th(CAd(BD(b,133).cd()));uAd(this.b,BD(b,133))};var v9=mdb(yve,'EcoreEMap/DelegateEObjectContainmentEList',746);bcb(1171,151,Ave,c6d);var x9=mdb(yve,'EcoreEMap/Unsettable',1171);bcb(1172,746,Pve,d6d);_.ci=function e6d(){this.a=true};_.fj=function f6d(){return this.a};_.Xj=function g6d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var w9=mdb(yve,'EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList',1172);bcb(1168,228,fke,A6d);_.a=false;_.b=false;var A9=mdb(yve,'EcoreUtil/Copier',1168);bcb(745,1,aie,C6d);_.Nb=function D6d(a){Rrb(this,a)};_.Ob=function E6d(){return B6d(this)};_.Pb=function F6d(){var a;B6d(this);a=this.b;this.b=null;return a};_.Qb=function G6d(){this.a.Qb()};var B9=mdb(yve,'EcoreUtil/ProperContentIterator',745);bcb(1382,1381,{},J6d);var H6d;var C9=mdb(yve,'EcoreValidator',1382);var P6d;var N9=odb(yve,'FeatureMapUtil/Validator');bcb(1260,1,{1942:1},U6d);_.rl=function V6d(a){return true};var F9=mdb(yve,'FeatureMapUtil/1',1260);bcb(757,1,{1942:1},Z6d);_.rl=function $6d(a){var b;if(this.c==a)return true;b=DD(Ohb(this.a,a));if(b==null){if(Y6d(this,a)){_6d(this.a,a,(Bcb(),Acb));return true}else{_6d(this.a,a,(Bcb(),zcb));return false}}else{return b==(Bcb(),Acb)}};_.e=false;var W6d;var I9=mdb(yve,'FeatureMapUtil/BasicValidator',757);bcb(758,43,fke,a7d);var H9=mdb(yve,'FeatureMapUtil/BasicValidator/Cache',758);bcb(501,52,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,69:1,95:1},f7d);_.Vc=function g7d(a,b){p2d(this.c,this.b,a,b)};_.Fc=function h7d(a){return q2d(this.c,this.b,a)};_.Wc=function i7d(a,b){return s2d(this.c,this.b,a,b)};_.Gc=function j7d(a){return b7d(this,a)};_.Xh=function k7d(a,b){u2d(this.c,this.b,a,b)};_.lk=function l7d(a,b){return x2d(this.c,this.b,a,b)};_.pi=function m7d(a){return J2d(this.c,this.b,a,false)};_.Zh=function n7d(){return y2d(this.c,this.b)};_.$h=function o7d(){return z2d(this.c,this.b)};_._h=function p7d(a){return A2d(this.c,this.b,a)};_.mk=function q7d(a,b){return c7d(this,a,b)};_.$b=function r7d(){d7d(this)};_.Hc=function s7d(a){return E2d(this.c,this.b,a)};_.Ic=function t7d(a){return G2d(this.c,this.b,a)};_.Xb=function u7d(a){return J2d(this.c,this.b,a,true)};_.Wj=function v7d(a){return this};_.Xc=function w7d(a){return L2d(this.c,this.b,a)};_.dc=function x7d(){return e7d(this)};_.fj=function y7d(){return !R2d(this.c,this.b)};_.Kc=function z7d(){return S2d(this.c,this.b)};_.Yc=function A7d(){return U2d(this.c,this.b)};_.Zc=function B7d(a){return V2d(this.c,this.b,a)};_.ii=function C7d(a,b){return X2d(this.c,this.b,a,b)};_.ji=function D7d(a,b){Y2d(this.c,this.b,a,b)};_.$c=function E7d(a){return Z2d(this.c,this.b,a)};_.Mc=function F7d(a){return $2d(this.c,this.b,a)};_._c=function G7d(a,b){return e3d(this.c,this.b,a,b)};_.Wb=function H7d(a){D2d(this.c,this.b);b7d(this,BD(a,15))};_.gc=function I7d(){return n3d(this.c,this.b)};_.Pc=function J7d(){return o3d(this.c,this.b)};_.Qc=function K7d(a){return q3d(this.c,this.b,a)};_.Ib=function L7d(){var a,b;b=new Hfb;b.a+='[';for(a=y2d(this.c,this.b);b4d(a);){Efb(b,xfb(d4d(a)));b4d(a)&&(b.a+=She,b)}b.a+=']';return b.a};_.Xj=function M7d(){D2d(this.c,this.b)};var J9=mdb(yve,'FeatureMapUtil/FeatureEList',501);bcb(627,36,fve,O7d);_.yi=function P7d(a){return N7d(this,a)};_.Di=function Q7d(a){var b,c,d,e,f,g,h;switch(this.d){case 1:case 2:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.g=a.zi();a.xi()==1&&(this.d=1);return true}break}case 3:{e=a.xi();switch(e){case 3:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.d=5;b=new zud(2);wtd(b,this.g);wtd(b,a.zi());this.g=b;return true}break}}break}case 5:{e=a.xi();switch(e){case 3:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){c=BD(this.g,14);c.Fc(a.zi());return true}break}}break}case 4:{e=a.xi();switch(e){case 3:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.d=1;this.g=a.zi();return true}break}case 4:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.d=6;h=new zud(2);wtd(h,this.n);wtd(h,a.Bi());this.n=h;g=OC(GC(WD,1),oje,25,15,[this.o,a.Ci()]);this.g=g;return true}break}}break}case 6:{e=a.xi();switch(e){case 4:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){c=BD(this.n,14);c.Fc(a.Bi());g=BD(this.g,48);d=KC(WD,oje,25,g.length+1,15,1);$fb(g,0,d,0,g.length);d[g.length]=a.Ci();this.g=d;return true}break}}break}}return false};var K9=mdb(yve,'FeatureMapUtil/FeatureENotificationImpl',627);bcb(552,501,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},R7d);_.dl=function S7d(a,b){return q2d(this.c,a,b)};_.el=function T7d(a,b,c){return x2d(this.c,a,b,c)};_.fl=function U7d(a,b,c){return C2d(this.c,a,b,c)};_.gl=function V7d(){return this};_.hl=function W7d(a,b){return K2d(this.c,a,b)};_.il=function X7d(a){return BD(J2d(this.c,this.b,a,false),72).ak()};_.jl=function Y7d(a){return BD(J2d(this.c,this.b,a,false),72).dd()};_.kl=function Z7d(){return this.a};_.ll=function $7d(a){return !R2d(this.c,a)};_.ml=function _7d(a,b){f3d(this.c,a,b)};_.nl=function a8d(a){return g3d(this.c,a)};_.ol=function b8d(a){s3d(this.c,a)};var L9=mdb(yve,'FeatureMapUtil/FeatureFeatureMap',552);bcb(1259,1,zve,c8d);_.Wj=function d8d(a){return J2d(this.b,this.a,-1,a)};_.fj=function e8d(){return !R2d(this.b,this.a)};_.Wb=function f8d(a){f3d(this.b,this.a,a)};_.Xj=function g8d(){D2d(this.b,this.a)};var M9=mdb(yve,'FeatureMapUtil/FeatureValue',1259);var h8d,i8d,j8d,k8d,l8d;var Q9=odb(Iwe,'AnyType');bcb(666,60,Tie,n8d);var R9=mdb(Iwe,'InvalidDatatypeValueException',666);var S9=odb(Iwe,Jwe);var T9=odb(Iwe,Kwe);var U9=odb(Iwe,Lwe);var o8d;var q8d;var s8d,t8d,u8d,v8d,w8d,x8d,y8d,z8d,A8d,B8d,C8d,D8d,E8d,F8d,G8d,H8d,I8d,J8d,K8d,L8d,M8d,N8d,O8d,P8d;bcb(830,506,{105:1,92:1,90:1,56:1,49:1,97:1,843:1},R8d);_._g=function S8d(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new u3d(this,0)),this.c;return !this.c&&(this.c=new u3d(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153);return (!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).kl();case 2:if(c)return !this.b&&(this.b=new u3d(this,2)),this.b;return !this.b&&(this.b=new u3d(this,2)),this.b.b;}return bid(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.jh=function T8d(a,b,c){var d;switch(b){case 0:return !this.c&&(this.c=new u3d(this,0)),B2d(this.c,a,c);case 1:return (!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),69)).mk(a,c);case 2:return !this.b&&(this.b=new u3d(this,2)),B2d(this.b,a,c);}return d=BD(XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),b),66),d.Nj().Rj(this,Aid(this),b-aLd(this.zh()),a,c)};_.lh=function U8d(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).dc();case 2:return !!this.b&&this.b.i!=0;}return cid(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function V8d(a,b){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));d3d(this.c,b);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).Wb(b);return;case 2:!this.b&&(this.b=new u3d(this,2));d3d(this.b,b);return;}did(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function W8d(){return Q8d(),s8d};_.Bh=function X8d(a){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));Uxd(this.c);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).$b();return;case 2:!this.b&&(this.b=new u3d(this,2));Uxd(this.b);return;}eid(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.Ib=function Y8d(){var a;if((this.j&4)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (mixed: ';Dfb(a,this.c);a.a+=', anyAttribute: ';Dfb(a,this.b);a.a+=')';return a.a};var V9=mdb(Mwe,'AnyTypeImpl',830);bcb(667,506,{105:1,92:1,90:1,56:1,49:1,97:1,2021:1,667:1},_8d);_._g=function a9d(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return bid(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.lh=function b9d(a){switch(a){case 0:return this.a!=null;case 1:return this.b!=null;}return cid(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function c9d(a,b){switch(a){case 0:Z8d(this,GD(b));return;case 1:$8d(this,GD(b));return;}did(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function d9d(){return Q8d(),F8d};_.Bh=function e9d(a){switch(a){case 0:this.a=null;return;case 1:this.b=null;return;}eid(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.Ib=function f9d(){var a;if((this.j&4)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (data: ';Efb(a,this.a);a.a+=', target: ';Efb(a,this.b);a.a+=')';return a.a};_.a=null;_.b=null;var W9=mdb(Mwe,'ProcessingInstructionImpl',667);bcb(668,830,{105:1,92:1,90:1,56:1,49:1,97:1,843:1,2022:1,668:1},i9d);_._g=function j9d(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new u3d(this,0)),this.c;return !this.c&&(this.c=new u3d(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153);return (!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).kl();case 2:if(c)return !this.b&&(this.b=new u3d(this,2)),this.b;return !this.b&&(this.b=new u3d(this,2)),this.b.b;case 3:return !this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true));case 4:return j6d(this.a,(!this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true))));case 5:return this.a;}return bid(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.lh=function k9d(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).dc();case 2:return !!this.b&&this.b.i!=0;case 3:return !this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true))!=null;case 4:return j6d(this.a,(!this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true))))!=null;case 5:return !!this.a;}return cid(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function l9d(a,b){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));d3d(this.c,b);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).Wb(b);return;case 2:!this.b&&(this.b=new u3d(this,2));d3d(this.b,b);return;case 3:h9d(this,GD(b));return;case 4:h9d(this,h6d(this.a,b));return;case 5:g9d(this,BD(b,148));return;}did(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function m9d(){return Q8d(),H8d};_.Bh=function n9d(a){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));Uxd(this.c);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).$b();return;case 2:!this.b&&(this.b=new u3d(this,2));Uxd(this.b);return;case 3:!this.c&&(this.c=new u3d(this,0));f3d(this.c,(Q8d(),I8d),null);return;case 4:h9d(this,h6d(this.a,null));return;case 5:this.a=null;return;}eid(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};var X9=mdb(Mwe,'SimpleAnyTypeImpl',668);bcb(669,506,{105:1,92:1,90:1,56:1,49:1,97:1,2023:1,669:1},o9d);_._g=function p9d(a,b,c){switch(a){case 0:if(c)return !this.a&&(this.a=new u3d(this,0)),this.a;return !this.a&&(this.a=new u3d(this,0)),this.a.b;case 1:return c?(!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1)),this.b):(!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1)),FAd(this.b));case 2:return c?(!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2)),this.c):(!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2)),FAd(this.c));case 3:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),L8d));case 4:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),M8d));case 5:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),O8d));case 6:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),P8d));}return bid(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.jh=function q9d(a,b,c){var d;switch(b){case 0:return !this.a&&(this.a=new u3d(this,0)),B2d(this.a,a,c);case 1:return !this.b&&(this.b=new dId((jGd(),fGd),x6,this,1)),bId(this.b,a,c);case 2:return !this.c&&(this.c=new dId((jGd(),fGd),x6,this,2)),bId(this.c,a,c);case 5:return !this.a&&(this.a=new u3d(this,0)),c7d(T2d(this.a,(Q8d(),O8d)),a,c);}return d=BD(XKd((this.j&2)==0?(Q8d(),K8d):(!this.k&&(this.k=new HGd),this.k).ck(),b),66),d.Nj().Rj(this,Aid(this),b-aLd((Q8d(),K8d)),a,c)};_.lh=function r9d(a){switch(a){case 0:return !!this.a&&this.a.i!=0;case 1:return !!this.b&&this.b.f!=0;case 2:return !!this.c&&this.c.f!=0;case 3:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),L8d)));case 4:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),M8d)));case 5:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),O8d)));case 6:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),P8d)));}return cid(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function s9d(a,b){switch(a){case 0:!this.a&&(this.a=new u3d(this,0));d3d(this.a,b);return;case 1:!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1));cId(this.b,b);return;case 2:!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2));cId(this.c,b);return;case 3:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),L8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,L8d),BD(b,14));return;case 4:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),M8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,M8d),BD(b,14));return;case 5:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),O8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,O8d),BD(b,14));return;case 6:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),P8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,P8d),BD(b,14));return;}did(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function t9d(){return Q8d(),K8d};_.Bh=function u9d(a){switch(a){case 0:!this.a&&(this.a=new u3d(this,0));Uxd(this.a);return;case 1:!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1));this.b.c.$b();return;case 2:!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2));this.c.c.$b();return;case 3:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),L8d)));return;case 4:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),M8d)));return;case 5:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),O8d)));return;case 6:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),P8d)));return;}eid(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.Ib=function v9d(){var a;if((this.j&4)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (mixed: ';Dfb(a,this.a);a.a+=')';return a.a};var Y9=mdb(Mwe,'XMLTypeDocumentRootImpl',669);bcb(1919,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1,2024:1},U9d);_.Ih=function V9d(a,b){switch(a.yj()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return b==null?null:fcb(b);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return GD(b);case 6:return C9d(BD(b,190));case 12:case 47:case 49:case 11:return Vmd(this,a,b);case 13:return b==null?null:qgb(BD(b,240));case 15:case 14:return b==null?null:D9d(Edb(ED(b)));case 17:return E9d((Q8d(),b));case 18:return E9d(b);case 21:case 20:return b==null?null:F9d(BD(b,155).a);case 27:return G9d(BD(b,190));case 30:return H9d((Q8d(),BD(b,15)));case 31:return H9d(BD(b,15));case 40:return K9d((Q8d(),b));case 42:return I9d((Q8d(),b));case 43:return I9d(b);case 59:case 48:return J9d((Q8d(),b));default:throw vbb(new Wdb(tte+a.ne()+ute));}};_.Jh=function W9d(a){var b,c,d,e,f;switch(a.G==-1&&(a.G=(c=bKd(a),c?HLd(c.Mh(),a):-1)),a.G){case 0:return b=new R8d,b;case 1:return d=new _8d,d;case 2:return e=new i9d,e;case 3:return f=new o9d,f;default:throw vbb(new Wdb(xte+a.zb+ute));}};_.Kh=function X9d(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;switch(a.yj()){case 5:case 52:case 4:return b;case 6:return L9d(b);case 8:case 7:return b==null?null:B9d(b);case 9:return b==null?null:Scb(Icb((d=Qge(b,true),d.length>0&&(BCb(0,d.length),d.charCodeAt(0)==43)?d.substr(1):d),-128,127)<<24>>24);case 10:return b==null?null:Scb(Icb((e=Qge(b,true),e.length>0&&(BCb(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e),-128,127)<<24>>24);case 11:return GD(Wmd(this,(Q8d(),w8d),b));case 12:return GD(Wmd(this,(Q8d(),x8d),b));case 13:return b==null?null:new tgb(Qge(b,true));case 15:case 14:return M9d(b);case 16:return GD(Wmd(this,(Q8d(),y8d),b));case 17:return N9d((Q8d(),b));case 18:return N9d(b);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return Qge(b,true);case 21:case 20:return O9d(b);case 22:return GD(Wmd(this,(Q8d(),z8d),b));case 23:return GD(Wmd(this,(Q8d(),A8d),b));case 24:return GD(Wmd(this,(Q8d(),B8d),b));case 25:return GD(Wmd(this,(Q8d(),C8d),b));case 26:return GD(Wmd(this,(Q8d(),D8d),b));case 27:return P9d(b);case 30:return Q9d((Q8d(),b));case 31:return Q9d(b);case 32:return b==null?null:meb(Icb((k=Qge(b,true),k.length>0&&(BCb(0,k.length),k.charCodeAt(0)==43)?k.substr(1):k),Rie,Ohe));case 33:return b==null?null:new Ygb((l=Qge(b,true),l.length>0&&(BCb(0,l.length),l.charCodeAt(0)==43)?l.substr(1):l));case 34:return b==null?null:meb(Icb((m=Qge(b,true),m.length>0&&(BCb(0,m.length),m.charCodeAt(0)==43)?m.substr(1):m),Rie,Ohe));case 36:return b==null?null:Aeb(Jcb((n=Qge(b,true),n.length>0&&(BCb(0,n.length),n.charCodeAt(0)==43)?n.substr(1):n)));case 37:return b==null?null:Aeb(Jcb((o=Qge(b,true),o.length>0&&(BCb(0,o.length),o.charCodeAt(0)==43)?o.substr(1):o)));case 40:return T9d((Q8d(),b));case 42:return R9d((Q8d(),b));case 43:return R9d(b);case 44:return b==null?null:new Ygb((p=Qge(b,true),p.length>0&&(BCb(0,p.length),p.charCodeAt(0)==43)?p.substr(1):p));case 45:return b==null?null:new Ygb((q=Qge(b,true),q.length>0&&(BCb(0,q.length),q.charCodeAt(0)==43)?q.substr(1):q));case 46:return Qge(b,false);case 47:return GD(Wmd(this,(Q8d(),E8d),b));case 59:case 48:return S9d((Q8d(),b));case 49:return GD(Wmd(this,(Q8d(),G8d),b));case 50:return b==null?null:Web(Icb((r=Qge(b,true),r.length>0&&(BCb(0,r.length),r.charCodeAt(0)==43)?r.substr(1):r),awe,32767)<<16>>16);case 51:return b==null?null:Web(Icb((f=Qge(b,true),f.length>0&&(BCb(0,f.length),f.charCodeAt(0)==43)?f.substr(1):f),awe,32767)<<16>>16);case 53:return GD(Wmd(this,(Q8d(),J8d),b));case 55:return b==null?null:Web(Icb((g=Qge(b,true),g.length>0&&(BCb(0,g.length),g.charCodeAt(0)==43)?g.substr(1):g),awe,32767)<<16>>16);case 56:return b==null?null:Web(Icb((h=Qge(b,true),h.length>0&&(BCb(0,h.length),h.charCodeAt(0)==43)?h.substr(1):h),awe,32767)<<16>>16);case 57:return b==null?null:Aeb(Jcb((i=Qge(b,true),i.length>0&&(BCb(0,i.length),i.charCodeAt(0)==43)?i.substr(1):i)));case 58:return b==null?null:Aeb(Jcb((j=Qge(b,true),j.length>0&&(BCb(0,j.length),j.charCodeAt(0)==43)?j.substr(1):j)));case 60:return b==null?null:meb(Icb((c=Qge(b,true),c.length>0&&(BCb(0,c.length),c.charCodeAt(0)==43)?c.substr(1):c),Rie,Ohe));case 61:return b==null?null:meb(Icb(Qge(b,true),Rie,Ohe));default:throw vbb(new Wdb(tte+a.ne()+ute));}};var w9d,x9d,y9d,z9d;var Z9=mdb(Mwe,'XMLTypeFactoryImpl',1919);bcb(586,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1,1945:1,586:1},cae);_.N=false;_.O=false;var Z9d=false;var Yab=mdb(Mwe,'XMLTypePackageImpl',586);bcb(1852,1,{837:1},fae);_._j=function gae(){return Uge(),Tge};var iab=mdb(Mwe,'XMLTypePackageImpl/1',1852);bcb(1861,1,nwe,hae);_.wj=function iae(a){return ND(a)};_.xj=function jae(a){return KC(ZI,nie,2,a,6,1)};var $9=mdb(Mwe,'XMLTypePackageImpl/10',1861);bcb(1862,1,nwe,kae);_.wj=function lae(a){return ND(a)};_.xj=function mae(a){return KC(ZI,nie,2,a,6,1)};var _9=mdb(Mwe,'XMLTypePackageImpl/11',1862);bcb(1863,1,nwe,nae);_.wj=function oae(a){return ND(a)};_.xj=function pae(a){return KC(ZI,nie,2,a,6,1)};var aab=mdb(Mwe,'XMLTypePackageImpl/12',1863);bcb(1864,1,nwe,qae);_.wj=function rae(a){return LD(a)};_.xj=function sae(a){return KC(BI,nie,333,a,7,1)};var bab=mdb(Mwe,'XMLTypePackageImpl/13',1864);bcb(1865,1,nwe,tae);_.wj=function uae(a){return ND(a)};_.xj=function vae(a){return KC(ZI,nie,2,a,6,1)};var cab=mdb(Mwe,'XMLTypePackageImpl/14',1865);bcb(1866,1,nwe,wae);_.wj=function xae(a){return JD(a,15)};_.xj=function yae(a){return KC(yK,eme,15,a,0,1)};var dab=mdb(Mwe,'XMLTypePackageImpl/15',1866);bcb(1867,1,nwe,zae);_.wj=function Aae(a){return JD(a,15)};_.xj=function Bae(a){return KC(yK,eme,15,a,0,1)};var eab=mdb(Mwe,'XMLTypePackageImpl/16',1867);bcb(1868,1,nwe,Cae);_.wj=function Dae(a){return ND(a)};_.xj=function Eae(a){return KC(ZI,nie,2,a,6,1)};var fab=mdb(Mwe,'XMLTypePackageImpl/17',1868);bcb(1869,1,nwe,Fae);_.wj=function Gae(a){return JD(a,155)};_.xj=function Hae(a){return KC(FI,nie,155,a,0,1)};var gab=mdb(Mwe,'XMLTypePackageImpl/18',1869);bcb(1870,1,nwe,Iae);_.wj=function Jae(a){return ND(a)};_.xj=function Kae(a){return KC(ZI,nie,2,a,6,1)};var hab=mdb(Mwe,'XMLTypePackageImpl/19',1870);bcb(1853,1,nwe,Lae);_.wj=function Mae(a){return JD(a,843)};_.xj=function Nae(a){return KC(Q9,Uhe,843,a,0,1)};var tab=mdb(Mwe,'XMLTypePackageImpl/2',1853);bcb(1871,1,nwe,Oae);_.wj=function Pae(a){return ND(a)};_.xj=function Qae(a){return KC(ZI,nie,2,a,6,1)};var jab=mdb(Mwe,'XMLTypePackageImpl/20',1871);bcb(1872,1,nwe,Rae);_.wj=function Sae(a){return ND(a)};_.xj=function Tae(a){return KC(ZI,nie,2,a,6,1)};var kab=mdb(Mwe,'XMLTypePackageImpl/21',1872);bcb(1873,1,nwe,Uae);_.wj=function Vae(a){return ND(a)};_.xj=function Wae(a){return KC(ZI,nie,2,a,6,1)};var lab=mdb(Mwe,'XMLTypePackageImpl/22',1873);bcb(1874,1,nwe,Xae);_.wj=function Yae(a){return ND(a)};_.xj=function Zae(a){return KC(ZI,nie,2,a,6,1)};var mab=mdb(Mwe,'XMLTypePackageImpl/23',1874);bcb(1875,1,nwe,$ae);_.wj=function _ae(a){return JD(a,190)};_.xj=function abe(a){return KC(SD,nie,190,a,0,2)};var nab=mdb(Mwe,'XMLTypePackageImpl/24',1875);bcb(1876,1,nwe,bbe);_.wj=function cbe(a){return ND(a)};_.xj=function dbe(a){return KC(ZI,nie,2,a,6,1)};var oab=mdb(Mwe,'XMLTypePackageImpl/25',1876);bcb(1877,1,nwe,ebe);_.wj=function fbe(a){return ND(a)};_.xj=function gbe(a){return KC(ZI,nie,2,a,6,1)};var pab=mdb(Mwe,'XMLTypePackageImpl/26',1877);bcb(1878,1,nwe,hbe);_.wj=function ibe(a){return JD(a,15)};_.xj=function jbe(a){return KC(yK,eme,15,a,0,1)};var qab=mdb(Mwe,'XMLTypePackageImpl/27',1878);bcb(1879,1,nwe,kbe);_.wj=function lbe(a){return JD(a,15)};_.xj=function mbe(a){return KC(yK,eme,15,a,0,1)};var rab=mdb(Mwe,'XMLTypePackageImpl/28',1879);bcb(1880,1,nwe,nbe);_.wj=function obe(a){return ND(a)};_.xj=function pbe(a){return KC(ZI,nie,2,a,6,1)};var sab=mdb(Mwe,'XMLTypePackageImpl/29',1880);bcb(1854,1,nwe,qbe);_.wj=function rbe(a){return JD(a,667)};_.xj=function sbe(a){return KC(S9,Uhe,2021,a,0,1)};var Eab=mdb(Mwe,'XMLTypePackageImpl/3',1854);bcb(1881,1,nwe,tbe);_.wj=function ube(a){return JD(a,19)};_.xj=function vbe(a){return KC(JI,nie,19,a,0,1)};var uab=mdb(Mwe,'XMLTypePackageImpl/30',1881);bcb(1882,1,nwe,wbe);_.wj=function xbe(a){return ND(a)};_.xj=function ybe(a){return KC(ZI,nie,2,a,6,1)};var vab=mdb(Mwe,'XMLTypePackageImpl/31',1882);bcb(1883,1,nwe,zbe);_.wj=function Abe(a){return JD(a,162)};_.xj=function Bbe(a){return KC(MI,nie,162,a,0,1)};var wab=mdb(Mwe,'XMLTypePackageImpl/32',1883);bcb(1884,1,nwe,Cbe);_.wj=function Dbe(a){return ND(a)};_.xj=function Ebe(a){return KC(ZI,nie,2,a,6,1)};var xab=mdb(Mwe,'XMLTypePackageImpl/33',1884);bcb(1885,1,nwe,Fbe);_.wj=function Gbe(a){return ND(a)};_.xj=function Hbe(a){return KC(ZI,nie,2,a,6,1)};var yab=mdb(Mwe,'XMLTypePackageImpl/34',1885);bcb(1886,1,nwe,Ibe);_.wj=function Jbe(a){return ND(a)};_.xj=function Kbe(a){return KC(ZI,nie,2,a,6,1)};var zab=mdb(Mwe,'XMLTypePackageImpl/35',1886);bcb(1887,1,nwe,Lbe);_.wj=function Mbe(a){return ND(a)};_.xj=function Nbe(a){return KC(ZI,nie,2,a,6,1)};var Aab=mdb(Mwe,'XMLTypePackageImpl/36',1887);bcb(1888,1,nwe,Obe);_.wj=function Pbe(a){return JD(a,15)};_.xj=function Qbe(a){return KC(yK,eme,15,a,0,1)};var Bab=mdb(Mwe,'XMLTypePackageImpl/37',1888);bcb(1889,1,nwe,Rbe);_.wj=function Sbe(a){return JD(a,15)};_.xj=function Tbe(a){return KC(yK,eme,15,a,0,1)};var Cab=mdb(Mwe,'XMLTypePackageImpl/38',1889);bcb(1890,1,nwe,Ube);_.wj=function Vbe(a){return ND(a)};_.xj=function Wbe(a){return KC(ZI,nie,2,a,6,1)};var Dab=mdb(Mwe,'XMLTypePackageImpl/39',1890);bcb(1855,1,nwe,Xbe);_.wj=function Ybe(a){return JD(a,668)};_.xj=function Zbe(a){return KC(T9,Uhe,2022,a,0,1)};var Pab=mdb(Mwe,'XMLTypePackageImpl/4',1855);bcb(1891,1,nwe,$be);_.wj=function _be(a){return ND(a)};_.xj=function ace(a){return KC(ZI,nie,2,a,6,1)};var Fab=mdb(Mwe,'XMLTypePackageImpl/40',1891);bcb(1892,1,nwe,bce);_.wj=function cce(a){return ND(a)};_.xj=function dce(a){return KC(ZI,nie,2,a,6,1)};var Gab=mdb(Mwe,'XMLTypePackageImpl/41',1892);bcb(1893,1,nwe,ece);_.wj=function fce(a){return ND(a)};_.xj=function gce(a){return KC(ZI,nie,2,a,6,1)};var Hab=mdb(Mwe,'XMLTypePackageImpl/42',1893);bcb(1894,1,nwe,hce);_.wj=function ice(a){return ND(a)};_.xj=function jce(a){return KC(ZI,nie,2,a,6,1)};var Iab=mdb(Mwe,'XMLTypePackageImpl/43',1894);bcb(1895,1,nwe,kce);_.wj=function lce(a){return ND(a)};_.xj=function mce(a){return KC(ZI,nie,2,a,6,1)};var Jab=mdb(Mwe,'XMLTypePackageImpl/44',1895);bcb(1896,1,nwe,nce);_.wj=function oce(a){return JD(a,184)};_.xj=function pce(a){return KC(UI,nie,184,a,0,1)};var Kab=mdb(Mwe,'XMLTypePackageImpl/45',1896);bcb(1897,1,nwe,qce);_.wj=function rce(a){return ND(a)};_.xj=function sce(a){return KC(ZI,nie,2,a,6,1)};var Lab=mdb(Mwe,'XMLTypePackageImpl/46',1897);bcb(1898,1,nwe,tce);_.wj=function uce(a){return ND(a)};_.xj=function vce(a){return KC(ZI,nie,2,a,6,1)};var Mab=mdb(Mwe,'XMLTypePackageImpl/47',1898);bcb(1899,1,nwe,wce);_.wj=function xce(a){return ND(a)};_.xj=function yce(a){return KC(ZI,nie,2,a,6,1)};var Nab=mdb(Mwe,'XMLTypePackageImpl/48',1899);bcb(nje,1,nwe,zce);_.wj=function Ace(a){return JD(a,184)};_.xj=function Bce(a){return KC(UI,nie,184,a,0,1)};var Oab=mdb(Mwe,'XMLTypePackageImpl/49',nje);bcb(1856,1,nwe,Cce);_.wj=function Dce(a){return JD(a,669)};_.xj=function Ece(a){return KC(U9,Uhe,2023,a,0,1)};var Tab=mdb(Mwe,'XMLTypePackageImpl/5',1856);bcb(1901,1,nwe,Fce);_.wj=function Gce(a){return JD(a,162)};_.xj=function Hce(a){return KC(MI,nie,162,a,0,1)};var Qab=mdb(Mwe,'XMLTypePackageImpl/50',1901);bcb(1902,1,nwe,Ice);_.wj=function Jce(a){return ND(a)};_.xj=function Kce(a){return KC(ZI,nie,2,a,6,1)};var Rab=mdb(Mwe,'XMLTypePackageImpl/51',1902);bcb(1903,1,nwe,Lce);_.wj=function Mce(a){return JD(a,19)};_.xj=function Nce(a){return KC(JI,nie,19,a,0,1)};var Sab=mdb(Mwe,'XMLTypePackageImpl/52',1903);bcb(1857,1,nwe,Oce);_.wj=function Pce(a){return ND(a)};_.xj=function Qce(a){return KC(ZI,nie,2,a,6,1)};var Uab=mdb(Mwe,'XMLTypePackageImpl/6',1857);bcb(1858,1,nwe,Rce);_.wj=function Sce(a){return JD(a,190)};_.xj=function Tce(a){return KC(SD,nie,190,a,0,2)};var Vab=mdb(Mwe,'XMLTypePackageImpl/7',1858);bcb(1859,1,nwe,Uce);_.wj=function Vce(a){return KD(a)};_.xj=function Wce(a){return KC(wI,nie,476,a,8,1)};var Wab=mdb(Mwe,'XMLTypePackageImpl/8',1859);bcb(1860,1,nwe,Xce);_.wj=function Yce(a){return JD(a,217)};_.xj=function Zce(a){return KC(xI,nie,217,a,0,1)};var Xab=mdb(Mwe,'XMLTypePackageImpl/9',1860);var $ce,_ce;var fde,gde;var kde;bcb(50,60,Tie,mde);var Zab=mdb(kxe,'RegEx/ParseException',50);bcb(820,1,{},ude);_.sl=function vde(a){return ac*16)throw vbb(new mde(tvd((h0d(),Uue))));c=c*16+e}while(true);if(this.a!=125)throw vbb(new mde(tvd((h0d(),Vue))));if(c>lxe)throw vbb(new mde(tvd((h0d(),Wue))));a=c}else{e=0;if(this.c!=0||(e=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));c=e;nde(this);if(this.c!=0||(e=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));c=c*16+e;a=c}break;case 117:d=0;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;a=b;break;case 118:nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;if(b>lxe)throw vbb(new mde(tvd((h0d(),'parser.descappe.4'))));a=b;break;case 65:case 90:case 122:throw vbb(new mde(tvd((h0d(),Xue))));}return a};_.ul=function xde(a){var b,c;switch(a){case 100:c=(this.e&32)==32?Kfe('Nd',true):(wfe(),cfe);break;case 68:c=(this.e&32)==32?Kfe('Nd',false):(wfe(),jfe);break;case 119:c=(this.e&32)==32?Kfe('IsWord',true):(wfe(),sfe);break;case 87:c=(this.e&32)==32?Kfe('IsWord',false):(wfe(),lfe);break;case 115:c=(this.e&32)==32?Kfe('IsSpace',true):(wfe(),nfe);break;case 83:c=(this.e&32)==32?Kfe('IsSpace',false):(wfe(),kfe);break;default:throw vbb(new hz((b=a,mxe+b.toString(16))));}return c};_.vl=function zde(a){var b,c,d,e,f,g,h,i,j,k,l,m;this.b=1;nde(this);b=null;if(this.c==0&&this.a==94){nde(this);if(a){k=(wfe(),wfe(),++vfe,new $fe(5))}else{b=(wfe(),wfe(),++vfe,new $fe(4));Ufe(b,0,lxe);k=(null,++vfe,new $fe(4))}}else{k=(wfe(),wfe(),++vfe,new $fe(4))}e=true;while((m=this.c)!=1){if(m==0&&this.a==93&&!e)break;e=false;c=this.a;d=false;if(m==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:Xfe(k,this.ul(c));d=true;break;case 105:case 73:case 99:case 67:c=this.Ll(k,c);c<0&&(d=true);break;case 112:case 80:l=tde(this,c);if(!l)throw vbb(new mde(tvd((h0d(),Iue))));Xfe(k,l);d=true;break;default:c=this.tl();}}else if(m==20){g=gfb(this.i,58,this.d);if(g<0)throw vbb(new mde(tvd((h0d(),Jue))));h=true;if(bfb(this.i,this.d)==94){++this.d;h=false}f=qfb(this.i,this.d,g);i=Lfe(f,h,(this.e&512)==512);if(!i)throw vbb(new mde(tvd((h0d(),Lue))));Xfe(k,i);d=true;if(g+1>=this.j||bfb(this.i,g+1)!=93)throw vbb(new mde(tvd((h0d(),Jue))));this.d=g+2}nde(this);if(!d){if(this.c!=0||this.a!=45){Ufe(k,c,c)}else{nde(this);if((m=this.c)==1)throw vbb(new mde(tvd((h0d(),Kue))));if(m==0&&this.a==93){Ufe(k,c,c);Ufe(k,45,45)}else{j=this.a;m==10&&(j=this.tl());nde(this);Ufe(k,c,j)}}}(this.e&zte)==zte&&this.c==0&&this.a==44&&nde(this)}if(this.c==1)throw vbb(new mde(tvd((h0d(),Kue))));if(b){Zfe(b,k);k=b}Yfe(k);Vfe(k);this.b=0;nde(this);return k};_.wl=function Ade(){var a,b,c,d;c=this.vl(false);while((d=this.c)!=7){a=this.a;if(d==0&&(a==45||a==38)||d==4){nde(this);if(this.c!=9)throw vbb(new mde(tvd((h0d(),Que))));b=this.vl(false);if(d==4)Xfe(c,b);else if(a==45)Zfe(c,b);else if(a==38)Wfe(c,b);else throw vbb(new hz('ASSERT'))}else{throw vbb(new mde(tvd((h0d(),Rue))))}}nde(this);return c};_.xl=function Bde(){var a,b;a=this.a-48;b=(wfe(),wfe(),++vfe,new Hge(12,null,a));!this.g&&(this.g=new Wvb);Tvb(this.g,new cge(a));nde(this);return b};_.yl=function Cde(){nde(this);return wfe(),ofe};_.zl=function Dde(){nde(this);return wfe(),mfe};_.Al=function Ede(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Bl=function Fde(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Cl=function Gde(){nde(this);return Ife()};_.Dl=function Hde(){nde(this);return wfe(),qfe};_.El=function Ide(){nde(this);return wfe(),tfe};_.Fl=function Jde(){var a;if(this.d>=this.j||((a=bfb(this.i,this.d++))&65504)!=64)throw vbb(new mde(tvd((h0d(),Eue))));nde(this);return wfe(),wfe(),++vfe,new ige(0,a-64)};_.Gl=function Kde(){nde(this);return Jfe()};_.Hl=function Lde(){nde(this);return wfe(),ufe};_.Il=function Mde(){var a;a=(wfe(),wfe(),++vfe,new ige(0,105));nde(this);return a};_.Jl=function Nde(){nde(this);return wfe(),rfe};_.Kl=function Ode(){nde(this);return wfe(),pfe};_.Ll=function Pde(a,b){return this.tl()};_.Ml=function Qde(){nde(this);return wfe(),hfe};_.Nl=function Rde(){var a,b,c,d,e;if(this.d+1>=this.j)throw vbb(new mde(tvd((h0d(),Bue))));d=-1;b=null;a=bfb(this.i,this.d);if(49<=a&&a<=57){d=a-48;!this.g&&(this.g=new Wvb);Tvb(this.g,new cge(d));++this.d;if(bfb(this.i,this.d)!=41)throw vbb(new mde(tvd((h0d(),yue))));++this.d}else{a==63&&--this.d;nde(this);b=qde(this);switch(b.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));break;default:throw vbb(new mde(tvd((h0d(),Cue))));}}nde(this);e=rde(this);c=null;if(e.e==2){if(e.em()!=2)throw vbb(new mde(tvd((h0d(),Due))));c=e.am(1);e=e.am(0)}if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return wfe(),wfe(),++vfe,new vge(d,b,e,c)};_.Ol=function Sde(){nde(this);return wfe(),ife};_.Pl=function Tde(){var a;nde(this);a=Cfe(24,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Ql=function Ude(){var a;nde(this);a=Cfe(20,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Rl=function Vde(){var a;nde(this);a=Cfe(22,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Sl=function Wde(){var a,b,c,d,e;a=0;c=0;b=-1;while(this.d=this.j)throw vbb(new mde(tvd((h0d(),zue))));if(b==45){++this.d;while(this.d=this.j)throw vbb(new mde(tvd((h0d(),zue))))}if(b==58){++this.d;nde(this);d=Dfe(rde(this),a,c);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this)}else if(b==41){++this.d;nde(this);d=Dfe(rde(this),a,c)}else throw vbb(new mde(tvd((h0d(),Aue))));return d};_.Tl=function Xde(){var a;nde(this);a=Cfe(21,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Ul=function Yde(){var a;nde(this);a=Cfe(23,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Vl=function Zde(){var a,b;nde(this);a=this.f++;b=Efe(rde(this),a);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return b};_.Wl=function $de(){var a;nde(this);a=Efe(rde(this),0);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Xl=function _de(a){nde(this);if(this.c==5){nde(this);return Bfe(a,(wfe(),wfe(),++vfe,new lge(9,a)))}else return Bfe(a,(wfe(),wfe(),++vfe,new lge(3,a)))};_.Yl=function aee(a){var b;nde(this);b=(wfe(),wfe(),++vfe,new Lge(2));if(this.c==5){nde(this);Kge(b,(null,ffe));Kge(b,a)}else{Kge(b,a);Kge(b,(null,ffe))}return b};_.Zl=function bee(a){nde(this);if(this.c==5){nde(this);return wfe(),wfe(),++vfe,new lge(9,a)}else return wfe(),wfe(),++vfe,new lge(3,a)};_.a=0;_.b=0;_.c=0;_.d=0;_.e=0;_.f=1;_.g=null;_.j=0;var bbb=mdb(kxe,'RegEx/RegexParser',820);bcb(1824,820,{},hee);_.sl=function iee(a){return false};_.tl=function jee(){return eee(this)};_.ul=function lee(a){return fee(a)};_.vl=function mee(a){return gee(this)};_.wl=function nee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.xl=function oee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.yl=function pee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.zl=function qee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Al=function ree(){nde(this);return fee(67)};_.Bl=function see(){nde(this);return fee(73)};_.Cl=function tee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Dl=function uee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.El=function vee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Fl=function wee(){nde(this);return fee(99)};_.Gl=function xee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Hl=function yee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Il=function zee(){nde(this);return fee(105)};_.Jl=function Aee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Kl=function Bee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ll=function Cee(a,b){return Xfe(a,fee(b)),-1};_.Ml=function Dee(){nde(this);return wfe(),wfe(),++vfe,new ige(0,94)};_.Nl=function Eee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ol=function Fee(){nde(this);return wfe(),wfe(),++vfe,new ige(0,36)};_.Pl=function Gee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ql=function Hee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Rl=function Iee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Sl=function Jee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Tl=function Kee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ul=function Lee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Vl=function Mee(){var a;nde(this);a=Efe(rde(this),0);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Wl=function Nee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Xl=function Oee(a){nde(this);return Bfe(a,(wfe(),wfe(),++vfe,new lge(3,a)))};_.Yl=function Pee(a){var b;nde(this);b=(wfe(),wfe(),++vfe,new Lge(2));Kge(b,a);Kge(b,(null,ffe));return b};_.Zl=function Qee(a){nde(this);return wfe(),wfe(),++vfe,new lge(3,a)};var cee=null,dee=null;var $ab=mdb(kxe,'RegEx/ParserForXMLSchema',1824);bcb(117,1,yxe,xfe);_.$l=function yfe(a){throw vbb(new hz('Not supported.'))};_._l=function Gfe(){return -1};_.am=function Hfe(a){return null};_.bm=function Mfe(){return null};_.cm=function Pfe(a){};_.dm=function Qfe(a){};_.em=function Rfe(){return 0};_.Ib=function Sfe(){return this.fm(0)};_.fm=function Tfe(a){return this.e==11?'.':''};_.e=0;var Yee,Zee,$ee,_ee,afe,bfe=null,cfe,dfe=null,efe,ffe,gfe=null,hfe,ife,jfe,kfe,lfe,mfe,nfe,ofe,pfe,qfe,rfe,sfe,tfe,ufe,vfe=0;var lbb=mdb(kxe,'RegEx/Token',117);bcb(136,117,{3:1,136:1,117:1},$fe);_.fm=function bge(a){var b,c,d;if(this.e==4){if(this==efe)c='.';else if(this==cfe)c='\\d';else if(this==sfe)c='\\w';else if(this==nfe)c='\\s';else{d=new Hfb;d.a+='[';for(b=0;b0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Efb(d,age(this.b[b]))}else{Efb(d,age(this.b[b]));d.a+='-';Efb(d,age(this.b[b+1]))}}d.a+=']';c=d.a}}else{if(this==jfe)c='\\D';else if(this==lfe)c='\\W';else if(this==kfe)c='\\S';else{d=new Hfb;d.a+='[^';for(b=0;b0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Efb(d,age(this.b[b]))}else{Efb(d,age(this.b[b]));d.a+='-';Efb(d,age(this.b[b+1]))}}d.a+=']';c=d.a}}return c};_.a=false;_.c=false;var _ab=mdb(kxe,'RegEx/RangeToken',136);bcb(584,1,{584:1},cge);_.a=0;var abb=mdb(kxe,'RegEx/RegexParser/ReferencePosition',584);bcb(583,1,{3:1,583:1},ege);_.Fb=function fge(a){var b;if(a==null)return false;if(!JD(a,583))return false;b=BD(a,583);return dfb(this.b,b.b)&&this.a==b.a};_.Hb=function gge(){return LCb(this.b+'/'+See(this.a))};_.Ib=function hge(){return this.c.fm(this.a)};_.a=0;var cbb=mdb(kxe,'RegEx/RegularExpression',583);bcb(223,117,yxe,ige);_._l=function jge(){return this.a};_.fm=function kge(a){var b,c,d;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:d='\\'+HD(this.a&aje);break;case 12:d='\\f';break;case 10:d='\\n';break;case 13:d='\\r';break;case 9:d='\\t';break;case 27:d='\\e';break;default:if(this.a>=Tje){c=(b=this.a>>>0,'0'+b.toString(16));d='\\v'+qfb(c,c.length-6,c.length)}else d=''+HD(this.a&aje);}break;case 8:this==hfe||this==ife?(d=''+HD(this.a&aje)):(d='\\'+HD(this.a&aje));break;default:d=null;}return d};_.a=0;var dbb=mdb(kxe,'RegEx/Token/CharToken',223);bcb(309,117,yxe,lge);_.am=function mge(a){return this.a};_.cm=function nge(a){this.b=a};_.dm=function oge(a){this.c=a};_.em=function pge(){return 1};_.fm=function qge(a){var b;if(this.e==3){if(this.c<0&&this.b<0){b=this.a.fm(a)+'*'}else if(this.c==this.b){b=this.a.fm(a)+'{'+this.c+'}'}else if(this.c>=0&&this.b>=0){b=this.a.fm(a)+'{'+this.c+','+this.b+'}'}else if(this.c>=0&&this.b<0){b=this.a.fm(a)+'{'+this.c+',}'}else throw vbb(new hz('Token#toString(): CLOSURE '+this.c+She+this.b))}else{if(this.c<0&&this.b<0){b=this.a.fm(a)+'*?'}else if(this.c==this.b){b=this.a.fm(a)+'{'+this.c+'}?'}else if(this.c>=0&&this.b>=0){b=this.a.fm(a)+'{'+this.c+','+this.b+'}?'}else if(this.c>=0&&this.b<0){b=this.a.fm(a)+'{'+this.c+',}?'}else throw vbb(new hz('Token#toString(): NONGREEDYCLOSURE '+this.c+She+this.b))}return b};_.b=0;_.c=0;var ebb=mdb(kxe,'RegEx/Token/ClosureToken',309);bcb(821,117,yxe,rge);_.am=function sge(a){return a==0?this.a:this.b};_.em=function tge(){return 2};_.fm=function uge(a){var b;this.b.e==3&&this.b.am(0)==this.a?(b=this.a.fm(a)+'+'):this.b.e==9&&this.b.am(0)==this.a?(b=this.a.fm(a)+'+?'):(b=this.a.fm(a)+(''+this.b.fm(a)));return b};var fbb=mdb(kxe,'RegEx/Token/ConcatToken',821);bcb(1822,117,yxe,vge);_.am=function wge(a){if(a==0)return this.d;if(a==1)return this.b;throw vbb(new hz('Internal Error: '+a))};_.em=function xge(){return !this.b?1:2};_.fm=function yge(a){var b;this.c>0?(b='(?('+this.c+')'):this.a.e==8?(b='(?('+this.a+')'):(b='(?'+this.a);!this.b?(b+=this.d+')'):(b+=this.d+'|'+this.b+')');return b};_.c=0;var gbb=mdb(kxe,'RegEx/Token/ConditionToken',1822);bcb(1823,117,yxe,zge);_.am=function Age(a){return this.b};_.em=function Bge(){return 1};_.fm=function Cge(a){return '(?'+(this.a==0?'':See(this.a))+(this.c==0?'':See(this.c))+':'+this.b.fm(a)+')'};_.a=0;_.c=0;var hbb=mdb(kxe,'RegEx/Token/ModifierToken',1823);bcb(822,117,yxe,Dge);_.am=function Ege(a){return this.a};_.em=function Fge(){return 1};_.fm=function Gge(a){var b;b=null;switch(this.e){case 6:this.b==0?(b='(?:'+this.a.fm(a)+')'):(b='('+this.a.fm(a)+')');break;case 20:b='(?='+this.a.fm(a)+')';break;case 21:b='(?!'+this.a.fm(a)+')';break;case 22:b='(?<='+this.a.fm(a)+')';break;case 23:b='(?'+this.a.fm(a)+')';}return b};_.b=0;var ibb=mdb(kxe,'RegEx/Token/ParenToken',822);bcb(521,117,{3:1,117:1,521:1},Hge);_.bm=function Ige(){return this.b};_.fm=function Jge(a){return this.e==12?'\\'+this.a:Wee(this.b)};_.a=0;var jbb=mdb(kxe,'RegEx/Token/StringToken',521);bcb(465,117,yxe,Lge);_.$l=function Mge(a){Kge(this,a)};_.am=function Nge(a){return BD(Uvb(this.a,a),117)};_.em=function Oge(){return !this.a?0:this.a.a.c.length};_.fm=function Pge(a){var b,c,d,e,f;if(this.e==1){if(this.a.a.c.length==2){b=BD(Uvb(this.a,0),117);c=BD(Uvb(this.a,1),117);c.e==3&&c.am(0)==b?(e=b.fm(a)+'+'):c.e==9&&c.am(0)==b?(e=b.fm(a)+'+?'):(e=b.fm(a)+(''+c.fm(a)))}else{f=new Hfb;for(d=0;d=this.c.b:this.a<=this.c.b};_.Sb=function whe(){return this.b>0};_.Tb=function yhe(){return this.b};_.Vb=function Ahe(){return this.b-1};_.Qb=function Bhe(){throw vbb(new cgb(Exe))};_.a=0;_.b=0;var pbb=mdb(Bxe,'ExclusiveRange/RangeIterator',254);var TD=pdb(Fve,'C');var WD=pdb(Ive,'I');var sbb=pdb(Khe,'Z');var XD=pdb(Jve,'J');var SD=pdb(Eve,'B');var UD=pdb(Gve,'D');var VD=pdb(Hve,'F');var rbb=pdb(Kve,'S');var h1=odb('org.eclipse.elk.core.labels','ILabelManager');var O4=odb(Tte,'DiagnosticChain');var u8=odb(pwe,'ResourceSet');var V4=mdb(Tte,'InvocationTargetException',null);var Ihe=(Az(),Dz);var gwtOnLoad=gwtOnLoad=Zbb;Xbb(hcb);$bb('permProps',[[[Fxe,Gxe],[Hxe,'gecko1_8']],[[Fxe,Gxe],[Hxe,'ie10']],[[Fxe,Gxe],[Hxe,'ie8']],[[Fxe,Gxe],[Hxe,'ie9']],[[Fxe,Gxe],[Hxe,'safari']]]); +// -------------- RUN GWT INITIALIZATION CODE -------------- +gwtOnLoad(null, 'elk', null); + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],3:[function(require,module,exports){ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/******************************************************************************* + * Copyright (c) 2021 Kiel University and others. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +var ELK = require('./elk-api.js').default; + +var ELKNode = function (_ELK) { + _inherits(ELKNode, _ELK); + + function ELKNode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, ELKNode); + + var optionsClone = Object.assign({}, options); + + var workerThreadsExist = false; + try { + require.resolve('web-worker'); + workerThreadsExist = true; + } catch (e) {} + + // user requested a worker + if (options.workerUrl) { + if (workerThreadsExist) { + var Worker = require('web-worker'); + optionsClone.workerFactory = function (url) { + return new Worker(url); + }; + } else { + console.warn('Web worker requested but \'web-worker\' package not installed. \nConsider installing the package or pass your own \'workerFactory\' to ELK\'s constructor.\n... Falling back to non-web worker version.'); + } + } + + // unless no other workerFactory is registered, use the fake worker + if (!optionsClone.workerFactory) { + var _require = require('./elk-worker.min.js'), + _Worker = _require.Worker; + + optionsClone.workerFactory = function (url) { + return new _Worker(url); + }; + } + + return _possibleConstructorReturn(this, (ELKNode.__proto__ || Object.getPrototypeOf(ELKNode)).call(this, optionsClone)); + } + + return ELKNode; +}(ELK); + +Object.defineProperty(module.exports, "__esModule", { + value: true +}); +module.exports = ELKNode; +ELKNode.default = ELKNode; +},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(require,module,exports){ +/** + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = Worker; +},{}]},{},[3])(3) +}); + + +/***/ }), + +/***/ 19487: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "diagram": () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(87115); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59373); +/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(43349); +/* harmony import */ var elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17295); +/* harmony import */ var elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27484); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17967); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20683); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(70277); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45625); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(39354); +/* harmony import */ var dagre_d3_es__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(91518); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59542); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(10285); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28734); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_11__); + + + + + + + + + + + + + + + + + + + + + + + +const findCommonAncestor = (id1, id2, treeData) => { + const { parentById } = treeData; + const visited = /* @__PURE__ */ new Set(); + let currentId = id1; + while (currentId) { + visited.add(currentId); + if (currentId === id2) { + return currentId; + } + currentId = parentById[currentId]; + } + currentId = id2; + while (currentId) { + if (visited.has(currentId)) { + return currentId; + } + currentId = parentById[currentId]; + } + return "root"; +}; +const elk = new (elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1___default())(); +const portPos = {}; +const conf = {}; +let nodeDb = {}; +const addVertices = function(vert, svgId, root, doc, diagObj, parentLookupDb, graph) { + const svg = root.select(`[id="${svgId}"]`); + const nodes = svg.insert("g").attr("class", "nodes"); + const keys = Object.keys(vert); + keys.forEach(function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + const styles2 = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.a)(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + const labelData = { width: 0, height: 0 }; + if ((0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.e)((0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.g)().flowchart.htmlLabels)) { + const node2 = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_13__/* .addHtmlLabel */ .a)(svg, node2).node(); + const bbox = vertexNode.getBBox(); + labelData.width = bbox.width; + labelData.height = bbox.height; + labelData.labelNode = vertexNode; + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles2.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.c.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + const bbox = vertexNode.getBBox(); + labelData.width = bbox.width; + labelData.height = bbox.height; + labelData.labelNode = vertexNode; + } + const ports = [ + { + id: vertex.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: vertex.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: vertex.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: vertex.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let radious = 0; + let _shape = ""; + let layoutOptions = {}; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + layoutOptions = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const node = { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.g)().flowchart.padding + }; + let boundingBox; + let nodeEl; + if (node.type !== "group") { + nodeEl = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.b)(nodes, node, vertex.dir); + boundingBox = nodeEl.node().getBBox(); + } + const data = { + id: vertex.id, + ports: vertex.type === "diamond" ? ports : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions, + labelText: vertexText, + labelData, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: diagObj.db.lookUpDomId(vertex.id), + // haveCallback: vertex.haveCallback, + width: boundingBox == null ? void 0 : boundingBox.width, + height: boundingBox == null ? void 0 : boundingBox.height, + // dir: vertex.dir, + type: vertex.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: nodeEl, + parent: parentLookupDb.parentById[vertex.id] + }; + nodeDb[node.id] = data; + }); + return graph; +}; +const getNextPosition = (position, edgeDirection, graphDirection) => { + const portPos2 = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + portPos2.TD = portPos2.TB; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc88", graphDirection, edgeDirection, position); + return portPos2[graphDirection][edgeDirection][position]; +}; +const getNextPort = (node, edgeDirection, graphDirection) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("getNextPort abc88", { node, edgeDirection, graphDirection }); + if (!portPos[node]) { + switch (graphDirection) { + case "TB": + case "TD": + portPos[node] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + portPos[node] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + portPos[node] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + portPos[node] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + } + const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; + if (edgeDirection === "in") { + portPos[node].inPosition = getNextPosition( + portPos[node].inPosition, + edgeDirection, + graphDirection + ); + } else { + portPos[node].outPosition = getNextPosition( + portPos[node].outPosition, + edgeDirection, + graphDirection + ); + } + return result; +}; +const getEdgeStartEndPoint = (edge, dir) => { + let source = edge.start; + let target = edge.end; + const startNode = nodeDb[source]; + const endNode = nodeDb[target]; + if (!startNode || !endNode) { + return { source, target }; + } + if (startNode.type === "diamond") { + source = `${source}-${getNextPort(source, "out", dir)}`; + } + if (endNode.type === "diamond") { + target = `${target}-${getNextPort(target, "in", dir)}`; + } + return { source, target }; +}; +const addEdges = function(edges, diagObj, graph, svg) { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 edges = ", edges); + const labelsEl = svg.insert("g").attr("class", "edgeLabels"); + let linkIdCnt = {}; + let dir = diagObj.db.getDirection(); + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.a)(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + var linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + var linkNameStart = "LS-" + edge.start; + var linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.a)(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.d)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .c_6); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.d)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .c_6); + } else { + edgeData.curve = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.d)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .c_6); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.c.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + const labelEl = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.f)(labelsEl, edgeData); + const { source, target } = getEdgeStartEndPoint(edge, dir); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.debug("abc78 source and target", source, target); + graph.edges.push({ + id: "e" + edge.start + edge.end, + sources: [source], + targets: [target], + labelEl, + labels: [ + { + width: edgeData.width, + height: edgeData.height, + orgWidth: edgeData.width, + orgHeight: edgeData.height, + text: edgeData.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData + }); + }); + return graph; +}; +const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute) { + let url = ""; + if (arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (edgeData.arrowTypeStart) { + case "arrow_cross": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-crossStart)"); + break; + case "arrow_point": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-pointStart)"); + break; + case "arrow_barb": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-barbStart)"); + break; + case "arrow_circle": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-circleStart)"); + break; + case "aggregation": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-aggregationStart)"); + break; + case "extension": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-extensionStart)"); + break; + case "composition": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-compositionStart)"); + break; + case "dependency": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-dependencyStart)"); + break; + case "lollipop": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-lollipopStart)"); + break; + } + switch (edgeData.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-aggregationEnd)"); + break; + case "extension": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-extensionEnd)"); + break; + case "composition": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-compositionEnd)"); + break; + case "dependency": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-dependencyEnd)"); + break; + case "lollipop": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-lollipopEnd)"); + break; + } +}; +const getClasses = function(text, diagObj) { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Extracting classes"); + diagObj.db.clear("ver-2"); + try { + diagObj.parse(text); + return diagObj.db.getClasses(); + } catch (e) { + return {}; + } +}; +const addSubGraphs = function(db2) { + const parentLookupDb = { parentById: {}, childrenById: {} }; + const subgraphs = db2.getSubGraphs(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Subgraphs - ", subgraphs); + subgraphs.forEach(function(subgraph) { + subgraph.nodes.forEach(function(node) { + parentLookupDb.parentById[node] = subgraph.id; + if (parentLookupDb.childrenById[subgraph.id] === void 0) { + parentLookupDb.childrenById[subgraph.id] = []; + } + parentLookupDb.childrenById[subgraph.id].push(node); + }); + }); + subgraphs.forEach(function(subgraph) { + ({ id: subgraph.id }); + if (parentLookupDb.parentById[subgraph.id] !== void 0) { + parentLookupDb.parentById[subgraph.id]; + } + }); + return parentLookupDb; +}; +const calcOffset = function(src, dest, parentLookupDb) { + const ancestor = findCommonAncestor(src, dest, parentLookupDb); + if (ancestor === void 0 || ancestor === "root") { + return { x: 0, y: 0 }; + } + const ancestorOffset = nodeDb[ancestor].offset; + return { x: ancestorOffset.posX, y: ancestorOffset.posY }; +}; +const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb) { + const offset = calcOffset(edge.sources[0], edge.targets[0], parentLookupDb); + const src = edge.sections[0].startPoint; + const dest = edge.sections[0].endPoint; + const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; + const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); + const points = [ + [src.x + offset.x, src.y + offset.y], + ...segPoints, + [dest.x + offset.x, dest.y + offset.y] + ]; + const curve = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .jvg)().curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .c_6); + const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path").attr("fill", "none"); + const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); + const edgeWithLabel = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(edgeG.node().appendChild(edge.labelEl)); + const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); + edgeWithLabel.attr("width", box.width); + edgeWithLabel.attr("height", box.height); + edgeG.attr( + "transform", + `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` + ); + addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute); +}; +const insertChildren = (nodeArray, parentLookupDb) => { + nodeArray.forEach((node) => { + if (!node.children) { + node.children = []; + } + const childIds = parentLookupDb.childrenById[node.id]; + if (childIds) { + childIds.forEach((childId) => { + node.children.push(nodeDb[childId]); + }); + } + insertChildren(node.children, parentLookupDb); + }); +}; +const draw = async function(text, id, _version, diagObj) { + var _a; + diagObj.db.clear(); + nodeDb = {}; + diagObj.db.setGen("gen-2"); + diagObj.parser.parse(text); + const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let graph = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Drawing flowchart using v3 renderer", elk); + let dir = diagObj.db.getDirection(); + switch (dir) { + case "BT": + graph.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + graph.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + graph.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + graph.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel, flowchart: conf2 } = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.g)(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const svg = root.select(`[id="${id}"]`); + const markers = ["point", "circle", "cross"]; + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.i)(svg, markers, diagObj.type, diagObj.arrowMarkerAbsolute); + const vert = diagObj.db.getVertices(); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Subgraphs - ", subGraphs); + for (let i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes, subG.dir); + } + const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); + const parentLookupDb = addSubGraphs(diagObj.db); + graph = addVertices(vert, id, root, doc, diagObj, parentLookupDb, graph); + const edgesEl = svg.insert("g").attr("class", "edges edgePath"); + const edges = diagObj.db.getEdges(); + graph = addEdges(edges, diagObj, graph, svg); + const nodes = Object.keys(nodeDb); + nodes.forEach((nodeId) => { + const node = nodeDb[nodeId]; + if (!node.parent) { + graph.children.push(node); + } + if (parentLookupDb.childrenById[nodeId] !== void 0) { + node.labels = [ + { + text: node.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: node.labelData.width, + height: node.labelData.height + } + ]; + delete node.x; + delete node.y; + delete node.width; + delete node.height; + } + }); + insertChildren(graph.children, parentLookupDb); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("after layout", JSON.stringify(graph, null, 2)); + const g = await elk.layout(graph); + drawNodes(0, 0, g.children, svg, subGraphsEl, diagObj, 0); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("after layout", g); + (_a = g.edges) == null ? void 0 : _a.map((edge) => { + insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb); + }); + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.s)({}, svg, conf2.diagramPadding, conf2.useMaxWidth); + renderEl.remove(); +}; +const drawNodes = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => { + nodeArray.forEach(function(node) { + if (node) { + nodeDb[node.id].offset = { + posX: node.x + relX, + posY: node.y + relY, + x: relX, + y: relY, + depth, + width: node.width, + height: node.height + }; + if (node.type === "group") { + const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); + subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); + const label = subgraphEl.insert("g").attr("class", "label"); + label.attr( + "transform", + `translate(${node.labels[0].x + relX + node.x}, ${node.labels[0].y + relY + node.y})` + ); + label.node().appendChild(node.labelData.labelNode); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Id (UGH)= ", node.type, node.labels); + } else { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Id (UGH)= ", node.id); + node.el.attr( + "transform", + `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` + ); + } + } + }); + nodeArray.forEach(function(node) { + if (node && node.type === "group") { + drawNodes(relX + node.x, relY + node.y, node.children, svg, subgraphsEl, diagObj, depth + 1); + } + }); +}; +const renderer = { + getClasses, + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < 5; i++) { + sections += ` + .subgraph-lvl-${i} { + fill: ${options[`surface${i}`]}; + stroke: ${options[`surfacePeer${i}`]}; + } + `; + } + return sections; +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span { + color: ${options.titleColor}; + } + + .label text,span { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + ${genSections(options)} +`; +const styles = getStyles; +const diagram = { + db: _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.h, + renderer, + parser: _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.p, + styles +}; + +//# sourceMappingURL=flowchart-elk-definition-170a3958.js.map + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/4ce354b2.2836c8a8.js b/assets/js/4ce354b2.2836c8a8.js new file mode 100644 index 0000000000..7a709e1cd4 --- /dev/null +++ b/assets/js/4ce354b2.2836c8a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5012],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>m});var r=n(67294);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},l=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,s=e.mdxType,o=e.originalType,i=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),p=u(n),b=s,m=p["".concat(i,".").concat(b)]||p[b]||d[b]||o;return n?r.createElement(m,a(a({ref:t},l),{},{components:n})):r.createElement(m,a({ref:t},l))}));function m(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=n.length,a=new Array(o);a[0]=b;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[p]="string"==typeof e?e:s,a[1]=c;for(var u=2;u{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var r=n(87462),s=(n(67294),n(3905));const o={},a="Websocket endpoint",c={unversionedId:"websocket",id:"websocket",title:"Websocket endpoint",description:"Tracetest allow you to subscribe to updates of resources using websockets. There are two endpoints that you can use to manage subscriptions:",source:"@site/docs/websocket.md",sourceDirName:".",slug:"/websocket",permalink:"/websocket",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/websocket.md",tags:[],version:"current",frontMatter:{}},i={},u=[{value:"Endpoint",id:"endpoint",level:2},{value:"Messages",id:"messages",level:2},{value:"Subscribing to updates",id:"subscribing-to-updates",level:3},{value:"Cancel a susbcription",id:"cancel-a-susbcription",level:3}],l={toc:u},p="wrapper";function d(e){let{components:t,...n}=e;return(0,s.kt)(p,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"websocket-endpoint"},"Websocket endpoint"),(0,s.kt)("p",null,"Tracetest allow you to subscribe to updates of resources using websockets. There are two endpoints that you can use to manage subscriptions:"),(0,s.kt)("h2",{id:"endpoint"},"Endpoint"),(0,s.kt)("p",null,"You can open a websocket connection by sending a request the path ",(0,s.kt)("inlineCode",{parentName:"p"},"/ws"),". Example: ",(0,s.kt)("inlineCode",{parentName:"p"},"ws://localhost:11633/ws"),"."),(0,s.kt)("h2",{id:"messages"},"Messages"),(0,s.kt)("h3",{id:"subscribing-to-updates"},"Subscribing to updates"),(0,s.kt)("p",null,"Once the connection is open, you can send a message with the format:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'{\n "type": "subscribe",\n "resource": "test/{testID}/run/{runID}"\n}\n')),(0,s.kt)("p",null,"If a problem happens, you will see an error like:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'{\n "type": "error",\n "message": "details of the error"\n}\n')),(0,s.kt)("p",null,"If the operation executes successfully, you will see a response like:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'{\n "type": "success",\n "resource": "test/{testID}/run/{runID}",\n "message": {\n "subscriptionId": "bdbc6cc8-bba6-4208-a8d3-d3c2c5b3e38b"\n }\n}\n')),(0,s.kt)("p",null,"The ",(0,s.kt)("inlineCode",{parentName:"p"},"subscriptionId")," is an important field because it is required to cancel the subscription. You should store it, otherwise you will keep receiving updates of a resource that you might not want."),(0,s.kt)("h3",{id:"cancel-a-susbcription"},"Cancel a susbcription"),(0,s.kt)("p",null,"Once you have a subscription to a resource, you might want to stop receiving events from that resource. So, there is a ",(0,s.kt)("inlineCode",{parentName:"p"},"unsubscribe")," message that you can send to achieve that."),(0,s.kt)("p",null,"But send this message to the websocket connection:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'{\n "type": "unsubscribe",\n "resource": "test/{testID}/run/{runID}",\n "subscriptionId": "id returned in the subscription command"\n}\n')),(0,s.kt)("p",null,"You will receive an error message if any required field is not field. But in case of a successful operation, you will receive a message like:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-json"},'{\n "type":"success",\n "message":"ok"\n}\n')),(0,s.kt)("p",null,"This message will be sent regardless if the subscription exists or not."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4edc808e.7caaa557.js b/assets/js/4edc808e.7caaa557.js new file mode 100644 index 0000000000..fde0de80c3 --- /dev/null +++ b/assets/js/4edc808e.7caaa557.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4173],{13899:(e,t,a)=>{a.d(t,{Z:()=>d});var n=a(87462),r=a(67294),s=a(86010),i=a(97325),o=a(20107),l=a(83699);const c={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function d(e){let{as:t,id:a,...d}=e;const{navbar:{hideOnScroll:u}}=(0,o.L)();if("h1"===t||!a)return r.createElement(t,(0,n.Z)({},d,{id:void 0}));const m=(0,i.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:a});return r.createElement(t,(0,n.Z)({},d,{className:(0,s.Z)("anchor",u?c.anchorWithHideOnScrollNavbar:c.anchorWithStickyNavbar,d.className),id:a}),d.children,r.createElement(l.Z,{className:"hash-link",to:`#${a}`,"aria-label":m,title:m},"\u200b"))}},90162:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>y,contentTitle:()=>h,default:()=>T,frontMatter:()=>g,metadata:()=>k,toc:()=>b});var n=a(87462),r=a(67294),s=a(3905),i=a(92053),o=a(86010),l=a(97325),c=a(83699),d=a(13899);const u=[{name:"\ud83d\udc47 Install Tracetest",url:"./getting-started/installation",description:r.createElement(l.Z,null,"Set up Tracetest and start trace-based testing your distributed system."),button:"Set up Tracetest"},{name:"\ud83d\ude4c Open Tracetest",url:"./getting-started/open",description:r.createElement(l.Z,null,"After installing it, open Tracetest start to creating trace-based tests."),button:"Create tests"},{name:"\ud83e\udd14 Don't have OpenTelemetry?",url:"./getting-started/no-otel",description:r.createElement(l.Z,null,"Install OpenTelemetry in 5 minutes without any code changes!"),button:"Set up OTel"},{name:"\ud83e\udd29 Open Source",url:"https://github.com/kubeshop/tracetest",description:r.createElement(l.Z,null,"Check out the Tracetest GitHub repo! Please consider giving us a star! \u2b50\ufe0f"),button:"Go to GitHub"},{name:"\u2699\ufe0f Configure trace data stores",url:"../configuration/overview#supported-trace-data-stores",description:r.createElement(l.Z,null,"Connect your existing trace data store or send traces to Tracetest directly!"),button:"Configure Tracetest"},{name:"\ud83d\ude44 New to Trace-based Testing?",url:"../concepts/what-is-trace-based-testing",description:r.createElement(l.Z,null,"Read about the concepts of trace-based testing to learn more!"),button:"View Concepts"}];function m(e){let{name:t,url:a,description:n,button:s}=e;return r.createElement("div",{className:"col col--6 margin-bottom--lg"},r.createElement("div",{className:(0,o.Z)("card")},r.createElement("div",{className:"card__body"},r.createElement(d.Z,{as:"h3"},t),r.createElement("p",null,n)),r.createElement("div",{className:"card__footer"},r.createElement("div",{className:"button-group button-group--block"},r.createElement(c.Z,{className:"button button--secondary",to:a},s)))))}function p(){return r.createElement("div",{className:"row"},u.map((e=>r.createElement(m,(0,n.Z)({key:e.name},e)))))}const g={id:"index",title:"Welcome to Tracetest Docs! \ud83d\udc4b",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",hide_table_of_contents:!1,keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png",breadcrumb_label:"Nothing"},h=void 0,k={unversionedId:"index",id:"index",title:"Welcome to Tracetest Docs! \ud83d\udc4b",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",source:"@site/docs/index.mdx",sourceDirName:".",slug:"/",permalink:"/",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/index.mdx",tags:[],version:"current",frontMatter:{id:"index",title:"Welcome to Tracetest Docs! \ud83d\udc4b",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",hide_table_of_contents:!1,keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png",breadcrumb_label:"Nothing"},sidebar:"tutorialSidebar",next:{title:"Getting Started with Tracetest \ud83d\ude80",permalink:"/getting-started/overview"}},y={},b=[{value:"Why Tracetest?",id:"why-tracetest",level:2},{value:"Architecture",id:"architecture",level:2},{value:"Who uses Tracetest?",id:"who-uses-tracetest",level:2},{value:"What makes Tracetest special?",id:"what-makes-tracetest-special",level:2}],v={toc:b},N="wrapper";function T(e){let{components:t,...a}=e;return(0,s.kt)(N,(0,n.Z)({},v,a,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("p",null,"Tracetest is a trace-based testing tool for building integration and end-to-end tests in minutes using your ",(0,s.kt)("a",{parentName:"p",href:"https://opentelemetry.io/docs/getting-started/"},"OpenTelemetry")," traces. Assert against your trace data at every point of a request transaction."),(0,s.kt)(p,{mdxType:"WelcomeGuideCardsRow"}),(0,s.kt)("h2",{id:"why-tracetest"},"Why Tracetest?"),(0,s.kt)("p",null,"You can:"),(0,s.kt)("ul",null,(0,s.kt)("li",{parentName:"ul"},"Define tests and assertions against every single microservice that a trace goes through."),(0,s.kt)("li",{parentName:"ul"},"Define ",(0,s.kt)("strong",{parentName:"li"},"assertions against")," both the ",(0,s.kt)("strong",{parentName:"li"},"response and trace data"),"."),(0,s.kt)("li",{parentName:"ul"},"Ensure both your response and the underlying processes worked correctly, quickly, and without errors."),(0,s.kt)("li",{parentName:"ul"},"Work with your existing distributed tracing solution."),(0,s.kt)("li",{parentName:"ul"},"Build tests based on your already instrumented system."),(0,s.kt)("li",{parentName:"ul"},"Define multiple transaction triggers:",(0,s.kt)("ul",{parentName:"li"},(0,s.kt)("li",{parentName:"ul"},"HTTP requests"),(0,s.kt)("li",{parentName:"ul"},"GRPC requests"),(0,s.kt)("li",{parentName:"ul"},"trace IDs"),(0,s.kt)("li",{parentName:"ul"},"and many more..."))),(0,s.kt)("li",{parentName:"ul"},"Save and run the tests manually or via CI build jobs."),(0,s.kt)("li",{parentName:"ul"},"Write detailed trace-based tests as:",(0,s.kt)("ul",{parentName:"li"},(0,s.kt)("li",{parentName:"ul"},"End-to-end tests"),(0,s.kt)("li",{parentName:"ul"},"Integration tests"))),(0,s.kt)("li",{parentName:"ul"},"Build tests in minutes.")),(0,s.kt)("div",{className:"row"},(0,s.kt)("div",{className:"col col--12 margin-bottom--lg"},(0,s.kt)("div",null,(0,s.kt)("div",{className:"card__body"},(0,s.kt)("p",{align:"center"},(0,s.kt)("b",null,"Visually - Build tests in the Web UI"))),(0,s.kt)("div",{className:"card__footer"},(0,s.kt)("img",{src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1688476657/docs/screely-1688476653521_omxe4r.png"})))),(0,s.kt)("div",{className:"col col--12 margin-bottom--lg"},(0,s.kt)("div",null,(0,s.kt)("div",{className:"card__body"},(0,s.kt)("p",{align:"center"},(0,s.kt)("b",null,"Programmatically - Build tests in YAML"))),(0,s.kt)("div",{className:"card__footer"},(0,s.kt)(i.Z,{language:"yaml",mdxType:"CodeBlock"},"\n type: Test\n spec:\n id: Yg9sN-94g\n name: Pokeshop - Import\n description: Import a Pokemon\n trigger:\n type: http\n httpRequest:\n url: http://demo-api:8081/pokemon/import\n method: POST\n headers:\n - key: Content-Type\n value: application/json\n body: '{\"id\":52}'\n specs:\n - name: 'All Database Spans: Processing time is less than 100ms'\n selector: span[tracetest.span.type=\"database\"]\n assertions:\n - attr:tracetest.span.duration < 100ms\n "))))),(0,s.kt)("h2",{id:"architecture"},"Architecture"),(0,s.kt)("p",null,"Understand how Tracetest works."),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},"Trigger a test and generate a trace response."),(0,s.kt)("li",{parentName:"ol"},"Fetch traces to render and analyze them."),(0,s.kt)("li",{parentName:"ol"},"Add assertions to traces."),(0,s.kt)("li",{parentName:"ol"},"See test results."),(0,s.kt)("li",{parentName:"ol"},"Run tests as part of CI/CD pipelines.")),(0,s.kt)("p",null,(0,s.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1686654113/docs/tracetest-marketechture-jun12-v3_ffj2e2.png",alt:"Marketechture"})),(0,s.kt)("h2",{id:"who-uses-tracetest"},"Who uses Tracetest?"),(0,s.kt)("p",null,"Our users are typically developers or QA engineers building distributed systems with microservices using back-end languages like Go, Rust, Node.js and Python."),(0,s.kt)("h2",{id:"what-makes-tracetest-special"},"What makes Tracetest special?"),(0,s.kt)("p",null,"Tracetest can be compared with Cypress or Selenium; however Tracetest is fundamentally different."),(0,s.kt)("p",null,"Cypress and Selenium are constrained by using the browser for testing. Tracetest bypasses this entirely by using your existing OpenTelemetry instrumentation and trace data to run tests and assertions against traces in every step of a request transaction."))}T.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/4f879a16.fa75f676.js b/assets/js/4f879a16.fa75f676.js new file mode 100644 index 0000000000..4f1c7a1f24 --- /dev/null +++ b/assets/js/4f879a16.fa75f676.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9630],{3905:(e,t,n)=>{n.d(t,{Zo:()=>g,kt:()=>d});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},g=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,g=l(e,["components","mdxType","originalType","parentName"]),p=c(n),h=i,d=p["".concat(s,".").concat(h)]||p[h]||u[h]||a;return n?r.createElement(d,o(o({ref:t},g),{},{components:n})):r.createElement(d,o({ref:t},g))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:i,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var r=n(87462),i=(n(67294),n(3905));const a={},o="Trace Polling Settings",l={unversionedId:"configuration/trace-polling",id:"configuration/trace-polling",title:"Trace Polling Settings",description:"Tracetest currently has one algorithm for gathering the trace associated with a test which is based on periodic polling. We will be adding the ability to add multiple polling settings in the coming releases, as well as adding new polling strategies. Let us know as you have specific needs by adding an issue.",source:"@site/docs/configuration/trace-polling.md",sourceDirName:"configuration",slug:"/configuration/trace-polling",permalink:"/configuration/trace-polling",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/trace-polling.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Provisioning a Tracetest Server",permalink:"/configuration/provisioning"},next:{title:"Tracetest Analyzer Settings",permalink:"/configuration/tracetest-analyzer"}},s={},c=[{value:"Periodic Polling Strategy",id:"periodic-polling-strategy",level:2},{value:"Changing Trace Polling Settings from the UI",id:"changing-trace-polling-settings-from-the-ui",level:2},{value:"Changing Trace Polling Settings with the CLI",id:"changing-trace-polling-settings-with-the-cli",level:2}],g={toc:c},p="wrapper";function u(e){let{components:t,...a}=e;return(0,i.kt)(p,(0,r.Z)({},g,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"trace-polling-settings"},"Trace Polling Settings"),(0,i.kt)("p",null,"Tracetest currently has one algorithm for gathering the trace associated with a test which is based on periodic polling. We will be adding the ability to add multiple polling settings in the coming releases, as well as adding new polling strategies. Let us know as you have specific needs by ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/issues/new/choose"},"adding an issue"),"."),(0,i.kt)("h2",{id:"periodic-polling-strategy"},"Periodic Polling Strategy"),(0,i.kt)("p",null,"Tracetest polls the trace data store to find and retrieve the trace that is generated by the current test run. Both the total length of time to wait to receive the trace, i.e. the 'Max wait time for trace', and the time to delay between each polling attempt, i.e. 'Retry delay', can be adjusted. The following diagram shows how the polling for the trace works:"),(0,i.kt)("mermaid",{value:"flowchart TD\n A[Run] --\x3e B[Created]\n B --\x3e C[Resolve Trigger Vars]\n C --\x3e D[Execute Trigger]\n D --\x3e ET{Is Successful Trigger}\n ET --\x3e|Yes| E[Queue Polling]\n ET --\x3e|NO| ES[Set State to Failed]\n ES --\x3e Q\n E --\x3e F[Execute Polling Job]\n F --\x3e G[Fetch Trace from Data Store
after the retry delay]\n G --\x3e H{Trace Exists}\n H --\x3e|No| I{Max wait time
for trace reached}\n H --\x3e|Yes| J{Has the span # changed}\n J --\x3e|Yes| G\n J --\x3e|No| K[Trace is ready]\n I --\x3e|No| G\n I --\x3e|Yes| L[Trace fetch failed]\n K --\x3e O[Generating Outputs]\n O --\x3e P[Running Test Specs]\n P --\x3e Q[Finish]\n L --\x3e ES"}),(0,i.kt)("h2",{id:"changing-trace-polling-settings-from-the-ui"},"Changing Trace Polling Settings from the UI"),(0,i.kt)("p",null,"In the Tracetest Web UI, open (1) Settings and select (2) the Trace Polling tab:"),(0,i.kt)("p",null,(0,i.kt)("img",{alt:"Trace Polling Settings",src:n(57630).Z,width:"2846",height:"1588"})),(0,i.kt)("p",null,"From this trace polling page, under settings, you can adjust the speed with which the trace data store is polled when gathering the trace associated with a test run."),(0,i.kt)("h2",{id:"changing-trace-polling-settings-with-the-cli"},"Changing Trace Polling Settings with the CLI"),(0,i.kt)("p",null,"Or, if you prefer using the CLI, you can use this resource definition file to set the polling parameters for the Tracetest server:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"type: PollingProfile\nspec:\n default: true\n periodic:\n retryDelay: 500ms\n timeout: 50s\n strategy: periodic\n")),(0,i.kt)("p",null,"Proceed to run this command in the terminal and specify the file above."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply pollingprofile -f my/resource/pollingprofile-resource.yaml\n")))}u.isMDXComponent=!0},57630:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/trace-polling-settings-0.11.3-3a1c291ba54b81a434f7d77c1f90a1ea.png"}}]); \ No newline at end of file diff --git a/assets/js/514a1dd4.98d84792.js b/assets/js/514a1dd4.98d84792.js new file mode 100644 index 0000000000..f2700ece15 --- /dev/null +++ b/assets/js/514a1dd4.98d84792.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5906],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>d});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),u=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(o.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},f=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=u(n),f=r,d=c["".concat(o,".").concat(f)]||c[f]||m[f]||s;return n?a.createElement(d,i(i({ref:t},p),{},{components:n})):a.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,i=new Array(s);i[0]=f;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[c]="string"==typeof e?e:r,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>u});var a=n(87462),r=(n(67294),n(3905));const s={},i="Defining Test Outputs in Text Files",l={unversionedId:"cli/creating-test-outputs",id:"cli/creating-test-outputs",title:"Defining Test Outputs in Text Files",description:"Outputs are really useful when running Test Suites. They allow for exporting values from a test so they become available in the Variable Sets of the current Test Suite.",source:"@site/docs/cli/creating-test-outputs.md",sourceDirName:"cli",slug:"/cli/creating-test-outputs",permalink:"/cli/creating-test-outputs",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/creating-test-outputs.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Defining Test Specifications in Text Files",permalink:"/cli/creating-test-specifications"},next:{title:"Running Tests From the Command Line Interface (CLI)",permalink:"/cli/running-tests"}},o={},u=[{value:"Outputs are Expression Results",id:"outputs-are-expression-results",level:2},{value:"Examples",id:"examples",level:2},{value:"Basic Expression",id:"basic-expression",level:3},{value:"Extract a Value from a JSON",id:"extract-a-value-from-a-json",level:3},{value:"Multiple Values",id:"multiple-values",level:3}],p={toc:u},c="wrapper";function m(e){let{components:t,...n}=e;return(0,r.kt)(c,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"defining-test-outputs-in-text-files"},"Defining Test Outputs in Text Files"),(0,r.kt)("p",null,"Outputs are really useful when running ",(0,r.kt)("a",{parentName:"p",href:"../concepts/test-suites"},"Test Suites"),". They allow for exporting values from a test so they become available in the ",(0,r.kt)("a",{parentName:"p",href:"/concepts/variable-sets"},"Variable Sets")," of the current Test Suite."),(0,r.kt)("h2",{id:"outputs-are-expression-results"},"Outputs are Expression Results"),(0,r.kt)("p",null,"An output exports the result of an ",(0,r.kt)("a",{parentName:"p",href:"../concepts/expressions"},"Expression")," and assigns it to a name, so it can be injected into the variable set of a running Test Suite.\nA ",(0,r.kt)("inlineCode",{parentName:"p"},"selector")," is needed only if the provided expression refers to a/some span/s attribute or meta attributes."),(0,r.kt)("p",null,"It can be defined using the following YAML definition:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'outputs:\n - name: USER_ID\n selector: span[name = "user creation"]\n value: attr:myapp.users.created_id\n')),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"value")," attribute is an ",(0,r.kt)("inlineCode",{parentName:"p"},"expression")," and is a very powerful tool."),(0,r.kt)("h2",{id:"examples"},"Examples"),(0,r.kt)("h3",{id:"basic-expression"},"Basic Expression"),(0,r.kt)("p",null,"You can output basic expressions:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'outputs:\n\n- name: ARITHMETIC_RESULT\n value: 1 + 1\n # results in ARITHMETIC_RESULT = 2\n\n- name: INTERPOLATE_STRING\n # assume PRE_EXISTING_VALUE=someValue from env vars\n value: "the value ${var:PRE_EXISTING_VALUE} comes from the env var PRE_EXISTING_VALUE"\n # results in INTERPOLATE_STRING = "the value someValue comes from the env var PRE_EXISTING_VALUE\n')),(0,r.kt)("h3",{id:"extract-a-value-from-a-json"},"Extract a Value from a JSON"),(0,r.kt)("p",null,"Imagine a hypotetical ",(0,r.kt)("inlineCode",{parentName:"p"},"/users/create")," endpoint that returns the full ",(0,r.kt)("inlineCode",{parentName:"p"},"user")," object, including the new ID, when the operation is successful."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"outputs:\n- name: USER_ID\n selector: span[name = \"POST /user/create\"]\n value: attr:http.response.body | json_path '.id'\n")),(0,r.kt)("h3",{id:"multiple-values"},"Multiple Values"),(0,r.kt)("p",null,"Using the same hypotethical user creation endpoint, a user creation might result on multiple sql queries, for example:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"INSERT INTO users ...")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"INSERT INTO permissions...")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"SELECT remaining_users FROM accounts")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"UPDATE accounts SET remaining_users ..."))),(0,r.kt)("p",null,"In this case, the service is instrumented so that each query generates a span of type ",(0,r.kt)("inlineCode",{parentName:"p"},"database"),".\nYou can get a list of SQL operations:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'outputs:\n- name: SQL_OPS\n selector: span[tracetest.span.type = "database"]\n value: attr:sql.operation\n # result: SQL_OPS = ["INSERT", "INSERT", "SELECT", "UPDATE"]\n')),(0,r.kt)("p",null,"Since the value is an array, you can also apply filters to it:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'outputs:\n- name: LAST_SQL_OP\n selector: span[tracetest.span.type = "database"]\n value: attr:sql.operation | get_index \'last\'\n # result: LAST_SQL_OP = "INSERT"\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/52afe2f5.da0c6d4f.js b/assets/js/52afe2f5.da0c6d4f.js new file mode 100644 index 0000000000..6df31a7b9f --- /dev/null +++ b/assets/js/52afe2f5.da0c6d4f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4262],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),u=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return a.createElement(i.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,i=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=u(n),d=r,h=c["".concat(i,".").concat(d)]||c[d]||m[d]||s;return n?a.createElement(h,o(o({ref:t},p),{},{components:n})):a.createElement(h,o({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,o=new Array(s);o[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[c]="string"==typeof e?e:r,o[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>u});var a=n(87462),r=(n(67294),n(3905));const s={},o="Running Tests From the Command Line Interface (CLI)",l={unversionedId:"cli/running-tests",id:"cli/running-tests",title:"Running Tests From the Command Line Interface (CLI)",description:"Once you have created a test, whether from the Tracetest UI or via a text editor, you will need the capability to run it via the Command Line Interface (CLI) to integrate it into your CI/CD process or your local development workflow.",source:"@site/docs/cli/running-tests.md",sourceDirName:"cli",slug:"/cli/running-tests",permalink:"/cli/running-tests",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/running-tests.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Defining Test Outputs in Text Files",permalink:"/cli/creating-test-outputs"},next:{title:"Undefined Variables",permalink:"/cli/undefined-variables"}},i={},u=[{value:"Running Your First Test",id:"running-your-first-test",level:2},{value:"Running a Test That Uses Variable Sets",id:"running-a-test-that-uses-variable-sets",level:2}],p={toc:u},c="wrapper";function m(e){let{components:t,...s}=e;return(0,r.kt)(c,(0,a.Z)({},p,s,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-tests-from-the-command-line-interface-cli"},"Running Tests From the Command Line Interface (CLI)"),(0,r.kt)("p",null,"Once you have created a test, whether from the Tracetest UI or via a text editor, you will need the capability to run it via the Command Line Interface (CLI) to integrate it into your CI/CD process or your local development workflow."),(0,r.kt)("p",null,"The documentation for running a test via the CLI can be found here:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_run"},"tracetest run"),": This page provides examples of using this command.")),(0,r.kt)("h2",{id:"running-your-first-test"},"Running Your First Test"),(0,r.kt)("p",null,"To run a test, give the path to the test definition file with the ",(0,r.kt)("inlineCode",{parentName:"p"},"'-f'")," option. This will launch a test and provide a link to the created test run."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Output:"',title:'"Output:"'},"\u2718 Pokeshop - Import (http://localhost:11633/test/4oI08rA4g/run/12/test)\n \u2714 Response should be ok\n \u2714 #59ce1f4250482ba5\n \u2714 attr:tracetest.response.status = 200 (200)\n \u2714 JSON from external request should have name of 'meowth'\n \u2714 #efa1be47f04a0d43\n \u2714 attr:http.response.body| json_path '$.name' = \"diglett\" (diglett)\n \u2718 Postgres DB queries are fast\n \u2718 #f062f4d34031279e\n \u2718 attr:tracetest.span.duration < 20ms (23ms) (http://localhost:11633/test/4oI08rA4g/run/12/test?selectedAssertion=2&selectedSpan=f062f4d34031279e)\n \u2714 #0afed975903f2db5\n \u2714 attr:tracetest.span.duration < 20ms (636us)\n \u2714 #13ce59129b4e7e31\n \u2714 attr:tracetest.span.duration < 20ms (2ms)\n")),(0,r.kt)("p",null,"Running the same command with the '-o json' option would change the output from the default of human readable 'pretty' to 'json'. This can be useful when you wish to extract particular data from the response. This would look like:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml -o json\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json",metastring:'title="Output:"',title:'"Output:"'},'{\n "testRunWebUrl": "http://localhost:11633/test/4oI08rA4g/run/13/test",\n "results": {\n "results": [\n {\n "results": [\n {\n "allPassed": true,\n "assertion": "attr:tracetest.response.status = 200",\n "spanResults": [\n {\n "observedValue": "200",\n "passed": true,\n "spanId": "92e4781f4961bbe9"\n }\n ]\n }\n ],\n "selector": {\n "query": "span[tracetest.span.type=\\"general\\" name=\\"Tracetest trigger\\"]",\n "structure": [\n {\n "filters": [\n {\n "operator": "=",\n "property": "tracetest.span.type",\n "value": "general"\n },\n {\n "operator": "=",\n "property": "name",\n "value": "Tracetest trigger"\n }\n ]\n }\n ]\n }\n },\n {\n "results": [\n {\n "assertion": "attr:http.response.body| json_path \'$.name\' = \\"diglett\\"",\n "spanResults": [\n {\n "error": "no match"\n }\n ]\n }\n ],\n "selector": {\n "query": "span[tracetest.span.type=\\"http\\" name=\\"HTTP GET pokeapi.pokemon\\" http.method=\\"GET\\"]",\n "structure": [\n {\n "filters": [\n {\n "operator": "=",\n "property": "tracetest.span.type",\n "value": "http"\n },\n {\n "operator": "=",\n "property": "name",\n "value": "HTTP GET pokeapi.pokemon"\n },\n {\n "operator": "=",\n "property": "http.method",\n "value": "GET"\n }\n ]\n }\n ]\n }\n },\n {\n "results": [\n {\n "assertion": "attr:tracetest.span.duration \\u003c 20ms",\n "spanResults": [\n {\n "error": "no match",\n "observedValue": "22ms",\n "spanId": "1755c8fc14905bd1"\n },\n {\n "observedValue": "574us",\n "passed": true,\n "spanId": "c41f9b8f49f6eb32"\n },\n {\n "observedValue": "1ms",\n "passed": true,\n "spanId": "48bef78ad4b3c3ab"\n }\n ]\n }\n ],\n "selector": {\n "query": "span[tracetest.span.type=\\"database\\" db.system=\\"postgresql\\"]",\n "structure": [\n {\n "filters": [\n {\n "operator": "=",\n "property": "tracetest.span.type",\n "value": "database"\n },\n {\n "operator": "=",\n "property": "db.system",\n "value": "postgresql"\n }\n ]\n }\n ]\n }\n }\n ]\n }\n}\n')),(0,r.kt)("p",null,"You can also opt to output the result as JUnit to a file. You would run the command with a -j option and a file name, ie:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml -j junit.out\n")),(0,r.kt)("p",null,"The JUnit output file would then contain the JUnit result, for example:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-xml"},'\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n')),(0,r.kt)("h2",{id:"running-a-test-that-uses-variable-sets"},"Running a Test That Uses Variable Sets"),(0,r.kt)("p",null,"There are two ways of referencing a variable set when running a test. "),(0,r.kt)("p",null,"You can reference an existing variable set using its id. For example, given this defined variable set with an id of 'testenv':"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"testenv",src:n(81754).Z,width:"1736",height:"620"})),(0,r.kt)("p",null,"We can run a test and specify that variable set with this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml -e testenv\n")),(0,r.kt)("p",null,"You can also reference a variable set resource file which will be used to create a new variable set or update an existing one. For example, if you have a file named local.env with this content:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: VariableSet\nspec:\n id: local.env\n name: local.env\n values:\n - key: POKEID\n value: 45\n - key: POKENAME\n value: vileplume\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run test -f path/to/test.yaml --vars path/to/local.env\n")),(0,r.kt)("p",null,"If you use the variable set resource approach, a new variable set will be created in Tracetest."),(0,r.kt)("p",null,"The second approach is very useful if you are running tests from a CI pipeline."))}m.isMDXComponent=!0},81754:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/show-environment-definition-69ba7aef6b87d684e9e8c311e5197aa0.png"}}]); \ No newline at end of file diff --git a/assets/js/532f69dd.90aa03e7.js b/assets/js/532f69dd.90aa03e7.js new file mode 100644 index 0000000000..2cbca33c02 --- /dev/null +++ b/assets/js/532f69dd.90aa03e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9188],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),l=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(r),d=a,m=u["".concat(i,".").concat(d)]||u[d]||f[d]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:a,c[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var n=r(87462),a=(r(67294),r(3905));const o={},c="CLI Reference",s={unversionedId:"cli/reference/tracetest_server",id:"cli/reference/tracetest_server",title:"CLI Reference",description:"tracetest server",source:"@site/docs/cli/reference/tracetest_server.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_server",permalink:"/cli/reference/tracetest_server",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_server.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_run"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_server_install"}},i={},l=[{value:"tracetest server",id:"tracetest-server",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:l},u="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,a.kt)("h2",{id:"tracetest-server"},"tracetest server"),(0,a.kt)("p",null,"Manage your tracetest server"),(0,a.kt)("h3",{id:"synopsis"},"Synopsis"),(0,a.kt)("p",null,"Manage your tracetest server"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"tracetest server [flags]\n")),(0,a.kt)("h3",{id:"options"},"Options"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," -h, --help help for server\n")),(0,a.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,a.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest"},"tracetest"),"\t - CLI to configure, install and execute tests on a Tracetest server"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_server_install"},"tracetest server install"),"\t - Install a new Tracetest server")),(0,a.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/567d21a5.e460327d.js b/assets/js/567d21a5.e460327d.js new file mode 100644 index 0000000000..b8f2c53670 --- /dev/null +++ b/assets/js/567d21a5.e460327d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1767],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),o=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=o(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,c=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=o(r),m=a,d=u["".concat(s,".").concat(m)]||u[m]||f[m]||c;return r?n.createElement(d,l(l({ref:t},p),{},{components:r})):n.createElement(d,l({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=r.length,l=new Array(c);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,l[1]=i;for(var o=2;o{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>f,frontMatter:()=>c,metadata:()=>i,toc:()=>o});var n=r(87462),a=(r(67294),r(3905));const c={},l="CLI Reference",i={unversionedId:"cli/reference/tracetest",id:"cli/reference/tracetest",title:"CLI Reference",description:"tracetest",source:"@site/docs/cli/reference/tracetest.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest",permalink:"/cli/reference/tracetest",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Defining Variable Sets as Text Files",permalink:"/cli/creating-variable-sets"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_apply"}},s={},o=[{value:"tracetest",id:"tracetest",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:o},u="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,a.kt)("h2",{id:"tracetest"},"tracetest"),(0,a.kt)("p",null,"CLI to configure, install and execute tests on a Tracetest server"),(0,a.kt)("h3",{id:"synopsis"},"Synopsis"),(0,a.kt)("p",null,"CLI to configure, install and execute tests on a Tracetest server"),(0,a.kt)("h3",{id:"options"},"Options"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -h, --help help for tracetest\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,a.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_apply"},"tracetest apply"),"\t - Apply resources"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_completion"},"tracetest completion"),"\t - Generate the autocompletion script for the specified shell"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_configure"},"tracetest configure"),"\t - Configure your tracetest CLI"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_dashboard"},"tracetest dashboard"),"\t - Opens the Tracetest Dashboard URL"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_delete"},"tracetest delete"),"\t - Delete resources"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_export"},"tracetest export"),"\t - Export resource"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_get"},"tracetest get"),"\t - Get resource"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_list"},"tracetest list"),"\t - List resources"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_run"},"tracetest run"),"\t - run resources"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_server"},"tracetest server"),"\t - Manage your tracetest server"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_version"},"tracetest version"),"\t - Display this CLI tool version")),(0,a.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/59bd05c4.f1ba7092.js b/assets/js/59bd05c4.f1ba7092.js new file mode 100644 index 0000000000..054623875b --- /dev/null +++ b/assets/js/59bd05c4.f1ba7092.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[182],{3905:(e,r,t)=>{t.d(r,{Zo:()=>c,kt:()=>y});var n=t(67294);function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=n.createContext({}),p=function(e){var r=n.useContext(s),t=r;return e&&(t="function"==typeof e?e(r):l(l({},r),e)),t},c=function(e){var r=p(e.components);return n.createElement(s.Provider,{value:r},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(t),f=o,y=u["".concat(s,".").concat(f)]||u[f]||m[f]||a;return t?n.createElement(y,l(l({ref:r},c),{},{components:t})):n.createElement(y,l({ref:r},c))}));function y(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var a=t.length,l=new Array(a);l[0]=f;var i={};for(var s in r)hasOwnProperty.call(r,s)&&(i[s]=r[s]);i.originalType=e,i[u]="string"==typeof e?e:o,l[1]=i;for(var p=2;p{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>i,toc:()=>p});var n=t(87462),o=(t(67294),t(3905));const a={},l="Common Problems",i={unversionedId:"analyzer/plugins/common-problems",id:"analyzer/plugins/common-problems",title:"Common Problems",description:"The Common Problems plugin is responsible of analyzing the spans that are part of a trace in order to identify frequent mistakes in the distributed system.",source:"@site/docs/analyzer/plugins/common-problems.md",sourceDirName:"analyzer/plugins",slug:"/analyzer/plugins/common-problems",permalink:"/analyzer/plugins/common-problems",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/analyzer/plugins/common-problems.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"no-api-key-leak",permalink:"/analyzer/rules/no-api-key-leak"},next:{title:"prefer-dns",permalink:"/analyzer/rules/prefer-dns"}},s={},p=[{value:"Rules",id:"rules",level:2}],c={toc:p},u="wrapper";function m(e){let{components:r,...t}=e;return(0,o.kt)(u,(0,n.Z)({},c,t,{components:r,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"common-problems"},"Common Problems"),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"Common Problems")," plugin is responsible of analyzing the spans that are part of a trace in order to identify frequent mistakes in the distributed system."),(0,o.kt)("h2",{id:"rules"},"Rules"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/analyzer/rules/prefer-dns"},"prefer-dns"))))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5bce1fe2.66cec72b.js b/assets/js/5bce1fe2.66cec72b.js new file mode 100644 index 0000000000..e554b3cda3 --- /dev/null +++ b/assets/js/5bce1fe2.66cec72b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[435],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=n.createContext({}),l=function(e){var t=n.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=l(e.components);return n.createElement(p.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=l(a),m=r,h=d["".concat(p,".").concat(m)]||d[m]||u[m]||s;return a?n.createElement(h,o(o({ref:t},c),{},{components:a})):n.createElement(h,o({ref:t},c))}));function h(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,o=new Array(s);o[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[d]="string"==typeof e?e:r,o[1]=i;for(var l=2;l{a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var n=a(87462),r=(a(67294),a(3905));const s={},o="Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK)",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-aws-x-ray",id:"examples-tutorials/recipes/running-tracetest-with-aws-x-ray",title:"Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK)",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-aws-x-ray.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray",permalink:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-aws-x-ray.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest with Elastic APM",permalink:"/examples-tutorials/recipes/running-tracetest-with-elasticapm"},next:{title:"Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK & AWS Distro for OpenTelemetry)",permalink:"/examples-tutorials/recipes/running-tracetest-with-aws-x-ray-adot"}},p={},l=[{value:"Sample Node.js App with AWS X-Ray and Tracetest",id:"sample-nodejs-app-with-aws-x-ray-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:l},d="wrapper";function u(e){let{components:t,...a}=e;return(0,r.kt)(d,(0,n.Z)({},c,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-tracetest-with-aws-x-ray-aws-x-ray-nodejs-sdk"},"Running Tracetest with AWS X-Ray (AWS X-Ray Node.js SDK)"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-amazon-x-ray"},"Check out the source code on GitHub here."))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/xray/"},"AWS X-Ray")," provides a complete view of requests as they travel through your application and filters visual data across payloads, functions, traces, services, APIs and more with no-code and low-code motions."),(0,r.kt)("h2",{id:"sample-nodejs-app-with-aws-x-ray-and-tracetest"},"Sample Node.js App with AWS X-Ray and Tracetest"),(0,r.kt)("p",null,"This is a simple quick start guide on how to configure a Node.js app to use instrumentation with traces and Tracetest for enhancing your E2E and integration tests with trace-based testing. The infrastructure will use AWS X-Ray as the trace data store and a Node.js app to generate the telemetry data."),(0,r.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("p",null,"You will need ",(0,r.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,r.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this quick start app!"),(0,r.kt)("p",null,"And a set of AWS credentials to connect Tracetest to the cloud API."),(0,r.kt)("h2",{id:"project-structure"},"Project Structure"),(0,r.kt)("p",null,"The project is built with Docker Compose."),(0,r.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory is for the Node.js app."),(0,r.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"root")," directory are for the setting up the Node.js App, Tracetest and ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon.html"},"X-Ray Daemon"),"."),(0,r.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,r.kt)("p",null,"All ",(0,r.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services. For example, ",(0,r.kt)("inlineCode",{parentName:"p"},"xray-daemon:2000")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/index.js")," will map to the ",(0,r.kt)("inlineCode",{parentName:"p"},"xray-daemon")," service, where the port ",(0,r.kt)("inlineCode",{parentName:"p"},"2000")," is the port where the X-Ray Daemon accepts telemetry data."),(0,r.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,r.kt)("p",null,"The Node.js app is a simple Express app, contained in the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/index.js")," file."),(0,r.kt)("p",null,"It is instrumented using ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-nodejs.html"},"AWS X-Ray SDK")," sending the initial data to the Daemon that will be pushing the telemetry data to the AWS service."),(0,r.kt)("p",null,"The key following is the instrumentation section from the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/index.js")," file."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},'const AWSXRay = require("aws-xray-sdk");\nconst XRayExpress = AWSXRay.express;\nconst express = require("express");\n\nAWSXRay.setDaemonAddress("xray-daemon:2000");\n\n// Capture all AWS clients we create\nconst AWS = AWSXRay.captureAWS(require("aws-sdk"));\nAWS.config.update({\n region: process.env.AWS_REGION || "us-west-2",\n});\n\n// Capture all outgoing https requests\nAWSXRay.captureHTTPsGlobal(require("https"));\nconst https = require("https");\n\nconst app = express();\nconst port = 3000;\n\napp.use(XRayExpress.openSegment("Tracetest"));\n')),(0,r.kt)("p",null,"To start the server, run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm start\n")),(0,r.kt)("p",null,"As you can see the ",(0,r.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\n\nCOPY ./src/package*.json ./\n\nRUN npm install\nCOPY ./src .\n\nEXPOSE 3000\nCMD [ "npm", "start" ]\n')),(0,r.kt)("h2",{id:"tracetest"},"Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," includes three other services."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon.html"},(0,r.kt)("strong",{parentName:"a"},"AWS X-Ray Daemon"))," - is a software application that listens for traffic on UDP port 2000, gathers raw segment data, and relays it to the AWS X-Ray API. The daemon works in conjunction with the AWS X-Ray SDKs and must be running so that data sent by the SDKs can reach the X-Ray service."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,r.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\n\nservices:\n tracetest:\n image: kubeshop/tracetest:${TAG:-latest}\n platform: linux/amd64\n volumes:\n - type: bind\n source: ./tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest.provision.yaml\n target: /app/provisioning.yaml\n ports:\n - 11633:11633\n command: --provisioning-file /app/provisioning.yaml\n extra_hosts:\n - "host.docker.internal:host-gateway"\n depends_on:\n postgres:\n condition: service_healthy\n xray-daemon:\n condition: service_started\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n\n postgres:\n image: postgres:14\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n ports:\n - 5432:5432\n\n xray-daemon:\n image: amazon/aws-xray-daemon:latest\n environment:\n AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}\n AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}\n AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}\n AWS_REGION: ${AWS_REGION}\n ports:\n - 2000:2000\n')),(0,r.kt)("p",null,"Tracetest depends on Postgres and the x-ray daemon. Tracetest requires config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,r.kt)("inlineCode",{parentName:"p"},"root")," directory and the respective config files."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml")," file defines the trace data store, set to AWS X-Ray, meaning the traces will be stored in X-Ray and Tracetest will fetch them from X-Ray when running tests."),(0,r.kt)("p",null,"But how does Tracetest fetch traces?"),(0,r.kt)("p",null,"Tracetest uses the Golang ",(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/sdk-for-go/"},"AWS-SDK")," library to pull to fetch trace data."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'---\ntype: DataStore\nspec:\n name: awsxray\n type: awsxray\n awsxray:\n accessKeyId: \n secretAccessKey: \n sessionToken: \n region: "us-west-2"\n')),(0,r.kt)("p",null,"How do traces reach AWX X-Ray?"),(0,r.kt)("p",null,"The application code in the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/index.js")," file uses the native AWS SDK X-Ray library which sends telemetry data to the X-Ray Daemon to be processed and then sent to the configured AWS X-Ray SaaS."),(0,r.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,r.kt)("p",null,"To start both the Node.js app and Tracetest, run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose up\n")),(0,r.kt)("p",null,"This will start your Tracetest instance on ",(0,r.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),". Open it and start creating tests!\nMake sure to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"http://app:3000/")," URL in your test creation because your Node.js app and Tracetest are in the same network."),(0,r.kt)("h2",{id:"learn-more"},"Learn More"),(0,r.kt)("p",null,"Please visit our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,r.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5c2a7aff.0f8beff5.js b/assets/js/5c2a7aff.0f8beff5.js new file mode 100644 index 0000000000..8f51f95d41 --- /dev/null +++ b/assets/js/5c2a7aff.0f8beff5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1134],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(f,s(s({ref:t},c),{},{components:n})):a.createElement(f,s({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,s=new Array(i);s[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:r,s[1]=o;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={},s="Defining Test Specifications in Text Files",o={unversionedId:"cli/creating-test-specifications",id:"cli/creating-test-specifications",title:"Defining Test Specifications in Text Files",description:"Test Specifications may be added to a trace to set a value for a step in the trace to determine success or failure.",source:"@site/docs/cli/creating-test-specifications.md",sourceDirName:"cli",slug:"/cli/creating-test-specifications",permalink:"/cli/creating-test-specifications",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/creating-test-specifications.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Defining Tests as Text Files",permalink:"/cli/creating-tests"},next:{title:"Defining Test Outputs in Text Files",permalink:"/cli/creating-test-outputs"}},l={},p=[{value:"Assertions and Selectors",id:"assertions-and-selectors",level:2},{value:"Selectors",id:"selectors",level:3},{value:"Assertions",id:"assertions",level:3},{value:"Referencing Other Fields from the Same Span",id:"referencing-other-fields-from-the-same-span",level:4},{value:"Available Operations",id:"available-operations",level:2},{value:"Testing Span Events",id:"testing-span-events",level:2},{value:"Query breakdown",id:"query-breakdown",level:3}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"defining-test-specifications-in-text-files"},"Defining Test Specifications in Text Files"),(0,r.kt)("p",null,"Test Specifications may be added to a trace to set a value for a step in the trace to determine success or failure."),(0,r.kt)("h2",{id:"assertions-and-selectors"},"Assertions and Selectors"),(0,r.kt)("p",null,"Assertions are as important as how you trigger your test. Without them, your test is just a fancy way of executing a request using a CLI command. In this section, we will discuss how you can declare your assertions in your definition file."),(0,r.kt)("p",null,"Before we start, there are two concepts that you must understand to write your tests:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/concepts/selectors"},"Selectors")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"/concepts/assertions"},"Assertions"))),(0,r.kt)("h3",{id:"selectors"},"Selectors"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Selectors")," are queries that are executed against your trace tree and select a set of spans based on some attributes. They are responsible for defining which spans will be tested against your assertions."),(0,r.kt)("h3",{id:"assertions"},"Assertions"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Assertions")," are tests against a specific span based on its attributes. A practical example might be useful:"),(0,r.kt)("p",null,"Imagine you have to ensure that all your ",(0,r.kt)("inlineCode",{parentName:"p"},"database select statements")," take ",(0,r.kt)("inlineCode",{parentName:"p"},"less than 500ms"),". To write a test for that you must:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Select all spans in your trace related to ",(0,r.kt)("inlineCode",{parentName:"li"},"select statements"),"."),(0,r.kt)("li",{parentName:"ol"},"Check if all those spans lasted ",(0,r.kt)("inlineCode",{parentName:"li"},"less than 500ms"),".")),(0,r.kt)("p",null,"For the first task, we use a selector: ",(0,r.kt)("inlineCode",{parentName:"p"},'span[db.statement contains "SELECT"]'),". While the second one is achieved by using an assertion: ",(0,r.kt)("inlineCode",{parentName:"p"},"attr:tracetest.span.duration < 500ms"),"."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Note:")," When asserting time fields, you can use the following time units: ",(0,r.kt)("inlineCode",{parentName:"p"},"ns")," (nanoseconds), ",(0,r.kt)("inlineCode",{parentName:"p"},"us")," (microseconds), ",(0,r.kt)("inlineCode",{parentName:"p"},"ms")," (milliseconds), ",(0,r.kt)("inlineCode",{parentName:"p"},"s")," (seconds), ",(0,r.kt)("inlineCode",{parentName:"p"},"m")," (minutes), and ",(0,r.kt)("inlineCode",{parentName:"p"},"h")," (hours). Instead of defining ",(0,r.kt)("inlineCode",{parentName:"p"},"attr:tracetest.span.duration <= 3600s"),", you can set it as ",(0,r.kt)("inlineCode",{parentName:"p"},"attr:tracetest.span.duration <= 1h"),".")),(0,r.kt)("p",null,"To write that in your test definition, you can define the following YAML definition:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'specs:\n- selector: span[db.statement contains "SELECT"]\n assertions:\n - attr:tracetest.span.duration < 500ms\n')),(0,r.kt)("p",null,"As you probably noticed in the test definition structure, you can have multiple assertions for the same selector. This is useful to group related validations. For example, ensuring that all your HTTP calls are successful and take less than 1000ms:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'specs:\n- selector: span[tracetest.span.type="http"]\n assertions:\n - attr:http.status_code >= 200\n - attr:http.status_code < 300\n - attr:tracetest.span.duration < 1000ms\n')),(0,r.kt)("h4",{id:"referencing-other-fields-from-the-same-span"},"Referencing Other Fields from the Same Span"),(0,r.kt)("p",null,"You also can reference fields from the same span in your assertions. For example, you can define an assertion to ensure the output number is greater than the input number."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'specs:\n- selector: span[name = "my operation"]\n assertions:\n - attr:myapp.output > attr:myapp.input\n')),(0,r.kt)("p",null,"You also can use basic arithmetic expressions in your assertions:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"assertions:\n - attr:myapp.output = myapp.input + 1\n")),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},"This does not take into account the order of operators yet. So an expression ",(0,r.kt)("inlineCode",{parentName:"p"},"1 + 2 * 3")," will be resolved as ",(0,r.kt)("inlineCode",{parentName:"p"},"9")," instead of ",(0,r.kt)("inlineCode",{parentName:"p"},"7"),". This will be fixed in future releases.")),(0,r.kt)("p",null,"Available operations in an expression are: ",(0,r.kt)("inlineCode",{parentName:"p"},"+"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"-"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"*"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"/"),"."),(0,r.kt)("p",null,"For more information about selectors or assertions, take a look at the documentation for those topics."),(0,r.kt)("h2",{id:"available-operations"},"Available Operations"),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:"left"},"Operator"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"=")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if two values are equal.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"!=")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if two values have different values.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"<")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if value from left side is smaller than the one on the right side of the operation.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"<=")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if value from left side is smaller or equal to the one on the right side of the operation.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},">")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if value from left side is larger than the one on the right side of the operation.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},">=")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if value from left side is larger or equal to the one on the right side of the operation.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"contains")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if value on the right side of the operation is contained inside of the value of the left side of the operation.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:"left"},(0,r.kt)("inlineCode",{parentName:"td"},"not-contains")),(0,r.kt)("td",{parentName:"tr",align:null},"Check if value on the right side of the operation is not contained inside of the value of the left side of the operation.")))),(0,r.kt)("h2",{id:"testing-span-events"},"Testing Span Events"),(0,r.kt)("p",null,"As an MVP of how to test span events, we are injecting ",(0,r.kt)("inlineCode",{parentName:"p"},"all spans")," events into the span attributes as a JSON array. To assert your span events, use the ",(0,r.kt)("inlineCode",{parentName:"p"},"json_path")," filter to select and test the ",(0,r.kt)("strong",{parentName:"p"},"write events"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'specs:\n - selector: span[name = "my span"]\n assertions:\n - attr:span.events | json_path \'$[?(@.name = "event name")].attributes.key\' = "expected_value"\n')),(0,r.kt)("h3",{id:"query-breakdown"},"Query breakdown"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},'@.name = "event name"'),': select the event with name "',(0,r.kt)("strong",{parentName:"li"},"event name"),'"'),(0,r.kt)("li",{parentName:"ul"},"$",'[?(@.name = "event name")]',(0,r.kt)("strong",{parentName:"li"},".attributes.key"),': select the attribute "',(0,r.kt)("strong",{parentName:"li"},"key"),'" from the event with name "',(0,r.kt)("strong",{parentName:"li"},"event name"),'"')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5cd8852f.ba2cf2a1.js b/assets/js/5cd8852f.ba2cf2a1.js new file mode 100644 index 0000000000..3346a7bb4b --- /dev/null +++ b/assets/js/5cd8852f.ba2cf2a1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3238],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=p(n),m=r,k=d["".concat(l,".").concat(m)]||d[m]||u[m]||i;return n?a.createElement(k,o(o({ref:t},c),{},{components:n})):a.createElement(k,o({ref:t},c))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:r,o[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const i={},o="Running Tracetest with Keptn",s={unversionedId:"tools-and-integrations/keptn",id:"tools-and-integrations/keptn",title:"Running Tracetest with Keptn",description:"Tracetest is a testing tool based on OpenTelemetry that permits you to test your distributed application. It allows you to use your trace data generated on your OpenTelemetry tools to check and assert if your application has the desired behavior defined by your test definitions.",source:"@site/docs/tools-and-integrations/keptn.md",sourceDirName:"tools-and-integrations",slug:"/tools-and-integrations/keptn",permalink:"/tools-and-integrations/keptn",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/tools-and-integrations/keptn.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Tools and Integrations",permalink:"/tools-and-integrations/overview"},next:{title:"Running Tracetest with K6",permalink:"/tools-and-integrations/k6"}},l={},p=[{value:"Quickstart",id:"quickstart",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"1. Setup a project and a service.",id:"1-setup-a-project-and-a-service",level:3},{value:"2. Add Tracetest files and job files as resources of a service.",id:"2-add-tracetest-files-and-job-files-as-resources-of-a-service",level:3},{value:"3. Setup a Job Executor Service to see events emitted by the test step.",id:"3-setup-a-job-executor-service-to-see-events-emitted-by-the-test-step",level:3},{value:"4. Run sequence when needed.",id:"4-run-sequence-when-needed",level:3}],c={toc:p},d="wrapper";function u(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-tracetest-with-keptn"},"Running Tracetest with Keptn"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on OpenTelemetry that permits you to test your distributed application. It allows you to use your trace data generated on your OpenTelemetry tools to check and assert if your application has the desired behavior defined by your test definitions."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://keptn.sh/"},"Keptn")," is a powerful tool to automate the lifecycle of your application running on Kubernetes. One of the tasks that we can do with ",(0,r.kt)("inlineCode",{parentName:"p"},"keptn")," is to test an application and see if it is healthy and ready to be used by your users."),(0,r.kt)("p",null,"By using the Keptn ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/keptn-contrib/job-executor-service"},"Job Executor Service")," plugin, we can upload a Tracetest test definition and a CLI configuration to a service and run a test using the following job:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'apiVersion: v2\nactions:\n- name: "Run tracetest on your service"\n events:\n - name: "sh.keptn.event.test.triggered"\n tasks:\n - name: "Run tracetest"\n files:\n - data/test-definition.yaml\n - data/tracetest-cli-config.yaml\n image: "kubeshop/tracetest:latest"\n cmd:\n - tracetest\n args:\n - --config\n - /keptn/data/tracetest-cli-config.yaml\n - test\n - run\n - --file\n - /keptn/data/test-definition.yaml\n\n')),(0,r.kt)("h2",{id:"quickstart"},"Quickstart"),(0,r.kt)("p",null,"In this guide, we will show how to use Tracetest to run these tests and help in your delivery and testing workflows using the Pokeshop example, available on http://localhost:8081 if you are using docker compose or on ",(0,r.kt)("a",{parentName:"p",href:"http://demo-pokemon-api.demo/"},"http://demo-pokemon-api.demo/")," if you installed it on Kubernetes and are using Tracetest on the same cluster."),(0,r.kt)("h3",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("p",null,"In your Kubernetes cluster you should have:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"Keptn 1.0.x")," ",(0,r.kt)("a",{parentName:"li",href:"https://keptn.sh/docs/1.0.x/install/"},"installed"),"."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"Job Executor Service 0.3.x")," ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/keptn-contrib/job-executor-service/blob/main/docs/INSTALL.md"},"installed"),"."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"Tracetest")," server ",(0,r.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/deployment/kubernetes"},"installed")," on the ",(0,r.kt)("inlineCode",{parentName:"li"},"tracetest")," namespace. ")),(0,r.kt)("p",null,"On your machine you should have:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"Keptn CLI")," ",(0,r.kt)("a",{parentName:"li",href:"https://keptn.sh/docs/1.0.x/install/cli-install/"},"installed")),(0,r.kt)("li",{parentName:"ol"},"and already ",(0,r.kt)("a",{parentName:"li",href:"https://keptn.sh/docs/1.0.x/install/authenticate-cli-bridge/"},"authenticated")," with Keptn API.")),(0,r.kt)("p",null,"With everything set up, we will start configuring Keptn and Tracetest."),(0,r.kt)("h3",{id:"1-setup-a-project-and-a-service"},"1. Setup a project and a service."),(0,r.kt)("p",null,"Keptn works with ",(0,r.kt)("a",{parentName:"p",href:"https://keptn.sh/docs/concepts/glossary/"},"concepts")," of a Project (element to maintain multiple services forming an application in stages) and a Service (smallest deployable unit and is deployed in all project stages according to the order)."),(0,r.kt)("p",null,"Usually, these resources are managed by Keptn during Sequences (a set of tasks for realizing a delivery or operations process). In this example, we will create a sequence and run a Tracetest test in a system, once the sequence is triggered."),(0,r.kt)("p",null,"To do that, we will do the following steps:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create a skeletal ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/kubeshop/tracetest/tree/main/examples/keptn-integration/shipyard.yaml"},(0,r.kt)("inlineCode",{parentName:"a"},"shipyard.yaml"))," file with the following content:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'apiVersion: "spec.keptn.sh/0.2.2"\nkind: "Shipyard"\nmetadata:\n name: "shipyard-keptn-tracetest-integration"\nspec:\n stages:\n - name: "production"\n sequences:\n - name: "validate-pokeshop"\n tasks:\n - name: "test"\n')),(0,r.kt)("ol",{start:2},(0,r.kt)("li",{parentName:"ol"},"Create a new ",(0,r.kt)("inlineCode",{parentName:"li"},"keptn-tracetest-integration")," project using that ",(0,r.kt)("inlineCode",{parentName:"li"},"shipyard")," file:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"keptn create project keptn-tracetest-integration -y -s shipyard.yaml\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note:")," Keptn may ask you to have a Git repository for this project to enable GitOps. If so, you need to create an empty Git repository and a Git token and pass it through the flags ",(0,r.kt)("inlineCode",{parentName:"p"},"--git-remote-url"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"--git-user"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"--git-token"),". More details about this setup can be seen on ",(0,r.kt)("a",{parentName:"p",href:"https://keptn.sh/docs/1.0.x/manage/git_upstream"},"Keptn docs/Git-based upstream"),"."),(0,r.kt)("ol",{start:3},(0,r.kt)("li",{parentName:"ol"},"Create a ",(0,r.kt)("inlineCode",{parentName:"li"},"pokeshop")," service:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"keptn create service pokeshop --project keptn-tracetest-integration -y\n")),(0,r.kt)("h3",{id:"2-add-tracetest-files-and-job-files-as-resources-of-a-service"},"2. Add Tracetest files and job files as resources of a service."),(0,r.kt)("p",null,"Now, we will set up a job associated with the ",(0,r.kt)("inlineCode",{parentName:"p"},"pokeshop")," service, listening to the task event ",(0,r.kt)("inlineCode",{parentName:"p"},"test-services"),":"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Create the ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/kubeshop/tracetest/tree/main/examples/keptn-integration/tracetest-cli-config.yaml"},(0,r.kt)("inlineCode",{parentName:"a"},"tracetest-cli-config.yaml"))," configuration file for the Tracetest CLI in your current directory, identifying the Tracetest instance that should run the tests:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"scheme: http\nendpoint: tracetest.tracetest.svc.cluster.local:11633\n")),(0,r.kt)("ol",{start:2},(0,r.kt)("li",{parentName:"ol"},"Create the ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/kubeshop/tracetest/tree/main/examples/keptn-integration/test-definition.yaml"},(0,r.kt)("inlineCode",{parentName:"a"},"test-definition.yaml"))," Tracetest test definition in your current directory:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: Test\nspec:\n id: apdCx-h4g\n name: Pokeshop - List Pokemons\n description: Get a Pokemon\n trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon?take=20&skip=0\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[name = \u201cTracetest trigger\u201d]\n assertions:\n - attr:tracetest.span.duration < 500ms\n")),(0,r.kt)("ol",{start:3},(0,r.kt)("li",{parentName:"ol"},"Add these files as resources for the ",(0,r.kt)("inlineCode",{parentName:"li"},"pokeshop")," service:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"keptn add-resource --project keptn-tracetest-integration --service pokeshop --stage production --resource test-definition.yaml --resourceUri data/test-definition.yaml\nkeptn add-resource --project keptn-tracetest-integration --service pokeshop --stage production --resource tracetest-cli-config.yaml --resourceUri data/tracetest-cli-config.yaml\n")),(0,r.kt)("p",null,"These files will be located in the folder ",(0,r.kt)("inlineCode",{parentName:"p"},"data")," and will be injected into our Keptn job that we will set up in the next step."),(0,r.kt)("ol",{start:4},(0,r.kt)("li",{parentName:"ol"},"Create ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/kubeshop/tracetest/tree/main/examples/keptn-integration/job-config.yaml"},(0,r.kt)("inlineCode",{parentName:"a"},"job-config.yaml")),":")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'apiVersion: v2\nactions:\n- name: "Run tracetest on your service"\n events:\n - name: "sh.keptn.event.test.triggered"\n tasks:\n - name: "Run tracetest"\n files:\n - data/test-definition.yaml\n - data/tracetest-cli-config.yaml\n image: "kubeshop/tracetest:latest"\n cmd:\n - tracetest\n args:\n - --config\n - /keptn/data/tracetest-cli-config.yaml\n - test\n - run\n - --file\n - /keptn/data/test-definition.yaml\n')),(0,r.kt)("p",null,"This job will run Tracetest every time a ",(0,r.kt)("inlineCode",{parentName:"p"},"test")," event happens, listening to the event ",(0,r.kt)("inlineCode",{parentName:"p"},"sh.keptn.event.test.triggered")," (event emitted by the ",(0,r.kt)("inlineCode",{parentName:"p"},"test")," task on the ",(0,r.kt)("inlineCode",{parentName:"p"},"validate-pokeshop")," sequence)."),(0,r.kt)("ol",{start:5},(0,r.kt)("li",{parentName:"ol"},"Add this job as a resource on Keptn:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"keptn add-resource --project keptn-tracetest-integration --service pokeshop --stage production --resource job-config.yaml --resourceUri job/config.yaml\n")),(0,r.kt)("h3",{id:"3-setup-a-job-executor-service-to-see-events-emitted-by-the-test-step"},"3. Setup a Job Executor Service to see events emitted by the test step."),(0,r.kt)("p",null,"To guarantee that our job will be called by Keptn when we execute the ",(0,r.kt)("inlineCode",{parentName:"p"},"deployment")," sequence, we need to configure the integration ",(0,r.kt)("inlineCode",{parentName:"p"},"Job Executor Service")," on ",(0,r.kt)("inlineCode",{parentName:"p"},"keptn-tracetest-integration")," project to listen to ",(0,r.kt)("inlineCode",{parentName:"p"},"sh.keptn.event.test.triggered")," events if it is not configured. We can do that only through the Keptn Bridge (their Web UI), by going to our project, choosing the ",(0,r.kt)("inlineCode",{parentName:"p"},"Settings")," option, and later ",(0,r.kt)("inlineCode",{parentName:"p"},"Integrations"),"."),(0,r.kt)("p",null,"Choose the ",(0,r.kt)("inlineCode",{parentName:"p"},"job-executor-service")," integration, and add a subscription to the event ",(0,r.kt)("inlineCode",{parentName:"p"},"sh.keptn.event.test.triggered")," and the project ",(0,r.kt)("inlineCode",{parentName:"p"},"keptn-tracetest-integration"),"."),(0,r.kt)("h3",{id:"4-run-sequence-when-needed"},"4. Run sequence when needed."),(0,r.kt)("p",null,"Finally, to see the integration running, we only need to execute the following command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sh"},"keptn trigger sequence test-sequence --project keptn-tracetest-integration --service pokeshop --stage production\n")),(0,r.kt)("p",null,"Now you should be able to see the sequence running for ",(0,r.kt)("inlineCode",{parentName:"p"},"keptn-tracetest-integration")," project on Keptn Bridge."))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5f2815e5.1fea0c72.js b/assets/js/5f2815e5.1fea0c72.js new file mode 100644 index 0000000000..729c6adcf8 --- /dev/null +++ b/assets/js/5f2815e5.1fea0c72.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7063],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=o.createContext({}),l=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=l(e.components);return o.createElement(c.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),m=l(n),d=r,f=m["".concat(c,".").concat(d)]||m[d]||u[d]||a;return n?o.createElement(f,i(i({ref:t},s),{},{components:n})):o.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var p={};for(var c in t)hasOwnProperty.call(t,c)&&(p[c]=t[c]);p.originalType=e,p[m]="string"==typeof e?e:r,i[1]=p;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>p,toc:()=>l});var o=n(87462),r=(n(67294),n(3905));const a={},i="Tempo",p={unversionedId:"configuration/connecting-to-data-stores/tempo",id:"configuration/connecting-to-data-stores/tempo",title:"Tempo",description:"Tracetest fetches traces from Tempo on the default gRPC port 9095, or default HTTP port 80.",source:"@site/docs/configuration/connecting-to-data-stores/tempo.md",sourceDirName:"configuration/connecting-to-data-stores",slug:"/configuration/connecting-to-data-stores/tempo",permalink:"/configuration/connecting-to-data-stores/tempo",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/configuration/connecting-to-data-stores/tempo.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Elastic APM",permalink:"/configuration/connecting-to-data-stores/elasticapm"},next:{title:"Honeycomb",permalink:"/configuration/connecting-to-data-stores/honeycomb"}},c={},l=[{value:"Configure Tempo",id:"configure-tempo",level:2},{value:"Configure Tracetest to Use Tempo as a Trace Data Store",id:"configure-tracetest-to-use-tempo-as-a-trace-data-store",level:2},{value:"Connect Tracetest to Tempo with the Web UI",id:"connect-tracetest-to-tempo-with-the-web-ui",level:2},{value:"Connect Tracetest to Tempo with the CLI",id:"connect-tracetest-to-tempo-with-the-cli",level:2}],s={toc:l},m="wrapper";function u(e){let{components:t,...a}=e;return(0,r.kt)(m,(0,o.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"tempo"},"Tempo"),(0,r.kt)("p",null,"Tracetest fetches traces from ",(0,r.kt)("a",{parentName:"p",href:"https://grafana.com/docs/tempo/latest/configuration/#server"},"Tempo on the default gRPC port")," ",(0,r.kt)("inlineCode",{parentName:"p"},"9095"),", or ",(0,r.kt)("a",{parentName:"p",href:"https://grafana.com/docs/tempo/latest/configuration/#server"},"default HTTP port")," ",(0,r.kt)("inlineCode",{parentName:"p"},"80"),"."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Examples of configuring Tracetest can be found in the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},(0,r.kt)("inlineCode",{parentName:"a"},"examples")," folder of the Tracetest GitHub repo"),".")),(0,r.kt)("h2",{id:"configure-tempo"},"Configure Tempo"),(0,r.kt)("p",null,"Tempo uses port ",(0,r.kt)("inlineCode",{parentName:"p"},"9095")," as the default ",(0,r.kt)("inlineCode",{parentName:"p"},"grpc_listen_port"),". The default ",(0,r.kt)("inlineCode",{parentName:"p"},"http_listen_port")," is ",(0,r.kt)("inlineCode",{parentName:"p"},"80"),". Here is a full example of a config file:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# tempo.config.yaml\n\nauth_enabled: false\nserver:\n http_listen_port: 80\n grpc_listen_port: 9095\ndistributor:\n receivers: # This configuration will listen on all ports and protocols that Tempo is capable of.\n jaeger: # the receives all come from the OpenTelemetry collector. more configuration information can\n protocols: # be found here: https://github.com/open-telemetry/opentelemetry-collector/tree/master/receiver.\n thrift_http: #\n grpc: # For a production deployment you should only enable the receivers you need!\n thrift_binary:\n thrift_compact:\n zipkin:\n otlp:\n protocols:\n http:\n grpc:\n opencensus:\ningester:\n trace_idle_period: 10s # The length of time after a trace has not received spans to consider it complete and flush it.\n max_block_bytes: 1_000_000 # Cut the head block when it hits this size or ...\n #traces_per_block: 1_000_000\n max_block_duration: 5m # this much time passes.\ncompactor:\n compaction:\n compaction_window: 1h # Blocks in this time window will be compacted together.\n max_compaction_objects: 1000000 # Maximum size of compacted blocks.\n block_retention: 1h\n compacted_block_retention: 10m\nstorage:\n trace:\n backend: local # Backend configuration to use.\n wal:\n path: /tmp/tempo/wal # Where to store the the wal locally.\n #bloom_filter_false_positive: .05 # Bloom filter false positive rate. Lower values create larger filters but fewer false positives.\n #index_downsample: 10 # Number of traces per index record.\n local:\n path: /tmp/tempo/blocks\n pool:\n max_workers: 100 # The worker pool mainly drives querying, but is also used for polling the blocklist.\n queue_depth: 10000\n")),(0,r.kt)("h2",{id:"configure-tracetest-to-use-tempo-as-a-trace-data-store"},"Configure Tracetest to Use Tempo as a Trace Data Store"),(0,r.kt)("p",null,"Configure Tracetest to be aware that it has to fetch trace data from Tempo."),(0,r.kt)("p",null,"Tracetest uses ",(0,r.kt)("a",{parentName:"p",href:"https://grafana.com/docs/tempo/latest/configuration/#server"},"Tempo's gRPC endpoint")," on port ",(0,r.kt)("inlineCode",{parentName:"p"},"9095")," to fetch trace data. Alternatively, you can use Tempo's HTTP endpoint and default port ",(0,r.kt)("inlineCode",{parentName:"p"},"80"),"."),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Need help configuring the OpenTelemetry Collector so send trace data from your application to Jaeger? Read more in ",(0,r.kt)("a",{parentName:"p",href:"../opentelemetry-collector-configuration-file-reference"},"the reference page here"),").")),(0,r.kt)("h2",{id:"connect-tracetest-to-tempo-with-the-web-ui"},"Connect Tracetest to Tempo with the Web UI"),(0,r.kt)("p",null,"IIn the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, (3) select Tempo. Then, select either ",(0,r.kt)("inlineCode",{parentName:"p"},"gRPC")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTP"),"."),(0,r.kt)("p",null,"If you are using Docker and the ",(0,r.kt)("inlineCode",{parentName:"p"},"gRPC")," endpoint like in the screenshot below, use the service name as the hostname with port ",(0,r.kt)("inlineCode",{parentName:"p"},"9095")," like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"tempo:9095\n")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Tempo",src:n(99015).Z,width:"2254",height:"1422"})),(0,r.kt)("p",null,"If you are using Docker and the ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTP")," URL like in the screenshot below, use the service name as the hostname with port ",(0,r.kt)("inlineCode",{parentName:"p"},"80")," or no specified port like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"http://tempo\n")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Tempo",src:n(99015).Z,width:"2254",height:"1422"})),(0,r.kt)("h2",{id:"connect-tracetest-to-tempo-with-the-cli"},"Connect Tracetest to Tempo with the CLI"),(0,r.kt)("p",null,"Or, if you prefer using the CLI, you can use this file config."),(0,r.kt)("p",null,"For gRPC:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Grafana Tempo\n type: tempo\n default: true\n tempo:\n type: grpc\n grpc:\n endpoint: tempo:9095\n tls:\n insecure: true\n")),(0,r.kt)("p",null,"For HTTP:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: Grafana Tempo\n type: tempo\n default: true\n tempo:\n type: http\n http:\n url: http://tempo\n tls:\n insecure: true\n")),(0,r.kt)("p",null,"Proceed to run this command in the terminal, and specify the file above."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest apply datastore -f my/data-store/file/location.yaml\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"To learn more, ",(0,r.kt)("a",{parentName:"p",href:"/examples-tutorials/recipes/running-tracetest-with-tempo"},"read the recipe on running a sample app with Tempo and Tracetest"),".")))}u.isMDXComponent=!0},99015:(e,t,n)=>{n.d(t,{Z:()=>o});const o=n.p+"assets/images/Tempo-settings-5694016647d4bc7b0e8c34cd68e833c1.png"}}]); \ No newline at end of file diff --git a/assets/js/5f6522c4.404c1a03.js b/assets/js/5f6522c4.404c1a03.js new file mode 100644 index 0000000000..b5aa86e313 --- /dev/null +++ b/assets/js/5f6522c4.404c1a03.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[288],{69162:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-redoc","id":"plugin-redoc-0"}')}}]); \ No newline at end of file diff --git a/assets/js/6316.df334188.js b/assets/js/6316.df334188.js new file mode 100644 index 0000000000..1deec8889b --- /dev/null +++ b/assets/js/6316.df334188.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[6316],{96316:(t,e,n)=>{n.r(e),n.d(e,{diagram:()=>A});var i=n(16432),s=n(59373),r=n(91619),a=n(12281),c=n(7201),o=(n(27484),n(17967),n(27856),n(70277),n(45625),n(39354),n(91518),n(59542),n(10285),n(28734),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[1,2],n=[1,5],i=[6,9,11,17,18,20,22,23,26,27,28],s=[1,15],r=[1,16],a=[1,17],c=[1,18],o=[1,19],l=[1,23],h=[1,24],d=[1,27],u=[4,6,9,11,17,18,20,22,23,26,27,28],p={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,period_statement:24,event_statement:25,period:26,event:27,open_directive:28,type_directive:29,arg_directive:30,close_directive:31,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",26:"period",27:"event",28:"open_directive",29:"type_directive",30:"arg_directive",31:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[24,1],[25,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,i,s,r,a){var c=r.length-1;switch(s){case 1:return r[c-1];case 3:case 7:case 8:this.$=[];break;case 4:r[c-1].push(r[c]),this.$=r[c-1];break;case 5:case 6:this.$=r[c];break;case 11:i.getCommonDb().setDiagramTitle(r[c].substr(6)),this.$=r[c].substr(6);break;case 12:this.$=r[c].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=r[c].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(r[c].substr(8)),this.$=r[c].substr(8);break;case 19:i.addTask(r[c],0,""),this.$=r[c];break;case 20:i.addEvent(r[c].substr(2)),this.$=r[c];break;case 21:i.parseDirective("%%{","open_directive");break;case 22:i.parseDirective(r[c],"type_directive");break;case 23:r[c]=r[c].trim().replace(/'/g,'"'),i.parseDirective(r[c],"arg_directive");break;case 24:i.parseDirective("}%%","close_directive","timeline")}},table:[{3:1,4:e,7:3,12:4,28:n},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,28:n},{13:8,29:[1,9]},{29:[2,21]},{6:[1,10],7:22,8:11,9:[1,12],10:13,11:[1,14],12:4,17:s,18:r,20:a,22:c,23:o,24:20,25:21,26:l,27:h,28:n},{1:[2,2]},{14:25,15:[1,26],31:d},t([15,31],[2,22]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:22,10:28,12:4,17:s,18:r,20:a,22:c,23:o,24:20,25:21,26:l,27:h,28:n},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),{19:[1,29]},{21:[1,30]},t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},t(i,[2,5]),t(i,[2,12]),t(i,[2,13]),t(u,[2,9]),{14:34,31:d},{31:[2,23]},{11:[1,35]},t(u,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,c="",o=0,l=0,h=1,d=r.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc;r.push(g);var f=u.options&&u.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,_,b,k,x,v,S,w,$,E={};;){if(_=n[n.length-1],this.defaultActions[_]?b=this.defaultActions[_]:(null==m&&($=void 0,"number"!=typeof($=i.pop()||u.lex()||h)&&($ instanceof Array&&($=(i=$).pop()),$=e.symbols_[$]||$),m=$),b=a[_]&&a[_][m]),void 0===b||!b.length||!b[0]){var I="";for(x in w=[],a[_])this.terminals_[x]&&x>2&&w.push("'"+this.terminals_[x]+"'");I=u.showPosition?"Parse error on line "+(o+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(m==h?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(I,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:g,expected:w})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+m);switch(b[0]){case 1:n.push(m),s.push(u.yytext),r.push(u.yylloc),n.push(b[1]),m=null,l=u.yyleng,c=u.yytext,o=u.yylineno,g=u.yylloc;break;case 2:if(v=this.productions_[b[1]][1],E.$=s[s.length-v],E._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(E._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(E,[c,l,o,p.yy,b[1],s,r].concat(d))))return k;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[b[1]][0]),s.push(E.$),r.push(E._$),S=a[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),28;case 1:return this.begin("type_directive"),29;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),31;case 4:return 30;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 27;case 21:return 26;case 22:return 6;case 23:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\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;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23],inclusive:!0}}};function g(){this.yy={}}return p.lexer=y,g.prototype=p,p.Parser=g,new g}());o.parser=o;const l=o;let h="",d=0;const u=[],p=[],y=[],g=()=>i.j,f=(t,e,n)=>{(0,i.k)(globalThis,t,e,n)},m=function(){u.length=0,p.length=0,h="",y.length=0,(0,i.m)()},_=function(t){h=t,u.push(t)},b=function(){return u},k=function(){let t=w();let e=0;for(;!t&&e<100;)t=w(),e++;return p.push(...y),p},x=function(t,e,n){const i={id:d++,section:h,type:h,task:t,score:e||0,events:n?[n]:[]};y.push(i)},v=function(t){y.find((t=>t.id===d-1)).events.push(t)},S=function(t){const e={section:h,type:h,description:t,task:t,classes:[]};p.push(e)},w=function(){let t=!0;for(const[e,n]of y.entries())y[e].processed,t=t&&n.processed;return t},$={clear:m,getCommonDb:g,addSection:_,getSections:b,getTasks:k,addTask:x,addTaskOrg:S,addEvent:v,parseDirective:f},E=Object.freeze(Object.defineProperty({__proto__:null,addEvent:v,addSection:_,addTask:x,addTaskOrg:S,clear:m,default:$,getCommonDb:g,getSections:b,getTasks:k,parseDirective:f},Symbol.toStringTag,{value:"Module"}));!function(){function t(t,e,n,s,r,a,c,o){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),c)}function e(t,e,n,s,r,a,c,o,l){const{taskFontSize:h,taskFontFamily:d}=o,u=t.split(//gi);for(let p=0;p)/).reverse(),r=[],a=n.attr("y"),c=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",c+"em");for(let s=0;se||"
"===t)&&(r.pop(),o.text(r.join(" ").trim()),r="
"===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}const T=function(t,e,n){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-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},D=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")},L=function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),c=r.append("g"),o=c.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(I,e.width).node().getBBox(),l=i.fontSize&&i.fontSize.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=o.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,c.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),T(a,e,s),e},C=function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(I,e.width).node().getBBox(),r=n.fontSize&&n.fontSize.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding},M=function(t,e,n,s,r,a,c,o,l,h,d){for(const u of e){const e={descr:u.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.l.debug("taskNode",e);const o=t.append("g").attr("class","taskWrapper"),p=L(o,e,n,c).height;if(i.l.debug("taskHeight after draw",p),o.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,p),u.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=O(t,u.events,n,s,r,c),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!(0,i.g)().timeline.disableMulticolor&&n++}r-=10},O=function(t,e,n,s,r,a){let c=0;const o=r;r+=100;for(const l of e){const e={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};i.l.debug("eventNode",e);const o=t.append("g").attr("class","eventWrapper"),h=L(o,e,n,a).height;c+=h,o.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=o,c},A={db:E,renderer:{setConf:function(t){Object.keys(t).forEach((function(e){conf[e]=t[e]}))},draw:function(t,e,n,r){const a=(0,i.g)(),c=a.leftMargin?a.leftMargin:50;r.db.clear(),r.parser.parse(t+"\n"),i.l.debug("timeline",r.db);const o=a.securityLevel;let l;"sandbox"===o&&(l=(0,s.Ys)("#i"+e));const h=("sandbox"===o?(0,s.Ys)(l.nodes()[0].contentDocument.body):(0,s.Ys)("body")).select("#"+e);h.append("g");const d=r.db.getTasks(),u=r.db.getCommonDb().getDiagramTitle();i.l.debug("task",d),D(h);const p=r.db.getSections();i.l.debug("sections",p);let y=0,g=0,f=0,m=0,_=50+c,b=50;m=50;let k=0,x=!0;p.forEach((function(t){const e=C(h,{number:k,descr:t,section:k,width:150,padding:20,maxHeight:y},a);i.l.debug("sectionHeight before draw",e),y=Math.max(y,e+20)}));let v=0,S=0;i.l.debug("tasks.length",d.length);for(const[s,$]of d.entries()){const t={number:s,descr:$,section:$.section,width:150,padding:20,maxHeight:g},e=C(h,t,a);i.l.debug("taskHeight before draw",e),g=Math.max(g,e+20),v=Math.max(v,$.events.length);let n=0;for(let i=0;i<$.events.length;i++){const t={descr:$.events[i],section:$.section,number:$.section,width:150,padding:20,maxHeight:50};n+=C(h,t,a)}S=Math.max(S,n)}i.l.debug("maxSectionHeight before draw",y),i.l.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach((t=>{const e={number:k,descr:t,section:k,width:150,padding:20,maxHeight:y};i.l.debug("sectionNode",e);const n=h.append("g"),s=L(n,e,k,a);i.l.debug("sectionNode output",s),n.attr("transform",`translate(${_}, 50)`),b+=y+50;const r=d.filter((e=>e.section===t));r.length>0&&M(h,r,k,_,b,g,a,v,S,y,!1),_+=200*Math.max(r.length,1),b=50,k++})):(x=!1,M(h,d,k,_,b,g,a,v,S,y,!0));const w=h.node().getBBox();i.l.debug("bounds",w),u&&h.append("text").text(u).attr("x",w.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=x?y+g+150:g+100;h.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",f).attr("x2",w.width+3*c).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.s)(void 0,h,a.timeline.padding?a.timeline.padding:50,!!a.timeline.useMaxWidth&&a.timeline.useMaxWidth)}},parser:l,styles:t=>`\n .edge {\n stroke-width: 3;\n }\n ${(t=>{let e="";for(let n=0;n{n.d(e,{Z:()=>c});var i=n(61691),s=n(71610);const r=t=>{const{r:e,g:n,b:r}=s.Z.parse(t),a=.2126*i.Z.channel.toLinear(e)+.7152*i.Z.channel.toLinear(n)+.0722*i.Z.channel.toLinear(r);return i.Z.lang.round(a)},a=t=>r(t)>=.5,c=t=>!a(t)}}]); \ No newline at end of file diff --git a/assets/js/63f4ae04.4437cce8.js b/assets/js/63f4ae04.4437cce8.js new file mode 100644 index 0000000000..447fa252ab --- /dev/null +++ b/assets/js/63f4ae04.4437cce8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7134],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(r),d=o,m=u["".concat(c,".").concat(d)]||u[d]||f[d]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[u]="string"==typeof e?e:o,a[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>f,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));const i={},a="CLI Reference",s={unversionedId:"cli/reference/tracetest_list",id:"cli/reference/tracetest_list",title:"CLI Reference",description:"tracetest list",source:"@site/docs/cli/reference/tracetest_list.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_list",permalink:"/cli/reference/tracetest_list",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_list.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_get"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_run"}},c={},l=[{value:"tracetest list",id:"tracetest-list",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:l},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,o.kt)("h2",{id:"tracetest-list"},"tracetest list"),(0,o.kt)("p",null,"List resources"),(0,o.kt)("h3",{id:"synopsis"},"Synopsis"),(0,o.kt)("p",null,"List resources from your Tracetest server"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"tracetest list analyzer|config|datastore|demo|env|organization|pollingprofile|test|testrunner|testsuite|variableset [flags]\n")),(0,o.kt)("h3",{id:"options"},"Options"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' --all All\n -h, --help help for list\n --skip int32 Skip number\n --sortBy string Sort by\n --sortDirection string Sort direction (default "desc")\n --take int32 Take number (default 20)\n')),(0,o.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,o.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/cli/reference/tracetest"},"tracetest"),"\t - CLI to configure, install and execute tests on a Tracetest server")),(0,o.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/63f9da5c.d3aff37b.js b/assets/js/63f9da5c.d3aff37b.js new file mode 100644 index 0000000000..2f1da13df5 --- /dev/null +++ b/assets/js/63f9da5c.d3aff37b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8679],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>d});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=r.createContext({}),p=function(e){var t=r.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,s=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),c=p(a),m=n,d=c["".concat(l,".").concat(m)]||c[m]||g[m]||s;return a?r.createElement(d,i(i({ref:t},u),{},{components:a})):r.createElement(d,i({ref:t},u))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var s=a.length,i=new Array(s);i[0]=m;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[c]="string"==typeof e?e:n,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>s,metadata:()=>o,toc:()=>p});var r=a(87462),n=(a(67294),a(3905));const s={},i="Expressions",o={unversionedId:"concepts/expressions",id:"concepts/expressions",title:"Expressions",description:"Tracetest allows you to add expressions when writing your tests. They are a nice and clean way of adding values that are only known during execution time. For example, when referencing a variable, a span attribute or even arithmetic operations.",source:"@site/docs/concepts/expressions.md",sourceDirName:"concepts",slug:"/concepts/expressions",permalink:"/concepts/expressions",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/concepts/expressions.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Selectors",permalink:"/concepts/selectors"},next:{title:"Test Suites",permalink:"/concepts/test-suites"}},l={},p=[{value:"Features",id:"features",level:2},{value:"Reference Span Attributes",id:"reference-span-attributes",level:3},{value:"Reference Variables",id:"reference-variables",level:3},{value:"Arithmetic Operations",id:"arithmetic-operations",level:3},{value:"String Interpolation",id:"string-interpolation",level:3},{value:"Filters",id:"filters",level:3},{value:"JSON Path",id:"json-path",level:4},{value:"RegEx",id:"regex",level:4},{value:"RegEx Group",id:"regex-group",level:4},{value:"Get Index",id:"get-index",level:3},{value:"Length",id:"length",level:3},{value:"Type",id:"type",level:3}],u={toc:p},c="wrapper";function g(e){let{components:t,...a}=e;return(0,n.kt)(c,(0,r.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"expressions"},"Expressions"),(0,n.kt)("p",null,"Tracetest allows you to add expressions when writing your tests. They are a nice and clean way of adding values that are only known during execution time. For example, when referencing a variable, a span attribute or even arithmetic operations."),(0,n.kt)("h2",{id:"features"},(0,n.kt)("strong",{parentName:"h2"},"Features")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Reference span attributes"),(0,n.kt)("li",{parentName:"ul"},"Reference variables"),(0,n.kt)("li",{parentName:"ul"},"Arithmetic operations"),(0,n.kt)("li",{parentName:"ul"},"String interpolation"),(0,n.kt)("li",{parentName:"ul"},"Filters")),(0,n.kt)("h3",{id:"reference-span-attributes"},(0,n.kt)("strong",{parentName:"h3"},"Reference Span Attributes")),(0,n.kt)("p",null,"When building assertions, you might need to assert if a certain span contains an attribute and that this attribute has a specific value. To accomplish this with Tracetest, you can use expressions to get the value of the span. When referencing an attribute, add the prefix ",(0,n.kt)("inlineCode",{parentName:"p"},"attr:")," and its name. For example, imagine you have to check if the attribute ",(0,n.kt)("inlineCode",{parentName:"p"},"service.name")," is equal to ",(0,n.kt)("inlineCode",{parentName:"p"},"cart-api"),". Use the following statement:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'attr:service.name = "cart-api"\n')),(0,n.kt)("h3",{id:"reference-variables"},(0,n.kt)("strong",{parentName:"h3"},"Reference Variables")),(0,n.kt)("p",null,"Create variables in Tracetest based on the trace obtained by the test to enable assertions that require values from other spans. Variables use the prefix ",(0,n.kt)("inlineCode",{parentName:"p"},"var:")," and its name. For example, a variable called ",(0,n.kt)("inlineCode",{parentName:"p"},"user_id")," would be referenced as ",(0,n.kt)("inlineCode",{parentName:"p"},"var:user_id")," in an expression."),(0,n.kt)("h3",{id:"arithmetic-operations"},(0,n.kt)("strong",{parentName:"h3"},"Arithmetic Operations")),(0,n.kt)("p",null,"Sometimes we need to manipulate data to ensure our test data is correct. As an example, we will use a purchase operation. How you would make sure that, after the purchase, the product inventory is smaller than before? For this, we might want to use arithmetic operations:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},"attr:product.stock = attr:product.stok_before_purchase - attr:product.number_bought_items\n")),(0,n.kt)("h3",{id:"string-interpolation"},(0,n.kt)("strong",{parentName:"h3"},"String Interpolation")),(0,n.kt)("p",null,"Some tests might require strings to be compared, but maybe you need to generate a dynamic string that relies on a dynamic value. This might be used in an assertion or even in the request body referencing a variable."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'attr:error.message = "Could not withdraw ${attr:withdraw.amount}, your balance is insufficient."\n')),(0,n.kt)("p",null,"Note that within ",(0,n.kt)("inlineCode",{parentName:"p"},"${}")," you can add any expression, including arithmetic operations and filters."),(0,n.kt)("h3",{id:"filters"},(0,n.kt)("strong",{parentName:"h3"},"Filters")),(0,n.kt)("p",null,"Filters are functions that are executed using the value obtained by the expression. They are useful to transform the data. Multiple filters can be chained together. The output of the previous filter will be used as the input to the next until all filters are executed."),(0,n.kt)("h4",{id:"json-path"},(0,n.kt)("strong",{parentName:"h4"},"JSON Path")),(0,n.kt)("p",null,"This filter allows you to filter a JSON string and obtain only data that is relevant."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'\'{ "name": "Jorge", "age": 27, "email": "jorge@company.com" }\' | json_path \'.age\' = 27\n')),(0,n.kt)("p",null,"If multiple values are matched, the output will be a flat array containing all values."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'\'{ "array": [{"name": "Jorge", "age": 27}, {"name": "Tim", "age": 52}]}\' | json_path \'$.array[*]..["name", "age"] = \'["Jorge", 27, "Tim", 52]\'\n')),(0,n.kt)("h4",{id:"regex"},(0,n.kt)("strong",{parentName:"h4"},"RegEx")),(0,n.kt)("p",null,"Filters part of the input that match a RegEx. Imagine you have a specific part of a text that you want to extract:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},"'My account balance is $48.52' | regex '\\$\\d+(\\.\\d+)?' = '$48.52'\n")),(0,n.kt)("h4",{id:"regex-group"},(0,n.kt)("strong",{parentName:"h4"},"RegEx Group")),(0,n.kt)("p",null,"If matching more than one value is required, you can define groups for your RegEx and extract multiple values at once."),(0,n.kt)("p",null,"Wrap the groups you want to extract with parentheses."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},"'Hello Marcus, today you have 8 meetings' | regex_group 'Hello (\\w+), today you have (\\d+) meetings' = '[\"Marcus\", 8]'\n")),(0,n.kt)("h3",{id:"get-index"},(0,n.kt)("strong",{parentName:"h3"},"Get Index")),(0,n.kt)("p",null,"Some filters might result in an array. If you want to assert just part of this array, this filter allows you to pick one element from the array based on its index."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},"'{ \"array\": [1, 2, 3] }' | json_path '$.array[*]' | get_index 1 = 2\n")),(0,n.kt)("p",null,"You can select the last item from a list by specifying ",(0,n.kt)("inlineCode",{parentName:"p"},"'last'")," as the argument for the filter:"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},"'{ \"array\": [1, 2, 3] }' | json_path '$.array[*]' | get_index 'last' = 3\n")),(0,n.kt)("h3",{id:"length"},(0,n.kt)("strong",{parentName:"h3"},"Length")),(0,n.kt)("p",null,"Returns the size of the input array. If it's a single value, it will return 1. Otherwise it will return ",(0,n.kt)("inlineCode",{parentName:"p"},"length(input_array)"),"."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},"'{ \"array\": [1, 2, 3] }' | json_path '$.array[*]' | length = 3\n")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'"my string" | length = 1\n')),(0,n.kt)("h3",{id:"type"},(0,n.kt)("strong",{parentName:"h3"},"Type")),(0,n.kt)("p",null,"Return the type of the input as a string."),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'2 | type = "number"\n')),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'2s | type = "duration"\n')),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'"something" | type = "string"\n')),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'[1, 2s, "this is a string"] | type = "array"\n')),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'attr:myapp.operations | get_index 2 | type = "string"\n')),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-css"},'# check if attribute is either a number of a string\n["number", "string"] contains attr:my_attribute | type\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6459b84b.d17e72c0.js b/assets/js/6459b84b.d17e72c0.js new file mode 100644 index 0000000000..c7f955a8c6 --- /dev/null +++ b/assets/js/6459b84b.d17e72c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7868],{18679:(e,t,a)=>{a.d(t,{Z:()=>o});var n=a(67294),r=a(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:a,className:o}=e;return n.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:a},t)}},73992:(e,t,a)=>{a.d(t,{Z:()=>v});var n=a(87462),r=a(67294),l=a(86010),o=a(72957),s=a(16550),i=a(75238),c=a(33609),p=a(92560);function u(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:n,default:r}}=e;return{value:t,label:a,attributes:n,default:r}}))}function m(e){const{values:t,children:a}=e;return(0,r.useMemo)((()=>{const e=t??u(a);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function h(e){let{queryString:t=!1,groupId:a}=e;const n=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,i._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function k(e){const{defaultValue:t,queryString:a=!1,groupId:n}=e,l=m(e),[o,s]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=a.find((e=>e.default))??a[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:l}))),[i,c]=h({queryString:a,groupId:n}),[u,k]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,l]=(0,p.Nk)(a);return[n,(0,r.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:n}),g=(()=>{const e=i??u;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{g&&s(g)}),[g]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);s(e),c(e),k(e)}),[c,k,l]),tabValues:l}}var g=a(51048);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){let{className:t,block:a,selectedValue:s,selectValue:i,tabValues:c}=e;const p=[],{blockElementScrollPositionUntilNextRender:u}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=p.indexOf(t),n=c[a].value;n!==s&&(u(t),i(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=p.indexOf(e.currentTarget)+1;t=p[a]??p[0];break}case"ArrowLeft":{const a=p.indexOf(e.currentTarget)-1;t=p[a]??p[p.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},c.map((e=>{let{value:t,label:a,attributes:o}=e;return r.createElement("li",(0,n.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>p.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":s===t})}),a??t)})))}function T(e){let{lazy:t,children:a,selectedValue:n}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===n));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function f(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",b.tabList)},r.createElement(y,(0,n.Z)({},e,t)),r.createElement(T,(0,n.Z)({},e,t)))}function v(e){const t=(0,g.Z)();return r.createElement(f,(0,n.Z)({key:String(t)},e))}},13063:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>u,default:()=>b,frontMatter:()=>p,metadata:()=>m,toc:()=>h});var n=a(87462),r=a(67294),l=a(3905),o=a(73992),s=a(18679),i=a(92053);function c(){function e(e){let{event:t,installationPlatform:a}=e;window.dataLayer=window.dataLayer||[],window.dataLayer.push({installationPlatform:a,event:"installationPlatform"})}return r.createElement(o.Z,{groupId:"operating-systems"},r.createElement(s.Z,{value:"mac",label:"MAC",default:!0},r.createElement("div",{onClick:()=>e({installationPlatform:"MacOS"})},r.createElement(i.Z,{language:"bash",title:"Terminal"},"brew install kubeshop/tracetest/tracetest"))),r.createElement(s.Z,{value:"linux",label:"LINUX"},r.createElement("div",{onClick:()=>e({installationPlatform:"Linux"})},r.createElement(i.Z,{language:"bash",title:"Terminal"},"curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash"))),r.createElement(s.Z,{value:"win",label:"WINDOWS"},r.createElement("div",{onClick:()=>e({installationPlatform:"Windows"})},r.createElement(i.Z,{language:"bash",title:"Terminal"},"choco source add --name=kubeshop_repo --source=https://chocolatey.kubeshop.io/chocolatey ; choco install tracetest"))))}const p={id:"installation",title:"Installing Tracetest",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png"},u=void 0,m={unversionedId:"getting-started/installation",id:"getting-started/installation",title:"Installing Tracetest",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",source:"@site/docs/getting-started/installation.mdx",sourceDirName:"getting-started",slug:"/getting-started/installation",permalink:"/getting-started/installation",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/getting-started/installation.mdx",tags:[],version:"current",frontMatter:{id:"installation",title:"Installing Tracetest",description:"Tracetest allows you to quickly build integration and end-to-end tests, powered by your OpenTelemetry traces.",keywords:["tracetest","trace-based testing","observability","distributed tracing","testing"],image:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1689693872/docs/Blog_Thumbnail_28_ugy2yy.png"},sidebar:"tutorialSidebar",previous:{title:"Getting Started with Tracetest \ud83d\ude80",permalink:"/getting-started/overview"},next:{title:"Opening Tracetest",permalink:"/getting-started/open"}},d={},h=[{value:"Install the Tracetest CLI",id:"install-the-tracetest-cli",level:2},{value:"Install the Tracetest Server",id:"install-the-tracetest-server",level:2}],k={toc:h},g="wrapper";function b(e){let{components:t,...a}=e;return(0,l.kt)(g,(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This page showcases getting started with Tracetest by using the Tracetest CLI, Docker, or Kubernetes."),(0,l.kt)("p",null,"This simple installation includes a demo app called ",(0,l.kt)("a",{parentName:"p",href:"/live-examples/pokeshop/overview"},"Pokeshop")," that will be installed alongside Tracetest. It shows how to configure OpenTelemetry and Tracetest and the architecture of the Pokeshop sample app."),(0,l.kt)("h2",{id:"install-the-tracetest-cli"},"Install the Tracetest CLI"),(0,l.kt)(c,{mdxType:"GtagInstallCliTabs"}),(0,l.kt)("admonition",{title:"Want more info?",type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"Read the CLI installation reference ",(0,l.kt)("a",{parentName:"p",href:"/cli/cli-installation-reference"},"here"),".")),(0,l.kt)("h2",{id:"install-the-tracetest-server"},"Install the Tracetest Server"),(0,l.kt)("p",null,"Tracetest runs as a standalone container. It runs a Server and exposes a Web UI on port ",(0,l.kt)("inlineCode",{parentName:"p"},"11633"),"."),(0,l.kt)("p",null,"You have three options to install Tracetest Server:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"Using the Tracetest CLI to guide your installation in Docker and Kubernetes."),(0,l.kt)("li",{parentName:"ul"},"Using the official ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/kubeshop/helm-charts/tree/main/charts/tracetest"},"Helm chart"),"."),(0,l.kt)("li",{parentName:"ul"},"Using the ",(0,l.kt)("a",{parentName:"li",href:"https://github.com/kubeshop/tracetest/tree/main/examples/quick-start-pokeshop"},"Docker Compose Quick Start with the Pokeshop Sample App"),".")),(0,l.kt)(o.Z,{groupId:"installation",mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"cli",label:"Tracetest CLI",default:!0,mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:'title="Terminal"',title:'"Terminal"'},"tracetest server install\n")),(0,l.kt)(o.Z,{groupId:"container-orchestrators",mdxType:"Tabs"},(0,l.kt)(s.Z,{value:"docker-compose",label:"Docker Compose",default:!0,mdxType:"TabItem"},(0,l.kt)(i.Z,{language:"text",title:"Terminal",mdxType:"CodeBlock"},"How do you want to run TraceTest? [type to search]:\n> Using Docker Compose\n Using Kubernetes"),(0,l.kt)("p",null,"Choose to install Tracetest with the OpenTelemetry Collector and the ",(0,l.kt)("a",{parentName:"p",href:"/live-examples/pokeshop/overview"},"Pokeshop")," sample app."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output:"',title:'"Expected','output:"':!0},"Do you have OpenTelemetry based tracing already set up, or would you like us to install a demo tracing environment and app? [type to search]: \n I have a tracing environment already. - Just install Tracetest.\n> Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.\n")),(0,l.kt)("p",null,"Choosing any option, this installer will create a ",(0,l.kt)("inlineCode",{parentName:"p"},"tracetest")," directory in the current directory and add a ",(0,l.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file to it."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you choose the first option, the ",(0,l.kt)("inlineCode",{parentName:"li"},"docker-compose.yaml")," will have only Tracetest and its dependencies."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"By choosing the second option, a sample app called ",(0,l.kt)("a",{parentName:"strong",href:"/live-examples/pokeshop/overview"},"Pokeshop")," will be installed with Tracetest, allowing you to create sample tests right away!"))),(0,l.kt)("details",null,(0,l.kt)("summary",null,(0,l.kt)("b",null,"Click to view Pokeshop Sample App Architecture")),(0,l.kt)("p",null,"Here's the Architecture of the Pokeshop Sample App:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"an ",(0,l.kt)("strong",{parentName:"li"},"API")," that serves client requests,"),(0,l.kt)("li",{parentName:"ul"},"a ",(0,l.kt)("strong",{parentName:"li"},"Worker")," who deals with background processes.")),(0,l.kt)("p",null,"The communication between the API and Worker is made using a ",(0,l.kt)("inlineCode",{parentName:"p"},"RabbitMQ")," queue, and both services emit telemetry data to OpenTelemetry Collector and communicate with a Postgres database."),(0,l.kt)("p",null,"Tracetest triggers tests against the Node.js API."),(0,l.kt)("mermaid",{value:"flowchart TD\n A[(Redis)]\n B[(Postgres)]\n C(Node.js API)\n D(RabbitMQ)\n E(Worker)\n F(OpenTelemetry Collector)\n G(Tracetest)\n\n G --\x3e C\n F --\x3e G\n C --\x3e A\n C --\x3e B\n C --\x3e D\n D --\x3e E\n E --\x3e B\n C --\x3e F\n E --\x3e F\n \n "})),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Start Docker Compose from the directory where you ran ",(0,l.kt)("inlineCode",{parentName:"strong"},"tracetest server install"),".")),(0,l.kt)(i.Z,{language:"bash",title:"Terminal",mdxType:"CodeBlock"},"docker compose -f tracetest/docker-compose.yaml up -d"),(0,l.kt)("p",null,"This will start the Tracetest Server and expose the Web UI on ",(0,l.kt)("a",{parentName:"p",href:"http://localhost:11633"},(0,l.kt)("inlineCode",{parentName:"a"},"http://localhost:11633")),".")),(0,l.kt)(s.Z,{value:"kubernetes",label:"Kubernetes",mdxType:"TabItem"},(0,l.kt)(i.Z,{language:"text",title:"Terminal",mdxType:"CodeBlock"},"How do you want to run TraceTest? [type to search]:\n Using Docker Compose\n> Using Kubernetes"),(0,l.kt)("p",null,"Choose to install Tracetest with the OpenTelemetry Collector and the ",(0,l.kt)("a",{parentName:"p",href:"/live-examples/pokeshop/overview"},"Pokeshop")," sample app."),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output:"',title:'"Expected','output:"':!0},"Do you have OpenTelemetry based tracing already set up, or would you like us to install a demo tracing environment and app? [type to search]: \n I have a tracing environment already - Just install Tracetest.\n> Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.\n")),(0,l.kt)("p",null,"Choosing any option, this installer will create a ",(0,l.kt)("inlineCode",{parentName:"p"},"tracetest")," namespace in the Kubernetes context you choose and create deployments for Tracetest and its dependencies."),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"If you choose the first option, the ",(0,l.kt)("inlineCode",{parentName:"li"},"tracetest")," namespace will only contain Tracetest and its dependencies."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"By choosing the second option, a sample app called ",(0,l.kt)("a",{parentName:"strong",href:"/live-examples/pokeshop/overview"},"Pokeshop")," will be installed in a ",(0,l.kt)("inlineCode",{parentName:"strong"},"demo")," namespace alongside Tracetest, allowing you to create sample tests right away!"))),(0,l.kt)("details",null,(0,l.kt)("summary",null,(0,l.kt)("b",null,"Click to view Pokeshop Sample App Architecture")),(0,l.kt)("p",null,"Here's the Architecture of the Pokeshop Sample App:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"an ",(0,l.kt)("strong",{parentName:"li"},"API")," that serves client requests,"),(0,l.kt)("li",{parentName:"ul"},"a ",(0,l.kt)("strong",{parentName:"li"},"Worker")," who deals with background processes.")),(0,l.kt)("p",null,"The communication between the API and Worker is made using a ",(0,l.kt)("inlineCode",{parentName:"p"},"RabbitMQ")," queue, and both services emit telemetry data to OpenTelemetry Collector and communicate with a Postgres database."),(0,l.kt)("p",null,"Tracetest triggers tests against the Node.js API."),(0,l.kt)("mermaid",{value:"flowchart TD\n A[(Redis)]\n B[(Postgres)]\n C(Node.js API)\n D(RabbitMQ)\n E(Worker)\n F(OpenTelemetry Collector)\n G(Tracetest)\n\n G --\x3e C\n F --\x3e G\n C --\x3e A\n C --\x3e B\n C --\x3e D\n D --\x3e E\n E --\x3e B\n C --\x3e F\n E --\x3e F\n \n "})),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Access the Tracetest Server by port forwarding to the Tracetest ",(0,l.kt)("inlineCode",{parentName:"strong"},"service"),".")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"title=Terminal",title:"Terminal"},'export POD_NAME=$(kubectl get pods --namespace demo -l "app.kubernetes.io/name=pokemon-api,app.kubernetes.io/instance=demo" -o jsonpath="{.items[0].metadata.name}")\nexport CONTAINER_PORT=$(kubectl get pod --namespace demo $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")\nkubectl --namespace demo port-forward $POD_NAME 8080:$CONTAINER_PORT\necho "Open http://127.0.0.1:8080 to view the Pokeshop demo app"\n\nkubectl --kubeconfig /.kube/config --context --namespace tracetest port-forward svc/tracetest 11633\necho "Open http://127.0.0.1:11633 to view the Tracetest Web UI"\n')),(0,l.kt)("p",null,"Access the Tracetest Web UI on ",(0,l.kt)("a",{parentName:"p",href:"http://localhost:11633"},(0,l.kt)("inlineCode",{parentName:"a"},"http://localhost:11633")),".")))),(0,l.kt)(s.Z,{value:"helm",label:"Helm Chart",mdxType:"TabItem"},(0,l.kt)("p",null,"First, be sure that you have ",(0,l.kt)("a",{parentName:"p",href:"https://helm.sh/"},"Helm")," installed in your machine."),(0,l.kt)("p",null,"The Tracetest Helm charts are located ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/helm-charts/tree/main/charts/tracetest"},"here"),"."),(0,l.kt)("p",null,"You can install them locally on your machine with the command:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"title=Terminal",title:"Terminal"},"helm repo add kubeshop https://kubeshop.github.io/helm-charts\nhelm repo update\n")),(0,l.kt)("p",null,"After that, you can install Tracetest with ",(0,l.kt)("inlineCode",{parentName:"p"},"helm install"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"title=Terminal",title:"Terminal"},"helm install tracetest kubeshop/tracetest --namespace=tracetest --create-namespace\n")),(0,l.kt)("p",null,"Or, generate a manifest file and apply it manually in your Kubernetes cluster:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"title=Terminal",title:"Terminal"},"helm template tracetest kubeshop/tracetest > tracetest-kubernetes-manifests.yaml\nkubectl apply -f ./tracetest-kubernetes-manifests.yaml\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Access the Tracetest Server by port forwarding to the Tracetest ",(0,l.kt)("inlineCode",{parentName:"strong"},"service"),".")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"title=Terminal",title:"Terminal"},"kubectl --kubeconfig /.kube/config --context --namespace tracetest port-forward svc/tracetest 11633\n")),(0,l.kt)("p",null,"Access the Tracetest Web UI on ",(0,l.kt)("a",{parentName:"p",href:"http://localhost:11633"},(0,l.kt)("inlineCode",{parentName:"a"},"http://localhost:11633")),".")),(0,l.kt)(s.Z,{value:"docker-compose",label:"Docker Compose",mdxType:"TabItem"},(0,l.kt)("p",null,"First, be sure that you have ",(0,l.kt)("a",{parentName:"p",href:"https://docker.com/"},"Docker")," installed in your machine."),(0,l.kt)("p",null,"The Quick Start with the Pokeshop Sample App is located ",(0,l.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/quick-start-pokeshop"},"here"),"."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"The ",(0,l.kt)("a",{parentName:"strong",href:"https://github.com/kubeshop/tracetest/blob/main/examples/quick-start-pokeshop/docker-compose.yml"},(0,l.kt)("inlineCode",{parentName:"a"},"docker-compose.yaml"))," contains Tracetest, the OpenTelemetry Collector, and a sample app called ",(0,l.kt)("a",{parentName:"strong",href:"/live-examples/pokeshop/overview"},"Pokeshop"),". This allows you to create sample tests right away!")),(0,l.kt)("details",null,(0,l.kt)("summary",null,(0,l.kt)("b",null,"Click to view Pokeshop Sample App Architecture")),(0,l.kt)("p",null,"Here's the Architecture of the Pokeshop Sample App:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"an ",(0,l.kt)("strong",{parentName:"li"},"API")," that serves client requests,"),(0,l.kt)("li",{parentName:"ul"},"a ",(0,l.kt)("strong",{parentName:"li"},"Worker")," who deals with background processes.")),(0,l.kt)("p",null,"The communication between the API and Worker is made using a ",(0,l.kt)("inlineCode",{parentName:"p"},"RabbitMQ")," queue, and both services emit telemetry data to OpenTelemetry Collector and communicate with a Postgres database."),(0,l.kt)("p",null,"Tracetest triggers tests against the Node.js API."),(0,l.kt)("mermaid",{value:"flowchart TD\n A[(Redis)]\n B[(Postgres)]\n C(Node.js API)\n D(RabbitMQ)\n E(Worker)\n F(OpenTelemetry Collector)\n G(Tracetest)\n\n G --\x3e C\n F --\x3e G\n C --\x3e A\n C --\x3e B\n C --\x3e D\n D --\x3e E\n E --\x3e B\n C --\x3e F\n E --\x3e F\n \n "})),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Start Docker Compose.")),(0,l.kt)(i.Z,{language:"bash",title:"Terminal",mdxType:"CodeBlock"},"docker compose -f docker-compose.yaml up -d"),(0,l.kt)("p",null,"This will start the Tracetest Server and expose the Web UI on ",(0,l.kt)("a",{parentName:"p",href:"http://localhost:11633"},(0,l.kt)("inlineCode",{parentName:"a"},"http://localhost:11633")),"."))),(0,l.kt)("admonition",{title:"Don't have OpenTelemetry installed?",type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"Tracetest requires that you have ",(0,l.kt)("a",{parentName:"p",href:"https://opentelemetry.io/docs/instrumentation/"},"OpenTelemetry instrumentation")," added in your code, and configured ",(0,l.kt)("a",{parentName:"p",href:"/configuration/connecting-to-data-stores/jaeger"},"sending traces to a trace data store"),", or ",(0,l.kt)("a",{parentName:"p",href:"/configuration/connecting-to-data-stores/opentelemetry-collector"},"Tracetest directly"),"."),(0,l.kt)("p",{parentName:"admonition"},(0,l.kt)("a",{parentName:"p",href:"/getting-started/no-otel"},"Follow these instructions to install OpenTelemetry in 5 minutes without any code changes!"))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6504aa33.438f0230.js b/assets/js/6504aa33.438f0230.js new file mode 100644 index 0000000000..d45d0e985a --- /dev/null +++ b/assets/js/6504aa33.438f0230.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1941],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>m});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,s=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=l(n),d=i,m=p["".concat(c,".").concat(d)]||p[d]||f[d]||s;return n?r.createElement(m,a(a({ref:t},u),{},{components:n})):r.createElement(m,a({ref:t},u))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var s=n.length,a=new Array(s);a[0]=d;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[p]="string"==typeof e?e:i,a[1]=o;for(var l=2;l{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>f,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var r=n(87462),i=(n(67294),n(3905));const s={},a="Defining Test Suites as Text Files",o={unversionedId:"cli/creating-test-suites",id:"cli/creating-test-suites",title:"Defining Test Suites as Text Files",description:"This page showcases how to create and edit Test Suites with the CLI.",source:"@site/docs/cli/creating-test-suites.md",sourceDirName:"cli",slug:"/cli/creating-test-suites",permalink:"/cli/creating-test-suites",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/creating-test-suites.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Undefined Variables",permalink:"/cli/undefined-variables"},next:{title:"Running Test Suites From the Command Line Interface (CLI)",permalink:"/cli/running-test-suites"}},c={},l=[],u={toc:l},p="wrapper";function f(e){let{components:t,...n}=e;return(0,i.kt)(p,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"defining-test-suites-as-text-files"},"Defining Test Suites as Text Files"),(0,i.kt)("p",null,"This page showcases how to create and edit Test Suites with the CLI."),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},(0,i.kt)("a",{parentName:"p",href:"/concepts/test-suites"},"To read more about Test Suites check out Test Suites concepts page."))),(0,i.kt)("p",null,"Just like other structures of Tracetest, you can also manage your Test Suites using the CLI and definition files."),(0,i.kt)("p",null,"A definition file for a Test Suite looks like the following:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},"type: TestSuite\nspec:\n name: Test purchase flow\n description: Test a flow of purchasing an item\n steps:\n - ./tests/create-product.yaml\n - ./tests/add-product-to-cart.yaml\n - ./tests/complete-purchase.yaml\n - testID # you can also reference tests by their ids instead of referencing the definition file\n")),(0,i.kt)("p",null,"In order to apply this Test Suite to your Tracetest instance, make sure to have your ",(0,i.kt)("a",{parentName:"p",href:"/cli/configuring-your-cli"},"CLI configured")," and run:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest apply testsuite -f \n")),(0,i.kt)("blockquote",null,(0,i.kt)("p",{parentName:"blockquote"},"If the file contains the property ",(0,i.kt)("inlineCode",{parentName:"p"},"spec.id"),", the operation will be considered a Test Suite update.")))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/65d1599b.c46c7733.js b/assets/js/65d1599b.c46c7733.js new file mode 100644 index 0000000000..dbb3b2682b --- /dev/null +++ b/assets/js/65d1599b.c46c7733.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5369],{3905:(e,t,a)=>{a.d(t,{Zo:()=>u,kt:()=>m});var n=a(67294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var c=n.createContext({}),l=function(e){var t=n.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},u=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,s=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),p=l(a),h=r,m=p["".concat(c,".").concat(h)]||p[h]||d[h]||s;return a?n.createElement(m,i(i({ref:t},u),{},{components:a})):n.createElement(m,i({ref:t},u))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=a.length,i=new Array(s);i[0]=h;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[p]="string"==typeof e?e:r,i[1]=o;for(var l=2;l{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var n=a(87462),r=(a(67294),a(3905));const s={},i="Running Tracetest with AWS Step Functions, AWS X-Ray and Terraform",o={unversionedId:"examples-tutorials/recipes/running-tracetest-with-step-functions-terraform",id:"examples-tutorials/recipes/running-tracetest-with-step-functions-terraform",title:"Running Tracetest with AWS Step Functions, AWS X-Ray and Terraform",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-step-functions-terraform.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-step-functions-terraform",permalink:"/examples-tutorials/recipes/running-tracetest-with-step-functions-terraform",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-step-functions-terraform.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest on AWS Fargate with Terraform",permalink:"/examples-tutorials/recipes/running-tracetest-with-aws-terraform"},next:{title:"Running Tracetest With Datadog",permalink:"/examples-tutorials/recipes/running-tracetest-with-datadog"}},c={},l=[{value:".NET Step Functions Serverless API with AWS X-Ray, AWS Fargate and Tracetest",id:"net-step-functions-serverless-api-with-aws-x-ray-aws-fargate-and-tracetest",level:2},{value:"Services Architecture",id:"services-architecture",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. NET Core Lambda Functions",id:"1-net-core-lambda-functions",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"AWS Network",id:"aws-network",level:3},{value:"Tracetest",id:"tracetest",level:2},{value:"Configuring the Tracetest Container",id:"configuring-the-tracetest-container",level:3},{value:"AWS X-Ray",id:"aws-x-ray",level:2},{value:"How does Tracetest reach AWS X-Ray?",id:"how-does-tracetest-reach-aws-x-ray",level:2},{value:"How do traces reach AWS X-Ray?",id:"how-do-traces-reach-aws-x-ray",level:2},{value:"Running the Example",id:"running-the-example",level:2},{value:"Running Trace-based Tests",id:"running-trace-based-tests",level:2},{value:"Learn More",id:"learn-more",level:2}],u={toc:l},p="wrapper";function d(e){let{components:t,...s}=e;return(0,r.kt)(p,(0,n.Z)({},u,s,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-tracetest-with-aws-step-functions-aws-x-ray-and-terraform"},"Running Tracetest with AWS Step Functions, AWS X-Ray and Terraform"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-aws-step-functions"},"Check out the source code on GitHub here."))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use your telemetry data generated by the OpenTelemetry tools to check and assert if your application has the desired behavior defined by your test definitions."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.terraform.io/"},"Terraform")," is an infrastructure as code tool that lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse and share. You can then use a consistent workflow to provision and manage all of your infrastructure throughout its lifecycle."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/fargate/"},"AWS Fargate")," is a serverless, pay-as-you-go compute engine that lets you focus on building applications without managing servers. AWS Fargate is compatible with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS)."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/step-functions"},"AWS Step Functions")," is a visual workflow service that helps developers use AWS services to build distributed applications, automate processes, orchestrate microservices and create data and machine learning (ML) pipelines."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/xray/"},"AWS X-Ray")," provides a complete view of requests as they travel through your application and filters visual data across payloads, functions, traces, services, APIs and more with no-code and low-code motions."),(0,r.kt)("h2",{id:"net-step-functions-serverless-api-with-aws-x-ray-aws-fargate-and-tracetest"},".NET Step Functions Serverless API with AWS X-Ray, AWS Fargate and Tracetest"),(0,r.kt)("p",null,"The use case you'll see in this recipe is based on ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/aws-samples/aws-step-functions-plagiarism-demo-dotnetcore"},"this .NET demo repository")," that illustrates how to create a Basic State Machine using Step Functions, Lambda and DynamoDB."),(0,r.kt)("p",null,"The infrastructure will use X-Ray as the trace data store to receive traces from the NET core lambda functions, SAM as deployment framework for the Step Functions and Terraform to provision the required AWS services to run Tracetest in the cloud."),(0,r.kt)("h2",{id:"services-architecture"},"Services Architecture"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"AWS Serverless Diagram",src:a(8179).Z,width:"1710",height:"1180"})),(0,r.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("p",null,"You will need ",(0,r.kt)("a",{parentName:"p",href:"https://www.terraform.io/"},"Terraform"),", a configured instance of the ",(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/cli/"},"AWS CLI")," and the ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html"},"SAM CLI")," installed on your machine to run this quick start Step Functions app!"),(0,r.kt)("h2",{id:"project-structure"},"Project Structure"),(0,r.kt)("p",null,"The project is divided into two main sections. The ",(0,r.kt)("inlineCode",{parentName:"p"},"infra")," folder includes the basic services and resources that are required to run Tracetest in your AWS account using Terraform as the deployment framework. Meanwhile, the ",(0,r.kt)("inlineCode",{parentName:"p"},"src")," folder includes the code and configuration to create and provision the Step Functions using the SAM framework."),(0,r.kt)("h3",{id:"1-net-core-lambda-functions"},"1. NET Core Lambda Functions"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"src")," directory includes a separate sub-folder for each of the Lambda functions that are a part of the Step Functions definition, there you can find what steps are taken for each of the checkpoints."),(0,r.kt)("p",null,"The State Machine definition can be found in the ",(0,r.kt)("inlineCode",{parentName:"p"},"scr/state-machine.asl.json")," file which is written using the ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html"},"AWS States Language"),"."),(0,r.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,r.kt)("p",null,"Under the ",(0,r.kt)("inlineCode",{parentName:"p"},"infra")," folder you'll find the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest.tf")," file, which includes the required services and configuration to run Tracetest on AWS Fargate."),(0,r.kt)("h3",{id:"aws-network"},"AWS Network"),(0,r.kt)("p",null,"To connect all of the services, the example generates a VPC network which includes private and public subnets. Internal services like the Postgres RDS instance are protected behind the VPC and only accessible through a node within the internal network."),(0,r.kt)("p",null,"There is one ",(0,r.kt)("a",{parentName:"p",href:"https://aws.amazon.com/elasticloadbalancing/application-load-balancer/"},"Public Application Load Balancer")," which provides access to the Tracetest task instance through port ",(0,r.kt)("inlineCode",{parentName:"p"},"11633"),"."),(0,r.kt)("h2",{id:"tracetest"},"Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"infra/tracetest.tf")," file contains the required services for the Tracetest server which include."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Postgres RDS")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html"},(0,r.kt)("strong",{parentName:"a"},"Tracetest Task Definition"))," - The information on how to configure and provision Tracetest using ECS."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html"},(0,r.kt)("strong",{parentName:"a"},"ECS Service"))," - The server provisioning metadata to run the Tracetest Task Definition."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Networking")," - Security groups, target groups and load balancer listeners required to have Tracetest connected to the rest of the AWS infrastructure.")),(0,r.kt)("h3",{id:"configuring-the-tracetest-container"},"Configuring the Tracetest Container"),(0,r.kt)("p",null,"The Tracetest docker image supports environment variables as the entry point for the bootstrap configuration. In this case the task definition includes the following:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-json"},'{\n "environment" : [\n // POSTGRES CONNECTION\n {\n "name" : "TRACETEST_POSTGRES_HOST",\n "value" : "${module.db.db_instance_address}"\n },\n {\n "name" : "TRACETEST_POSTGRES_PORT",\n "value" : "${tostring(module.db.db_instance_port)}"\n },\n {\n "name" : "TRACETEST_POSTGRES_DBNAME",\n "value" : "${module.db.db_instance_name}"\n },\n {\n "name" : "TRACETEST_POSTGRES_USER",\n "value" : "${module.db.db_instance_username}"\n },\n {\n "name" : "TRACETEST_POSTGRES_PASSWORD",\n "value" : "${module.db.db_instance_password}"\n },\n ]\n}\n')),(0,r.kt)("h2",{id:"aws-x-ray"},"AWS X-Ray"),(0,r.kt)("p",null,"This recipe uses AWS X-Ray as the Data Source for the telemetry data. It doesn't require any predefined configuration to start using this service, only needing the correct access for applications to be able to send and fetch information from it."),(0,r.kt)("h2",{id:"how-does-tracetest-reach-aws-x-ray"},"How does Tracetest reach AWS X-Ray?"),(0,r.kt)("p",null,"Tracetest supports the native AWS SDK library to connect to X-Ray to find traces. Currently, the only authentication method supported is manually adding a set of AWS credentials that have access to the X-Ray service from your account.\nThis can be done by either providing them from the initial bootstrap using:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'---\ntype: DataStore\nspec:\n name: awsxray\n type: awsxray\n awsxray:\n accessKeyId: \n secretAccessKey: \n sessionToken: \n region: "us-west-2"\n')),(0,r.kt)("p",null,"Or from the Tracetest settings page:\n",(0,r.kt)("img",{alt:"AWS X-Ray Settings",src:a(26442).Z,width:"1991",height:"905"})),(0,r.kt)("h2",{id:"how-do-traces-reach-aws-x-ray"},"How do traces reach AWS X-Ray?"),(0,r.kt)("p",null,"This recipe uses the auto-instrumentation ",(0,r.kt)("a",{parentName:"p",href:"https://docs.aws.amazon.com/xray-sdk-for-dotnet/latest/reference/html/N_Amazon_XRay_Recorder_Handlers_AwsSdk.htm"},"library for .NET")," which automatically listens to any AWS SDK request and sends the telemetry data to X-Ray."),(0,r.kt)("p",null,"To provide the Lambda functions access to X-Ray, the ",(0,r.kt)("inlineCode",{parentName:"p"},"arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess")," AWS managed policy is also added."),(0,r.kt)("h2",{id:"running-the-example"},"Running the Example"),(0,r.kt)("p",null,"The first thing you need to do is to provision the Tracetest infrastructure by running the following commands from the ",(0,r.kt)("inlineCode",{parentName:"p"},"infra")," folder:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"terraform init \\\nterraform apply\n")),(0,r.kt)("p",null,"After accepting the changes after running the ",(0,r.kt)("inlineCode",{parentName:"p"},"terraform apply")," command and finalizing the infra creation, you can find the output with the required endpoints to continue with tests.\nThe final output from the Terraform command should be a list of endpoints that are similar to the following:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Terraform Step Functions Output",src:a(53524).Z,width:"913",height:"139"})),(0,r.kt)("p",null,"You can follow the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest_url")," to find the Tracetest UI."),(0,r.kt)("p",null,"The second step is adding the AWS credentials for Tracetest to reach X-Ray by following this url ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest_url/settings"),". Select X-Ray as the data store and update the settings."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Tip.")," After you add the credentials, you can test the connection by clicking the ",(0,r.kt)("strong",{parentName:"p"},"Test Connection")," button."),(0,r.kt)("p",null,"The third step is to create the Lambda functions and the rest of the services to run the Step Functions by running the following command from the ",(0,r.kt)("inlineCode",{parentName:"p"},"src")," folder:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"sam build \\\nsam deploy --guided\n")),(0,r.kt)("p",null,"You'll be asked to fill in some details like the app name, email settings and a Sendgrid API key.\nThe output from the previous command should look similar to this:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"SAM Step Functions",src:a(71213).Z,width:"1194",height:"173"})),(0,r.kt)("h2",{id:"running-trace-based-tests"},"Running Trace-based Tests"),(0,r.kt)("p",null,"Now that all of the required services and infra have been created, you can start running trace-based testing by doing the following:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Run this ",(0,r.kt)("inlineCode",{parentName:"li"},"sam list stack-outputs --stack-name ")," command where you can copy the ",(0,r.kt)("inlineCode",{parentName:"li"},"StepFunctionsAPIUrl")," value and add the ",(0,r.kt)("inlineCode",{parentName:"li"},"")," placeholder from the ",(0,r.kt)("inlineCode",{parentName:"li"},"tests/incident.yaml")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"tests/exam.yaml")," files."),(0,r.kt)("li",{parentName:"ol"},"From the Terraform output, configure the ",(0,r.kt)("a",{parentName:"li",href:"https://docs.tracetest.io/cli/configuring-your-cli"},"Tracetest CLI")," to point to the public load balancer endpoint with ",(0,r.kt)("inlineCode",{parentName:"li"},"tracetest configure --endpoint "),"."),(0,r.kt)("li",{parentName:"ol"},"Run the tests YAML file using the CLI.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"}," tracetest run test -f tests/incident.yaml \\\n tracetest run test -f tests/exam.yaml \\\n tracetest run transaction -f tests/transaction.yaml\n")),(0,r.kt)("ol",{start:4},(0,r.kt)("li",{parentName:"ol"},"Follow the link to find the results.")),(0,r.kt)("h2",{id:"learn-more"},"Learn More"),(0,r.kt)("p",null,"Please visit our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,r.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}d.isMDXComponent=!0},8179:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/aws-step-functions-2ac976fdcc905a02959c81073f996577.png"},26442:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/awsxray-settings-2c5641bea0e40ce72679da99925b8a97.png"},71213:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/sam-step-functions-35d8757498b8638a12a39fe298739212.png"},53524:(e,t,a)=>{a.d(t,{Z:()=>n});const n=a.p+"assets/images/terraform-step-functions-2c02a787a9c756fae747316eb18fb4c5.png"}}]); \ No newline at end of file diff --git a/assets/js/6669.645df4e4.js b/assets/js/6669.645df4e4.js new file mode 100644 index 0000000000..dd8a3a40d9 --- /dev/null +++ b/assets/js/6669.645df4e4.js @@ -0,0 +1,1807 @@ +/*! For license information please see 6669.645df4e4.js.LICENSE.txt */ +(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[6669],{43675:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(t){o(t)}}function a(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.mapTypeToComponent=t.bundleDocument=t.bundle=t.OasVersion=void 0;const i=n(72307),o=n(44182),s=n(68065),a=n(85241),l=n(80388),c=n(22608),u=n(45220),p=n(69443),d=n(71510),f=n(27468),h=n(75030),m=n(20348),g=n(10771),y=n(81094),v=n(54508),b=n(16350);var x;function w(e){return r(this,void 0,void 0,(function*(){const{document:t,config:n,customTypes:r,externalRefResolver:i,dereference:f=!1,skipRedoclyRegistryRefs:m=!1,removeUnusedComponents:g=!1,keepUrlRefs:y=!1}=e,w=d.detectOpenAPI(t.parsed),k=d.openAPIMajor(w),S=n.getRulesForOasVersion(k),E=u.normalizeTypes(n.extendTypes((null!=r?r:k===d.OasMajorVersion.Version3)?w===x.Version3_1?c.Oas3_1Types:a.Oas3Types:l.Oas2Types,w),n),_=h.initRules(S,n,"preprocessors",w),A=h.initRules(S,n,"decorators",w),R={problems:[],oasVersion:w,refTypes:new Map,visitorsData:{}};g&&A.push({severity:"error",ruleId:"remove-unused-components",visitor:k===d.OasMajorVersion.Version2?v.RemoveUnusedComponents({}):b.RemoveUnusedComponents({})});const P=yield o.resolveDocument({rootDocument:t,rootType:E.Root,externalRefResolver:i}),C=s.normalizeVisitors([..._,{severity:"error",ruleId:"bundler",visitor:O(k,f,m,t,P,y)},...A],E);return p.walkDocument({document:t,rootType:E.Root,normalizedVisitors:C,resolvedRefMap:P,ctx:R}),{bundle:t,problems:R.problems.map((e=>n.addProblemToIgnore(e))),fileDependencies:i.getFiles(),rootType:E.Root,refTypes:R.refTypes,visitorsData:R.visitorsData}}))}function k(e,t){switch(t){case d.OasMajorVersion.Version3:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case d.OasMajorVersion.Version2:switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}}}function O(e,t,n,r,s,a){let l;const c={ref:{leave(i,l,c){if(!c.location||void 0===c.node)return void m.reportUnresolvedRef(c,l.report,l.location);if(c.location.source===r.source&&c.location.source===l.location.source&&"scalar"!==l.type.name&&!t)return;if(n&&y.isRedoclyRegistryURL(i.$ref))return;if(a&&f.isAbsoluteUrl(i.$ref))return;const d=k(l.type.name,e);d?t?(p(d,c,l),u(i,c,l)):(i.$ref=p(d,c,l),function(e,t,n){const i=o.makeRefId(n.location.source.absoluteRef,e.$ref);s.set(i,{document:r,isRemote:!1,node:t.node,nodePointer:e.$ref,resolved:!0})}(i,c,l)):u(i,c,l)}},Root:{enter(t){e===d.OasMajorVersion.Version3?l=t.components=t.components||{}:e===d.OasMajorVersion.Version2&&(l=t)}}};function u(e,t,n){if(g.isPlainObject(t.node)){delete e.$ref;const n=Object.assign({},t.node,e);Object.assign(e,n)}else n.parent[n.key]=t.node}function p(t,n,r){l[t]=l[t]||{};const i=function(e,t,n){const[r,i]=[e.location.source.absoluteRef,e.location.pointer],o=l[t];let s="";const a=i.slice(2).split("/").filter(g.isTruthy);for(;a.length>0;)if(s=a.pop()+(s?`-${s}`:""),!o||!o[s]||h(o[s],e,n))return s;if(s=f.refBaseName(r)+(s?`_${s}`:""),!o[s]||h(o[s],e,n))return s;const c=s;let u=2;for(;o[s]&&!h(o[s],e,n);)s=`${c}-${u}`,u++;o[s]||n.report({message:`Two schemas are referenced with the same name but different content. Renamed ${c} to ${s}.`,location:n.location,forceSeverity:"warn"});return s}(n,t,r);return l[t][i]=n.node,e===d.OasMajorVersion.Version3?`#/components/${t}/${i}`:`#/${t}/${i}`}function h(e,t,n){var r;return!(!f.isRef(e)||(null===(r=n.resolve(e).location)||void 0===r?void 0:r.absolutePointer)!==t.location.absolutePointer)||i(e,t.node)}return e===d.OasMajorVersion.Version3&&(c.DiscriminatorMapping={leave(n,r){for(const i of Object.keys(n)){const o=n[i],s=r.resolve({$ref:o});if(!s.location||void 0===s.node)return void m.reportUnresolvedRef(s,r.report,r.location.child(i));const a=k("Schema",e);t?p(a,s,r):n[i]=p(a,s,r)}}}),c}!function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(x=t.OasVersion||(t.OasVersion={})),t.bundle=function(e){return r(this,void 0,void 0,(function*(){const{ref:t,doc:n,externalRefResolver:r=new o.BaseResolver(e.config.resolve),base:i=null}=e;if(!t&&!n)throw new Error("Document or reference is required.\n");const s=void 0!==n?n:yield r.resolveDocument(i,t,!0);if(s instanceof Error)throw s;return w(Object.assign(Object.assign({document:s},e),{config:e.config.styleguide,externalRefResolver:r}))}))},t.bundleDocument=w,t.mapTypeToComponent=k},63777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.StyleguideConfig=t.AVAILABLE_REGIONS=t.DOMAINS=t.DEFAULT_REGION=t.IGNORE_FILE=void 0;const r=n(15101),i=n(26470),o=n(55273),s=n(10771),a=n(71510),l=n(28005),c=n(2565);t.IGNORE_FILE=".redocly.lint-ignore.yaml";t.DEFAULT_REGION="us",t.DOMAINS=function(){const e={us:"redocly.com",eu:"eu.redocly.com"},t=l.env.REDOCLY_DOMAIN;return(null==t?void 0:t.endsWith(".redocly.host"))&&(e[t.split(".")[0]]=t),"redoc.online"===t&&(e[t]=t),e}(),t.AVAILABLE_REGIONS=Object.keys(t.DOMAINS);class u{constructor(e,n){this.rawConfig=e,this.configFile=n,this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.plugins=e.plugins||[],this.doNotResolveExamples=!!e.doNotResolveExamples,this.recommendedFallback=e.recommendedFallback||!1,this.rules={[a.OasVersion.Version2]:Object.assign(Object.assign({},e.rules),e.oas2Rules),[a.OasVersion.Version3_0]:Object.assign(Object.assign({},e.rules),e.oas3_0Rules),[a.OasVersion.Version3_1]:Object.assign(Object.assign({},e.rules),e.oas3_1Rules)},this.preprocessors={[a.OasVersion.Version2]:Object.assign(Object.assign({},e.preprocessors),e.oas2Preprocessors),[a.OasVersion.Version3_0]:Object.assign(Object.assign({},e.preprocessors),e.oas3_0Preprocessors),[a.OasVersion.Version3_1]:Object.assign(Object.assign({},e.preprocessors),e.oas3_1Preprocessors)},this.decorators={[a.OasVersion.Version2]:Object.assign(Object.assign({},e.decorators),e.oas2Decorators),[a.OasVersion.Version3_0]:Object.assign(Object.assign({},e.decorators),e.oas3_0Decorators),[a.OasVersion.Version3_1]:Object.assign(Object.assign({},e.decorators),e.oas3_1Decorators)},this.extendPaths=e.extendPaths||[],this.pluginPaths=e.pluginPaths||[],this.resolveIgnore(function(e){return e?s.doesYamlFileExist(e)?i.join(i.dirname(e),t.IGNORE_FILE):i.join(e,t.IGNORE_FILE):l.isBrowser?void 0:i.join(process.cwd(),t.IGNORE_FILE)}(n))}resolveIgnore(e){if(e&&s.doesYamlFileExist(e)){this.ignore=o.parseYaml(r.readFileSync(e,"utf-8"))||{};for(const t of Object.keys(this.ignore)){this.ignore[i.resolve(i.dirname(e),t)]=this.ignore[t];for(const e of Object.keys(this.ignore[t]))this.ignore[t][e]=new Set(this.ignore[t][e]);delete this.ignore[t]}}}saveIgnore(){const e=this.configFile?i.dirname(this.configFile):process.cwd(),n=i.join(e,t.IGNORE_FILE),a={};for(const t of Object.keys(this.ignore)){const n=a[s.slash(i.relative(e,t))]=this.ignore[t];for(const e of Object.keys(n))n[e]=Array.from(n[e])}r.writeFileSync(n,"# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n# See https://redoc.ly/docs/cli/ for more information.\n"+o.stringifyYaml(a))}addIgnore(e){const t=this.ignore,n=e.location[0];if(void 0===n.pointer)return;const r=t[n.source.absoluteRef]=t[n.source.absoluteRef]||{};(r[e.ruleId]=r[e.ruleId]||new Set).add(n.pointer)}addProblemToIgnore(e){const t=e.location[0];if(void 0===t.pointer)return e;const n=(this.ignore[t.source.absoluteRef]||{})[e.ruleId],r=n&&n.has(t.pointer);return r?Object.assign(Object.assign({},e),{ignored:r}):e}extendTypes(e,t){let n=e;for(const r of this.plugins)if(void 0!==r.typeExtension)switch(t){case a.OasVersion.Version3_0:case a.OasVersion.Version3_1:if(!r.typeExtension.oas3)continue;n=r.typeExtension.oas3(n,t);break;case a.OasVersion.Version2:if(!r.typeExtension.oas2)continue;n=r.typeExtension.oas2(n,t);break;default:throw new Error("Not implemented")}return n}getRuleSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.rules[t][e]||"off";return"string"==typeof n?{severity:n}:Object.assign({severity:"error"},n)}getPreprocessorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.preprocessors[t][e]||"off";return"string"==typeof n?{severity:"on"===n?"error":n}:Object.assign({severity:"error"},n)}getDecoratorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const n=this.decorators[t][e]||"off";return"string"==typeof n?{severity:"on"===n?"error":n}:Object.assign({severity:"error"},n)}getUnusedRules(){const e=[],t=[],n=[];for(const r of Array.from(this._usedVersions))e.push(...Object.keys(this.rules[r]).filter((e=>!this._usedRules.has(e)))),t.push(...Object.keys(this.decorators[r]).filter((e=>!this._usedRules.has(e)))),n.push(...Object.keys(this.preprocessors[r]).filter((e=>!this._usedRules.has(e))));return{rules:e,preprocessors:n,decorators:t}}getRulesForOasVersion(e){switch(e){case a.OasMajorVersion.Version3:const e=[];return this.plugins.forEach((t=>{var n;return(null===(n=t.preprocessors)||void 0===n?void 0:n.oas3)&&e.push(t.preprocessors.oas3)})),this.plugins.forEach((t=>{var n;return(null===(n=t.rules)||void 0===n?void 0:n.oas3)&&e.push(t.rules.oas3)})),this.plugins.forEach((t=>{var n;return(null===(n=t.decorators)||void 0===n?void 0:n.oas3)&&e.push(t.decorators.oas3)})),e;case a.OasMajorVersion.Version2:const t=[];return this.plugins.forEach((e=>{var n;return(null===(n=e.preprocessors)||void 0===n?void 0:n.oas2)&&t.push(e.preprocessors.oas2)})),this.plugins.forEach((e=>{var n;return(null===(n=e.rules)||void 0===n?void 0:n.oas2)&&t.push(e.rules.oas2)})),this.plugins.forEach((e=>{var n;return(null===(n=e.decorators)||void 0===n?void 0:n.oas2)&&t.push(e.decorators.oas2)})),t}}skipRules(e){for(const t of e||[])for(const e of Object.values(a.OasVersion))this.rules[e][t]&&(this.rules[e][t]="off")}skipPreprocessors(e){for(const t of e||[])for(const e of Object.values(a.OasVersion))this.preprocessors[e][t]&&(this.preprocessors[e][t]="off")}skipDecorators(e){for(const t of e||[])for(const e of Object.values(a.OasVersion))this.decorators[e][t]&&(this.decorators[e][t]="off")}}t.StyleguideConfig=u;t.Config=class{constructor(e,t){this.rawConfig=e,this.configFile=t,this.apis=e.apis||{},this.styleguide=new u(e.styleguide||{},t),this.theme=e.theme||{},this.resolve=c.getResolveConfig(null==e?void 0:e.resolve),this.region=e.region,this.organization=e.organization,this.files=e.files||[]}}},75030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRules=void 0;const r=n(10771);t.initRules=function(e,t,n,i){return e.flatMap((e=>Object.keys(e).map((r=>{const o=e[r],s="rules"===n?t.getRuleSettings(r,i):"preprocessors"===n?t.getPreprocessorSettings(r,i):t.getDecoratorSettings(r,i);if("off"===s.severity)return;const a=s.severity,l=o(s);return Array.isArray(l)?l.map((e=>({severity:a,ruleId:r,visitor:e}))):{severity:a,ruleId:r,visitor:l}})))).flatMap((e=>e)).filter(r.isDefined)}},2565:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);it[e]));n[e]&&null===t&&i.showWarningForDeprecatedField(e),n[e]&&t&&n[t]&&i.showErrorForDeprecatedField(e,t),n[e]&&r&&n[r]&&i.showErrorForDeprecatedField(e,t,r),(n[e]||o)&&i.showWarningForDeprecatedField(e,t,r)}t.parsePresetName=function(e){if(e.indexOf("/")>-1){const[t,n]=e.split("/");return{pluginId:t,configName:n}}return{pluginId:"",configName:e}},t.transformApiDefinitionsToApis=a,t.prefixRules=function(e,t){if(!t)return e;const n={};for(const r of Object.keys(e))n[`${t}/${r}`]=e[r];return n},t.mergeExtends=function(e){const t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},plugins:[],pluginPaths:[],extendPaths:[]};for(const n of e){if(n.extends)throw new Error(`'extends' is not supported in shared configs yet: ${JSON.stringify(n,null,2)}.`);Object.assign(t.rules,n.rules),Object.assign(t.oas2Rules,n.oas2Rules),i.assignExisting(t.oas2Rules,n.rules||{}),Object.assign(t.oas3_0Rules,n.oas3_0Rules),i.assignExisting(t.oas3_0Rules,n.rules||{}),Object.assign(t.oas3_1Rules,n.oas3_1Rules),i.assignExisting(t.oas3_1Rules,n.rules||{}),Object.assign(t.preprocessors,n.preprocessors),Object.assign(t.oas2Preprocessors,n.oas2Preprocessors),i.assignExisting(t.oas2Preprocessors,n.preprocessors||{}),Object.assign(t.oas3_0Preprocessors,n.oas3_0Preprocessors),i.assignExisting(t.oas3_0Preprocessors,n.preprocessors||{}),Object.assign(t.oas3_1Preprocessors,n.oas3_1Preprocessors),i.assignExisting(t.oas3_1Preprocessors,n.preprocessors||{}),Object.assign(t.decorators,n.decorators),Object.assign(t.oas2Decorators,n.oas2Decorators),i.assignExisting(t.oas2Decorators,n.decorators||{}),Object.assign(t.oas3_0Decorators,n.oas3_0Decorators),i.assignExisting(t.oas3_0Decorators,n.decorators||{}),Object.assign(t.oas3_1Decorators,n.oas3_1Decorators),i.assignExisting(t.oas3_1Decorators,n.decorators||{}),t.plugins.push(...n.plugins||[]),t.pluginPaths.push(...n.pluginPaths||[]),t.extendPaths.push(...new Set(n.extendPaths))}return t},t.getMergedConfig=function(e,t){var n,r,s,a,l,c,u,p;const d=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.styleguide)||void 0===t?void 0:t.extendPaths})),null===(r=null===(n=e.rawConfig)||void 0===n?void 0:n.styleguide)||void 0===r?void 0:r.extendPaths].flat().filter(i.isTruthy),f=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.styleguide)||void 0===t?void 0:t.pluginPaths})),null===(a=null===(s=e.rawConfig)||void 0===s?void 0:s.styleguide)||void 0===a?void 0:a.pluginPaths].flat().filter(i.isTruthy);return t?new o.Config(Object.assign(Object.assign({},e.rawConfig),{styleguide:Object.assign(Object.assign({},e.apis[t]?e.apis[t].styleguide:e.rawConfig.styleguide),{extendPaths:d,pluginPaths:f}),theme:Object.assign(Object.assign({},e.rawConfig.theme),null===(l=e.apis[t])||void 0===l?void 0:l.theme),files:[...e.files,...null!==(p=null===(u=null===(c=e.apis)||void 0===c?void 0:c[t])||void 0===u?void 0:u.files)&&void 0!==p?p:[]]}),e.configFile):e},t.checkForDeprecatedFields=u,t.transformConfig=function(e){var t,n;const i=[["apiDefinitions","apis",void 0],["referenceDocs","openapi","theme"],["lint",void 0,void 0],["styleguide",void 0,void 0],["features.openapi","openapi","theme"]];for(const[r,a,l]of i)u(r,a,e,l);const{apis:o,apiDefinitions:s,referenceDocs:p,lint:d}=e,f=r(e,["apis","apiDefinitions","referenceDocs","lint"]),{styleguideConfig:h,rawConfigRest:m}=l(f);return Object.assign({theme:{openapi:Object.assign(Object.assign(Object.assign({},p),e["features.openapi"]),null===(t=e.theme)||void 0===t?void 0:t.openapi),mockServer:Object.assign(Object.assign({},e["features.mockServer"]),null===(n=e.theme)||void 0===n?void 0:n.mockServer)},apis:c(o)||a(s),styleguide:h||d},m)},t.getResolveConfig=function(e){var t,n;return{http:{headers:null!==(n=null===(t=null==e?void 0:e.http)||void 0===t?void 0:t.headers)&&void 0!==n?n:[],customFetch:void 0}}},t.getUniquePlugins=function(e){const t=new Set,n=[];for(const r of e)t.has(r.id)?r.id&&s.logger.warn(`Duplicate plugin id "${s.colorize.red(r.id)}".\n`):(n.push(r),t.add(r.id));return n}},28005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.env=t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window||"undefined"!=typeof self||"undefined"==typeof process,t.env=t.isBrowser?{}:{}||{}},55273:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyYaml=t.parseYaml=void 0;const r=n(93320),i=r.JSON_SCHEMA.extend({implicit:[r.types.merge],explicit:[r.types.binary,r.types.omap,r.types.pairs,r.types.set]});t.parseYaml=(e,t)=>r.load(e,Object.assign({schema:i},t));t.stringifyYaml=(e,t)=>r.dump(e,t)},23065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.colorize=t.colorOptions=void 0;const r=n(84819);var i=n(84819);Object.defineProperty(t,"colorOptions",{enumerable:!0,get:function(){return i.options}});const o=n(28005),s=n(10771);t.colorize=new Proxy(r,{get:(e,t)=>o.isBrowser?s.identity:e[t]});t.logger=new class{stderr(e){return process.stderr.write(e)}info(e){return o.isBrowser?console.log(e):this.stderr(e)}warn(e){return o.isBrowser?console.warn(e):this.stderr(t.colorize.yellow(e))}error(e){return o.isBrowser?console.error(e):this.stderr(t.colorize.red(e))}}},71510:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.openAPIMajor=t.detectOpenAPI=t.OasMajorVersion=t.OasVersion=void 0,function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(n=t.OasVersion||(t.OasVersion={})),function(e){e.Version2="oas2",e.Version3="oas3"}(r=t.OasMajorVersion||(t.OasMajorVersion={})),t.detectOpenAPI=function(e){if("object"!=typeof e)throw new Error("Document must be JSON object, got "+typeof e);if(!e.openapi&&!e.swagger)throw new Error("This doesn\u2019t look like an OpenAPI document.\n");if(e.openapi&&"string"!=typeof e.openapi)throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof e.openapi}"`);if(e.openapi&&e.openapi.startsWith("3.0"))return n.Version3_0;if(e.openapi&&e.openapi.startsWith("3.1"))return n.Version3_1;if(e.swagger&&"2.0"===e.swagger)return n.Version2;throw new Error(`Unsupported OpenAPI Version: ${e.openapi||e.swagger}`)},t.openAPIMajor=function(e){return e===n.Version2?r.Version2:r.Version3}},81094:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(t){o(t)}}function a(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.isRedoclyRegistryURL=t.RedoclyClient=void 0;const i=n(42116),o=n(26470),s=n(6918),a=n(41390),l=n(63777),c=n(28005),u=n(10771),p=n(23065),d=".redocly-config.json";t.RedoclyClient=class{constructor(e){this.accessTokens={},this.region=this.loadRegion(e),this.loadTokens(),this.domain=e?l.DOMAINS[e]:c.env.REDOCLY_DOMAIN||l.DOMAINS[l.DEFAULT_REGION],c.env.REDOCLY_DOMAIN=this.domain,this.registryApi=new a.RegistryApi(this.accessTokens,this.region)}loadRegion(e){if(e&&!l.DOMAINS[e])throw new Error(`Invalid argument: region in config file.\nGiven: ${p.colorize.green(e)}, choices: "us", "eu".`);return c.env.REDOCLY_DOMAIN?l.AVAILABLE_REGIONS.find((e=>l.DOMAINS[e]===c.env.REDOCLY_DOMAIN))||l.DEFAULT_REGION:e||l.DEFAULT_REGION}getRegion(){return this.region}hasTokens(){return u.isNotEmptyObject(this.accessTokens)}hasToken(){return!!this.accessTokens[this.region]}getAuthorizationHeader(){return r(this,void 0,void 0,(function*(){return this.accessTokens[this.region]}))}setAccessTokens(e){this.accessTokens=e}loadTokens(){const e=o.resolve(s.homedir(),d),t=this.readCredentialsFile(e);u.isNotEmptyObject(t)&&this.setAccessTokens(Object.assign(Object.assign({},t),t.token&&!t[this.region]&&{[this.region]:t.token})),c.env.REDOCLY_AUTHORIZATION&&this.setAccessTokens(Object.assign(Object.assign({},this.accessTokens),{[this.region]:c.env.REDOCLY_AUTHORIZATION}))}getAllTokens(){return Object.entries(this.accessTokens).filter((([e])=>l.AVAILABLE_REGIONS.includes(e))).map((([e,t])=>({region:e,token:t})))}getValidTokens(){return r(this,void 0,void 0,(function*(){const e=this.getAllTokens(),t=yield Promise.allSettled(e.map((({token:e,region:t})=>this.verifyToken(e,t))));return e.filter(((e,n)=>"fulfilled"===t[n].status)).map((({token:e,region:t})=>({token:e,region:t,valid:!0})))}))}getTokens(){return r(this,void 0,void 0,(function*(){return this.hasTokens()?yield this.getValidTokens():[]}))}isAuthorizedWithRedoclyByRegion(){return r(this,void 0,void 0,(function*(){if(!this.hasTokens())return!1;const e=this.accessTokens[this.region];if(!e)return!1;try{return yield this.verifyToken(e,this.region),!0}catch(t){return!1}}))}isAuthorizedWithRedocly(){return r(this,void 0,void 0,(function*(){return this.hasTokens()&&u.isNotEmptyObject(yield this.getValidTokens())}))}readCredentialsFile(e){return i.existsSync(e)?JSON.parse(i.readFileSync(e,"utf-8")):{}}verifyToken(e,t,n=!1){return r(this,void 0,void 0,(function*(){return this.registryApi.authStatus(e,t,n)}))}login(e,t=!1){return r(this,void 0,void 0,(function*(){const n=o.resolve(s.homedir(),d);try{yield this.verifyToken(e,this.region,t)}catch(a){throw new Error("Authorization failed. Please check if you entered a valid API key.")}const r=Object.assign(Object.assign({},this.readCredentialsFile(n)),{[this.region]:e,token:e});this.accessTokens=r,this.registryApi.setAccessTokens(r),i.writeFileSync(n,JSON.stringify(r,null,2))}))}logout(){const e=o.resolve(s.homedir(),d);i.existsSync(e)&&i.unlinkSync(e)}},t.isRedoclyRegistryURL=function(e){const t=c.env.REDOCLY_DOMAIN||l.DOMAINS[l.DEFAULT_REGION],n="redocly.com"===t?"redoc.ly":t;return!(!e.startsWith(`https://api.${t}/registry/`)&&!e.startsWith(`https://api.${n}/registry/`))}},41390:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(t){o(t)}}function a(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegistryApi=void 0;const i=n(34904),o=n(63777),s=n(10771),a=n(43244).i8;t.RegistryApi=class{constructor(e,t){this.accessTokens=e,this.region=t}get accessToken(){return s.isNotEmptyObject(this.accessTokens)&&this.accessTokens[this.region]}getBaseUrl(e=o.DEFAULT_REGION){return`https://api.${o.DOMAINS[e]}/registry`}setAccessTokens(e){return this.accessTokens=e,this}request(e="",t={},n){var o,s;return r(this,void 0,void 0,(function*(){const r="undefined"!=typeof process&&(null===(o={})||void 0===o?void 0:o.REDOCLY_CLI_COMMAND)||"",l="undefined"!=typeof process&&(null===(s={})||void 0===s?void 0:s.REDOCLY_ENVIRONMENT)||"",c=Object.assign({},t.headers||{},{"x-redocly-cli-version":a,"user-agent":`redocly-cli / ${a} ${r} ${l}`});if(!c.hasOwnProperty("authorization"))throw new Error("Unauthorized");const u=yield i.default(`${this.getBaseUrl(n)}${e}`,Object.assign({},t,{headers:c}));if(401===u.status)throw new Error("Unauthorized");if(404===u.status){const e=yield u.json();throw new Error(e.code)}return u}))}authStatus(e,t,n=!1){return r(this,void 0,void 0,(function*(){try{const n=yield this.request("",{headers:{authorization:e}},t);return yield n.json()}catch(r){throw n&&console.log(r),r}}))}prepareFileUpload({organizationId:e,name:t,version:n,filesHash:i,filename:o,isUpsert:s}){return r(this,void 0,void 0,(function*(){const r=yield this.request(`/${e}/${t}/${n}/prepare-file-upload`,{method:"POST",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({filesHash:i,filename:o,isUpsert:s})},this.region);if(r.ok)return r.json();throw new Error("Could not prepare file upload")}))}pushApi({organizationId:e,name:t,version:n,rootFilePath:i,filePaths:o,branch:s,isUpsert:a,isPublic:l,batchId:c,batchSize:u}){return r(this,void 0,void 0,(function*(){if(!(yield this.request(`/${e}/${t}/${n}`,{method:"PUT",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({rootFilePath:i,filePaths:o,branch:s,isUpsert:a,isPublic:l,batchId:c,batchSize:u})},this.region)).ok)throw new Error("Could not push api")}))}}},27468:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAnchor=t.isMappingRef=t.isAbsoluteUrl=t.refBaseName=t.pointerBaseName=t.parsePointer=t.parseRef=t.escapePointer=t.unescapePointer=t.Location=t.isRef=t.joinPointer=void 0;const r=n(10771);function i(e,t){return""===e&&(e="#/"),"/"===e[e.length-1]?e+t:e+"/"+t}t.joinPointer=i,t.isRef=function(e){return e&&"string"==typeof e.$ref};class o{constructor(e,t){this.source=e,this.pointer=t}child(e){return new o(this.source,i(this.pointer,(Array.isArray(e)?e:[e]).map(a).join("/")))}key(){return Object.assign(Object.assign({},this),{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+("#/"===this.pointer?"":this.pointer)}}function s(e){return decodeURIComponent(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function a(e){return"number"==typeof e?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}t.Location=o,t.unescapePointer=s,t.escapePointer=a,t.parseRef=function(e){const[t,n]=e.split("#/");return{uri:t||null,pointer:n?n.split("/").map(s).filter(r.isTruthy):[]}},t.parsePointer=function(e){return e.substr(2).split("/").map(s)},t.pointerBaseName=function(e){const t=e.split("/");return t[t.length-1]},t.refBaseName=function(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")},t.isAbsoluteUrl=function(e){return e.startsWith("http://")||e.startsWith("https://")},t.isMappingRef=function(e){return e.startsWith("#")||e.startsWith("https://")||e.startsWith("http://")||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1},t.isAnchor=function(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}},44182:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(t){o(t)}}function a(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDocument=t.BaseResolver=t.makeDocumentFromString=t.makeRefId=t.YamlParseError=t.ResolveError=t.Source=void 0;const i=n(23197),o=n(26470),s=n(27468),a=n(45220),l=n(10771);class c{constructor(e,t,n){this.absoluteRef=e,this.body=t,this.mimeType=n}getAst(e){var t;return void 0===this._ast&&(this._ast=null!==(t=e(this.body,{filename:this.absoluteRef}))&&void 0!==t?t:void 0,this._ast&&0===this._ast.kind&&""===this._ast.value&&1!==this._ast.startPosition&&(this._ast.startPosition=1,this._ast.endPosition=1)),this._ast}getLines(){return void 0===this._lines&&(this._lines=this.body.split(/\r\n|[\n\r]/g)),this._lines}}t.Source=c;class u extends Error{constructor(e){super(e.message),this.originalError=e,Object.setPrototypeOf(this,u.prototype)}}t.ResolveError=u;const p=/\((\d+):(\d+)\)$/;class d extends Error{constructor(e,t){super(e.message.split("\n")[0]),this.originalError=e,this.source=t,Object.setPrototypeOf(this,d.prototype);const[,n,r]=this.message.match(p)||[];this.line=parseInt(n,10),this.col=parseInt(r,10)}}function f(e,t){return e+"::"+t}t.YamlParseError=d,t.makeRefId=f,t.makeDocumentFromString=function(e,t){const n=new c(t,e);try{return{source:n,parsed:l.parseYaml(e,{filename:t})}}catch(r){throw new d(r,n)}};function h(e,t){return{prev:e,node:t}}t.BaseResolver=class{constructor(e={http:{headers:[]}}){this.config=e,this.cache=new Map}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(e,t){return s.isAbsoluteUrl(t)?t:e&&s.isAbsoluteUrl(e)?new URL(t,e).href:o.resolve(e?o.dirname(e):process.cwd(),t)}loadExternalRef(e){return r(this,void 0,void 0,(function*(){try{if(s.isAbsoluteUrl(e)){const{body:t,mimeType:n}=yield l.readFileFromUrl(e,this.config.http);return new c(e,t,n)}{const t=yield i.promises.readFile(e,"utf-8");return new c(e,t.replace(/\r\n/g,"\n"))}}catch(t){throw new u(t)}}))}parseDocument(e,t=!1){var n;const r=e.absoluteRef.substr(e.absoluteRef.lastIndexOf("."));if(![".json",".json",".yml",".yaml"].includes(r)&&!(null===(n=e.mimeType)||void 0===n?void 0:n.match(/(json|yaml|openapi)/))&&!t)return{source:e,parsed:e.body};try{return{source:e,parsed:l.parseYaml(e.body,{filename:e.absoluteRef})}}catch(i){throw new d(i,e)}}resolveDocument(e,t,n=!1){return r(this,void 0,void 0,(function*(){const r=this.resolveExternalRef(e,t),i=this.cache.get(r);if(i)return i;const o=this.loadExternalRef(r).then((e=>this.parseDocument(e,n)));return this.cache.set(r,o),o}))}};const m={name:"unknown",properties:{}},g={name:"scalar",properties:{}};t.resolveDocument=function(e){return r(this,void 0,void 0,(function*(){const{rootDocument:t,externalRefResolver:n,rootType:i}=e,o=new Map,c=new Set,u=[];let p;!function e(t,i,p,d){const y=i.source.absoluteRef,v=new Map;function b(t,n,r){if("object"!=typeof t||null===t)return;const o=`${n.name}::${r}`;if(c.has(o))return;c.add(o);const[l,p]=Object.entries(t).find((([e])=>"$anchor"===e))||[];if(p&&v.set(`#${p}`,t),Array.isArray(t)){const e=n.items;if(n!==m&&void 0===e)return;for(let n=0;n{t.resolved&&e(t.node,t.document,t.nodePointer,n)}));u.push(r)}}}function x(e,t,i){return r(this,void 0,void 0,(function*(){if(function(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}(i.prev,t))throw new Error("Self-referencing circular pointer");if(s.isAnchor(t.$ref)){yield l.nextTick();const n={resolved:!0,isRemote:!1,node:v.get(t.$ref),document:e,nodePointer:t.$ref},r=f(e.source.absoluteRef,t.$ref);return o.set(r,n),n}const{uri:r,pointer:a}=s.parseRef(t.$ref),c=null!==r;let u;try{u=c?yield n.resolveDocument(e.source.absoluteRef,r):e}catch(y){const n={resolved:!1,isRemote:c,document:void 0,error:y},r=f(e.source.absoluteRef,t.$ref);return o.set(r,n),n}let p={resolved:!0,document:u,isRemote:c,node:e.parsed,nodePointer:"#/"},d=u.parsed;const m=a;for(const e of m){if("object"!=typeof d){d=void 0;break}if(void 0!==d[e])d=d[e],p.nodePointer=s.joinPointer(p.nodePointer,s.escapePointer(e));else{if(!s.isRef(d)){d=void 0;break}if(p=yield x(u,d,h(i,d)),u=p.document||u,"object"!=typeof p.node){d=void 0;break}d=p.node[e],p.nodePointer=s.joinPointer(p.nodePointer,s.escapePointer(e))}}p.node=d,p.document=u;const g=f(e.source.absoluteRef,t.$ref);return p.document&&s.isRef(d)&&(p=yield x(p.document,d,h(i,d))),o.set(g,p),Object.assign({},p)}))}b(t,d,y+p)}(t.parsed,t,"#/",i);do{p=yield Promise.all(u)}while(u.length!==p.length);return o}))}},20348:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnresolvedRef=t.NoUnresolvedRefs=void 0;const r=n(44182);function i(e,t,n){var i;const o=e.error;o instanceof r.YamlParseError&&t({message:"Failed to parse: "+o.message,location:{source:o.source,pointer:void 0,start:{col:o.col,line:o.line}}});const s=null===(i=e.error)||void 0===i?void 0:i.message;t({location:n,message:"Can't resolve $ref"+(s?": "+s:"")})}t.NoUnresolvedRefs=()=>({ref:{leave(e,{report:t,location:n},r){void 0===r.node&&i(r,t,n)}},DiscriminatorMapping(e,{report:t,resolve:n,location:r}){for(const o of Object.keys(e)){const s=n({$ref:e[o]});if(void 0!==s.node)return;i(s,t,r.child(o))}}}),t.reportUnresolvedRef=i},54508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const r=n(10771);t.RemoveUnusedComponents=()=>{const e=new Map;function t(t,n,r){var i;e.set(t.absolutePointer,{used:(null===(i=e.get(t.absolutePointer))||void 0===i?void 0:i.used)||!1,componentType:n,name:r})}return{ref:{leave(t,{type:n,resolve:r,key:i}){if(["Schema","Parameter","Response","SecurityScheme"].includes(n.name)){const n=r(t);if(!n.location)return;e.set(n.location.absolutePointer,{used:!0,name:i.toString()})}}},Root:{leave(t,n){const i=n.getVisitorData();i.removedCount=0;const o=new Set;e.forEach((e=>{const{used:n,name:r,componentType:s}=e;!n&&s&&(o.add(s),delete t[s][r],i.removedCount++)}));for(const e of o)r.isEmptyObject(t[e])&&delete t[e]}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,"definitions",r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,"parameters",r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,"responses",r.toString())}},NamedSecuritySchemes:{SecurityScheme(e,{location:n,key:r}){t(n,"securityDefinitions",r.toString())}}}}},16350:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const r=n(10771);t.RemoveUnusedComponents=()=>{const e=new Map;function t(t,n,r){var i;e.set(t.absolutePointer,{used:(null===(i=e.get(t.absolutePointer))||void 0===i?void 0:i.used)||!1,componentType:n,name:r})}return{ref:{leave(t,{type:n,resolve:r,key:i}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(n.name)){const n=r(t);if(!n.location)return;e.set(n.location.absolutePointer,{used:!0,name:i.toString()})}}},Root:{leave(t,n){const i=n.getVisitorData();i.removedCount=0,e.forEach((e=>{const{used:n,componentType:o,name:s}=e;if(!n&&o&&t.components){const e=t.components[o];delete e[s],i.removedCount++,r.isEmptyObject(e)&&delete t.components[o]}})),r.isEmptyObject(t.components)&&delete t.components}},NamedSchemas:{Schema(e,{location:n,key:r}){e.allOf||t(n,"schemas",r.toString())}},NamedParameters:{Parameter(e,{location:n,key:r}){t(n,"parameters",r.toString())}},NamedResponses:{Response(e,{location:n,key:r}){t(n,"responses",r.toString())}},NamedExamples:{Example(e,{location:n,key:r}){t(n,"examples",r.toString())}},NamedRequestBodies:{RequestBody(e,{location:n,key:r}){t(n,"requestBodies",r.toString())}},NamedHeaders:{Header(e,{location:n,key:r}){t(n,"headers",r.toString())}}}}},45220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedType=t.normalizeTypes=t.SpecExtension=t.mapOf=t.listOf=void 0,t.listOf=function(e){return{name:`${e}List`,properties:{},items:e}},t.mapOf=function(e){return{name:`${e}Map`,properties:{},additionalProperties:()=>e}},t.SpecExtension={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}},t.normalizeTypes=function(e,n={}){const r={};for(const t of Object.keys(e))r[t]=Object.assign(Object.assign({},e[t]),{name:t});for(const t of Object.values(r))i(t);return r.SpecExtension=t.SpecExtension,r;function i(e){if(e.additionalProperties&&(e.additionalProperties=o(e.additionalProperties)),e.items&&(e.items=o(e.items)),e.properties){const t={};for(const[r,i]of Object.entries(e.properties))t[r]=o(i),n.doNotResolveExamples&&i&&i.isExample&&(t[r]=Object.assign(Object.assign({},i),{resolvable:!1}));e.properties=t}}function o(e){if("string"==typeof e){if(!r[e])throw new Error(`Unknown type name found: ${e}`);return r[e]}return"function"==typeof e?(t,n)=>o(e(t,n)):e&&e.name?(i(e=Object.assign({},e)),e):e&&e.directResolveAs?Object.assign(Object.assign({},e),{directResolveAs:o(e.directResolveAs)}):e}},t.isNamedType=function(e){return"string"==typeof(null==e?void 0:e.name)}},80388:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas2Types=void 0;const r=n(45220),i=/^[0-9][0-9Xx]{2}$/,o={properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},s={properties:{name:{type:"string"},in:{type:"string",enum:["query","header","path","formData","body"]},description:{type:"string"},required:{type:"boolean"},schema:"Schema",type:{type:"string",enum:["string","number","integer","boolean","array","file"]},format:{type:"string"},allowEmptyValue:{type:"boolean"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"},"x-example":"Example","x-examples":"ExamplesMap"},required:e=>e&&e.in?"body"===e.in?["name","in","schema"]:"array"===e.type?["name","in","type","items"]:["name","in","type"]:["name","in"],extensionsPrefix:"x-"},a={properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"],extensionsPrefix:"x-"},l={properties:{default:"Response"},additionalProperties:(e,t)=>i.test(t)?"Response":void 0},c={properties:{description:{type:"string"},schema:"Schema",headers:r.mapOf("Header"),examples:"Examples","x-summary":{type:"string"}},required:["description"],extensionsPrefix:"x-"},u={properties:{description:{type:"string"},type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"],extensionsPrefix:"x-"},p={properties:{format:{type:"string"},title:{type:"string"},description:{type:"string"},default:null,multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{type:"string",enum:["object","array","string","number","integer","boolean","null"]},items:e=>Array.isArray(e)?r.listOf("Schema"):"Schema",allOf:r.listOf("Schema"),properties:"SchemaProperties",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",discriminator:{type:"string"},readOnly:{type:"boolean"},xml:"Xml",externalDocs:"ExternalDocs",example:{isExample:!0},"x-tags":{type:"array",items:{type:"string"}},"x-nullable":{type:"boolean"},"x-extendedDiscriminator":{type:"string"},"x-additionalPropertiesName":{type:"string"},"x-explicitMappingOnly":{type:"boolean"},"x-enumDescriptions":"EnumDescriptions"},extensionsPrefix:"x-"},d={properties:{type:{enum:["basic","apiKey","oauth2"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header"]},flow:{enum:["implicit","password","application","accessCode"]},authorizationUrl:{type:"string"},tokenUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},"x-defaultClientId":{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","scopes"];case"application":case"password":return["type","flow","tokenUrl","scopes"];default:return["type","flow","scopes"]}default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"basic":return["type","description"];case"apiKey":return["type","name","in","description"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","description","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","description","scopes"];case"application":case"password":return["type","flow","tokenUrl","description","scopes"];default:return["type","flow","tokenUrl","authorizationUrl","description","scopes"]}default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas2Types={Root:{properties:{swagger:{type:"string"},info:"Info",host:{type:"string"},basePath:{type:"string"},schemes:{type:"array",items:{type:"string"}},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},paths:"Paths",definitions:"NamedSchemas",parameters:"NamedParameters",responses:"NamedResponses",securityDefinitions:"NamedSecuritySchemes",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs","x-servers":"XServerList","x-tagGroups":"TagGroups","x-ignoredHeaderParameters":{type:"array",items:{type:"string"}}},required:["swagger","paths","info"],extensionsPrefix:"x-"},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs","x-traitTag":{type:"boolean"},"x-displayName":{type:"string"}},required:["name"],extensionsPrefix:"x-"},TagList:r.listOf("Tag"),TagGroups:r.listOf("TagGroup"),TagGroup:{properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}}}},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"],extensionsPrefix:"x-"},Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}},extensionsPrefix:"x-"},ExamplesMap:r.mapOf("Example"),EnumDescriptions:{properties:{},additionalProperties:{type:"string"}},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:r.listOf("SecurityRequirement"),Info:{properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License",version:{type:"string"},"x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}},extensionsPrefix:"x-"},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Logo:{properties:{url:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"},href:{type:"string"}},extensionsPrefix:"x-"},Paths:o,PathItem:{properties:{$ref:{type:"string"},parameters:"ParameterList",get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation"},extensionsPrefix:"x-"},Parameter:s,ParameterItems:a,ParameterList:r.listOf("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},parameters:"ParameterList",responses:"Responses",schemes:{type:"array",items:{type:"string"}},deprecated:{type:"boolean"},security:"SecurityRequirementList","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},required:["responses"],extensionsPrefix:"x-"},Examples:{properties:{},additionalProperties:{isExample:!0}},Header:u,Responses:l,Response:c,Schema:p,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}},extensionsPrefix:"x-"},SchemaProperties:{properties:{},additionalProperties:"Schema"},NamedSchemas:r.mapOf("Schema"),NamedResponses:r.mapOf("Response"),NamedParameters:r.mapOf("Parameter"),NamedSecuritySchemes:r.mapOf("SecurityScheme"),SecurityScheme:d,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},XCodeSampleList:r.listOf("XCodeSample"),XServerList:r.listOf("XServer"),XServer:{properties:{url:{type:"string"},description:{type:"string"}},required:["url"]}}},85241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3Types=void 0;const r=n(45220),i=n(27468),o=/^[0-9][0-9Xx]{2}$/,s={properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},a={properties:{default:"Response"},additionalProperties:(e,t)=>o.test(t)?"Response":void 0},l={properties:{externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{enum:["object","array","string","number","integer","boolean","null"]},allOf:r.listOf("Schema"),anyOf:r.listOf("Schema"),oneOf:r.listOf("Schema"),not:"Schema",properties:"SchemaProperties",items:e=>Array.isArray(e)?r.listOf("Schema"):"Schema",additionalItems:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},default:null,nullable:{type:"boolean"},readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",example:{isExample:!0},deprecated:{type:"boolean"},"x-tags":{type:"array",items:{type:"string"}},"x-additionalPropertiesName":{type:"string"},"x-explicitMappingOnly":{type:"boolean"}},extensionsPrefix:"x-"},c={properties:{},additionalProperties:e=>i.isMappingRef(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},u={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"OAuth2Flows",openIdConnectUrl:{type:"string"},"x-defaultClientId":{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3Types={Root:{properties:{openapi:null,info:"Info",servers:"ServerList",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs",paths:"Paths",components:"Components","x-webhooks":"WebhooksMap","x-tagGroups":"TagGroups","x-ignoredHeaderParameters":{type:"array",items:{type:"string"}}},required:["openapi","paths","info"],extensionsPrefix:"x-"},Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs","x-traitTag":{type:"boolean"},"x-displayName":{type:"string"}},required:["name"],extensionsPrefix:"x-"},TagList:r.listOf("Tag"),TagGroups:r.listOf("TagGroup"),TagGroup:{properties:{name:{type:"string"},tags:{type:"array",items:{type:"string"}}},extensionsPrefix:"x-"},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"],extensionsPrefix:"x-"},Server:{properties:{url:{type:"string"},description:{type:"string"},variables:"ServerVariablesMap"},required:["url"],extensionsPrefix:"x-"},ServerList:r.listOf("Server"),ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:{type:"string"}},required:["default"],extensionsPrefix:"x-"},ServerVariablesMap:r.mapOf("ServerVariable"),SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},SecurityRequirementList:r.listOf("SecurityRequirement"),Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License","x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}},extensionsPrefix:"x-"},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Paths:s,PathItem:{properties:{$ref:{type:"string"},servers:"ServerList",parameters:"ParameterList",summary:{type:"string"},description:{type:"string"},get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation",trace:"Operation"},extensionsPrefix:"x-"},Parameter:{properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",content:"MediaTypesMap"},required:["name","in"],requiredOneOf:["schema","content"],extensionsPrefix:"x-"},ParameterList:r.listOf("Parameter"),Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:"ParameterList",security:"SecurityRequirementList",servers:"ServerList",requestBody:"RequestBody",responses:"Responses",deprecated:{type:"boolean"},callbacks:"CallbacksMap","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},required:["responses"],extensionsPrefix:"x-"},Callback:r.mapOf("PathItem"),CallbacksMap:r.mapOf("Callback"),RequestBody:{properties:{description:{type:"string"},required:{type:"boolean"},content:"MediaTypesMap"},required:["content"],extensionsPrefix:"x-"},MediaTypesMap:{properties:{},additionalProperties:"MediaType"},MediaType:{properties:{schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",encoding:"EncodingMap"},extensionsPrefix:"x-"},Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}},extensionsPrefix:"x-"},ExamplesMap:r.mapOf("Example"),Encoding:{properties:{contentType:{type:"string"},headers:"HeadersMap",style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"}},extensionsPrefix:"x-"},EncodingMap:r.mapOf("Encoding"),EnumDescriptions:{properties:{},additionalProperties:{type:"string"}},Header:{properties:{description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:"ExamplesMap",content:"MediaTypesMap"},requiredOneOf:["schema","content"],extensionsPrefix:"x-"},HeadersMap:r.mapOf("Header"),Responses:a,Response:{properties:{description:{type:"string"},headers:"HeadersMap",content:"MediaTypesMap",links:"LinksMap","x-summary":{type:"string"}},required:["description"],extensionsPrefix:"x-"},Link:{properties:{operationRef:{type:"string"},operationId:{type:"string"},parameters:null,requestBody:null,description:{type:"string"},server:"Server"},extensionsPrefix:"x-"},Logo:{properties:{url:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"},href:{type:"string"}}},Schema:l,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}},extensionsPrefix:"x-"},SchemaProperties:{properties:{},additionalProperties:"Schema"},DiscriminatorMapping:c,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"],extensionsPrefix:"x-"},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks"},extensionsPrefix:"x-"},LinksMap:r.mapOf("Link"),NamedSchemas:r.mapOf("Schema"),NamedResponses:r.mapOf("Response"),NamedParameters:r.mapOf("Parameter"),NamedExamples:r.mapOf("Example"),NamedRequestBodies:r.mapOf("RequestBody"),NamedHeaders:r.mapOf("Header"),NamedSecuritySchemes:r.mapOf("SecurityScheme"),NamedLinks:r.mapOf("Link"),NamedCallbacks:r.mapOf("Callback"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"],extensionsPrefix:"x-"},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"],extensionsPrefix:"x-"},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"],extensionsPrefix:"x-"},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"},"x-usePkce":e=>"boolean"==typeof e?{type:"boolean"}:"XUsePkce"},required:["authorizationUrl","tokenUrl","scopes"],extensionsPrefix:"x-"},OAuth2Flows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"},extensionsPrefix:"x-"},SecurityScheme:u,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},XCodeSampleList:r.listOf("XCodeSample"),XUsePkce:{properties:{disableManualConfiguration:{type:"boolean"},hideClientSecretInput:{type:"boolean"}}},WebhooksMap:{properties:{},additionalProperties:()=>"PathItem"}}},22608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3_1Types=void 0;const r=n(45220),i=n(85241),o={properties:{$id:{type:"string"},$anchor:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"integer",minimum:0},minLength:{type:"integer",minimum:0},pattern:{type:"string"},maxItems:{type:"integer",minimum:0},minItems:{type:"integer",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"integer",minimum:0},minProperties:{type:"integer",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:r.listOf("Schema"),anyOf:r.listOf("Schema"),oneOf:r.listOf("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:r.listOf("Schema"),prefixItems:r.listOf("Schema"),contains:"Schema",minContains:{type:"integer",minimum:0},maxContains:{type:"integer",minimum:0},patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"},"x-tags":{type:"array",items:{type:"string"}}},extensionsPrefix:"x-"},s={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect","mutualTLS"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"OAuth2Flows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":switch(null==e?void 0:e.flows){case"implicit":return["type","flows","authorizationUrl","refreshUrl","description","scopes"];case"password":case"clientCredentials":return["type","flows","tokenUrl","refreshUrl","description","scopes"];default:return["type","flows","authorizationUrl","refreshUrl","tokenUrl","description","scopes"]}case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3_1Types=Object.assign(Object.assign({},i.Oas3Types),{Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},summary:{type:"string"},contact:"Contact",license:"License","x-logo":"Logo"},required:["title","version"],extensionsPrefix:"x-"},Root:{properties:{openapi:null,info:"Info",servers:"ServerList",security:"SecurityRequirementList",tags:"TagList",externalDocs:"ExternalDocs",paths:"Paths",webhooks:"WebhooksMap",components:"Components",jsonSchemaDialect:{type:"string"}},required:["openapi","info"],requiredOneOf:["paths","components","webhooks"],extensionsPrefix:"x-"},Schema:o,License:{properties:{name:{type:"string"},url:{type:"string"},identifier:{type:"string"}},required:["name"],extensionsPrefix:"x-"},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks",pathItems:"NamedPathItems"},extensionsPrefix:"x-"},NamedPathItems:r.mapOf("PathItem"),SecurityScheme:s,Operation:{properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:"ParameterList",security:"SecurityRequirementList",servers:"ServerList",requestBody:"RequestBody",responses:"Responses",deprecated:{type:"boolean"},callbacks:"CallbacksMap","x-codeSamples":"XCodeSampleList","x-code-samples":"XCodeSampleList","x-hideTryItPanel":{type:"boolean"}},extensionsPrefix:"x-"}})},10771:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(t){o(t)}}function a(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.nextTick=t.pickDefined=t.keysOf=t.identity=t.isTruthy=t.showErrorForDeprecatedField=t.showWarningForDeprecatedField=t.doesYamlFileExist=t.isCustomRuleId=t.getMatchingStatusCodeRange=t.assignExisting=t.isNotString=t.isString=t.isNotEmptyObject=t.slash=t.isPathParameter=t.yamlAndJsonSyncReader=t.readFileAsStringSync=t.isSingular=t.validateMimeTypeOAS3=t.validateMimeType=t.splitCamelCaseIntoWords=t.omitObjectProps=t.pickObjectProps=t.readFileFromUrl=t.isEmptyArray=t.isEmptyObject=t.isPlainObject=t.isDefined=t.loadYaml=t.popStack=t.pushStack=t.stringifyYaml=t.parseYaml=void 0;const i=n(23197),o=n(26470),s=n(34099),a=n(60996),l=n(23450),c=n(55273),u=n(28005),p=n(23065);var d=n(55273);function f(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function h(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),s(e,t)}function m(e){return"string"==typeof e}function g(e){return!!e}function y(e,t){return`${void 0!==t?`${t}.`:""}${e}`}Object.defineProperty(t,"parseYaml",{enumerable:!0,get:function(){return d.parseYaml}}),Object.defineProperty(t,"stringifyYaml",{enumerable:!0,get:function(){return d.stringifyYaml}}),t.pushStack=function(e,t){return{prev:e,value:t}},t.popStack=function(e){var t;return null!==(t=null==e?void 0:e.prev)&&void 0!==t?t:null},t.loadYaml=function(e){return r(this,void 0,void 0,(function*(){const t=yield i.promises.readFile(e,"utf-8");return c.parseYaml(t)}))},t.isDefined=function(e){return void 0!==e},t.isPlainObject=f,t.isEmptyObject=function(e){return f(e)&&0===Object.keys(e).length},t.isEmptyArray=function(e){return Array.isArray(e)&&0===e.length},t.readFileFromUrl=function(e,t){return r(this,void 0,void 0,(function*(){const n={};for(const i of t.headers)h(e,i.matches)&&(n[i.name]=void 0!==i.envVariable?u.env[i.envVariable]||"":i.value);const r=yield(t.customFetch||a.default)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:yield r.text(),mimeType:r.headers.get("content-type")}}))},t.pickObjectProps=function(e,t){return Object.fromEntries(t.filter((t=>t in e)).map((t=>[t,e[t]])))},t.omitObjectProps=function(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))},t.splitCamelCaseIntoWords=function(e){const t=e.split(/(?:[-._])|([A-Z][a-z]+)/).filter(g).map((e=>e.toLocaleLowerCase())),n=e.split(/([A-Z]{2,})/).filter((e=>e&&e===e.toUpperCase())).map((e=>e.toLocaleLowerCase()));return new Set([...t,...n])},t.validateMimeType=function({type:e,value:t},{report:n,location:r},i){if(!i)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t[e])for(const o of t[e])i.includes(o)||n({message:`Mime type "${o}" is not allowed`,location:r.child(t[e].indexOf(o)).key()})},t.validateMimeTypeOAS3=function({type:e,value:t},{report:n,location:r},i){if(!i)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t.content)for(const o of Object.keys(t.content))i.includes(o)||n({message:`Mime type "${o}" is not allowed`,location:r.child("content").child(o).key()})},t.isSingular=function(e){return l.isSingular(e)},t.readFileAsStringSync=function(e){return i.readFileSync(e,"utf-8")},t.yamlAndJsonSyncReader=function(e){const t=i.readFileSync(e,"utf-8");return c.parseYaml(t)},t.isPathParameter=function(e){return e.startsWith("{")&&e.endsWith("}")},t.slash=function(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")},t.isNotEmptyObject=function(e){return!!e&&Object.keys(e).length>0},t.isString=m,t.isNotString=function(e){return!m(e)},t.assignExisting=function(e,t){for(const n of Object.keys(t))e.hasOwnProperty(n)&&(e[n]=t[n])},t.getMatchingStatusCodeRange=function(e){return`${e}`.replace(/^(\d)\d\d$/,((e,t)=>`${t}XX`))},t.isCustomRuleId=function(e){return e.includes("/")},t.doesYamlFileExist=function(e){return(".yaml"===o.extname(e)||".yml"===o.extname(e))&&i.hasOwnProperty("existsSync")&&i.existsSync(e)},t.showWarningForDeprecatedField=function(e,t,n){p.logger.warn(`The '${p.colorize.red(e)}' field is deprecated. ${t?`Use ${p.colorize.green(y(t,n))} instead. `:""}Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`)},t.showErrorForDeprecatedField=function(e,t,n){throw new Error(`Do not use '${e}' field. ${t?`Use '${y(t,n)}' instead. `:""}\n`)},t.isTruthy=g,t.identity=function(e){return e},t.keysOf=function(e){return e?Object.keys(e):[]},t.pickDefined=function(e){if(!e)return;const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t},t.nextTick=function(){new Promise((e=>{setTimeout(e)}))}},68065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVisitors=void 0;const r=n(45220),i={Root:"DefinitionRoot",ServerVariablesMap:"ServerVariableMap",Paths:["PathMap","PathsMap"],CallbacksMap:"CallbackMap",MediaTypesMap:"MediaTypeMap",ExamplesMap:"ExampleMap",EncodingMap:"EncodingsMap",HeadersMap:"HeaderMap",LinksMap:"LinkMap",OAuth2Flows:"SecuritySchemeFlows",Responses:"ResponsesMap"};t.normalizeVisitors=function(e,t){const n={any:{enter:[],leave:[]}};for(const r of Object.keys(t))n[r]={enter:[],leave:[]};n.ref={enter:[],leave:[]};for(const{ruleId:r,severity:i,visitor:l}of e)a({ruleId:r,severity:i},l,null);for(const r of Object.keys(n))n[r].enter.sort(((e,t)=>t.depth-e.depth)),n[r].leave.sort(((e,t)=>e.depth-t.depth));return n;function o(e,t,i,s,a=[]){if(a.includes(t))return;a=[...a,t];const l=new Set;for(const n of Object.values(t.properties))n!==i?"object"==typeof n&&null!==n&&n.name&&l.add(n):c(e,a);t.additionalProperties&&"function"!=typeof t.additionalProperties&&(t.additionalProperties===i?c(e,a):void 0!==t.additionalProperties.name&&l.add(t.additionalProperties)),t.items&&(t.items===i?c(e,a):void 0!==t.items.name&&l.add(t.items)),t.extensionsPrefix&&l.add(r.SpecExtension);for(const n of Array.from(l.values()))o(e,n,i,s,a);function c(e,t){for(const r of t.slice(1))n[r.name]=n[r.name]||{enter:[],leave:[]},n[r.name].enter.push(Object.assign(Object.assign({},e),{visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:s}}))}}function s(e,t){if(Array.isArray(t)){const n=t.find((t=>e[t]))||void 0;return n&&e[n]}return e[t]}function a(e,r,l,c=0){const u=Object.keys(t);if(0===c)u.push("any"),u.push("ref");else{if(r.any)throw new Error("any() is allowed only on top level");if(r.ref)throw new Error("ref() is allowed only on top level")}for(const p of u){const u=r[p]||s(r,i[p]),d=n[p];if(!u)continue;let f,h,m;const g="object"==typeof u;if("ref"===p&&g&&u.skip)throw new Error("ref() visitor does not support skip");"function"==typeof u?f=u:g&&(f=u.enter,h=u.leave,m=u.skip);const y={activatedOn:null,type:t[p],parent:l,isSkippedLevel:!1};if("object"==typeof u&&a(e,u,y,c+1),l&&o(e,l.type,t[p],l),f||g){if(f&&"function"!=typeof f)throw new Error("DEV: should be function");d.enter.push(Object.assign(Object.assign({},e),{visit:f||(()=>{}),skip:m,depth:c,context:y}))}if(h){if("function"!=typeof h)throw new Error("DEV: should be function");d.leave.push(Object.assign(Object.assign({},e),{visit:h,depth:c,context:y}))}}}}},69443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkDocument=void 0;const r=n(27468),i=n(44182),o=n(10771),s=n(45220);function a(e){var t,n;const r={};for(;e.parent;)(null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.location)&&(r[e.parent.type.name]=null===(n=e.parent.activatedOn)||void 0===n?void 0:n.value.location),e=e.parent;return r}t.walkDocument=function(e){const{document:t,rootType:n,normalizedVisitors:l,resolvedRefMap:c,ctx:u}=e,p={},d=new Set;!function e(t,n,f,h,m){var g,y,v,b,x,w,k,O,S,E,_;const A=(e,t=P.source.absoluteRef)=>{if(!r.isRef(e))return{location:f,node:e};const n=i.makeRefId(t,e.$ref),o=c.get(n);if(!o)return{location:void 0,node:void 0};const{resolved:s,node:a,document:l,nodePointer:u,error:p}=o;return{location:s?new r.Location(l.source,u):p instanceof i.YamlParseError?new r.Location(p.source,""):void 0,node:a,error:p}},R=f;let P=f;const{node:C,location:I,error:T}=A(t),j=new Set;if(r.isRef(t)){const e=l.ref.enter;for(const{visit:r,ruleId:i,severity:o,context:s}of e)if(!d.has(t)){j.add(s);r(t,{report:N.bind(void 0,i,o),resolve:A,rawNode:t,rawLocation:R,location:f,type:n,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:$.bind(void 0,i)},{node:C,location:I,error:T}),(null==I?void 0:I.source.absoluteRef)&&u.refTypes&&u.refTypes.set(null==I?void 0:I.source.absoluteRef,n)}}if(void 0!==C&&I&&"scalar"!==n.name){P=I;const i=null===(y=null===(g=p[n.name])||void 0===g?void 0:g.has)||void 0===y?void 0:y.call(g,C);let a=!1;const c=l.any.enter.concat((null===(v=l[n.name])||void 0===v?void 0:v.enter)||[]),u=[];for(const{context:e,visit:r,skip:s,ruleId:l,severity:p}of c)if(e.isSkippedLevel)!e.parent.activatedOn||e.parent.activatedOn.value.nextLevelTypeActivated||e.seen.has(t)||(e.seen.add(t),a=!0,u.push(e));else if(e.parent&&e.parent.activatedOn&&(null===(b=e.activatedOn)||void 0===b?void 0:b.value.withParentNode)!==e.parent.activatedOn.value.node&&(null===(x=e.parent.activatedOn.value.nextLevelTypeActivated)||void 0===x?void 0:x.value)!==n||!e.parent&&!i){u.push(e);const i={node:C,location:I,nextLevelTypeActivated:null,withParentNode:null===(k=null===(w=e.parent)||void 0===w?void 0:w.activatedOn)||void 0===k?void 0:k.value.node,skipped:null!==(E=(null===(S=null===(O=e.parent)||void 0===O?void 0:O.activatedOn)||void 0===S?void 0:S.value.skipped)||(null==s?void 0:s(C,m,{location:f,rawLocation:R,resolve:A,rawNode:t})))&&void 0!==E&&E};e.activatedOn=o.pushStack(e.activatedOn,i);let c=e.parent;for(;c;)c.activatedOn.value.nextLevelTypeActivated=o.pushStack(c.activatedOn.value.nextLevelTypeActivated,n),c=c.parent;if(!i.skipped){a=!0,j.add(e);const{ignoreNextVisitorsOnNode:n}=L(r,C,t,e,l,p);if(n)break}}if(a||!i)if(p[n.name]=p[n.name]||new Set,p[n.name].add(C),Array.isArray(C)){const t=n.items;if(void 0!==t)for(let n=0;n!i.includes(e)))):n.extensionsPrefix&&i.push(...Object.keys(C).filter((e=>e.startsWith(n.extensionsPrefix)))),r.isRef(t)&&i.push(...Object.keys(t).filter((e=>"$ref"!==e&&!i.includes(e))));for(const o of i){let i=C[o],a=I;void 0===i&&(i=t[o],a=f);let l=n.properties[o];void 0===l&&(l=n.additionalProperties),"function"==typeof l&&(l=l(i,o)),void 0===l&&n.extensionsPrefix&&o.startsWith(n.extensionsPrefix)&&(l=s.SpecExtension),!s.isNamedType(l)&&(null==l?void 0:l.directResolveAs)&&(l=l.directResolveAs,i={$ref:i}),l&&void 0===l.name&&!1!==l.resolvable&&(l={name:"scalar",properties:{}}),s.isNamedType(l)&&("scalar"!==l.name||r.isRef(i))&&e(i,l,a.child([o]),C,o)}}const d=l.any.leave,h=((null===(_=l[n.name])||void 0===_?void 0:_.leave)||[]).concat(d);for(const e of u.reverse())if(e.isSkippedLevel)e.seen.delete(C);else if(e.activatedOn=o.popStack(e.activatedOn),e.parent){let t=e.parent;for(;t;)t.activatedOn.value.nextLevelTypeActivated=o.popStack(t.activatedOn.value.nextLevelTypeActivated),t=t.parent}for(const{context:e,visit:n,ruleId:r,severity:o}of h)!e.isSkippedLevel&&j.has(e)&&L(n,C,t,e,r,o)}if(P=f,r.isRef(t)){const e=l.ref.leave;for(const{visit:r,ruleId:i,severity:o,context:s}of e)if(j.has(s)){r(t,{report:N.bind(void 0,i,o),resolve:A,rawNode:t,rawLocation:R,location:f,type:n,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:$.bind(void 0,i)},{node:C,location:I,error:T})}}function L(e,t,r,i,o,s){const l=N.bind(void 0,o,s);let c=!1;return e(t,{report:l,resolve:A,rawNode:r,location:P,rawLocation:R,type:n,parent:h,key:m,parentLocations:a(i),oasVersion:u.oasVersion,ignoreNextVisitorsOnNode:()=>{c=!0},getVisitorData:$.bind(void 0,o)},function(e){var t;const n={};for(;e.parent;)n[e.parent.type.name]=null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.node,e=e.parent;return n}(i),i),{ignoreNextVisitorsOnNode:c}}function N(e,t,n){const r=n.location?Array.isArray(n.location)?n.location:[n.location]:[Object.assign(Object.assign({},P),{reportOnKey:!1})],i=n.forceSeverity||t;"off"!==i&&u.problems.push(Object.assign(Object.assign({ruleId:n.ruleId||e,severity:i},n),{suggest:n.suggest||[],location:r.map((e=>Object.assign(Object.assign(Object.assign({},P),{reportOnKey:!1}),e)))}))}function $(e){return u.visitorsData[e]=u.visitorsData[e]||{},u.visitorsData[e]}}(t.parsed,n,new r.Location(t.source,"#/"),void 0,"")}},95019:(e,t,n)=>{var r=n(5623);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return g(function(e){return e.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(s).split("\\,").join(a).split("\\.").join(l)}(e),!0).map(u)};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join("\\").split(o).join("{").split(s).join("}").split(a).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,o=n.body,s=n.post,a=i.split(",");a[a.length-1]+="{"+o+"}";var l=p(s);return s.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function d(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function m(e,t){return e>=t}function g(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var o=i.pre,a=i.post.length?g(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l=0;if(!w&&!k)return i.post.match(/,.*\}/)?g(e=i.pre+"{"+i.body+s+i.post):[e];if(w)y=i.body.split(/\.\./);else if(1===(y=p(i.body)).length&&1===(y=g(y[0],!1).map(d)).length)return a.map((function(e){return i.pre+y[0]+e}));if(w){var O=c(y[0]),S=c(y[1]),E=Math.max(y[0].length,y[1].length),_=3==y.length?Math.abs(c(y[2])):1,A=h;S0){var T=new Array(I+1).join("0");C=P<0?"-"+T+C.slice(1):T+C}}v.push(C)}}else{v=[];for(var j=0;j{const t="object"==typeof process&&process&&!1;e.exports=t?{sep:"\\"}:{sep:"/"}},34099:(e,t,n)=>{const r=e.exports=(e,t,n={})=>(g(t),!(!n.nocomment&&"#"===t.charAt(0))&&new b(t,n).match(e));e.exports=r;const i=n(95751);r.sep=i.sep;const o=Symbol("globstar **");r.GLOBSTAR=o;const s=n(95019),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},l="[^/]",c=l+"*?",u=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),p=u("().*{}+?[]^$\\!"),d=u("[.("),f=/\/+/;r.filter=(e,t={})=>(n,i,o)=>r(n,e,t);const h=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};r.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return r;const t=r,n=(n,r,i)=>t(n,r,h(e,i));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,h(e,n))}}).defaults=n=>t.defaults(h(e,n)).Minimatch,n.filter=(n,r)=>t.filter(n,h(e,r)),n.defaults=n=>t.defaults(h(e,n)),n.makeRe=(n,r)=>t.makeRe(n,h(e,r)),n.braceExpand=(n,r)=>t.braceExpand(n,h(e,r)),n.match=(n,r,i)=>t.match(n,r,h(e,i)),n},r.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(g(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),g=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");r.makeRe=(e,t)=>new b(e,t||{}).makeRe(),r.match=(e,t,n={})=>{const r=new b(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};const v=e=>e.replace(/[[\]\\]/g,"\\$&");class b{constructor(e,t){g(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(f))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r>> no match, partial?",e,d,t,f),d!==a))}if("string"==typeof u?(c=p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(i===a&&s===l)return!0;if(i===a)return n;if(s===l)return i===a-1&&""===e[i];throw new Error("wtf?")}braceExpand(){return m(this.pattern,this.options)}parse(e,t){g(e);const n=this.options;if("**"===e){if(!n.noglobstar)return o;e="*"}if(""===e)return"";let r="",i=!1,s=!1;const u=[],f=[];let h,m,b,x,w=!1,k=-1,O=-1,S="."===e.charAt(0),E=n.dot||S;const _=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",A=()=>{if(h){switch(h){case"*":r+=c,i=!0;break;case"?":r+=l,i=!0;break;default:r+="\\"+h}this.debug("clearStateChar %j %j",h,r),h=!1}};for(let o,l=0;l(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,b,r);const t="*"===b.type?c:"?"===b.type?l:"\\"+b.type;i=!0,r=r.slice(0,b.reStart)+t+"\\("+e}A(),s&&(r+="\\\\");const R=d[r.charAt(0)];for(let o=f.length-1;o>-1;o--){const e=f[o],n=r.slice(0,e.reStart),i=r.slice(e.reStart,e.reEnd-8);let s=r.slice(e.reEnd);const a=r.slice(e.reEnd-8,e.reEnd)+s,l=n.split(")").length,c=n.split("(").length-l;let u=s;for(let t=0;te.replace(/\\(.)/g,"$1"))(e);const P=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+r+"$",P),{_glob:e,_src:r})}catch(C){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"";let i=e.map((e=>(e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===o?o:e._src)).reduce(((e,t)=>(e[e.length-1]===o&&t===o||e.push(t),e)),[]),e.forEach(((t,r)=>{t===o&&e[r-1]!==o&&(0===r?e.length>1?e[r+1]="(?:\\/|"+n+"\\/)?"+e[r+1]:e[r]=n:r===e.length-1?e[r-1]+="(?:\\/|"+n+")?":(e[r-1]+="(?:\\/|\\/"+n+"\\/)"+e[r+1],e[r+1]=o))})),e.filter((e=>e!==o)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,r)}catch(s){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/")),e=e.split(f),this.debug(this.pattern,"split",e);const r=this.set;let o;this.debug(this.pattern,"set",r);for(let i=e.length-1;i>=0&&(o=e[i],!o);i--);for(let i=0;i{"use strict";n.r(t),n.d(t,{default:()=>b});var r=n(87462),i=n(67294),o=n(32517),s=n(86010);n(36136).default.canUseDOM&&(window.Prism=window.Prism||{},window.Prism.manual=!0);var a=n(72933),l=n(51048),c=n(31610),u=n(9200),p=n(82492),d=n.n(p);function f(e,t){void 0===e&&(e="theme-redoc");const n=(0,l.Z)(),r="dark"===(0,u.I)().colorMode,o=(0,c.OD)("docusaurus-theme-redoc",{failfast:!0}),s=(0,c.eZ)("docusaurus-theme-redoc",e)||Object.values(o)[0];return(0,i.useMemo)((()=>{const{lightTheme:e,darkTheme:i,options:o}=s,a={scrollYOffset:n||"string"!=typeof o.scrollYOffset?o.scrollYOffset:0},l=d()({...o,...a,theme:e},t),c=d()({...o,...a,theme:i},t);return{options:n&&r?c:l,darkThemeOptions:c,lightThemeOptions:l}}),[n,r,s,t])}var h=n(79524);let m=null;function g(e){return i.createElement("div",{className:"redocusaurus-styles",dangerouslySetInnerHTML:{__html:""}})}const y=function(e){const{className:t,optionsOverrides:n,...r}=e,{store:o,darkThemeOptions:c,lightThemeOptions:p,hasLogo:d}=function(e,t){let{spec:n,url:r,themeId:o}=e;const s=f(o,t),c=(0,h.Z)(r,{absolute:!0}),p=(0,l.Z)(),d="dark"===(0,u.I)().colorMode,g=(0,i.useMemo)((()=>(null!==m&&p&&m.dispose(),m=new a.AppStore(n,c,s.options),{...s,hasLogo:!!n.info?.["x-logo"],store:m})),[p,n,c,s]);return(0,i.useEffect)((()=>{g.store.onDidMount()}),[g,p,d]),g}(r,n);return i.createElement(i.Fragment,null,i.createElement(g,{specProps:r,lightThemeOptions:p,darkThemeOptions:c}),i.createElement("div",{className:(0,s.Z)(["redocusaurus",d&&"redocusaurus-has-logo",t])},i.createElement(a.Redoc,{store:o})))};const v=function(e){const{className:t,optionsOverrides:n,spec:o,url:l,themeId:c,isSpecFile:u}=e,{options:p}=f(c,n);return o?i.createElement(y,(0,r.Z)({},e,{spec:o})):i.createElement("div",{className:(0,s.Z)(["redocusaurus",t])},i.createElement(a.RedocStandalone,{specUrl:l,options:p}))};const b=function(e){let{layoutProps:t,specProps:n}=e;const s=n.spec?.info?.title||"API Docs",a=n.spec?.info?.description||"Open API Reference Docs for the API";return i.createElement(o.Z,(0,r.Z)({title:s,description:a},t),i.createElement(v,n))}},5623:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(r=[],o=n.length;u>=0&&!a;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),c]:((i=r.pop())=0?l:c;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},40472:(e,t,n)=>{"use strict";var r=n(84663);e.exports=function(e,t){return e?void t.then((function(t){r((function(){e(null,t)}))}),(function(t){r((function(){e(t)}))})):t}},84663:e=>{"use strict";e.exports="object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){setTimeout(e,0)}},94184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t2?n:e).apply(void 0,i)}}function l(e){return function(t){return"function"==typeof t?e(t):function(n,r,i){i.value=e(i.value,t,n,r,i)}}}e.memoize=i,e.debounce=o,e.bind=s,e.default={memoize:i,debounce:o,bind:s}},void 0===(i="function"==typeof n?n.apply(t,r):n)||(e.exports=i)},26729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",n="[Circular]",r=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,n,s){var a;void 0===s&&(s=o()),l(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,n):JSON.stringify(e,d(t),n)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(e,t,n,o){var s=Object.getOwnPropertyDescriptor(o,n);void 0!==s.get?s.configurable?(Object.defineProperty(o,n,{value:e}),r.push([o,n,t,s])):i.push([t,n,e]):(o[n]=e,r.push([o,n,t]))}function l(e,r,i,o,s,c,u){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;pu.depthLimit)return void a(t,e,r,s);if(void 0!==u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,r,s);if(o.push(e),Array.isArray(e))for(p=0;pt?1:0}function u(e,t,n,s){void 0===s&&(s=o());var a,l=p(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(l,t,n):JSON.stringify(l,d(t),n)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function p(e,i,o,s,l,u,d){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;fd.depthLimit)return void a(t,e,i,l);if(void 0!==d.edgesLimit&&o+1>d.edgesLimit)return void a(t,e,i,l);if(s.push(e),Array.isArray(e))for(f=0;f0)for(var r=0;r{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;e.exports=function(e,r,i){if("[object Function]"!==n.call(r))throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var s=0;s{"use strict";var r=n(7990),i=n(13150);function o(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}e.exports.Type=n(71364),e.exports.Schema=n(67657),e.exports.FAILSAFE_SCHEMA=n(44795),e.exports.JSON_SCHEMA=n(35966),e.exports.CORE_SCHEMA=n(9471),e.exports.DEFAULT_SCHEMA=n(86601),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=i.dump,e.exports.YAMLException=n(88425),e.exports.types={binary:n(43531),float:n(45215),map:n(40945),null:n(30151),pairs:n(6879),set:n(44982),timestamp:n(12156),bool:n(48771),int:n(61518),merge:n(67452),omap:n(51605),seq:n(76451),str:n(48)},e.exports.safeLoad=o("safeLoad","load"),e.exports.safeLoadAll=o("safeLoadAll","loadAll"),e.exports.safeDump=o("safeDump","dump")},8347:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n{"use strict";var r=n(8347),i=n(88425),o=n(86601),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,l=65279,c=9,u=10,p=13,d=32,f=33,h=34,m=35,g=37,y=38,v=39,b=42,x=44,w=45,k=58,O=61,S=62,E=63,_=64,A=91,R=93,P=96,C=123,I=124,T=125,j={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"},L=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $(e){var t,n,o;if(t=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");n="U",o=8}return"\\"+n+r.repeat("0",o-t.length)+t}var M=1,D=2;function F(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,i,o,s,l,c;if(null===t)return{};for(n={},i=0,o=(r=Object.keys(t)).length;i=55296&&r<=56319&&t+1=56320&&n<=57343?1024*(r-55296)+n-56320+65536:r}function H(e){return/^\n* /.test(e)}var Y=1,G=2,X=3,K=4,Z=5;function J(e,t,n,r,i,o,s,a){var c,p,d=0,j=null,L=!1,N=!1,$=-1!==r,M=-1,F=q(p=Q(e,0))&&p!==l&&!U(p)&&p!==w&&p!==E&&p!==k&&p!==x&&p!==A&&p!==R&&p!==C&&p!==T&&p!==m&&p!==y&&p!==b&&p!==f&&p!==I&&p!==O&&p!==S&&p!==v&&p!==h&&p!==g&&p!==_&&p!==P&&function(e){return!U(e)&&e!==k}(Q(e,e.length-1));if(t||s)for(c=0;c=65536?c+=2:c++){if(!q(d=Q(e,c)))return Z;F=F&&V(d,j,a),j=d}else{for(c=0;c=65536?c+=2:c++){if((d=Q(e,c))===u)L=!0,$&&(N=N||c-M-1>r&&" "!==e[M+1],M=c);else if(!q(d))return Z;F=F&&V(d,j,a),j=d}N=N||$&&c-M-1>r&&" "!==e[M+1]}return L||N?n>9&&H(e)?Z:s?o===D?Z:G:N?K:X:!F||s||i(e)?o===D?Z:G:Y}function ee(e,t,n,r,o){e.dump=function(){if(0===t.length)return e.quotingType===D?'""':"''";if(!e.noCompatMode&&(-1!==L.indexOf(t)||N.test(t)))return e.quotingType===D?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=r||e.flowLevel>-1&&n>=e.flowLevel;switch(J(t,l,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+te(t,e.indent)+ne(z(function(e,t){var n,r,i=/(\n+)([^\n]*)/g,o=(a=e.indexOf("\n"),a=-1!==a?a:e.length,i.lastIndex=a,re(e.slice(0,a),t)),s="\n"===e[0]||" "===e[0];var a;for(;r=i.exec(e);){var l=r[1],c=r[2];n=" "===c[0],o+=l+(s||n||""===c?"":"\n")+re(c,t),s=n}return o}(t,a),s));case Z:return'"'+function(e){for(var t,n="",r=0,i=0;i=65536?i+=2:i++)r=Q(e,i),!(t=j[r])&&q(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||$(r);return n}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function te(e,t){var n=H(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function ne(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function re(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,s=0,a=0,l="";n=i.exec(e);)(a=n.index)-o>t&&(r=s>o?s:a,l+="\n"+e.slice(o,r),o=r+1),s=a;return l+="\n",e.length-o>t&&s>o?l+=e.slice(o,s)+"\n"+e.slice(s+1):l+=e.slice(o),l.slice(1)}function ie(e,t,n,r){var i,o,s,a="",l=e.tag;for(i=0,o=n.length;i tag resolver accepts not "'+p+'" style');r=u.represent[p](t,p)}e.dump=r}return!0}return!1}function se(e,t,n,r,o,a,l){e.tag=null,e.dump=n,oe(e,n,!1)||oe(e,n,!0);var c,p=s.call(e.dump),d=r;r&&(r=e.flowLevel<0||e.flowLevel>t);var f,h,m="[object Object]"===p||"[object Array]"===p;if(m&&(h=-1!==(f=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||h||2!==e.indent&&t>0)&&(o=!1),h&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(m&&h&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),"[object Object]"===p)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,s,a,l,c,p,d="",f=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,s=h.length;o1024)&&(e.dump&&u===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,c&&(p+=B(e,t)),se(e,t+1,l,!0,c)&&(e.dump&&u===e.dump.charCodeAt(0)?p+=":":p+=": ",d+=p+=e.dump));e.tag=f,e.dump=d||"{}"}(e,t,e.dump,o),h&&(e.dump="&ref_"+f+e.dump)):(!function(e,t,n){var r,i,o,s,a,l="",c=e.tag,u=Object.keys(n);for(r=0,i=u.length;r1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),se(e,t,s,!1,!1)&&(l+=a+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if("[object Array]"===p)r&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?ie(e,t-1,e.dump,o):ie(e,t,e.dump,o),h&&(e.dump="&ref_"+f+e.dump)):(!function(e,t,n){var r,i,o,s="",a=e.tag;for(r=0,i=n.length;r",e.dump=c+" "+e.dump)}return!0}function ae(e,t){var n,r,i=[],o=[];for(le(e,i,o),n=0,r=o.length;n{"use strict";function t(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),r+" "+n):r}function n(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(e){return this.name+": "+t(this,e)},e.exports=n},7990:(e,t,n)=>{"use strict";var r=n(8347),i=n(88425),o=n(10192),s=n(86601),a=Object.prototype.hasOwnProperty,l=1,c=2,u=3,p=4,d=1,f=2,h=3,m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,y=/[,\[\]\{\}]/,v=/^(?:!|!!|![a-z\-]+!)$/i,b=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function x(e){return Object.prototype.toString.call(e)}function w(e){return 10===e||13===e}function k(e){return 9===e||32===e}function O(e){return 9===e||32===e||10===e||13===e}function S(e){return 44===e||91===e||93===e||123===e||125===e}function E(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function _(e){return 48===e?"\0":97===e?"\x07":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"\x1b":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"\x85":95===e?"\xa0":76===e?"\u2028":80===e?"\u2029":""}function A(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var R=new Array(256),P=new Array(256),C=0;C<256;C++)R[C]=_(C)?1:0,P[C]=_(C);function I(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function T(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=o(n),new i(t,n)}function j(e,t){throw T(e,t)}function L(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}var N={YAML:function(e,t,n){var r,i,o;null!==e.version&&j(e,"duplication of %YAML directive"),1!==n.length&&j(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&j(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&j(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&L(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&j(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],v.test(r)||j(e,"ill-formed tag handle (first argument) of the TAG directive"),a.call(e.tagMap,r)&&j(e,'there is a previously declared suffix for "'+r+'" tag handle'),b.test(i)||j(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(o){j(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i}};function $(e,t,n,r){var i,o,s,a;if(t1&&(e.result+=r.repeat("\n",t-1))}function q(e,t){var n,r,i=e.tag,o=e.anchor,s=[],a=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),r=e.input.charCodeAt(e.position);0!==r&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),45===r)&&O(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,z(e,!0,-1)&&e.lineIndent<=t)s.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,Q(e,t,u,!1,!0),s.push(e.result),z(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)j(e,"bad indentation of a sequence entry");else if(e.lineIndentt?I=1:e.lineIndent===t?I=0:e.lineIndentt?I=1:e.lineIndent===t?I=0:e.lineIndentt)&&(b&&(s=e.line,a=e.lineStart,l=e.position),Q(e,t,p,!0,i)&&(b?y=e.result:v=e.result),b||(D(e,h,m,g,y,v,s,a,l),g=y=v=null),z(e,!0,-1),u=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==u)j(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?j(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(k(s)){do{s=e.input.charCodeAt(++e.position)}while(k(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!w(s)&&0!==s)}for(;0!==s;){for(F(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),w(s))m++;else{if(e.lineIndent0){for(i=s,o=0;i>0;i--)(s=E(a=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+s:j(e,"expected hexadecimal character");e.result+=A(o),e.position++}else j(e,"unknown escape sequence");n=r=e.position}else w(a)?($(e,n,r,!0),U(e,z(e,!1,t)),n=r=e.position):e.position===e.lineStart&&B(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}(e,_)?L=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!O(r)&&!S(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),a.call(e.anchorMap,n)||j(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],z(e,!0,-1),!0}(e)?function(e,t,n){var r,i,o,s,a,l,c,u,p=e.kind,d=e.result;if(O(u=e.input.charCodeAt(e.position))||S(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(O(r=e.input.charCodeAt(e.position+1))||n&&S(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,s=!1;0!==u;){if(58===u){if(O(r=e.input.charCodeAt(e.position+1))||n&&S(r))break}else if(35===u){if(O(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&B(e)||n&&S(u))break;if(w(u)){if(a=e.line,l=e.lineStart,c=e.lineIndent,z(e,!1,-1),e.lineIndent>=t){s=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=a,e.lineStart=l,e.lineIndent=c;break}}s&&($(e,i,o,!1),U(e,e.line-a),i=o=e.position,s=!1),k(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return $(e,i,o,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,_,l===n)&&(L=!0,null===e.tag&&(e.tag="?")):(L=!0,null===e.tag&&null===e.anchor||j(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===I&&(L=g&&q(e,C))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&j(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),y=0,v=e.implicitTypes.length;y"),null!==e.result&&x.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):j(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||L}function H(e){var t,n,r,i,o=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(z(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(s=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!O(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&j(e,"directive name must not be less than one character in length");0!==i;){for(;k(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!w(i));break}if(w(i))break;for(t=e.position;0!==i&&!O(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&F(e),a.call(N,n)?N[n](e,n,r):L(e,'unknown document directive "'+n+'"')}z(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,z(e,!0,-1)):s&&j(e,"directives end mark is expected"),Q(e,e.lineIndent-1,p,!1,!0),z(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(o,e.position))&&L(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&B(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,z(e,!0,-1)):e.position{"use strict";var r=n(88425),i=n(71364);function o(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)})),n[t]=e})),n}function s(e){return this.extend(e)}s.prototype.extend=function(e){var t=[],n=[];if(e instanceof i)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof i))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var a=Object.create(s.prototype);return a.implicit=(this.implicit||[]).concat(t),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=o(a,"implicit"),a.compiledExplicit=o(a,"explicit"),a.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e{"use strict";e.exports=n(35966)},86601:(e,t,n)=>{"use strict";e.exports=n(9471).extend({implicit:[n(12156),n(67452)],explicit:[n(43531),n(51605),n(6879),n(44982)]})},44795:(e,t,n)=>{"use strict";var r=n(67657);e.exports=new r({explicit:[n(48),n(76451),n(40945)]})},35966:(e,t,n)=>{"use strict";e.exports=n(44795).extend({implicit:[n(30151),n(48771),n(61518),n(45215)]})},10192:(e,t,n)=>{"use strict";var r=n(8347);function i(e,t,n,r,i){var o="",s="",a=Math.floor(i/2)-1;return r-t>a&&(t=r-a+(o=" ... ").length),n-r>a&&(n=r+a-(s=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"\u2192")+s,pos:r-t+o.length}}function o(e,t){return r.repeat(" ",t-e.length)+e}e.exports=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,s=/\r?\n|\r|\0/g,a=[0],l=[],c=-1;n=s.exec(e.buffer);)l.push(n.index),a.push(n.index+n[0].length),e.position<=n.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var u,p,d="",f=Math.min(e.line+t.linesAfter,l.length).toString().length,h=t.maxLength-(t.indent+f+3);for(u=1;u<=t.linesBefore&&!(c-u<0);u++)p=i(e.buffer,a[c-u],l[c-u],e.position-(a[c]-a[c-u]),h),d=r.repeat(" ",t.indent)+o((e.line-u+1).toString(),f)+" | "+p.str+"\n"+d;for(p=i(e.buffer,a[c],l[c],e.position,h),d+=r.repeat(" ",t.indent)+o((e.line+1).toString(),f)+" | "+p.str+"\n",d+=r.repeat("-",t.indent+f+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(c+u>=l.length);u++)p=i(e.buffer,a[c+u],l[c+u],e.position-(a[c]-a[c+u]),h),d+=r.repeat(" ",t.indent)+o((e.line+u+1).toString(),f)+" | "+p.str+"\n";return d.replace(/\n$/,"")}},71364:(e,t,n)=>{"use strict";var r=n(88425),i=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,s;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('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(e){return e},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=(n=t.styleAliases||null,s={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){s[String(t)]=e}))})),s),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},43531:(e,t,n)=>{"use strict";var r=n(71364),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,s=i;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),o=r.length,s=i,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|s.indexOf(r.charAt(t));return 0===(n=o%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,r="",o=0,s=e.length,a=i;for(t=0;t>18&63],r+=a[o>>12&63],r+=a[o>>6&63],r+=a[63&o]),o=(o<<8)+e[t];return 0===(n=s%3)?(r+=a[o>>18&63],r+=a[o>>12&63],r+=a[o>>6&63],r+=a[63&o]):2===n?(r+=a[o>>10&63],r+=a[o>>4&63],r+=a[o<<2&63],r+=a[64]):1===n&&(r+=a[o>>2&63],r+=a[o<<4&63],r+=a[64],r+=a[64]),r}})},48771:(e,t,n)=>{"use strict";var r=n(71364);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},45215:(e,t,n)=>{"use strict";var r=n(8347),i=n(71364),o=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var s=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),s.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},61518:(e,t,n)=>{"use strict";var r=n(8347),i=n(71364);function o(e){return 48<=e&&e<=55}function s(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,a=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},40945:(e,t,n)=>{"use strict";var r=n(71364);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},67452:(e,t,n)=>{"use strict";var r=n(71364);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},30151:(e,t,n)=>{"use strict";var r=n(71364);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})},51605:(e,t,n)=>{"use strict";var r=n(71364),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,s,a,l=[],c=e;for(t=0,n=c.length;t{"use strict";var r=n(71364),i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,o,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t{"use strict";var r=n(71364);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},44982:(e,t,n)=>{"use strict";var r=n(71364),i=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(i.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},48:(e,t,n)=>{"use strict";var r=n(71364);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},12156:(e,t,n)=>{"use strict";var r=n(71364),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=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]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,s,a,l,c,u,p=0,d=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(n,r,s));if(a=+t[4],l=+t[5],c=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(d=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(d=-d)),u=new Date(Date.UTC(n,r,s,a,l,c,p)),d&&u.setTime(u.getTime()-d),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},83573:(e,t,n)=>{"use strict";var r=n(49804);function i(e,t,n){if(3===arguments.length)return i.set(e,t,n);if(2===arguments.length)return i.get(e,t);var r=i.bind(i,e);for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o].bind(r,e));return r}e.exports=i,i.get=function(e,t){for(var n=Array.isArray(t)?t:i.parse(t),r=0;r{e=n.nmd(e);var r=200,i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",p="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",m="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Null]",b="[object Object]",x="[object Promise]",w="[object Proxy]",k="[object RegExp]",O="[object Set]",S="[object String]",E="[object Symbol]",_="[object Undefined]",A="[object WeakMap]",R="[object ArrayBuffer]",P="[object DataView]",C=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[l]=T[c]=T[R]=T[p]=T[P]=T[d]=T[f]=T[h]=T[g]=T[y]=T[b]=T[k]=T[O]=T[S]=T[A]=!1;var j="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,L="object"==typeof self&&self&&self.Object===Object&&self,N=j||L||Function("return this")(),$=t&&!t.nodeType&&t,M=$&&e&&!e.nodeType&&e,D=M&&M.exports===$,F=D&&j.process,z=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),B=z&&z.isTypedArray;function U(e,t){for(var n=-1,r=null==e?0:e.length;++nc))return!1;var p=a.get(e);if(p&&a.get(t))return p==t;var d=-1,f=!0,h=n&s?new Pe:void 0;for(a.set(e,t),a.set(t,e);++d-1},Ae.prototype.set=function(e,t){var n=this.__data__,r=Te(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Re.prototype.clear=function(){this.size=0,this.__data__={hash:new _e,map:new(he||Ae),string:new _e}},Re.prototype.delete=function(e){var t=ze(this,e).delete(e);return this.size-=t?1:0,t},Re.prototype.get=function(e){return ze(this,e).get(e)},Re.prototype.has=function(e){return ze(this,e).has(e)},Re.prototype.set=function(e,t){var n=ze(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pe.prototype.add=Pe.prototype.push=function(e){return this.__data__.set(e,i),this},Pe.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new Ae,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ae){var i=n.__data__;if(!he||i.length-1&&e%1==0&&e-1&&e%1==0&&e<=a}function Ze(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var et=B?function(e){return function(t){return e(t)}}(B):function(e){return Je(e)&&Ke(e.length)&&!!T[je(e)]};function tt(e){return null!=(t=e)&&Ke(t.length)&&!Xe(t)?Ie(e):Me(e);var t}e.exports=function(e,t){return Ne(e,t)}},1989:(e,t,n)=>{var r=n(51789),i=n(80401),o=n(57667),s=n(21327),a=n(81866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(27040),i=n(14125),o=n(82117),s=n(67518),a=n(54705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(10852)(n(55639),"Map");e.exports=r},83369:(e,t,n)=>{var r=n(24785),i=n(11285),o=n(96e3),s=n(49916),a=n(95265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(38407),i=n(37465),o=n(63779),s=n(67599),a=n(44758),l=n(34309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},62705:(e,t,n)=>{var r=n(55639).Symbol;e.exports=r},11149:(e,t,n)=>{var r=n(55639).Uint8Array;e.exports=r},96874:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},14636:(e,t,n)=>{var r=n(22545),i=n(35694),o=n(1469),s=n(44144),a=n(65776),l=n(36719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),p=!n&&!u&&s(e),d=!n&&!u&&!p&&l(e),f=n||u||p||d,h=f?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||f&&("length"==g||p&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||h.push(g);return h}},86556:(e,t,n)=>{var r=n(89465),i=n(77813);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},34865:(e,t,n)=>{var r=n(89465),i=n(77813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},18470:(e,t,n)=>{var r=n(77813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},89465:(e,t,n)=>{var r=n(38777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:(e,t,n)=>{var r=n(13218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},28483:(e,t,n)=>{var r=n(25063)();e.exports=r},44239:(e,t,n)=>{var r=n(62705),i=n(89607),o=n(2333),s="[object Null]",a="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:s:l&&l in Object(e)?i(e):o(e)}},9454:(e,t,n)=>{var r=n(44239),i=n(37005),o="[object Arguments]";e.exports=function(e){return i(e)&&r(e)==o}},28458:(e,t,n)=>{var r=n(23560),i=n(15346),o=n(13218),s=n(80346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:a).test(s(e))}},38749:(e,t,n)=>{var r=n(44239),i=n(41780),o=n(37005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},10313:(e,t,n)=>{var r=n(13218),i=n(25726),o=n(33498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},42980:(e,t,n)=>{var r=n(46384),i=n(86556),o=n(28483),s=n(59783),a=n(13218),l=n(81704),c=n(36390);e.exports=function e(t,n,u,p,d){t!==n&&o(n,(function(o,l){if(d||(d=new r),a(o))s(t,n,l,u,e,p,d);else{var f=p?p(c(t,l),o,l+"",t,n,d):void 0;void 0===f&&(f=o),i(t,l,f)}}),l)}},59783:(e,t,n)=>{var r=n(86556),i=n(64626),o=n(77133),s=n(278),a=n(38517),l=n(35694),c=n(1469),u=n(29246),p=n(44144),d=n(23560),f=n(13218),h=n(68630),m=n(36719),g=n(36390),y=n(59881);e.exports=function(e,t,n,v,b,x,w){var k=g(e,n),O=g(t,n),S=w.get(O);if(S)r(e,n,S);else{var E=x?x(k,O,n+"",e,t,w):void 0,_=void 0===E;if(_){var A=c(O),R=!A&&p(O),P=!A&&!R&&m(O);E=O,A||R||P?c(k)?E=k:u(k)?E=s(k):R?(_=!1,E=i(O,!0)):P?(_=!1,E=o(O,!0)):E=[]:h(O)||l(O)?(E=k,l(k)?E=y(k):f(k)&&!d(k)||(E=a(O))):_=!1}_&&(w.set(O,E),b(E,O,v,x,w),w.delete(O)),r(e,n,E)}}},5976:(e,t,n)=>{var r=n(6557),i=n(45357),o=n(30061);e.exports=function(e,t){return o(i(e,t,r),e+"")}},56560:(e,t,n)=>{var r=n(75703),i=n(38777),o=n(6557),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},22545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{e.exports=function(e){return function(t){return e(t)}}},74318:(e,t,n)=>{var r=n(11149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},64626:(e,t,n)=>{e=n.nmd(e);var r=n(55639),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},77133:(e,t,n)=>{var r=n(74318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(34865),i=n(89465);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a{var r=n(55639)["__core-js_shared__"];e.exports=r},21463:(e,t,n)=>{var r=n(5976),i=n(16612);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++r{e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}},38777:(e,t,n)=>{var r=n(10852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},31957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},45050:(e,t,n)=>{var r=n(37019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},10852:(e,t,n)=>{var r=n(28458),i=n(47801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},85924:(e,t,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},89607:(e,t,n)=>{var r=n(62705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(l){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},51789:(e,t,n)=>{var r=n(94536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,n)=>{var r=n(94536),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return n===i?void 0:n}return o.call(t,e)?t[e]:void 0}},21327:(e,t,n)=>{var r=n(94536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},81866:(e,t,n)=>{var r=n(94536),i="__lodash_hash_undefined__";e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?i:t,this}},38517:(e,t,n)=>{var r=n(3118),i=n(85924),o=n(25726);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},65776:e=>{var t=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var i=typeof e;return!!(r=null==r?t:r)&&("number"==i||"symbol"!=i&&n.test(e))&&e>-1&&e%1==0&&e{var r=n(77813),i=n(98612),o=n(65776),s=n(13218);e.exports=function(e,t,n){if(!s(n))return!1;var a=typeof t;return!!("number"==a?i(n)&&o(t,n.length):"string"==a&&t in n)&&r(n[t],e)}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,n)=>{var r,i=n(14429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},25726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,n)=>{var r=n(18470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},82117:(e,t,n)=>{var r=n(18470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},67518:(e,t,n)=>{var r=n(18470);e.exports=function(e){return r(this.__data__,e)>-1}},54705:(e,t,n)=>{var r=n(18470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},24785:(e,t,n)=>{var r=n(1989),i=n(38407),o=n(57071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},11285:(e,t,n)=>{var r=n(45050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,n)=>{var r=n(45050);e.exports=function(e){return r(this,e).get(e)}},49916:(e,t,n)=>{var r=n(45050);e.exports=function(e){return r(this,e).has(e)}},95265:(e,t,n)=>{var r=n(45050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},94536:(e,t,n)=>{var r=n(10852)(Object,"create");e.exports=r},33498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},31167:(e,t,n)=>{e=n.nmd(e);var r=n(31957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(t){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},45357:(e,t,n)=>{var r=n(96874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s{var r=n(31957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},36390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},30061:(e,t,n)=>{var r=n(56560),i=n(21275)(r);e.exports=i},21275:e=>{var t=800,n=16,r=Date.now;e.exports=function(e){var i=0,o=0;return function(){var s=r(),a=n-(s-o);if(o=s,a>0){if(++i>=t)return arguments[0]}else i=0;return e.apply(void 0,arguments)}}},37465:(e,t,n)=>{var r=n(38407);e.exports=function(){this.__data__=new r,this.size=0}},63779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},67599:e=>{e.exports=function(e){return this.__data__.get(e)}},44758:e=>{e.exports=function(e){return this.__data__.has(e)}},34309:(e,t,n)=>{var r=n(38407),i=n(57071),o=n(83369),s=200;e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},75703:e=>{e.exports=function(e){return function(){return e}}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6557:e=>{e.exports=function(e){return e}},35694:(e,t,n)=>{var r=n(9454),i=n(37005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},98612:(e,t,n)=>{var r=n(23560),i=n(41780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},29246:(e,t,n)=>{var r=n(98612),i=n(37005);e.exports=function(e){return i(e)&&r(e)}},44144:(e,t,n)=>{e=n.nmd(e);var r=n(55639),i=n(95062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||i;e.exports=l},23560:(e,t,n)=>{var r=n(44239),i=n(13218),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",l="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=r(e);return t==s||t==a||t==o||t==l}},41780:e=>{var t=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},68630:(e,t,n)=>{var r=n(44239),i=n(85924),o=n(37005),s="[object Object]",a=Function.prototype,l=Object.prototype,c=a.toString,u=l.hasOwnProperty,p=c.call(Object);e.exports=function(e){if(!o(e)||r(e)!=s)return!1;var t=i(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}},36719:(e,t,n)=>{var r=n(38749),i=n(7518),o=n(31167),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},81704:(e,t,n)=>{var r=n(14636),i=n(10313),o=n(98612);e.exports=function(e){return o(e)?r(e,!0):i(e)}},82492:(e,t,n)=>{var r=n(42980),i=n(21463)((function(e,t,n){r(e,t,n)}));e.exports=i},95062:e=>{e.exports=function(){return!1}},59881:(e,t,n)=>{var r=n(98363),i=n(81704);e.exports=function(e){return r(e,i(e))}},31336:(e,t,n)=>{var r,i;!function(){var o,s,a,l,c,u,p,d,f,h,m,g,y,v,b,x,w,k,O,S,E,_,A,R,P,C,I,T,j,L,N=function(e){var t=new N.Builder;return t.pipeline.add(N.trimmer,N.stopWordFilter,N.stemmer),t.searchPipeline.add(N.stemmer),e.call(t,t),t.build()};N.version="2.3.9",N.utils={},N.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),N.utils.asString=function(e){return null==e?"":e.toString()},N.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var l=N.utils.clone(t)||{};l.position=[s,a],l.index=i.length,i.push(new N.Token(n.slice(s,o),l))}s=o+1}}return i},N.tokenizer.separator=/[\s\-]+/,N.Pipeline=function(){this._stack=[]},N.Pipeline.registeredFunctions=Object.create(null),N.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&N.utils.warn("Overwriting existing registered function: "+t),e.label=t,N.Pipeline.registeredFunctions[e.label]=e},N.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||N.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},N.Pipeline.load=function(e){var t=new N.Pipeline;return e.forEach((function(e){var n=N.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},N.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){N.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},N.Pipeline.prototype.after=function(e,t){N.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},N.Pipeline.prototype.before=function(e,t){N.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},N.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},N.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=i),o!=e);)r=n-t,i=t+Math.floor(r/2),o=this.elements[2*i];return o==e||o>e?2*i:oa?c+=2:s==a&&(t+=n[l+1]*r[c+1],l+=2,c+=2);return t},N.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},N.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,s=i.str.charAt(0);s in i.node.edges?o=i.node.edges[s]:(o=new N.TokenSet,i.node.edges[s]=o),1==i.str.length&&(o.final=!0),r.push({node:o,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var a=i.node.edges["*"];else{a=new N.TokenSet;i.node.edges["*"]=a}if(0==i.str.length&&(a.final=!0),r.push({node:a,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&r.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var l=i.node.edges["*"];else{l=new N.TokenSet;i.node.edges["*"]=l}1==i.str.length&&(l.final=!0),r.push({node:l,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var c,u=i.str.charAt(0),p=i.str.charAt(1);p in i.node.edges?c=i.node.edges[p]:(c=new N.TokenSet,i.node.edges[p]=c),1==i.str.length&&(c.final=!0),r.push({node:c,editsRemaining:i.editsRemaining-1,str:u+i.str.slice(2)})}}}return n},N.TokenSet.fromString=function(e){for(var t=new N.TokenSet,n=t,r=0,i=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},N.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},N.Index.prototype.search=function(e){return this.query((function(t){new N.QueryParser(e,t).parse()}))},N.Index.prototype.query=function(e){for(var t=new N.Query(this.fields),n=Object.create(null),r=Object.create(null),i=Object.create(null),o=Object.create(null),s=Object.create(null),a=0;a1?1:e},N.Builder.prototype.k1=function(e){this._k1=e},N.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return N.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},N.QueryLexer.prototype.width=function(){return this.pos-this.start},N.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},N.QueryLexer.prototype.backup=function(){this.pos-=1},N.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=N.QueryLexer.EOS&&this.backup()},N.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(N.QueryLexer.TERM)),e.ignore(),e.more())return N.QueryLexer.lexText},N.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(N.QueryLexer.EDIT_DISTANCE),N.QueryLexer.lexText},N.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(N.QueryLexer.BOOST),N.QueryLexer.lexText},N.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(N.QueryLexer.TERM)},N.QueryLexer.termSeparator=N.tokenizer.separator,N.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==N.QueryLexer.EOS)return N.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return N.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(N.QueryLexer.TERM),N.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(N.QueryLexer.TERM),N.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(N.QueryLexer.PRESENCE),N.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(N.QueryLexer.PRESENCE),N.QueryLexer.lexText;if(t.match(N.QueryLexer.termSeparator))return N.QueryLexer.lexTerm}else e.escapeCharacter()}},N.QueryParser=function(e,t){this.lexer=new N.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},N.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=N.QueryParser.parseClause;e;)e=e(this);return this.query},N.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},N.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},N.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},N.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case N.QueryLexer.PRESENCE:return N.QueryParser.parsePresence;case N.QueryLexer.FIELD:return N.QueryParser.parseField;case N.QueryLexer.TERM:return N.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new N.QueryParseError(n,t.start,t.end)}},N.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=N.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=N.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new N.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new N.QueryParseError(n,t.start,t.end)}switch(r.type){case N.QueryLexer.FIELD:return N.QueryParser.parseField;case N.QueryLexer.TERM:return N.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new N.QueryParseError(n,r.start,r.end)}}},N.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new N.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i){r="expecting term, found nothing";throw new N.QueryParseError(r,t.start,t.end)}if(i.type===N.QueryLexer.TERM)return N.QueryParser.parseTerm;r="expecting term, found '"+i.type+"'";throw new N.QueryParseError(r,i.start,i.end)}},N.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case N.QueryLexer.TERM:return e.nextClause(),N.QueryParser.parseTerm;case N.QueryLexer.FIELD:return e.nextClause(),N.QueryParser.parseField;case N.QueryLexer.EDIT_DISTANCE:return N.QueryParser.parseEditDistance;case N.QueryLexer.BOOST:return N.QueryParser.parseBoost;case N.QueryLexer.PRESENCE:return e.nextClause(),N.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new N.QueryParseError(r,n.start,n.end)}else e.nextClause()}},N.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new N.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case N.QueryLexer.TERM:return e.nextClause(),N.QueryParser.parseTerm;case N.QueryLexer.FIELD:return e.nextClause(),N.QueryParser.parseField;case N.QueryLexer.EDIT_DISTANCE:return N.QueryParser.parseEditDistance;case N.QueryLexer.BOOST:return N.QueryParser.parseBoost;case N.QueryLexer.PRESENCE:return e.nextClause(),N.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new N.QueryParseError(r,i.start,i.end)}else e.nextClause()}},N.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new N.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case N.QueryLexer.TERM:return e.nextClause(),N.QueryParser.parseTerm;case N.QueryLexer.FIELD:return e.nextClause(),N.QueryParser.parseField;case N.QueryLexer.EDIT_DISTANCE:return N.QueryParser.parseEditDistance;case N.QueryLexer.BOOST:return N.QueryParser.parseBoost;case N.QueryLexer.PRESENCE:return e.nextClause(),N.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new N.QueryParseError(r,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(r=function(){return N})?r.call(t,n,t,e):r)||(e.exports=i)}()},813:function(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(o){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,o=null,s=function s(){if(!i){i=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",s),r.getIframeContents(e,t,n))}catch(a){n()}}};e.addEventListener("load",s),o=setTimeout(s,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(r){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},s=t.querySelectorAll("iframe"),a=s.length,l=0;s=Array.prototype.slice.call(s);var c=function(){--a<=0&&o(l)};a||c(),s.forEach((function(t){e.matches(t,i.exclude)?c():i.onIframeReady(t,(function(e){n(t)&&(l++,r(e)),c()}),c)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,o=!1;return r.forEach((function(e,t){e.val===n&&(i=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==i||o?!1===i||o||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach((function(e){e.handled||i.getIframeContents(e.val,(function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var o=this,s=this.createIterator(t,e,r),a=[],l=[],c=void 0,u=void 0,p=function(){var e=o.getIteratorNode(s);return u=e.prevNode,c=e.node};p();)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(c,u,e,a)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return l.push(e)}),r)})),l.push(c);l.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(a,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),s=o.length;s||i(),o.forEach((function(o){var a=function(){r.iterateThroughNodes(e,o,t,n,(function(){--s<=0&&i()}))};r.iframes?r.waitForIframes(o,a):a()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every((function(t){return!r.call(e,t)||(i=!0,!1)})),i}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(o,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==s&&""!==a&&(e=e.replace(new RegExp("("+this.escapeStr(s)+"|"+this.escapeStr(a)+")","gm"+n),r+"("+this.processSynomyms(s)+"|"+this.processSynomyms(a)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":"\x01"}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":"\x02"}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],r=[];return e.split("").forEach((function(i){n.every((function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",r=this.opt.accuracy,i="string"==typeof r?r:r.value,o="string"==typeof r?[]:r.limiters,s="";switch(o.forEach((function(e){s+="|"+t.escapeStr(e)})),i){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr(n)))+"]*"+e+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+e+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var i=t.callNoMatchOnInvalidRanges(e,r),o=i.start,s=i.end;i.valid&&(e.start=o,e.length=s-o,n.push(e),r=s)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,o=n.length,s=t-o,a=parseInt(e.start,10)-s;return(r=(a=a>o?o:a)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),a<0||r-a<0||a>o||r>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(a,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(n-t),s=document.createElement(r);return s.setAttribute("data-markjs","true"),this.opt.className&&s.setAttribute("class",this.opt.className),s.textContent=i.textContent,i.parentNode.replaceChild(s,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var o=this;e.nodes.every((function(s,a){var l=e.nodes[a+1];if(void 0===l||l.start>t){if(!r(s.node))return!1;var c=t-s.start,u=(n>s.end?s.end:n)-s.start,p=e.value.substr(0,s.start),d=e.value.substr(u+s.start);if(s.node=o.wrapRangeInTextNode(s.node,c,u),e.value=p+d,e.nodes.forEach((function(t,n){n>=a&&(e.nodes[n].start>0&&n!==a&&(e.nodes[n].start-=u),e.nodes[n].end-=u)})),n-=u,i(s.node.previousSibling,s.start),!(n>s.end))return!1;t=s.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,i){var o=this,s=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[s];)if(n(i[s],t)){var a=i.index;if(0!==s)for(var l=1;l{"use strict";n.r(t),n.d(t,{MobXProviderContext:()=>ie,Observer:()=>S,PropTypes:()=>ge,Provider:()=>oe,disposeOnUnmount:()=>pe,enableStaticRendering:()=>d,inject:()=>ae,isUsingStaticRendering:()=>f,observer:()=>te,observerBatching:()=>a,useAsObservableSource:()=>R,useLocalObservable:()=>E,useLocalStore:()=>P,useObserver:()=>C,useStaticRendering:()=>I});var r=n(68949),i=n(67294);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var o=n(73935);function s(e){e()}function a(e){e||(e=s),(0,r.configure)({reactionScheduler:e})}function l(e){return(0,r.getDependencyTree)(e)}var c=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach((function(r,i){n-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(i))})),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),u=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:c)((function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null})),p=!1;function d(e){p=e}function f(){return p}var h=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};function m(e){return"observer".concat(e)}var g=function(){};function y(){return new g}function v(e,t){if(void 0===t&&(t="observed"),f())return e();var n=h(i.useState(y),1)[0],o=h(i.useState(),2)[1],s=function(){return o([])},a=i.useRef(null);a.current||(a.current={reaction:null,mounted:!1,changedBeforeMount:!1});var c,p,d=a.current;if(d.reaction||(d.reaction=new r.Reaction(m(t),(function(){d.mounted?s():d.changedBeforeMount=!0})),u.register(n,d,d)),i.useDebugValue(d.reaction,l),i.useEffect((function(){return u.unregister(d),d.mounted=!0,d.reaction?d.changedBeforeMount&&(d.changedBeforeMount=!1,s()):(d.reaction=new r.Reaction(m(t),(function(){s()})),s()),function(){d.reaction.dispose(),d.reaction=null,d.mounted=!1,d.changedBeforeMount=!1}}),[]),d.reaction.track((function(){try{c=e()}catch(t){p=t}})),p)throw p;return c}var b="function"==typeof Symbol&&Symbol.for,x=b?Symbol.for("react.forward_ref"):"function"==typeof i.forwardRef&&(0,i.forwardRef)((function(e){return null})).$$typeof,w=b?Symbol.for("react.memo"):"function"==typeof i.memo&&(0,i.memo)((function(e){return null})).$$typeof;function k(e,t){var n;if(w&&e.$$typeof===w)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(f())return e;var r=null!==(n=null==t?void 0:t.forwardRef)&&void 0!==n&&n,o=e,s=e.displayName||e.name;if(x&&e.$$typeof===x&&(r=!0,"function"!=typeof(o=e.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,l,c=function(e,t){return v((function(){return o(e,t)}),s)};return""!==s&&(c.displayName=s),e.contextTypes&&(c.contextTypes=e.contextTypes),r&&(c=(0,i.forwardRef)(c)),c=(0,i.memo)(c),a=e,l=c,Object.keys(a).forEach((function(e){O[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(a,e))})),c}var O={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function S(e){var t=e.children,n=e.render,r=t||n;return"function"!=typeof r?null:v(r)}function E(e,t){return(0,i.useState)((function(){return(0,r.observable)(e(),t,{autoBind:!0})}))[0]}S.displayName="Observer";var _,A=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};function R(e){var t=A((0,i.useState)((function(){return(0,r.observable)(e,{},{deep:!1})})),1)[0];return(0,r.runInAction)((function(){Object.assign(t,e)})),t}function P(e,t){var n=t&&R(t);return(0,i.useState)((function(){return(0,r.observable)(e(n),void 0,{autoBind:!0})}))[0]}a(o.unstable_batchedUpdates);_=u.finalizeAllImmediately;function C(e,t){return void 0===t&&(t="observed"),v(e,t)}function I(e){d(e)}var T=0;var j={};function L(e){return j[e]||(j[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+T+")";return T++,t}(e)),j[e]}function N(e,t){if($(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i2?r-2:0),o=2;o {}` or `render = function() {}` is not supported.")}return t.render=function(){return this.render=f()?r:Z.call(this,r),this.render()},q(t,"componentDidMount",(function(){this[H]=!1,this.render[V]||i.Component.prototype.forceUpdate.call(this)})),q(t,"componentWillUnmount",(function(){if(!f()){var e=this.render[V];if(e)e.dispose(),this.render[V]=null;else{var t=K(this);console.warn("The reactive render of an observer class component ("+t+")\n was overridden after MobX attached. This may result in a memory leak if the\n overridden reactive render was not properly disposed.")}this[H]=!0}})),e}function K(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||""}function Z(e){var t=this;D(this,Y,!1),D(this,G,!1);var n=K(this),o=e.bind(this),s=!1,a=function(){var e=new r.Reaction(n+".render()",(function(){if(!s&&(s=!0,!0!==t[H])){var n=!0;try{D(t,G,!0),t[Y]||i.Component.prototype.forceUpdate.call(t),n=!1}finally{D(t,G,!1),n&&(e.dispose(),t.render[V]=null)}}}));return e.reactComponent=t,e};return function e(){var t;s=!1;var n=null!=(t=e[V])?t:e[V]=a(),i=void 0,l=void 0;if(n.track((function(){try{l=(0,r._allowStateChanges)(!1,o)}catch(e){i=e}})),i)throw i;return l}}function J(e,t){return f()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||!N(this.props,e)}function ee(e,t){var n=L("reactProp_"+t+"_valueHolder"),i=L("reactProp_"+t+"_atomHolder");function o(){return this[i]||D(this,i,(0,r.createAtom)("reactive "+t)),this[i]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return r._allowStateReadsStart&&r._allowStateReadsEnd&&(e=(0,r._allowStateReadsStart)(!0)),o.call(this).reportObserved(),r._allowStateReadsStart&&r._allowStateReadsEnd&&(0,r._allowStateReadsEnd)(e),this[n]},set:function(e){this[G]||N(this[n],e)?D(this,n,e):(D(this,n,e),D(this,Y,!0),o.call(this).reportChanged(),D(this,Y,!1))}})}function te(e){return!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use `observer` on a component that already has `inject`. Please apply `observer` before applying `inject`"),Object.prototype.isPrototypeOf.call(i.Component,e)||Object.prototype.isPrototypeOf.call(i.PureComponent,e)?X(e):k(e)}function ne(){return ne=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,re),r=i.useContext(ie),o=i.useRef(ne({},r,n)).current;return i.createElement(ie.Provider,{value:o},t)}function se(e,t,n,r){var o,s,a,l=i.forwardRef((function(n,r){var o=ne({},n),s=i.useContext(ie);return Object.assign(o,e(s||{},o)||{}),r&&(o.ref=r),i.createElement(t,o)}));return r&&(l=te(l)),l.isMobxInjector=!0,o=t,s=l,a=Object.getOwnPropertyNames(Object.getPrototypeOf(o)),Object.getOwnPropertyNames(o).forEach((function(e){M[e]||-1!==a.indexOf(e)||Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(o,e))})),l.wrappedComponent=t,l.displayName=function(e,t){var n,r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";n=t?"inject-with-"+t+"("+r+")":"inject("+r+")";return n}(t,n),l}function ae(){for(var e=arguments.length,t=new Array(e),n=0;n6?l-6:0),u=6;u>",a=a||i,null==n[i]){if(t){var r=null===n[i]?"null":"undefined";return new Error("The "+s+" `"+a+"` is marked as required in `"+o+"`, but its value is `"+r+"`.")}return null}return e.apply(void 0,[n,i,o,s,a].concat(c))}))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function fe(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function he(e,t){return de((function(n,i,o,s,a){return(0,r.untracked)((function(){if(e&&fe(n[i])===t.toLowerCase())return null;var s;switch(t){case"Array":s=r.isObservableArray;break;case"Object":s=r.isObservableObject;break;case"Map":s=r.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var l=n[i];if(!s(l)){var c=function(e){var t=fe(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}(l),u=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+a+"` of type `"+c+"` supplied to `"+o+"`, expected `mobx.Observable"+t+"`"+u+".")}return null}))}))}function me(e,t){return de((function(n,i,o,s,a){for(var l=arguments.length,c=new Array(l>5?l-5:0),u=5;u{"use strict";n.r(t),n.d(t,{$mobx:()=>W,FlowCancellationError:()=>dn,ObservableMap:()=>wr,ObservableSet:()=>Sr,Reaction:()=>_t,_allowStateChanges:()=>qe,_allowStateChangesInsideComputed:()=>Wt,_allowStateReadsEnd:()=>ut,_allowStateReadsStart:()=>ct,_autoAction:()=>qt,_endAction:()=>Ue,_getAdministration:()=>Qr,_getGlobalState:()=>yt,_interceptReads:()=>xn,_isComputingDerivation:()=>nt,_resetGlobalState:()=>vt,_startAction:()=>Be,action:()=>Ut,autorun:()=>Qt,comparer:()=>Y,computed:()=>je,configure:()=>on,createAtom:()=>H,defineProperty:()=>Nn,entries:()=>Cn,extendObservable:()=>sn,flow:()=>gn,flowResult:()=>vn,get:()=>Ln,getAtom:()=>Vr,getDebugName:()=>Hr,getDependencyTree:()=>an,getObserverTree:()=>cn,has:()=>jn,intercept:()=>wn,isAction:()=>Vt,isBoxedObservable:()=>Ye,isComputed:()=>On,isComputedProp:()=>Sn,isFlow:()=>bn,isFlowCancellationError:()=>fn,isObservable:()=>_n,isObservableArray:()=>mr,isObservableMap:()=>kr,isObservableObject:()=>Tr,isObservableProp:()=>An,isObservableSet:()=>Er,keys:()=>Rn,makeAutoObservable:()=>tr,makeObservable:()=>Jn,observable:()=>Pe,observe:()=>Mn,onBecomeObserved:()=>Zt,onBecomeUnobserved:()=>Jt,onReactionError:()=>At,override:()=>Z,ownKeys:()=>$n,reaction:()=>Gt,remove:()=>Tn,runInAction:()=>Wt,set:()=>In,spy:()=>jt,toJS:()=>zn,trace:()=>Bn,transaction:()=>Un,untracked:()=>st,values:()=>Pn,when:()=>qn});function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var B=Symbol("mobx-stored-annotations");function U(e){return Object.assign((function(t,n){q(t,n,e)}),e)}function q(e,t,n){C(e,B)||k(e,B,L({},e[B])),function(e){return e.annotationType_===K}(n)||(e[B][t]=n)}var W=Symbol("mobx administration"),V=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return St(this)},t.reportChanged=function(){kt(),Et(this),Ot()},t.toString=function(){return this.name_},e}(),Q=S("Atom",V);function H(e,t,n){void 0===t&&(t=g),void 0===n&&(n=g);var r=new V(e);return t!==g&&Zt(r,t),n!==g&&Jt(r,n),r}var Y={identity:function(e,t){return e===t},structural:function(e,t){return Gr(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){return Gr(e,t,1)}};function G(e,t,n){return _n(e)?e:Array.isArray(e)?Pe.array(e,{name:n}):x(e)?Pe.object(e,void 0,{name:n}):E(e)?Pe.map(e,{name:n}):_(e)?Pe.set(e,{name:n}):"function"!=typeof e||Vt(e)||bn(e)?e:w(e)?gn(e):qt(n,e)}function X(e){return e}var K="override",Z=U({annotationType_:K,make_:function(e,t){0;0;return 0},extend_:function(e,t,n,i){r("'"+this.annotationType_+"' can only be used with 'makeObservable'")}});function J(e,t){return{annotationType_:e,options_:t,make_:ee,extend_:te}}function ee(e,t,n,r){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Vt(n.value))return 1;var o=ne(e,this,t,n,!1);return l(r,t,o),2}function te(e,t,n,r){var i=ne(e,this,t,n);return e.defineProperty_(t,i,r)}function ne(e,t,n,r,i){var o,s,a,l,c,u,p,d;void 0===i&&(i=gt.safeDescriptors),d=r,t.annotationType_,d.value;var f,h=r.value;null!=(o=t.options_)&&o.bound&&(h=h.bind(null!=(f=e.proxy_)?f:e.target_));return{value:Fe(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),h,null!=(l=null==(c=t.options_)?void 0:c.autoAction)&&l,null!=(u=t.options_)&&u.bound?null!=(p=e.proxy_)?p:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function re(e,t){return{annotationType_:e,options_:t,make_:ie,extend_:oe}}function ie(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!C(e.target_,t)||!bn(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(bn(n.value))return 1;var o=se(e,this,t,n,!1,!1);return l(r,t,o),2}function oe(e,t,n,r){var i,o=se(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,r)}function se(e,t,n,r,i,o){var s;void 0===o&&(o=gt.safeDescriptors),s=r,t.annotationType_,s.value;var a,l=r.value;(bn(l)||(l=gn(l)),i)&&((l=l.bind(null!=(a=e.proxy_)?a:e.target_)).isMobXFlow=!0);return{value:l,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ae(e,t){return{annotationType_:e,options_:t,make_:le,extend_:ce}}function le(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function ce(e,t,n,r){return function(e,t,n,r){t.annotationType_,r.get;0}(0,this,0,n),e.defineComputedProperty_(t,L({},this.options_,{get:n.get,set:n.set}),r)}function ue(e,t){return{annotationType_:e,options_:t,make_:pe,extend_:de}}function pe(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function de(e,t,n,r){var i,o;return function(e,t,n,r){t.annotationType_;0}(0,this),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:G,r)}var fe="true",he=me();function me(e){return{annotationType_:fe,options_:e,make_:ge,extend_:ye}}function ge(e,t,n,r){var i,o,s,a;if(n.get)return je.make_(e,t,n,r);if(n.set){var c=Fe(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!gt.safeDescriptors||e.isPlainObject_,set:c})?0:2:(l(r,t,{configurable:!0,set:c}),2)}if(r!==e.target_&&"function"==typeof n.value)return w(n.value)?(null!=(a=this.options_)&&a.autoBind?gn.bound:gn).make_(e,t,n,r):(null!=(s=this.options_)&&s.autoBind?qt.bound:qt).make_(e,t,n,r);var u,p=!1===(null==(i=this.options_)?void 0:i.deep)?Pe.ref:Pe;"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return p.make_(e,t,n,r)}function ye(e,t,n,r){var i,o,s;if(n.get)return je.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!gt.safeDescriptors||e.isPlainObject_,set:Fe(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(s=e.proxy_)?s:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?Pe.ref:Pe).extend_(e,t,n,r)}var ve={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function be(e){return e||ve}Object.freeze(ve);var xe=ue("observable"),we=ue("observable.ref",{enhancer:X}),ke=ue("observable.shallow",{enhancer:function(e,t,n){return null==e||Tr(e)||mr(e)||kr(e)||Er(e)?e:Array.isArray(e)?Pe.array(e,{name:n,deep:!1}):x(e)?Pe.object(e,void 0,{name:n,deep:!1}):E(e)?Pe.map(e,{name:n,deep:!1}):_(e)?Pe.set(e,{name:n,deep:!1}):void 0}}),Oe=ue("observable.struct",{enhancer:function(e,t){return Gr(e,t)?t:e}}),Se=U(xe);function Ee(e){return!0===e.deep?G:!1===e.deep?X:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:G;var t,n,r}function _e(e,t,n){if(!v(t))return _n(e)?e:x(e)?Pe.object(e,t,n):Array.isArray(e)?Pe.array(e,t):E(e)?Pe.map(e,t):_(e)?Pe.set(e,t):"object"==typeof e&&null!==e?e:Pe.box(e,t);q(e,t,xe)}s(_e,Se);var Ae,Re,Pe=s(_e,{box:function(e,t){var n=be(t);return new He(e,Ee(n),n.name,!0,n.equals)},array:function(e,t){var n=be(t);return(!1===gt.useProxies||!1===n.proxy?Wr:sr)(e,Ee(n),n.name)},map:function(e,t){var n=be(t);return new wr(e,Ee(n),n.name)},set:function(e,t){var n=be(t);return new Sr(e,Ee(n),n.name)},object:function(e,t,n){return sn(!1===gt.useProxies||!1===(null==n?void 0:n.proxy)?Pr({},n):function(e,t){var n,r;return h(),e=Pr(e,t),null!=(r=(n=e[W]).proxy_)?r:n.proxy_=new Proxy(e,Qn)}({},n),e,t)},ref:U(we),shallow:U(ke),deep:Se,struct:U(Oe)}),Ce="computed",Ie=ae(Ce),Te=ae("computed.struct",{equals:Y.structural}),je=function(e,t){if(v(t))return q(e,t,Ie);if(x(e))return U(ae(Ce,e));var n=x(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Ke(n)};Object.assign(je,Ie),je.struct=U(Te);var Le,Ne=0,$e=1,Me=null!=(Ae=null==(Re=a((function(){}),"name"))?void 0:Re.configurable)&&Ae,De={value:"action",configurable:!0,writable:!1,enumerable:!1};function Fe(e,t,n,r){function i(){return ze(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,Me&&(De.value=e,l(i,"name",De)),i}function ze(e,t,n,r,i){var o=Be(e,t,r,i);try{return n.apply(r,i)}catch(s){throw o.error_=s,s}finally{Ue(o)}}function Be(e,t,n,r){var i=gt.trackingDerivation,o=!t||!i;kt();var s=gt.allowStateChanges;o&&(at(),s=We(!0));var a={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:s,prevAllowStateReads_:ct(!0),notifySpy_:!1,startTime_:0,actionId_:$e++,parentActionId_:Ne};return Ne=a.actionId_,a}function Ue(e){Ne!==e.actionId_&&r(30),Ne=e.parentActionId_,void 0!==e.error_&&(gt.suppressReactionErrors=!0),Ve(e.prevAllowStateChanges_),ut(e.prevAllowStateReads_),Ot(),e.runAsAction_&<(e.prevDerivation_),gt.suppressReactionErrors=!1}function qe(e,t){var n=We(e);try{return t()}finally{Ve(n)}}function We(e){var t=gt.allowStateChanges;return gt.allowStateChanges=e,t}function Ve(e){gt.allowStateChanges=e}Le=Symbol.toPrimitive;var Qe,He=function(e){function t(t,n,r,i,o){var s;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=Y.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=o,s.value_=n(t,void 0,r),s}N(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==gt.UNCHANGED){0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(rt(this),Hn(this)){var t=Gn(this,{object:this,type:rr,newValue:e});if(!t)return gt.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?gt.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Xn(this)&&Zn(this,{type:rr,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Yn(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:rr,newValue:this.value_,oldValue:void 0}),Kn(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return P(this.get())},n[Le]=function(){return this.valueOf()},t}(V),Ye=S("ObservableValue",He);Qe=Symbol.toPrimitive;var Ge,Xe,Ke=function(){function e(e){this.dependenciesState_=Ge.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Je(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Xe.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||r(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Fe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Y.structural:Y.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Ge.UP_TO_DATE_)return;e.lowestObserverState_=Ge.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&(e.dependenciesState_=Ge.POSSIBLY_STALE_,e.onBecomeStale_())}))}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.get=function(){if(this.isComputing_&&r(32,this.name_,this.derivation),0!==gt.inBatch||0!==this.observers_.size||this.keepAlive_){if(St(this),tt(this)){var e=gt.trackingContext;this.keepAlive_&&!e&&(gt.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Ge.STALE_)return;e.lowestObserverState_=Ge.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===Ge.POSSIBLY_STALE_?t.dependenciesState_=Ge.STALE_:t.dependenciesState_===Ge.UP_TO_DATE_&&(e.lowestObserverState_=Ge.UP_TO_DATE_)}))}(this),gt.trackingContext=e}}else tt(this)&&(this.warnAboutUntrackedRead_(),kt(),this.value_=this.computeValue_(!1),Ot());var t=this.value_;if(et(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&r(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else r(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Ge.NOT_TRACKING_,n=this.computeValue_(!0),r=t||et(e)||et(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing_=!0;var t,n=We(!1);if(e)t=it(this,this.derivation,this.scope_);else if(!0===gt.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(r){t=new Je(r)}return Ve(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(ot(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return Qt((function(){var o=n.get();if(!r||t){var s=at();e({observableKind:"computed",debugObjectName:n.name_,type:rr,object:n,newValue:o,oldValue:i}),lt(s)}r=!1,i=o}))},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return P(this.get())},t[Qe]=function(){return this.valueOf()},e}(),Ze=S("ComputedValue",Ke);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Ge||(Ge={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Xe||(Xe={}));var Je=function(e){this.cause=void 0,this.cause=e};function et(e){return e instanceof Je}function tt(e){switch(e.dependenciesState_){case Ge.UP_TO_DATE_:return!1;case Ge.NOT_TRACKING_:case Ge.STALE_:return!0;case Ge.POSSIBLY_STALE_:for(var t=ct(!0),n=at(),r=e.observing_,i=r.length,o=0;or&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue_&&xt(l,e),l.diffValue_=0}for(;i--;){var c=n[i];1===c.diffValue_&&(c.diffValue_=0,bt(c,e))}r!==Ge.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),ut(r),i}function ot(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)xt(t[n],e);e.dependenciesState_=Ge.NOT_TRACKING_}function st(e){var t=at();try{return e()}finally{lt(t)}}function at(){var e=gt.trackingDerivation;return gt.trackingDerivation=null,e}function lt(e){gt.trackingDerivation=e}function ct(e){var t=gt.allowStateReads;return gt.allowStateReads=e,t}function ut(e){gt.allowStateReads=e}function pt(e){if(e.dependenciesState_!==Ge.UP_TO_DATE_){e.dependenciesState_=Ge.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Ge.UP_TO_DATE_}}var dt=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],ft=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},ht=!0,mt=!1,gt=function(){var e=o();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ht=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ft).version&&(ht=!1),ht?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ft):(setTimeout((function(){mt||r(35)}),1),new ft)}();function yt(){return gt}function vt(){var e=new ft;for(var t in e)-1===dt.indexOf(t)&&(gt[t]=e[t]);gt.allowStateChanges=!gt.enforceActions}function bt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function xt(e,t){e.observers_.delete(t),0===e.observers_.size&&wt(e)}function wt(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,gt.pendingUnobservations.push(e))}function kt(){gt.inBatch++}function Ot(){if(0==--gt.inBatch){Ct();for(var e=gt.pendingUnobservations,t=0;t0&&wt(e),!1)}function Et(e){e.lowestObserverState_!==Ge.STALE_&&(e.lowestObserverState_=Ge.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ge.STALE_})))}var _t=function(){function e(e,t,n,r){void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ge.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Xe.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,gt.pendingReactions.push(this),Ct())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){kt(),this.isScheduled_=!1;var e=gt.trackingContext;if(gt.trackingContext=this,tt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}gt.trackingContext=e,Ot()}},t.track=function(e){if(!this.isDisposed_){kt();0,this.isRunning_=!0;var t=gt.trackingContext;gt.trackingContext=this;var n=it(this,e,void 0);gt.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&ot(this),et(n)&&this.reportExceptionInDerivation_(n.cause),Ot()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(gt.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";gt.suppressReactionErrors||console.error(n,e),gt.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(kt(),ot(this),Ot()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[W]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),Bn(this,e)},e}();function At(e){return gt.globalReactionErrorHandlers.push(e),function(){var t=gt.globalReactionErrorHandlers.indexOf(e);t>=0&>.globalReactionErrorHandlers.splice(t,1)}}var Rt=100,Pt=function(e){return e()};function Ct(){gt.inBatch>0||gt.isRunningReactions||Pt(It)}function It(){gt.isRunningReactions=!0;for(var e=gt.pendingReactions,t=0;e.length>0;){++t===Rt&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(ln)),n}function cn(e,t){return un(Vr(e,t))}function un(e){var t={name:e.name_};return function(e){return e.observers_&&e.observers_.size>0}(e)&&(t.observers=Array.from(function(e){return e.observers_}(e)).map(un)),t}var pn=0;function dn(){this.message="FLOW_CANCELLED"}function fn(e){return e instanceof dn}dn.prototype=Object.create(Error.prototype);var hn=re("flow"),mn=re("flow.bound",{bound:!0}),gn=Object.assign((function(e,t){if(v(t))return q(e,t,hn);var n=e,r=n.name||"",i=function(){var e,t=arguments,i=++pn,o=Ut(r+" - runid: "+i+" - init",n).apply(this,t),s=void 0,a=new Promise((function(t,n){var a=0;function l(e){var t;s=void 0;try{t=Ut(r+" - runid: "+i+" - yield "+a++,o.next).call(o,e)}catch(l){return n(l)}u(t)}function c(e){var t;s=void 0;try{t=Ut(r+" - runid: "+i+" - yield "+a++,o.throw).call(o,e)}catch(l){return n(l)}u(t)}function u(e){if(!y(null==e?void 0:e.then))return e.done?t(e.value):(s=Promise.resolve(e.value)).then(l,c);e.then(u,n)}e=n,l(void 0)}));return a.cancel=Ut(r+" - runid: "+i+" - cancel",(function(){try{s&&yn(s);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(g,g),yn(n),e(new dn)}catch(r){e(r)}})),a};return i.isMobXFlow=!0,i}),hn);function yn(e){y(e.cancel)&&e.cancel()}function vn(e){return e}function bn(e){return!0===(null==e?void 0:e.isMobXFlow)}function xn(e,t,n){var r;return kr(e)||mr(e)||Ye(e)?r=Qr(e):Tr(e)&&(r=Qr(e,t)),r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0}}function wn(e,t,n){return y(n)?function(e,t,n){return Qr(e,t).intercept_(n)}(e,t,n):function(e,t){return Qr(e).intercept_(t)}(e,t)}function kn(e,t){if(void 0===t)return Ze(e);if(!1===Tr(e))return!1;if(!e[W].values_.has(t))return!1;var n=Vr(e,t);return Ze(n)}function On(e){return kn(e)}function Sn(e,t){return kn(e,t)}function En(e,t){return!!e&&(void 0!==t?!!Tr(e)&&e[W].values_.has(t):Tr(e)||!!e[W]||Q(e)||Tt(e)||Ze(e))}function _n(e){return En(e)}function An(e,t){return En(e,t)}function Rn(e){return Tr(e)?e[W].keys_():kr(e)||Er(e)?Array.from(e.keys()):mr(e)?e.map((function(e,t){return t})):void r(5)}function Pn(e){return Tr(e)?Rn(e).map((function(t){return e[t]})):kr(e)?Rn(e).map((function(t){return e.get(t)})):Er(e)?Array.from(e.values()):mr(e)?e.slice():void r(6)}function Cn(e){return Tr(e)?Rn(e).map((function(t){return[t,e[t]]})):kr(e)?Rn(e).map((function(t){return[t,e.get(t)]})):Er(e)?Array.from(e.entries()):mr(e)?e.map((function(e,t){return[t,e]})):void r(7)}function In(e,t,n){if(2!==arguments.length||Er(e))Tr(e)?e[W].set_(t,n):kr(e)?e.set(t,n):Er(e)?e.add(t):mr(e)?("number"!=typeof t&&(t=parseInt(t,10)),t<0&&r("Invalid index: '"+t+"'"),kt(),t>=e.length&&(e.length=t+1),e[t]=n,Ot()):r(8);else{kt();var i=t;try{for(var o in i)In(e,o,i[o])}finally{Ot()}}}function Tn(e,t){Tr(e)?e[W].delete_(t):kr(e)||Er(e)?e.delete(t):mr(e)?("number"!=typeof t&&(t=parseInt(t,10)),e.splice(t,1)):r(9)}function jn(e,t){return Tr(e)?e[W].has_(t):kr(e)||Er(e)?e.has(t):mr(e)?t>=0&&t0}function Yn(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),m((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function Gn(e,t){var n=at();try{for(var i=[].concat(e.interceptors_||[]),o=0,s=i.length;o0}function Kn(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),m((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function Zn(e,t){var n=at(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i0?e.map(this.dehancer):e},t.intercept_=function(e){return Yn(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Kn(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&r("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i0&&qr(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=u),Hn(this)){var o=Gn(this,{object:this.proxy_,type:nr,index:e,removedCount:t,added:n});if(!o)return u;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_){var s=n.length-t;this.updateArrayLength_(i,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var s=0;s=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&r(17,e,n.length),e2?n-2:0),i=2;i-1&&(this.splice(n,1),!0)}};function lr(e,t){"function"==typeof Array.prototype[e]&&(ar[e]=t(e))}function cr(e){return function(){var t=this[W];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ur(e){return function(t,n){var r=this,i=this[W];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(n,e,i,r)}))}}function pr(e){return function(){var t=this,n=this[W];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}lr("concat",cr),lr("flat",cr),lr("includes",cr),lr("indexOf",cr),lr("join",cr),lr("lastIndexOf",cr),lr("slice",cr),lr("toString",cr),lr("toLocaleString",cr),lr("every",ur),lr("filter",ur),lr("find",ur),lr("findIndex",ur),lr("flatMap",ur),lr("forEach",ur),lr("map",ur),lr("some",ur),lr("reduce",pr),lr("reduceRight",pr);var dr,fr,hr=S("ObservableArrayAdministration",or);function mr(e){return b(e)&&hr(e[W])}var gr={},yr="add",vr="delete";dr=Symbol.iterator,fr=Symbol.toStringTag;var br,xr,wr=function(){function e(e,t,n){var i=this;void 0===t&&(t=G),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[W]=gr,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,y(Map)||r(18),this.keysAtom_=H("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,qe(!0,(function(){i.merge(e)}))}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!gt.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new He(this.has_(e),X,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Jt(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Hn(this)){var r=Gn(this,{type:n?rr:yr,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,Hn(this))&&!Gn(this,{type:vr,object:this,name:e}))return!1;if(this.has_(e)){var n=Xn(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:vr,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Un((function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),n&&Zn(this,r),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==gt.UNCHANGED){var r=Xn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:rr,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&Zn(this,i)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,Un((function(){var r,i=new He(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()}));var r=Xn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:yr,object:this,name:e,newValue:t}:null;r&&Zn(this,i)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return Zr({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return Zr({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[dr]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];e.call(t,s,o,this)}},t.merge=function(e){var t=this;return kr(e)&&(e=new Map(e)),Un((function(){x(e)?function(e){var t=Object.keys(e);if(!A)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return c.propertyIsEnumerable.call(e,t)}))):t}(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):E(e)?(e.constructor!==Map&&r(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!=e&&r(20,e)})),this},t.clear=function(){var e=this;Un((function(){st((function(){for(var t,n=F(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return Un((function(){for(var n,i=function(e){if(E(e)||kr(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return r(21,e)}(e),o=new Map,s=!1,a=F(t.data_.keys());!(n=a()).done;){var l=n.value;if(!i.has(l))if(t.delete(l))s=!0;else{var c=t.data_.get(l);o.set(l,c)}}for(var u,p=F(i.entries());!(u=p()).done;){var d=u.value,f=d[0],h=d[1],m=t.data_.has(f);if(t.set(f,h),t.data_.has(f)){var g=t.data_.get(f);o.set(f,g),m||(s=!0)}}if(!s)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var y=t.data_.keys(),v=o.keys(),b=y.next(),w=v.next();!b.done;){if(b.value!==w.value){t.keysAtom_.reportChanged();break}b=y.next(),w=v.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return Kn(this,e)},t.intercept_=function(e){return Yn(this,e)},j(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:fr,get:function(){return"Map"}}]),e}(),kr=S("ObservableMap",wr);var Or={};br=Symbol.iterator,xr=Symbol.toStringTag;var Sr=function(){function e(e,t,n){void 0===t&&(t=G),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[W]=Or,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,y(Set)||r(22),this.atom_=H(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Un((function(){st((function(){for(var t,n=F(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if((this.atom_,Hn(this))&&!Gn(this,{type:yr,object:this,newValue:e}))return this;if(!this.has(e)){Un((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n=!1,r=Xn(this),i=r?{observableKind:"set",debugObjectName:this.name_,type:yr,object:this,newValue:e}:null;n,r&&Zn(this,i)}return this},t.delete=function(e){var t=this;if(Hn(this)&&!Gn(this,{type:vr,object:this,oldValue:e}))return!1;if(this.has(e)){var n=Xn(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:vr,object:this,oldValue:e}:null;return Un((function(){t.atom_.reportChanged(),t.data_.delete(e)})),n&&Zn(this,r),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Zr({next:function(){var r=e;return e+=1,rDr){for(var t=Dr;t=0&&n++}e=Kr(e),t=Kr(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,c=t.constructor;if(l!==c&&!(y(l)&&l instanceof l&&y(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var u=(r=r||[]).length;u--;)if(r[u]===e)return i[u]===t;if(r.push(e),i.push(t),a){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Xr(e[u],t[u],n-1,r,i))return!1}else{var p,d=Object.keys(e);if(u=d.length,Object.keys(t).length!==u)return!1;for(;u--;)if(!C(t,p=d[u])||!Xr(e[p],t[p],n-1,r,i))return!1}return r.pop(),i.pop(),!0}function Kr(e){return mr(e)?e.slice():E(e)||kr(e)||_(e)||Er(e)?Array.from(e.entries()):e}function Zr(e){return e[Symbol.iterator]=Jr,e}function Jr(){return this}["Symbol","Map","Set"].forEach((function(e){void 0===o()[e]&&r("MobX requires global '"+e+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:jt,extras:{getDebugName:Hr},$mobx:W})},5900:(e,t,n)=>{"use strict";function r(e){return e<10?"0"+e:e}function i(e,t){return t>e.length?e.repeat(Math.trunc(t/e.length)+1).substring(0,t):e}function o(...e){const t=e=>e&&"object"==typeof e;return e.reduce(((e,n)=>(Object.keys(n||{}).forEach((r=>{const i=e[r],s=n[r];t(i)&&t(s)?e[r]=o(i,s):e[r]=s})),e)),Array.isArray(e[e.length-1])?[]:{})}function s(e){return{value:"object"===e?{}:"array"===e?[]:void 0}}function a(e,t){t&&e.pop()}n.r(t),n.d(t,{_registerSampler:()=>E,_samplers:()=>k,inferType:()=>c,sample:()=>S});const l={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function c(e){if(void 0!==e.type)return Array.isArray(e.type)?0===e.type.length?null:e.type[0]:e.type;const t=Object.keys(l);for(var n=0;nt.maxSampleDepth)return a(f,r),s(c(e));if(e.$ref){if(!n)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let i=decodeURIComponent(e.$ref);i.startsWith("#")&&(i=i.substring(1));const o=p().get(n,i);let l;if(!0!==d[i])d[i]=!0,l=g(o,t,n,r),d[i]=!1;else{l=s(c(o))}return a(f,r),l}if(void 0!==e.example)return a(f,r),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(void 0!==e.allOf)return a(f,r),m(e)||function(e,t,n,r,i){let s=g(e,n,r);const a=[];for(let o of t){const{type:e,readOnly:t,writeOnly:l,value:c}=g({type:s.type,...o},n,r,i);s.type&&e&&e!==s.type&&(console.warn("allOf: schemas with different types can't be merged"),s.type=e),s.type=s.type||e,s.readOnly=s.readOnly||t,s.writeOnly=s.writeOnly||l,null!=c&&a.push(c)}if("object"===s.type)return s.value=o(s.value||{},...a.filter((e=>"object"==typeof e))),s;{"array"===s.type&&(n.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const e=a[a.length-1];return s.value=null!=e?e:s.value,s}}({...e,allOf:void 0},e.allOf,t,n,r);if(e.oneOf&&e.oneOf.length){e.anyOf&&(t.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),a(f,r);return u(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]))}if(e.anyOf&&e.anyOf.length){a(f,r);return u(e,Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]))}if(e.if&&e.then){a(f,r);const{if:i,then:s,...l}=e;return g(o(l,i,s),t,n,r)}let i=h(e),l=null;if(void 0===i){i=null,l=e.type,Array.isArray(l)&&e.type.length>0&&(l=e.type[0]),l||(l=c(e));let o=k[l];o&&(i=o(e,t,n,r))}return a(f,r),{value:i,readOnly:e.readOnly,writeOnly:e.writeOnly,type:l};function u(e,i){const s=m(e);if(void 0!==s)return s;const a=g({...e,oneOf:void 0,anyOf:void 0},t,n,r),l=g(i,t,n,r);if("object"==typeof a.value&&"object"==typeof l.value){const e=o(a.value,l.value);return{...l,value:e}}return l}}function y(e){let t=0;if("boolean"==typeof e.exclusiveMinimum||"boolean"==typeof e.exclusiveMaximum){if(e.maximum&&e.minimum)return t=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&t>=e.maximum||!e.exclusiveMaximum&&t>e.maximum)&&(t=(e.maximum+e.minimum)/2),t;if(e.minimum)return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(e.maximum)return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(e.minimum)return e.minimum;e.exclusiveMinimum?(t=Math.floor(e.exclusiveMinimum)+1,t===e.exclusiveMaximum&&(t=(t+Math.floor(e.exclusiveMaximum)-1)/2)):e.exclusiveMaximum?t=Math.floor(e.exclusiveMaximum)-1:e.maximum&&(t=e.maximum)}return t}const v="qwerty!@#$%^123456";function b({min:e,max:t,omitTime:n,omitDate:i}){let o=function(e,t,n,i){var o=n?"":e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate());return t||(o+="T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())+(i?"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5):"")+"Z"),o}(new Date("2019-08-24T14:15:22.123Z"),n,i,!1);return o.lengtht&&console.warn(`Using maxLength = ${t} is incorrect with format "date-time"`),o}function x(e,t){let n=i("string",e);return t&&n.length>t&&(n=n.substring(0,t)),n}const w={email:function(){return"user@example.com"},"idn-email":function(){return"\u043f\u043e\u0448\u0442\u0430@\u0443\u043a\u0440.\u043d\u0435\u0442"},password:function(e,t){let n="pa$$word";return e>n.length&&(n+="_",n+=i(v,e-n.length).substring(0,e-n.length)),n},"date-time":function(e,t){return b({min:e,max:t,omitTime:!1,omitDate:!1})},date:function(e,t){return b({min:e,max:t,omitTime:!0,omitDate:!1})},time:function(e,t){return b({min:e,max:t,omitTime:!1,omitDate:!0}).slice(1)},ipv4:function(){return"192.168.0.1"},ipv6:function(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"},hostname:function(){return"example.com"},"idn-hostname":function(){return"\u043f\u0440\u0438\u043a\u043b\u0430\u0434.\u0443\u043a\u0440"},iri:function(){return"http://example.com/entity/1"},"iri-reference":function(){return"/entity/1"},uri:function(){return"http://example.com"},"uri-reference":function(){return"../dictionary"},"uri-template":function(){return"http://example.com/{endpoint}"},uuid:function(e,t,n){return function(e){var t,n,r,i,o=function(e){var t=0;if(0==e.length)return t;for(var n=0;n>>5)|0;return t=n^((r|=0)<<17|r>>>15),n=r+(i|=0)|0,r=i+e|0,((i=t+e|0)>>>0)/4294967296}),a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*s()%16|0;return("x"==e?t:3&t|8).toString(16)}));return a}(n||"id")},default:x,"json-pointer":function(){return"/json/pointer"},"relative-json-pointer":function(){return"1/relative/json/pointer"},regex:function(){return"/regex/"}};var k={};const O={skipReadOnly:!1,maxSampleDepth:15};function S(e,t,n){let r=Object.assign({},O,t);return d={},f=[],g(e,r,n).value}function E(e,t){k[e]=t}E("array",(function(e,t={},n,r){const i=r&&r.depth||1;let o=Math.min(null!=e.maxItems?e.maxItems:1/0,e.minItems||1);const s=e.prefixItems||e.items||e.contains;Array.isArray(s)&&(o=Math.max(o,s.length));let a=[];if(!s)return a;for(let c=0;c(e[t]=!0,e)),{});Object.keys(e.properties).forEach((s=>{if(t.skipNonRequired&&!r.hasOwnProperty(s))return;const a=g(e.properties[s],t,n,{propertyName:s,depth:o+1});t.skipReadOnly&&a.readOnly||t.skipWriteOnly&&a.writeOnly||(i[s]=a.value)}))}if(e&&"object"==typeof e.additionalProperties){const r=e.additionalProperties["x-additionalPropertiesName"]||"property";i[`${String(r)}1`]=g(e.additionalProperties,t,n,{depth:o+1}).value,i[`${String(r)}2`]=g(e.additionalProperties,t,n,{depth:o+1}).value}return i})),E("string",(function(e,t,n,r){let i=e.format||"default",o=w[i]||x,s=r&&r.propertyName;return o(0|e.minLength,e.maxLength,s)}))},26470:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),o=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,i=47===s.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(a+p))return n.slice(a+p+1);if(0===p)return n.slice(a+p)}else s>c&&(47===e.charCodeAt(i+p)?u=p:0===p&&(u=0));break}var d=e.charCodeAt(i+p);if(d!==n.charCodeAt(a+p))break;47===d&&(u=p)}var f="";for(p=i+u+1;p<=o;++p)p!==o&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,o=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!s){i=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){i=r+1;break}}else-1===o&&(s=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(o=!1,i=a+1),46===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!o){r=a+1;break}}return-1===n||-1===i||0===s||1===s&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}("/",e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),o=47===i;o?(n.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,p=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===s?s=u:1!==p&&(p=1):-1!==s&&(p=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===a+1?-1!==l&&(n.base=n.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(a,s),n.base=e.slice(a,l)),n.ext=e.slice(s,l)),a>0?n.dir=e.slice(0,a-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},84772:(e,t,n)=>{"use strict";function r(e){return getComputedStyle(e)}function i(e,t){for(var n in t){var r=t[n];"number"==typeof r&&(r+="px"),e.style[n]=r}return e}function o(e){var t=document.createElement("div");return t.className=e,t}n.r(t),n.d(t,{default:()=>_});var s="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function a(e,t){if(!s)throw new Error("No element matching method supported");return s.call(e,t)}function l(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function c(e,t){return Array.prototype.filter.call(e.children,(function(e){return a(e,t)}))}var u={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},p={x:null,y:null};function d(e,t){var n=e.element.classList,r=u.state.scrolling(t);n.contains(r)?clearTimeout(p[t]):n.add(r)}function f(e,t){p[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(u.state.scrolling(t))}),e.settings.scrollingThreshold)}var h=function(e){this.element=e,this.handlers={}},m={isEmpty:{configurable:!0}};h.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)},h.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(r){return!(!t||r===t)||(n.element.removeEventListener(e,r,!1),!1)}))},h.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},m.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(h.prototype,m);var g=function(){this.eventElements=[]};function y(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function v(e,t,n,r,i){var o;if(void 0===r&&(r=!0),void 0===i&&(i=!1),"top"===t)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,r,i){var o=n[0],s=n[1],a=n[2],l=n[3],c=n[4],u=n[5];void 0===r&&(r=!0);void 0===i&&(i=!1);var p=e.element;e.reach[l]=null,p[a]<1&&(e.reach[l]="start");p[a]>e[o]-e[s]-1&&(e.reach[l]="end");t&&(p.dispatchEvent(y("ps-scroll-"+l)),t<0?p.dispatchEvent(y("ps-scroll-"+c)):t>0&&p.dispatchEvent(y("ps-scroll-"+u)),r&&function(e,t){d(e,t),f(e,t)}(e,l));e.reach[l]&&(t||i)&&p.dispatchEvent(y("ps-"+l+"-reach-"+e.reach[l]))}(e,n,o,r,i)}function b(e){return parseInt(e,10)||0}g.prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new h(e),this.eventElements.push(t)),t},g.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},g.prototype.unbind=function(e,t,n){var r=this.eventElement(e);r.unbind(t,n),r.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(r),1)},g.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},g.prototype.once=function(e,t,n){var r=this.eventElement(e),i=function(e){r.unbind(t,i),n(e)};r.bind(t,i)};var x={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function w(e){var t=e.element,n=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.round(r.width),e.containerHeight=Math.round(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(c(t,u.element.rail("x")).forEach((function(e){return l(e)})),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(c(t,u.element.rail("y")).forEach((function(e){return l(e)})),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,t){var n={width:t.railXWidth},r=Math.floor(e.scrollTop);t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft;t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-r:n.top=t.scrollbarXTop+r;i(t.scrollbarXRail,n);var o={top:r,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?o.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:o.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?o.left=t.negativeScrollAdjustment+e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:o.left=t.scrollbarYLeft+e.scrollLeft;i(t.scrollbarYRail,o),i(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),i(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}(t,e),e.scrollbarXActive?t.classList.add(u.state.active("x")):(t.classList.remove(u.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?t.classList.add(u.state.active("y")):(t.classList.remove(u.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function k(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function O(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],p=t[8],h=e.element,m=null,g=null,y=null;function v(t){t.touches&&t.touches[0]&&(t[i]=t.touches[0].pageY),h[l]=m+y*(t[i]-g),d(e,c),w(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function b(){f(e,c),e[p].classList.remove(u.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",v)}function x(t,s){m=h[l],s&&t.touches&&(t[i]=t.touches[0].pageY),g=t[i],y=(e[r]-e[n])/(e[o]-e[a]),s?e.event.bind(e.ownerDocument,"touchmove",v):(e.event.bind(e.ownerDocument,"mousemove",v),e.event.once(e.ownerDocument,"mouseup",b),t.preventDefault()),e[p].classList.add(u.state.clicking),t.stopPropagation()}e.event.bind(e[s],"mousedown",(function(e){x(e)})),e.event.bind(e[s],"touchstart",(function(e){x(e,!0)}))}var S={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=n*e.containerHeight,w(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=n*e.containerWidth,w(e),t.stopPropagation()}))},"drag-thumb":function(e){O(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),O(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(a(t,":hover")||a(e.scrollbarX,":focus")||a(e.scrollbarY,":focus"))){var r,i=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(i){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(a(r=i,"input,[contenteditable]")||a(r,"select,[contenteditable]")||a(r,"textarea,[contenteditable]")||a(r,"button,[contenteditable]"))return}var o=0,s=0;switch(n.which){case 37:o=n.metaKey?-e.contentWidth:n.altKey?-e.containerWidth:-30;break;case 38:s=n.metaKey?e.contentHeight:n.altKey?e.containerHeight:30;break;case 39:o=n.metaKey?e.contentWidth:n.altKey?e.containerWidth:30;break;case 40:s=n.metaKey?-e.contentHeight:n.altKey?-e.containerHeight:-30;break;case 32:s=n.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:s=e.containerHeight;break;case 34:s=-e.containerHeight;break;case 36:s=e.contentHeight;break;case 35:s=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==o||e.settings.suppressScrollY&&0!==s||(t.scrollTop-=s,t.scrollLeft+=o,w(e),function(n,r){var i=Math.floor(t.scrollTop);if(0===n){if(!e.scrollbarYActive)return!1;if(0===i&&r>0||i>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var o=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===o&&n<0||o>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}(o,s)&&n.preventDefault())}}))},wheel:function(e){var t=e.element;function n(n){var i=function(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!=t&&n!=n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}(n),o=i[0],s=i[1];if(!function(e,n,i){if(!x.isWebKit&&t.querySelector("select:focus"))return!0;if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(u.element.consuming))return!0;var s=r(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var a=o.scrollHeight-o.clientHeight;if(a>0&&(o.scrollTop>0&&i<0||o.scrollTop0))return!0}if(n&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft0))return!0}o=o.parentNode}return!1}(n.target,o,s)){var a=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(s?t.scrollTop-=s*e.settings.wheelSpeed:t.scrollTop+=o*e.settings.wheelSpeed,a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?t.scrollLeft+=o*e.settings.wheelSpeed:t.scrollLeft-=s*e.settings.wheelSpeed,a=!0):(t.scrollTop-=s*e.settings.wheelSpeed,t.scrollLeft+=o*e.settings.wheelSpeed),w(e),a=a||function(n,r){var i=Math.floor(t.scrollTop),o=0===t.scrollTop,s=i+t.offsetHeight===t.scrollHeight,a=0===t.scrollLeft,l=t.scrollLeft+t.offsetWidth===t.scrollWidth;return!(Math.abs(r)>Math.abs(n)?o||s:a||l)||!e.settings.wheelPropagation}(o,s),a&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}void 0!==window.onwheel?e.event.bind(t,"wheel",n):void 0!==window.onmousewheel&&e.event.bind(t,"mousewheel",n)},touch:function(e){if(x.supportsTouch||x.supportsIePointer){var t=e.element,n={},i=0,o={},s=null;x.supportsTouch?(e.event.bind(t,"touchstart",p),e.event.bind(t,"touchmove",d),e.event.bind(t,"touchend",f)):x.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",p),e.event.bind(t,"pointermove",d),e.event.bind(t,"pointerup",f)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",p),e.event.bind(t,"MSPointerMove",d),e.event.bind(t,"MSPointerUp",f)))}function a(n,r){t.scrollTop-=r,t.scrollLeft-=n,w(e)}function l(e){return e.targetTouches?e.targetTouches[0]:e}function c(e){return(!e.pointerType||"pen"!==e.pointerType||0!==e.buttons)&&(!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function p(e){if(c(e)){var t=l(e);n.pageX=t.pageX,n.pageY=t.pageY,i=(new Date).getTime(),null!==s&&clearInterval(s)}}function d(s){if(c(s)){var p=l(s),d={pageX:p.pageX,pageY:p.pageY},f=d.pageX-n.pageX,h=d.pageY-n.pageY;if(function(e,n,i){if(!t.contains(e))return!1;for(var o=e;o&&o!==t;){if(o.classList.contains(u.element.consuming))return!0;var s=r(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var a=o.scrollHeight-o.clientHeight;if(a>0&&(o.scrollTop>0&&i<0||o.scrollTop0))return!0}if(n&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft0))return!0}o=o.parentNode}return!1}(s.target,f,h))return;a(f,h),n=d;var m=(new Date).getTime(),g=m-i;g>0&&(o.x=f/g,o.y=h/g,i=m),function(n,r){var i=Math.floor(t.scrollTop),o=t.scrollLeft,s=Math.abs(n),a=Math.abs(r);if(a>s){if(r<0&&i===e.contentHeight-e.containerHeight||r>0&&0===i)return 0===window.scrollY&&r>0&&x.isChrome}else if(s>a&&(n<0&&o===e.contentWidth-e.containerWidth||n>0&&0===o))return!0;return!0}(f,h)&&s.preventDefault()}}function f(){e.settings.swipeEasing&&(clearInterval(s),s=setInterval((function(){e.isInitialized?clearInterval(s):o.x||o.y?Math.abs(o.x)<.01&&Math.abs(o.y)<.01?clearInterval(s):e.element?(a(30*o.x,30*o.y),o.x*=.8,o.y*=.8):clearInterval(s):clearInterval(s)}),10))}}},E=function(e,t){var n=this;if(void 0===t&&(t={}),"string"==typeof e&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var s in this.element=e,e.classList.add(u.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},t)this.settings[s]=t[s];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var a,l,c=function(){return e.classList.add(u.state.focus)},p=function(){return e.classList.remove(u.state.focus)};this.isRtl="rtl"===r(e).direction,!0===this.isRtl&&e.classList.add(u.rtl),this.isNegativeScroll=(l=e.scrollLeft,e.scrollLeft=-1,a=e.scrollLeft<0,e.scrollLeft=l,a),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new g,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=o(u.element.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=o(u.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",p),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var d=r(this.scrollbarXRail);this.scrollbarXBottom=parseInt(d.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=b(d.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=b(d.borderLeftWidth)+b(d.borderRightWidth),i(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=b(d.marginLeft)+b(d.marginRight),i(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=o(u.element.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=o(u.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",p),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var f=r(this.scrollbarYRail);this.scrollbarYRight=parseInt(f.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=b(f.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var t=r(e);return b(t.width)+b(t.paddingLeft)+b(t.paddingRight)+b(t.borderLeftWidth)+b(t.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=b(f.borderTopWidth)+b(f.borderBottomWidth),i(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=b(f.marginTop)+b(f.marginBottom),i(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return S[e](n)})),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return n.onScroll(e)})),w(this)};E.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,i(this.scrollbarXRail,{display:"block"}),i(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=b(r(this.scrollbarXRail).marginLeft)+b(r(this.scrollbarXRail).marginRight),this.railYMarginHeight=b(r(this.scrollbarYRail).marginTop)+b(r(this.scrollbarYRail).marginBottom),i(this.scrollbarXRail,{display:"none"}),i(this.scrollbarYRail,{display:"none"}),w(this),v(this,"top",0,!1,!0),v(this,"left",0,!1,!0),i(this.scrollbarXRail,{display:""}),i(this.scrollbarYRail,{display:""}))},E.prototype.onScroll=function(e){this.isAlive&&(w(this),v(this,"top",this.element.scrollTop-this.lastScrollTop),v(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},E.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),l(this.scrollbarX),l(this.scrollbarY),l(this.scrollbarXRail),l(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},E.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")};const _=E},23450:function(e){e.exports=function(){var e=[],t=[],n={},r={},i={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function s(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,n){return t[n]||""}))}function l(e,t){return e.replace(t[0],(function(n,r){var i=a(t[1],arguments);return s(""===n?e[r-1]:n,i)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var i=r.length;i--;){var o=r[i];if(o[0].test(t))return l(t,o)}return t}function u(e,t,n){return function(r){var i=r.toLowerCase();return t.hasOwnProperty(i)?s(r,i):e.hasOwnProperty(i)?s(r,e[i]):c(i,r,n)}}function p(e,t,n,r){return function(r){var i=r.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&c(i,i,n)===i}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=u(i,r,e),d.isPlural=p(i,r,e),d.singular=u(r,i,t),d.isSingular=p(r,i,t),d.addPluralRule=function(t,n){e.push([o(t),n])},d.addSingularRule=function(e,n){t.push([o(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),i[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\xe9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}()},61303:(e,t,n)=>{"use strict";n.r(t),n.d(t,{adjustHue:()=>Xe,animation:()=>jt,backgroundImages:()=>Lt,backgrounds:()=>Nt,between:()=>W,border:()=>Mt,borderColor:()=>Dt,borderRadius:()=>Ft,borderStyle:()=>zt,borderWidth:()=>Bt,buttons:()=>Qt,clearFix:()=>V,complement:()=>Ke,cover:()=>Q,cssVar:()=>b,darken:()=>et,desaturate:()=>nt,directionalProperty:()=>O,easeIn:()=>F,easeInOut:()=>B,easeOut:()=>q,ellipsis:()=>H,em:()=>R,fluidRange:()=>X,fontFace:()=>ie,getContrast:()=>it,getLuminance:()=>rt,getValueAndUnit:()=>C,grayscale:()=>ot,hiDPI:()=>ae,hideText:()=>oe,hideVisually:()=>se,hsl:()=>De,hslToColorString:()=>st,hsla:()=>Fe,important:()=>I,invert:()=>at,lighten:()=>ct,linearGradient:()=>ce,margin:()=>Ht,math:()=>y,meetsContrastGuidelines:()=>ut,mix:()=>dt,modularScale:()=>j,normalize:()=>ue,opacify:()=>ht,padding:()=>Yt,parseToHsl:()=>Te,parseToRgb:()=>Ie,position:()=>Xt,radialGradient:()=>pe,readableColor:()=>yt,rem:()=>L,remToPx:()=>M,retinaImage:()=>de,rgb:()=>ze,rgbToColorString:()=>vt,rgba:()=>Be,saturate:()=>xt,setHue:()=>kt,setLightness:()=>St,setSaturation:()=>_t,shade:()=>Rt,size:()=>Kt,stripUnit:()=>_,textInputs:()=>en,timingFunctions:()=>he,tint:()=>Ct,toColorString:()=>Qe,transitions:()=>tn,transparentize:()=>Tt,triangle:()=>ye,wordWrap:()=>ve});var r=n(87462);var i=n(94578);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s=n(89611);function a(e,t,n){return a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&(0,s.Z)(i,n.prototype),i},a.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s.Z)(r,e)},l(e)}function c(e,t){return t||(t=e.slice(0)),e.raw=t,e}function u(){var e;return(e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e]}var p={symbols:{"*":{infix:{symbol:"*",f:function(e,t){return e*t},notation:"infix",precedence:4,rightToLeft:0,argCount:2},symbol:"*",regSymbol:"\\*"},"/":{infix:{symbol:"/",f:function(e,t){return e/t},notation:"infix",precedence:4,rightToLeft:0,argCount:2},symbol:"/",regSymbol:"/"},"+":{infix:{symbol:"+",f:function(e,t){return e+t},notation:"infix",precedence:2,rightToLeft:0,argCount:2},prefix:{symbol:"+",f:u,notation:"prefix",precedence:3,rightToLeft:0,argCount:1},symbol:"+",regSymbol:"\\+"},"-":{infix:{symbol:"-",f:function(e,t){return e-t},notation:"infix",precedence:2,rightToLeft:0,argCount:2},prefix:{symbol:"-",f:function(e){return-e},notation:"prefix",precedence:3,rightToLeft:0,argCount:1},symbol:"-",regSymbol:"-"},",":{infix:{symbol:",",f:function(){return Array.of.apply(Array,arguments)},notation:"infix",precedence:1,rightToLeft:0,argCount:2},symbol:",",regSymbol:","},"(":{prefix:{symbol:"(",f:u,notation:"prefix",precedence:0,rightToLeft:0,argCount:1},symbol:"(",regSymbol:"\\("},")":{postfix:{symbol:")",f:void 0,notation:"postfix",precedence:0,rightToLeft:0,argCount:1},symbol:")",regSymbol:"\\)"},min:{func:{symbol:"min",f:function(){return Math.min.apply(Math,arguments)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"min",regSymbol:"min\\b"},max:{func:{symbol:"max",f:function(){return Math.max.apply(Math,arguments)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"max",regSymbol:"max\\b"}}};var d=function(e){function t(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return(0,i.Z)(t,e),t}(l(Error)),f=/((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;function h(e,t){var n,r=e.pop();return t.push(r.f.apply(r,(n=[]).concat.apply(n,t.splice(-r.argCount)))),r.precedence}function m(e,t){var n,i=function(e){var t={};return t.symbols=e?(0,r.Z)({},p.symbols,e.symbols):(0,r.Z)({},p.symbols),t}(t),o=[i.symbols["("].prefix],s=[],a=new RegExp("\\d+(?:\\.\\d+)?|"+Object.keys(i.symbols).map((function(e){return i.symbols[e]})).sort((function(e,t){return t.symbol.length-e.symbol.length})).map((function(e){return e.regSymbol})).join("|")+"|(\\S)","g");a.lastIndex=0;var l=!1;do{var c=(n=a.exec(e))||[")",void 0],u=c[0],f=c[1],m=i.symbols[u],g=m&&!m.prefix&&!m.func,y=!m||!m.postfix&&!m.infix;if(f||(l?y:g))throw new d(37,n?n.index:e.length,e);if(l){var v=m.postfix||m.infix;do{var b=o[o.length-1];if((v.precedence-b.precedence||b.rightToLeft)>0)break}while(h(o,s));l="postfix"===v.notation,")"!==v.symbol&&(o.push(v),l&&h(o,s))}else if(m){if(o.push(m.prefix||m.func),m.func&&(!(n=a.exec(e))||"("!==n[0]))throw new d(38,n?n.index:e.length,e)}else s.push(+u),l=!0}while(n&&o.length);if(o.length)throw new d(39,n?n.index:e.length,e);if(n)throw new d(40,n?n.index:e.length,e);return s.pop()}function g(e){return e.split("").reverse().join("")}function y(e,t){var n=g(e),r=n.match(f);if(r&&!r.every((function(e){return e===r[0]})))throw new d(41);return""+m(g(n.replace(f,"")),t)+(r?g(r[0]):"")}var v=/--[\S]*/g;function b(e,t){if(!e||!e.match(v))throw new d(73);var n;if("undefined"!=typeof document&&null!==document.documentElement&&(n=getComputedStyle(document.documentElement).getPropertyValue(e)),n)return n.trim();if(t)return t;throw new d(74)}function x(e){return e.charAt(0).toUpperCase()+e.slice(1)}var w=["Top","Right","Bottom","Left"];function k(e,t){if(!e)return t.toLowerCase();var n=e.split("-");if(n.length>1)return n.splice(1,0,t),n.reduce((function(e,t){return""+e+x(t)}));var r=e.replace(/([a-z])([A-Z])/g,"$1"+t+"$2");return e===r?""+e+t:r}function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0)?n[r]=e[r]+" !important":n[r]=e[r]})),n}var T={minorSecond:1.067,majorSecond:1.125,minorThird:1.2,majorThird:1.25,perfectFourth:1.333,augFourth:1.414,perfectFifth:1.5,minorSixth:1.6,goldenSection:1.618,majorSixth:1.667,minorSeventh:1.778,majorSeventh:1.875,octave:2,majorTenth:2.5,majorEleventh:2.667,majorTwelfth:3,doubleOctave:4};function j(e,t,n){if(void 0===t&&(t="1em"),void 0===n&&(n=1.333),"number"!=typeof e)throw new d(42);if("string"==typeof n&&!T[n])throw new d(43);var r="string"==typeof t?C(t):[t,""],i=r[0],o=r[1],s="string"==typeof n?T[n]:n;if("string"==typeof i)throw new d(44,t);return""+i*Math.pow(s,e)+(o||"")}var L=A("rem"),N=16;function $(e){var t=C(e);if("px"===t[1])return parseFloat(e);if("%"===t[1])return parseFloat(e)/100*N;throw new d(78,t[1])}function M(e,t){var n=C(e);if("rem"!==n[1]&&""!==n[1])throw new d(77,n[1]);var r=t?$(t):function(){if("undefined"!=typeof document&&null!==document.documentElement){var e=getComputedStyle(document.documentElement).fontSize;return e?$(e):N}return N}();return n[0]*r+"px"}var D={back:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",circ:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",cubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",expo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",quad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",quart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",quint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",sine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)"};function F(e){return D[e.toLowerCase().trim()]}var z={back:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",circ:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",cubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",expo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",quad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",quart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",quint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",sine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"};function B(e){return z[e.toLowerCase().trim()]}var U={back:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",cubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",circ:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",expo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",quad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",quart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",quint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",sine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)"};function q(e){return U[e.toLowerCase().trim()]}function W(e,t,n,r){void 0===n&&(n="320px"),void 0===r&&(r="1200px");var i=C(e),o=i[0],s=i[1],a=C(t),l=a[0],c=a[1],u=C(n),p=u[0],f=u[1],h=C(r),m=h[0],g=h[1];if("number"!=typeof p||"number"!=typeof m||!f||!g||f!==g)throw new d(47);if("number"!=typeof o||"number"!=typeof l||s!==c)throw new d(48);if(s!==f||c!==g)throw new d(76);var y=(o-l)/(p-m);return"calc("+(l-y*m).toFixed(2)+(s||"")+" + "+(100*y).toFixed(2)+"vw)"}function V(e){var t;return void 0===e&&(e="&"),(t={})[e+"::after"]={clear:"both",content:'""',display:"table"},t}function Q(e){return void 0===e&&(e=0),{position:"absolute",top:e,right:e,bottom:e,left:e}}function H(e,t){void 0===t&&(t=1);var n={display:"inline-block",maxWidth:e||"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"};return t>1?(0,r.Z)({},n,{WebkitBoxOrient:"vertical",WebkitLineClamp:t,display:"-webkit-box",whiteSpace:"normal"}):n}function Y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i1?(t=t.slice(0,-1),t+=", "+r[o]):1===s.length&&(t+=""+r[o])}else r[o]&&(t+=r[o]+" ");return t.trim()}function ce(e){var t=e.colorStops,n=e.fallback,r=e.toDirection,i=void 0===r?"":r;if(!t||t.length<2)throw new d(56);return{backgroundColor:n||t[0].replace(/,\s+/g,",").split(" ")[0].replace(/,(?=\S)/g,", "),backgroundImage:le(K||(K=c(["linear-gradient(","",")"])),i,t.join(", ").replace(/,(?=\S)/g,", "))}}function ue(){var e;return[(e={html:{lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:"0"},main:{display:"block"},h1:{fontSize:"2em",margin:"0.67em 0"},hr:{boxSizing:"content-box",height:"0",overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{backgroundColor:"transparent"},"abbr[title]":{borderBottom:"none",textDecoration:"underline"}},e["b,\n strong"]={fontWeight:"bolder"},e["code,\n kbd,\n samp"]={fontFamily:"monospace, monospace",fontSize:"1em"},e.small={fontSize:"80%"},e["sub,\n sup"]={fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},e.sub={bottom:"-0.25em"},e.sup={top:"-0.5em"},e.img={borderStyle:"none"},e["button,\n input,\n optgroup,\n select,\n textarea"]={fontFamily:"inherit",fontSize:"100%",lineHeight:"1.15",margin:"0"},e["button,\n input"]={overflow:"visible"},e["button,\n select"]={textTransform:"none"},e['button,\n html [type="button"],\n [type="reset"],\n [type="submit"]']={WebkitAppearance:"button"},e['button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner']={borderStyle:"none",padding:"0"},e['button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring']={outline:"1px dotted ButtonText"},e.fieldset={padding:"0.35em 0.625em 0.75em"},e.legend={boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:"0",whiteSpace:"normal"},e.progress={verticalAlign:"baseline"},e.textarea={overflow:"auto"},e['[type="checkbox"],\n [type="radio"]']={boxSizing:"border-box",padding:"0"},e['[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button']={height:"auto"},e['[type="search"]']={WebkitAppearance:"textfield",outlineOffset:"-2px"},e['[type="search"]::-webkit-search-decoration']={WebkitAppearance:"none"},e["::-webkit-file-upload-button"]={WebkitAppearance:"button",font:"inherit"},e.details={display:"block"},e.summary={display:"list-item"},e.template={display:"none"},e["[hidden]"]={display:"none"},e),{"abbr[title]":{textDecoration:"underline dotted"}}]}function pe(e){var t=e.colorStops,n=e.extent,r=void 0===n?"":n,i=e.fallback,o=e.position,s=void 0===o?"":o,a=e.shape,l=void 0===a?"":a;if(!t||t.length<2)throw new d(57);return{backgroundColor:i||t[0].split(" ")[0],backgroundImage:le(Z||(Z=c(["radial-gradient(","","","",")"])),s,l,r,t.join(", "))}}function de(e,t,n,i,o){var s;if(void 0===n&&(n="png"),void 0===o&&(o="_2x"),!e)throw new d(58);var a=n.replace(/^\./,""),l=i?i+"."+a:""+e+o+"."+a;return(s={backgroundImage:"url("+e+"."+a+")"})[ae()]=(0,r.Z)({backgroundImage:"url("+l+")"},t?{backgroundSize:t}:{}),s}var fe={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"};function he(e){return fe[e]}var me=function(e,t,n){var r=""+n[0]+(n[1]||""),i=""+n[0]/2+(n[1]||""),o=""+t[0]+(t[1]||""),s=""+t[0]/2+(t[1]||"");switch(e){case"top":return"0 "+i+" "+o+" "+i;case"topLeft":return r+" "+o+" 0 0";case"left":return s+" "+r+" "+s+" 0";case"bottomLeft":return r+" 0 0 "+o;case"bottom":return o+" "+i+" 0 "+i;case"bottomRight":return"0 0 "+r+" "+o;case"right":return s+" 0 "+s+" "+r;default:return"0 "+r+" "+o+" 0"}},ge=function(e,t){switch(e){case"top":case"bottomRight":return{borderBottomColor:t};case"right":case"bottomLeft":return{borderLeftColor:t};case"bottom":case"topLeft":return{borderTopColor:t};case"left":case"topRight":return{borderRightColor:t};default:throw new d(59)}};function ye(e){var t=e.pointingDirection,n=e.height,i=e.width,o=e.foregroundColor,s=e.backgroundColor,a=void 0===s?"transparent":s,l=C(i),c=C(n);if(isNaN(c[0])||isNaN(l[0]))throw new d(60);return(0,r.Z)({width:"0",height:"0",borderColor:a},ge(t,o),{borderStyle:"solid",borderWidth:me(t,c,l)})}function ve(e){return void 0===e&&(e="break-word"),{overflowWrap:e,wordWrap:e,wordBreak:"break-word"===e?"break-all":e}}function be(e){return Math.round(255*e)}function xe(e,t,n){return be(e)+","+be(t)+","+be(n)}function we(e,t,n,r){if(void 0===r&&(r=xe),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,s=o*(1-Math.abs(i%2-1)),a=0,l=0,c=0;i>=0&&i<1?(a=o,l=s):i>=1&&i<2?(a=s,l=o):i>=2&&i<3?(l=o,c=s):i>=3&&i<4?(l=s,c=o):i>=4&&i<5?(a=s,c=o):i>=5&&i<6&&(a=o,c=s);var u=n-o/2;return r(a+u,l+u,c+u)}var ke={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var Oe=/^#[a-fA-F0-9]{6}$/,Se=/^#[a-fA-F0-9]{8}$/,Ee=/^#[a-fA-F0-9]{3}$/,_e=/^#[a-fA-F0-9]{4}$/,Ae=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,Re=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,Pe=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Ce=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Ie(e){if("string"!=typeof e)throw new d(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return ke[t]?"#"+ke[t]:e}(e);if(t.match(Oe))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Se)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(Ee))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(_e)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=Ae.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=Re.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])>1?parseFloat(""+o[4])/100:parseFloat(""+o[4])};var s=Pe.exec(t);if(s){var a="rgb("+we(parseInt(""+s[1],10),parseInt(""+s[2],10)/100,parseInt(""+s[3],10)/100)+")",l=Ae.exec(a);if(!l)throw new d(4,t,a);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=Ce.exec(t.substring(0,50));if(c){var u="rgb("+we(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",p=Ae.exec(u);if(!p)throw new d(4,t,u);return{red:parseInt(""+p[1],10),green:parseInt(""+p[2],10),blue:parseInt(""+p[3],10),alpha:parseFloat(""+c[4])>1?parseFloat(""+c[4])/100:parseFloat(""+c[4])}}throw new d(5)}function Te(e){return function(e){var t,n=e.red/255,r=e.green/255,i=e.blue/255,o=Math.max(n,r,i),s=Math.min(n,r,i),a=(o+s)/2;if(o===s)return void 0!==e.alpha?{hue:0,saturation:0,lightness:a,alpha:e.alpha}:{hue:0,saturation:0,lightness:a};var l=o-s,c=a>.5?l/(2-o-s):l/(o+s);switch(o){case n:t=(r-i)/l+(r=1?Me(e,t,n):"rgba("+we(e,t,n)+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?Me(e.hue,e.saturation,e.lightness):"rgba("+we(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new d(2)}function ze(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return je("#"+Le(e)+Le(t)+Le(n));if("object"==typeof e&&void 0===t&&void 0===n)return je("#"+Le(e.red)+Le(e.green)+Le(e.blue));throw new d(6)}function Be(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=Ie(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?ze(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?ze(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new d(7)}var Ue=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},qe=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},We=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},Ve=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha};function Qe(e){if("object"!=typeof e)throw new d(8);if(qe(e))return Be(e);if(Ue(e))return ze(e);if(Ve(e))return Fe(e);if(We(e))return De(e);throw new d(8)}function He(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):He(e,t,r)}}function Ye(e){return He(e,e.length,[])}function Ge(e,t){if("transparent"===t)return t;var n=Te(t);return Qe((0,r.Z)({},n,{hue:n.hue+parseFloat(e)}))}var Xe=Ye(Ge);function Ke(e){if("transparent"===e)return e;var t=Te(e);return Qe((0,r.Z)({},t,{hue:(t.hue+180)%360}))}function Ze(e,t,n){return Math.max(e,Math.min(t,n))}function Je(e,t){if("transparent"===t)return t;var n=Te(t);return Qe((0,r.Z)({},n,{lightness:Ze(0,1,n.lightness-parseFloat(e))}))}var et=Ye(Je);function tt(e,t){if("transparent"===t)return t;var n=Te(t);return Qe((0,r.Z)({},n,{saturation:Ze(0,1,n.saturation-parseFloat(e))}))}var nt=Ye(tt);function rt(e){if("transparent"===e)return 0;var t=Ie(e),n=Object.keys(t).map((function(e){var n=t[e]/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)})),r=n[0],i=n[1],o=n[2];return parseFloat((.2126*r+.7152*i+.0722*o).toFixed(3))}function it(e,t){var n=rt(e),r=rt(t);return parseFloat((n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)).toFixed(2))}function ot(e){return"transparent"===e?e:Qe((0,r.Z)({},Te(e),{saturation:0}))}function st(e){if("object"==typeof e&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness)return e.alpha&&"number"==typeof e.alpha?Fe({hue:e.hue,saturation:e.saturation,lightness:e.lightness,alpha:e.alpha}):De({hue:e.hue,saturation:e.saturation,lightness:e.lightness});throw new d(45)}function at(e){if("transparent"===e)return e;var t=Ie(e);return Qe((0,r.Z)({},t,{red:255-t.red,green:255-t.green,blue:255-t.blue}))}function lt(e,t){if("transparent"===t)return t;var n=Te(t);return Qe((0,r.Z)({},n,{lightness:Ze(0,1,n.lightness+parseFloat(e))}))}var ct=Ye(lt);function ut(e,t){var n=it(e,t);return{AA:n>=4.5,AALarge:n>=3,AAA:n>=7,AAALarge:n>=4.5}}function pt(e,t,n){if("transparent"===t)return n;if("transparent"===n)return t;if(0===e)return n;var i=Ie(t),o=(0,r.Z)({},i,{alpha:"number"==typeof i.alpha?i.alpha:1}),s=Ie(n),a=(0,r.Z)({},s,{alpha:"number"==typeof s.alpha?s.alpha:1}),l=o.alpha-a.alpha,c=2*parseFloat(e)-1,u=((c*l==-1?c:c+l)/(1+c*l)+1)/2,p=1-u;return Be({red:Math.floor(o.red*u+a.red*p),green:Math.floor(o.green*u+a.green*p),blue:Math.floor(o.blue*u+a.blue*p),alpha:o.alpha*parseFloat(e)+a.alpha*(1-parseFloat(e))})}var dt=Ye(pt);function ft(e,t){if("transparent"===t)return t;var n=Ie(t),i="number"==typeof n.alpha?n.alpha:1;return Be((0,r.Z)({},n,{alpha:Ze(0,1,(100*i+100*parseFloat(e))/100)}))}var ht=Ye(ft),mt="#000",gt="#fff";function yt(e,t,n,r){void 0===t&&(t=mt),void 0===n&&(n=gt),void 0===r&&(r=!0);var i=rt(e)>.179,o=i?t:n;return!r||it(e,o)>=4.5?o:i?mt:gt}function vt(e){if("object"==typeof e&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue)return"number"==typeof e.alpha?Be({red:e.red,green:e.green,blue:e.blue,alpha:e.alpha}):ze({red:e.red,green:e.green,blue:e.blue});throw new d(46)}function bt(e,t){if("transparent"===t)return t;var n=Te(t);return Qe((0,r.Z)({},n,{saturation:Ze(0,1,n.saturation+parseFloat(e))}))}var xt=Ye(bt);function wt(e,t){return"transparent"===t?t:Qe((0,r.Z)({},Te(t),{hue:parseFloat(e)}))}var kt=Ye(wt);function Ot(e,t){return"transparent"===t?t:Qe((0,r.Z)({},Te(t),{lightness:parseFloat(e)}))}var St=Ye(Ot);function Et(e,t){return"transparent"===t?t:Qe((0,r.Z)({},Te(t),{saturation:parseFloat(e)}))}var _t=Ye(Et);function At(e,t){return"transparent"===t?t:dt(parseFloat(e),"rgb(0, 0, 0)",t)}var Rt=Ye(At);function Pt(e,t){return"transparent"===t?t:dt(parseFloat(e),"rgb(255, 255, 255)",t)}var Ct=Ye(Pt);function It(e,t){if("transparent"===t)return t;var n=Ie(t),i="number"==typeof n.alpha?n.alpha:1;return Be((0,r.Z)({},n,{alpha:Ze(0,1,+(100*i-100*parseFloat(e)).toFixed(2)/100)}))}var Tt=Ye(It);function jt(){for(var e=arguments.length,t=new Array(e),n=0;n8)throw new d(64);return{animation:t.map((function(e){if(r&&!Array.isArray(e)||!r&&Array.isArray(e))throw new d(65);if(Array.isArray(e)&&e.length>8)throw new d(66);return Array.isArray(e)?e.join(" "):e})).join(", ")}}function Lt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r=0?((i={})["border"+x(e)+"Width"]=n[0],i["border"+x(e)+"Style"]=n[1],i["border"+x(e)+"Color"]=n[2],i):(n.unshift(e),{borderWidth:n[0],borderStyle:n[1],borderColor:n[2]})}function Dt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),i=1;i=0&&e?(0,r.Z)({},O.apply(void 0,[""].concat(n)),{position:e}):O.apply(void 0,["",e].concat(n))}function Kt(e,t){return void 0===t&&(t=e),{height:e,width:t}}var Zt=[void 0,null,"active","focus","hover"];function Jt(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function en(){for(var e=arguments.length,t=new Array(e),n=0;n{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,s=0;s{Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean},35433:()=>{Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},46213:()=>{!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(Prism)},2731:()=>{!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)},79016:()=>{!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",s="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(o),u=RegExp(l(i+" "+o+" "+s+" "+a)),p=l(o+" "+s+" "+a),d=l(i+" "+o+" "+a),f=r(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),h=r(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[p,g]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,v]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),k=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,y,v]),O={keyword:u,punctuation:/[<>()?,.:[\]]/},S=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,_=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[_]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:O},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,k]),lookbehind:!0,inside:O},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:O},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:O},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:O},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[k,d,m]),inside:O}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:O},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[k,y]),inside:O,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[k]),lookbehind:!0,inside:O,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:O}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,m,k,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(k),greedy:!0,inside:O},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var A=E+"|"+S,R=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[A]),P=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[R]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,P]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[P]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var T=/:[^}\r\n]+/.source,j=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[R]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[j,T]),N=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[A]),2),$=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[N,T]);function M(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,T]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:M(L,j)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[$]),lookbehind:!0,greedy:!0,inside:M($,N)}],char:{pattern:RegExp(S),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},97899:()=>{Prism.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}},27046:()=>{Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},50057:()=>{!function(e){function t(e){return RegExp("(^(?:"+e+"):[ \t]*(?![ \t]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var n,r=e.languages,i={"application/javascript":r.javascript,"application/json":r.json||r.javascript,"application/xml":r.xml,"text/xml":r.xml,"text/html":r.html,"text/css":r.css,"text/plain":r.plain},o={"application/json":!0,"application/xml":!0};function s(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|"+("\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-])")+")"}for(var a in i)if(i[a]){n=n||{};var l=o[a]?s(a):a;n[a.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+l+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:i[a]}}n&&e.languages.insertBefore("http","header",n)}(Prism)},52503:()=>{!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},66841:()=>{Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},96854:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var s=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof o&&!o(e))return e;for(var i,a=s.length;-1!==n.code.indexOf(i=t(r,a));)++a;return s[a]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);!function s(a){for(var l=0;l=o.length);l++){var c=a[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[i],p=n.tokenStack[u],d="string"==typeof c?c:c.content,f=t(r,u),h=d.indexOf(f);if(h>-1){++i;var m=d.substring(0,h),g=new e.Token(r,e.tokenize(p,n.grammar),"language-"+r,p),y=d.substring(h+f.length),v=[];m&&v.push.apply(v,s([m])),v.push(g),y&&v.push.apply(v,s([y])),"string"==typeof c?a.splice.apply(a,[l,1].concat(v)):c.content=v}}else c.content&&s(c.content)}return a}(n.tokens)}}}})}(Prism)},24335:()=>{Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},11426:()=>{Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec},20288:()=>{!function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(Prism)},99945:()=>{!function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var s={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},a=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:s}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:s}}];e.languages.insertBefore("php","variable",{string:a,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:a,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)},80366:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},82939:()=>{Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}},59385:()=>{!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)},12886:()=>{Prism.languages.scala=Prism.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),Prism.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:Prism.languages.scala}}},string:/[\s\S]+/}}}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function,delete Prism.languages.scala.constant},35266:()=>{Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},90874:()=>{Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}))},73358:()=>{!function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function s(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+i+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:s(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:s(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:s(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:s(o),lookbehind:!0,greedy:!0},number:{pattern:s(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism)},15660:(e,t,n)=>{var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=p.reach);O+=k.value.length,k=k.next){var S=k.value;if(t.length>e.length)return;if(!(S instanceof o)){var E,_=1;if(v){if(!(E=s(w,O,e,y))||E.index>=e.length)break;var A=E.index,R=E.index+E[0].length,P=O;for(P+=k.value.length;A>=P;)P+=(k=k.next).value.length;if(O=P-=k.value.length,k.value instanceof o)continue;for(var C=k;C!==t.tail&&(Pp.reach&&(p.reach=L);var N=k.prev;if(T&&(N=c(t,N,T),O+=T.length),u(t,N,_),k=c(t,N,new o(d,g?i.tokenize(I,g):I,b,I)),j&&c(t,k,j),_>1){var $={cause:d+","+h,reach:L};a(e,t,n,k.prev,O,$),p&&$.reach>p.reach&&(p.reach=$.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+o.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,s=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),s&&e.close()}),!1),i):i;var p=i.util.currentScript();function d(){i.manual||i.highlightAll()}if(p&&(i.filename=p.src,p.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var f=document.readyState;"loading"===f||"interactive"===f&&p&&p.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(void 0!==r&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=function(e,t){return"\u2716 Error "+e+" while fetching file: "+t},t="\u2716 Error: File does not exist or is empty",n={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",o="loading",s="loaded",a="pre[data-src]:not(["+i+'="'+s+'"]):not(['+i+'="'+o+'"])';r.hooks.add("before-highlightall",(function(e){e.selector+=", "+a})),r.hooks.add("before-sanity-check",(function(l){var c=l.element;if(c.matches(a)){l.code="",c.setAttribute(i,o);var u=c.appendChild(document.createElement("CODE"));u.textContent="Loading\u2026";var p=c.getAttribute("data-src"),d=l.language;if("none"===d){var f=(/\.(\w+)$/.exec(p)||[,"none"])[1];d=n[f]||f}r.util.setLanguage(u,d),r.util.setLanguage(c,d);var h=r.plugins.autoloader;h&&h.loadLanguages(d),function(n,r,i){var o=new XMLHttpRequest;o.open("GET",n,!0),o.onreadystatechange=function(){4==o.readyState&&(o.status<400&&o.responseText?r(o.responseText):o.status>=400?i(e(o.status,o.statusText)):i(t))},o.send(null)}(p,(function(e){c.setAttribute(i,s);var t=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}(c.getAttribute("data-range"));if(t){var n=e.split(/\r\n?|\n/g),o=t[0],a=null==t[1]?n.length:t[1];o<0&&(o+=n.length),o=Math.max(0,Math.min(o-1,n.length)),a<0&&(a+=n.length),a=Math.max(0,Math.min(a,n.length)),e=n.slice(o,a).join("\n"),c.hasAttribute("data-start")||c.setAttribute("data-start",String(o+1))}u.textContent=e,r.highlightElement(u)}),(function(e){c.setAttribute(i,"failed"),u.textContent=e}))}})),r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(a),i=0;t=n[i++];)r.highlightElement(t)}};var l=!1;r.fileHighlight=function(){l||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),l=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},78369:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Tab:()=>N,TabList:()=>C,TabPanel:()=>z,Tabs:()=>_,resetIdCounter:()=>h});var r=n(67294);function i(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var o=i("Tab"),s=i("TabList"),a=i("TabPanel");function l(){return l=Object.assign||function(e){for(var t=1;t=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},l.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;ne;)if(!k(this.getTab(t)))return t;return e},l.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t=0||(i[n]=e[n]);return i}(t,y));return r.createElement("div",v({},o,{className:(0,p.Z)(n),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(t){e.node=t,i&&i(t)},"data-rttabs":!0}),this.getChildren())},i}(r.Component);O.defaultProps={className:"react-tabs",focus:!1},O.propTypes={};var S=["children","defaultIndex","defaultFocus"];function E(e,t){return E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},E(e,t)}var _=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).handleSelected=function(e,t,r){var i=n.props.onSelect,o=n.state.mode;if("function"!=typeof i||!1!==i(e,t,r)){var s={focus:"keydown"===r.type};1===o&&(s.selectedIndex=e),n.setState(s)}},n.state=i.copyPropsToState(n.props,{},t.defaultFocus),n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n),i.getDerivedStateFromProps=function(e,t){return i.copyPropsToState(e,t)},i.getModeFromProps=function(e){return null===e.selectedIndex?1:0},i.copyPropsToState=function(e,t,n){void 0===n&&(n=!1);var r={focus:n,mode:i.getModeFromProps(e)};if(1===r.mode){var o=Math.max(0,m(e.children)-1),s=null;s=null!=t.selectedIndex?Math.min(t.selectedIndex,o):e.defaultIndex||0,r.selectedIndex=s}return r},i.prototype.render=function(){var e=this.props,t=e.children,n=(e.defaultIndex,e.defaultFocus,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,S)),i=this.state,o=i.focus,s=i.selectedIndex;return n.focus=o,n.onSelect=this.handleSelected,null!=s&&(n.selectedIndex=s),r.createElement(O,n,t)},i}(r.Component);_.defaultProps={defaultFocus:!1,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1},_.propTypes={},_.tabsRole="Tabs";var A=["children","className"];function R(){return R=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,A);return r.createElement("ul",R({},i,{className:(0,p.Z)(n),role:"tablist"}),t)},i}(r.Component);C.defaultProps={className:"react-tabs__tab-list"},C.propTypes={},C.tabsRole="TabList";var I=["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"];function T(){return T=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(n,I);return r.createElement("li",T({},m,{className:(0,p.Z)(o,(e={},e[d]=u,e[a]=s,e)),ref:function(e){t.node=e,h&&h(e)},role:"tab",id:l,"aria-selected":u?"true":"false","aria-disabled":s?"true":"false","aria-controls":c,tabIndex:f||(u?"0":null),"data-rttab":!0}),i)},i}(r.Component);N.defaultProps={className:L,disabledClassName:L+"--disabled",focus:!1,id:null,panelId:null,selected:!1,selectedClassName:L+"--selected"},N.propTypes={},N.tabsRole="Tab";var $=["children","className","forceRender","id","selected","selectedClassName","tabId"];function M(){return M=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,$);return r.createElement("div",M({},u,{className:(0,p.Z)(i,(e={},e[l]=a,e)),role:"tabpanel",id:s,"aria-labelledby":c}),o||a?n:null)},i}(r.Component);z.defaultProps={className:F,forceRender:!1,selectedClassName:F+"--selected"},z.propTypes={},z.tabsRole="TabPanel"},72933:function(e,t,n){e.exports=function(){var e={295:function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(645),s=n.n(o)()(i());s.push([e.id,".ps{overflow:hidden!important;overflow-anchor:none;-ms-overflow-style:none;touch-action:auto;-ms-touch-action:auto}.ps__rail-x{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;height:15px;bottom:0;position:absolute}.ps__rail-y{display:none;opacity:0;transition:background-color .2s linear,opacity .2s linear;-webkit-transition:background-color .2s linear,opacity .2s linear;width:15px;right:0;position:absolute}.ps--active-x>.ps__rail-x,.ps--active-y>.ps__rail-y{display:block;background-color:transparent}.ps:hover>.ps__rail-x,.ps:hover>.ps__rail-y,.ps--focus>.ps__rail-x,.ps--focus>.ps__rail-y,.ps--scrolling-x>.ps__rail-x,.ps--scrolling-y>.ps__rail-y{opacity:.6}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking{background-color:#eee;opacity:.9}.ps__thumb-x{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,height .2s ease-in-out;-webkit-transition:background-color .2s linear,height .2s ease-in-out;height:6px;bottom:2px;position:absolute}.ps__thumb-y{background-color:#aaa;border-radius:6px;transition:background-color .2s linear,width .2s ease-in-out;-webkit-transition:background-color .2s linear,width .2s ease-in-out;width:6px;right:2px;position:absolute}.ps__rail-x:hover>.ps__thumb-x,.ps__rail-x:focus>.ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x{background-color:#999;height:11px}.ps__rail-y:hover>.ps__thumb-y,.ps__rail-y:focus>.ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y{background-color:#999;width:11px}@supports (-ms-overflow-style: none){.ps{overflow:auto!important}}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ps{overflow:auto!important}}\n","",{version:3,sources:["webpack://./node_modules/perfect-scrollbar/css/perfect-scrollbar.css"],names:[],mappings:"AAGA,IACE,yBAAA,CACA,oBAAA,CACA,uBAAA,CACA,iBAAA,CACA,qBAAA,CAMF,YACE,YAAA,CACA,SAAA,CACA,yDAAA,CACA,iEAAA,CACA,WAAA,CAEA,QAAA,CAEA,iBAAA,CAGF,YACE,YAAA,CACA,SAAA,CACA,yDAAA,CACA,iEAAA,CACA,UAAA,CAEA,OAAA,CAEA,iBAAA,CAGF,oDAEE,aAAA,CACA,4BAAA,CAGF,oJAME,UAAA,CAGF,kJAME,qBAAA,CACA,UAAA,CAMF,aACE,qBAAA,CAnEF,iBAAA,CAqEE,6DAAA,CACA,qEAAA,CACA,UAAA,CAEA,UAAA,CAEA,iBAAA,CAGF,aACE,qBAAA,CA/EF,iBAAA,CAiFE,4DAAA,CACA,oEAAA,CACA,SAAA,CAEA,SAAA,CAEA,iBAAA,CAGF,oGAGE,qBAAA,CACA,WAAA,CAGF,oGAGE,qBAAA,CACA,UAAA,CAIF,qCACE,IACE,uBAAA,CAAA,CAIJ,wEACE,IACE,uBAAA,CAAA",sourcesContent:["/*\n * Container style\n */\n.ps {\n overflow: hidden !important;\n overflow-anchor: none;\n -ms-overflow-style: none;\n touch-action: auto;\n -ms-touch-action: auto;\n}\n\n/*\n * Scrollbar rail styles\n */\n.ps__rail-x {\n display: none;\n opacity: 0;\n transition: background-color .2s linear, opacity .2s linear;\n -webkit-transition: background-color .2s linear, opacity .2s linear;\n height: 15px;\n /* there must be 'bottom' or 'top' for ps__rail-x */\n bottom: 0px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__rail-y {\n display: none;\n opacity: 0;\n transition: background-color .2s linear, opacity .2s linear;\n -webkit-transition: background-color .2s linear, opacity .2s linear;\n width: 15px;\n /* there must be 'right' or 'left' for ps__rail-y */\n right: 0;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps--active-x > .ps__rail-x,\n.ps--active-y > .ps__rail-y {\n display: block;\n background-color: transparent;\n}\n\n.ps:hover > .ps__rail-x,\n.ps:hover > .ps__rail-y,\n.ps--focus > .ps__rail-x,\n.ps--focus > .ps__rail-y,\n.ps--scrolling-x > .ps__rail-x,\n.ps--scrolling-y > .ps__rail-y {\n opacity: 0.6;\n}\n\n.ps .ps__rail-x:hover,\n.ps .ps__rail-y:hover,\n.ps .ps__rail-x:focus,\n.ps .ps__rail-y:focus,\n.ps .ps__rail-x.ps--clicking,\n.ps .ps__rail-y.ps--clicking {\n background-color: #eee;\n opacity: 0.9;\n}\n\n/*\n * Scrollbar thumb styles\n */\n.ps__thumb-x {\n background-color: #aaa;\n border-radius: 6px;\n transition: background-color .2s linear, height .2s ease-in-out;\n -webkit-transition: background-color .2s linear, height .2s ease-in-out;\n height: 6px;\n /* there must be 'bottom' for ps__thumb-x */\n bottom: 2px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__thumb-y {\n background-color: #aaa;\n border-radius: 6px;\n transition: background-color .2s linear, width .2s ease-in-out;\n -webkit-transition: background-color .2s linear, width .2s ease-in-out;\n width: 6px;\n /* there must be 'right' for ps__thumb-y */\n right: 2px;\n /* please don't change 'position' */\n position: absolute;\n}\n\n.ps__rail-x:hover > .ps__thumb-x,\n.ps__rail-x:focus > .ps__thumb-x,\n.ps__rail-x.ps--clicking .ps__thumb-x {\n background-color: #999;\n height: 11px;\n}\n\n.ps__rail-y:hover > .ps__thumb-y,\n.ps__rail-y:focus > .ps__thumb-y,\n.ps__rail-y.ps--clicking .ps__thumb-y {\n background-color: #999;\n width: 11px;\n}\n\n/* MS supports */\n@supports (-ms-overflow-style: none) {\n .ps {\n overflow: auto !important;\n }\n}\n\n@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {\n .ps {\n overflow: auto !important;\n }\n}\n"],sourceRoot:""}]),t.Z=s},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);nnew Promise(((r,i)=>{var o=e=>{try{a(n.next(e))}catch(e){i(e)}},s=e=>{try{a(n.throw(e))}catch(e){i(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}));class s{constructor(){this.add=d,this.done=f,this.search=v,this.toJS=h,this.load=g,this.dispose=y,this.fromExternalJS=m}}let a,l,c,u=[];function p(){a=new i.Builder,a.field("title"),a.field("description"),a.ref("ref"),a.pipeline.add(i.trimmer,i.stopWordFilter,i.stemmer),c=new Promise((e=>{l=e}))}function d(e,t,n){const r=u.push(n)-1,i={title:e.toLowerCase(),description:t.toLowerCase(),ref:r};a.add(i)}function f(){return o(this,null,(function*(){l(a.build())}))}function h(){return o(this,null,(function*(){return{store:u,index:(yield c).toJSON()}}))}function m(e,t){return o(this,null,(function*(){try{if(importScripts(e),!self[t])throw new Error("Broken index file format");g(self[t])}catch(e){console.error("Failed to load search index: "+e.message)}}))}function g(e){return o(this,null,(function*(){u=e.store,l(i.Index.load(e.index))}))}function y(){return o(this,null,(function*(){u=[],p()}))}function v(e,t=0){return o(this,null,(function*(){if(0===e.trim().length)return[];let n=(yield c).query((t=>{e.trim().toLowerCase().split(/\s+/).forEach((e=>{if(1===e.length)return;const n=(e=>{const t=i.trimmer(new i.Token(e,{}));return"*"+i.stemmer(t)+"*"})(e);t.term(n,{})}))}));return t>0&&(n=n.slice(0,t)),n.map((e=>({meta:u[e.ref],score:e.score})))}))}i.tokenizer.separator=/\s+/,p()},342:function(e,t,n){"use strict";const r=n(376),i={}.NODE_DISABLE_COLORS?{red:"",yellow:"",green:"",normal:""}:{red:"\x1b[31m",yellow:"\x1b[33;1m",green:"\x1b[32m",normal:"\x1b[0m"};function o(e,t){function n(e,t){return r.stringify(e)===r.stringify(Object.assign({},e,t))}return n(e,t)&&n(t,e)}function s(e){let t=(e=e.replace("[]","Array")).split("/");return t[0]=t[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),t.join("/")}String.prototype.toCamelCase=function(){return this.toLowerCase().replace(/[-_ \/\.](.)/g,(function(e,t){return t.toUpperCase()}))},e.exports={colour:i,uniqueOnly:function(e,t,n){return n.indexOf(e)===t},hasDuplicates:function(e){return new Set(e).size!==e.length},allSame:function(e){return new Set(e).size<=1},distinctArray:function(e){return e.length===function(e){let t=[];for(let n of e)t.find((function(e,t,r){return o(e,n)}))||t.push(n);return t}(e).length},firstDupe:function(e){return e.find((function(t,n,r){return e.indexOf(t)1&&console.warn("Replacing with",t),m++}}else{let i=u(l(t,e[n]));if(s.verbose>1&&console.warn((!1===i?f.colour.red:f.colour.green)+"Fragment resolution",e[n],f.colour.normal),!1===i){if(r.parent[r.pkey]={},s.fatal){let t=new Error("Fragment $ref resolution failed "+e[n]);if(!s.promise)throw t;s.promise.reject(t)}}else m++,r.parent[r.pkey]=i,h[e[n]]=r.path.replace("/%24ref","")}else if(p.protocol){let t=o.resolve(i,e[n]).toString();s.verbose>1&&console.warn(f.colour.yellow+"Rewriting external url ref",e[n],"as",t,f.colour.normal),e["x-miro"]=e[n],s.externalRefs[e[n]]&&(s.externalRefs[t]||(s.externalRefs[t]=s.externalRefs[e[n]]),s.externalRefs[t].failed=s.externalRefs[e[n]].failed),e[n]=t}else if(!e["x-miro"]){let t=o.resolve(i,e[n]).toString(),r=!1;s.externalRefs[e[n]]&&(r=s.externalRefs[e[n]].failed),r||(s.verbose>1&&console.warn(f.colour.yellow+"Rewriting external ref",e[n],"as",t,f.colour.normal),e["x-miro"]=e[n],e[n]=t)}}));return c(e,{},(function(e,t,n){d(e,t)&&void 0!==e.$fixed&&delete e.$fixed})),s.verbose>1&&console.warn("Finished fragment resolution"),e}function m(e,t){if(!t.filters||!t.filters.length)return e;for(let n of t.filters)e=n(e,t);return e}function g(e,t,n,s){var c=o.parse(n.source),p=n.source.split("\\").join("/").split("/");p.pop()||p.pop();let d="",f=t.split("#");f.length>1&&(d="#"+f[1],t=f[0]),p=p.join("/");let g=(y=o.parse(t).protocol,v=c.protocol,y&&y.length>2?y:v&&v.length>2?v:"file:");var y,v;let b;if(b="file:"===g?i.resolve(p?p+"/":"",t):o.resolve(p?p+"/":"",t),n.cache[b]){n.verbose&&console.warn("CACHED",b,d);let e=u(n.cache[b]),r=n.externalRef=e;if(d&&(r=l(r,d),!1===r&&(r={},n.fatal))){let e=new Error("Cached $ref resolution failed "+b+d);if(!n.promise)throw e;n.promise.reject(e)}return r=h(r,e,t,d,b,n),r=m(r,n),s(u(r),b,n),Promise.resolve(r)}if(n.verbose&&console.warn("GET",b,d),n.handlers&&n.handlers[g])return n.handlers[g](p,t,d,n).then((function(e){return n.externalRef=e,e=m(e,n),n.cache[b]=e,s(e,b,n),e})).catch((function(e){throw n.verbose&&console.warn(e),e}));if(g&&g.startsWith("http")){const e=Object.assign({},n.fetchOptions,{agent:n.agent});return n.fetch(b,e).then((function(e){if(200!==e.status){if(n.ignoreIOErrors)return n.verbose&&console.warn("FAILED",t),n.externalRefs[t].failed=!0,'{"$ref":"'+t+'"}';throw new Error(`Received status code ${e.status}: ${b}`)}return e.text()})).then((function(e){try{let r=a.parse(e,{schema:"core",prettyErrors:!0});if(e=n.externalRef=r,n.cache[b]=u(e),d&&!1===(e=l(e,d))&&(e={},n.fatal)){let e=new Error("Remote $ref resolution failed "+b+d);if(!n.promise)throw e;n.promise.reject(e)}e=m(e=h(e,r,t,d,b,n),n)}catch(e){if(n.verbose&&console.warn(e),!n.promise||!n.fatal)throw e;n.promise.reject(e)}return s(e,b,n),e})).catch((function(e){if(n.verbose&&console.warn(e),n.cache[b]={},!n.promise||!n.fatal)throw e;n.promise.reject(e)}))}{const e='{"$ref":"'+t+'"}';return function(e,t,n,i,o){return new Promise((function(s,a){r.readFile(e,t,(function(e,t){e?n.ignoreIOErrors&&o?(n.verbose&&console.warn("FAILED",i),n.externalRefs[i].failed=!0,s(o)):a(e):s(t)}))}))}(b,n.encoding||"utf8",n,t,e).then((function(e){try{let r=a.parse(e,{schema:"core",prettyErrors:!0});if(e=n.externalRef=r,n.cache[b]=u(e),d&&!1===(e=l(e,d))&&(e={},n.fatal)){let e=new Error("File $ref resolution failed "+b+d);if(!n.promise)throw e;n.promise.reject(e)}e=m(e=h(e,r,t,d,b,n),n)}catch(e){if(n.verbose&&console.warn(e),!n.promise||!n.fatal)throw e;n.promise.reject(e)}return s(e,b,n),e})).catch((function(e){if(n.verbose&&console.warn(e),!n.promise||!n.fatal)throw e;n.promise.reject(e)}))}}function y(e){return new Promise((function(t,n){(function(e){return new Promise((function(t,n){function r(t,n,r){if(t[n]&&d(t[n],"$ref")){let o=t[n].$ref;if(!o.startsWith("#")){let s="";if(!i[o]){let t=Object.keys(i).find((function(e,t,n){return o.startsWith(e+"/")}));t&&(e.verbose&&console.warn("Found potential subschema at",t),s="/"+(o.split("#")[1]||"").replace(t.split("#")[1]||""),s=s.split("/undefined").join(""),o=t)}if(i[o]||(i[o]={resolved:!1,paths:[],extras:{},description:t[n].description}),i[o].resolved)if(i[o].failed);else if(e.rewriteRefs){let r=i[o].resolvedAt;e.verbose>1&&console.warn("Rewriting ref",o,r),t[n]["x-miro"]=o,t[n].$ref=r+s}else t[n]=u(i[o].data);else i[o].paths.push(r.path),i[o].extras[r.path]=s}}}let i=e.externalRefs;if(e.resolver.depth>0&&e.source===e.resolver.base)return t(i);c(e.openapi.definitions,{identityDetection:!0,path:"#/definitions"},r),c(e.openapi.components,{identityDetection:!0,path:"#/components"},r),c(e.openapi,{identityDetection:!0},r),t(i)}))})(e).then((function(t){for(let n in t)if(!t[n].resolved){let r=e.resolver.depth;r>0&&r++,e.resolver.actions[r].push((function(){return g(e.openapi,n,e,(function(e,r,i){if(!t[n].resolved){let o={};o.context=t[n],o.$ref=n,o.original=u(e),o.updated=e,o.source=r,i.externals.push(o),t[n].resolved=!0}let o=Object.assign({},i,{source:"",resolver:{actions:i.resolver.actions,depth:i.resolver.actions.length-1,base:i.resolver.base}});i.patch&&t[n].description&&!e.description&&"object"==typeof e&&(e.description=t[n].description),t[n].data=e;let s=(a=t[n].paths,[...new Set(a)]);var a;s=s.sort((function(e,t){const n=e.startsWith("#/components/")||e.startsWith("#/definitions/"),r=t.startsWith("#/components/")||t.startsWith("#/definitions/");return n&&!r?-1:r&&!n?1:0}));for(let c of s)if(t[n].resolvedAt&&c!==t[n].resolvedAt&&c.indexOf("x-ms-examples/")<0)i.verbose>1&&console.warn("Creating pointer to data at",c),l(i.openapi,c,{$ref:t[n].resolvedAt+t[n].extras[c],"x-miro":n+t[n].extras[c]});else{t[n].resolvedAt?i.verbose>1&&console.warn("Avoiding circular reference"):(t[n].resolvedAt=c,i.verbose>1&&console.warn("Creating initial clone of data at",c));let r=u(e);l(i.openapi,c,r)}0===i.resolver.actions[o.resolver.depth].length&&i.resolver.actions[o.resolver.depth].push((function(){return y(o)}))}))}))}})).catch((function(t){e.verbose&&console.warn(t),n(t)}));let r={options:e};r.actions=e.resolver.actions[e.resolver.depth],t(r)}))}function v(e,t,n){e.resolver.actions.push([]),y(e).then((function(r){var i;(i=r.actions,i.reduce(((e,t)=>e.then((e=>t().then(Array.prototype.concat.bind(e))))),Promise.resolve([]))).then((function(){if(e.resolver.depth>=e.resolver.actions.length)return console.warn("Ran off the end of resolver actions"),t(!0);e.resolver.depth++,e.resolver.actions[e.resolver.depth].length?setTimeout((function(){v(r.options,t,n)}),0):(e.verbose>1&&console.warn(f.colour.yellow+"Finished external resolution!",f.colour.normal),e.resolveInternal&&(e.verbose>1&&console.warn(f.colour.yellow+"Starting internal resolution!",f.colour.normal),e.openapi=p(e.openapi,e.original,{verbose:e.verbose-1}),e.verbose>1&&console.warn(f.colour.yellow+"Finished internal resolution!",f.colour.normal)),c(e.openapi,{},(function(t,n,r){d(t,n)&&(e.preserveMiro||delete t["x-miro"])})),t(e))})).catch((function(t){e.verbose&&console.warn(t),n(t)}))})).catch((function(t){e.verbose&&console.warn(t),n(t)}))}function b(e){if(e.cache||(e.cache={}),e.fetch||(e.fetch=s),e.source){let t=o.parse(e.source);(!t.protocol||t.protocol.length<=2)&&(e.source=i.resolve(e.source))}e.externals=[],e.externalRefs={},e.rewriteRefs=!0,e.resolver={},e.resolver.depth=0,e.resolver.base=e.source,e.resolver.actions=[[]]}e.exports={optionalResolve:function(e){return b(e),new Promise((function(t,n){e.resolve?v(e,t,n):t(e)}))},resolve:function(e,t,n){return n||(n={}),n.openapi=e,n.source=t,n.resolve=!0,b(n),new Promise((function(e,t){v(n,e,t)}))}}},804:function(e){"use strict";function t(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}e.exports={getDefaultState:t,walkSchema:function e(n,r,i,o){if(void 0===i.depth&&(i=t()),null==n)return n;if(void 0!==n.$ref){let e={$ref:n.$ref};return i.allowRefSiblings&&n.description&&(e.description=n.description),o(e,r,i),e}if(i.combine&&(n.allOf&&Array.isArray(n.allOf)&&1===n.allOf.length&&delete(n=Object.assign({},n.allOf[0],n)).allOf,n.anyOf&&Array.isArray(n.anyOf)&&1===n.anyOf.length&&delete(n=Object.assign({},n.anyOf[0],n)).anyOf,n.oneOf&&Array.isArray(n.oneOf)&&1===n.oneOf.length&&delete(n=Object.assign({},n.oneOf[0],n)).oneOf),o(n,r,i),i.seen.has(n))return n;if("object"==typeof n&&null!==n&&i.seen.set(n,!0),i.top=!1,i.depth++,void 0!==n.items&&(i.property="items",e(n.items,n,i,o)),n.additionalItems&&"object"==typeof n.additionalItems&&(i.property="additionalItems",e(n.additionalItems,n,i,o)),n.additionalProperties&&"object"==typeof n.additionalProperties&&(i.property="additionalProperties",e(n.additionalProperties,n,i,o)),n.properties)for(let t in n.properties){let r=n.properties[t];i.property="properties/"+t,e(r,n,i,o)}if(n.patternProperties)for(let t in n.patternProperties){let r=n.patternProperties[t];i.property="patternProperties/"+t,e(r,n,i,o)}if(n.allOf)for(let t in n.allOf){let r=n.allOf[t];i.property="allOf/"+t,e(r,n,i,o)}if(n.anyOf)for(let t in n.anyOf){let r=n.anyOf[t];i.property="anyOf/"+t,e(r,n,i,o)}if(n.oneOf)for(let t in n.oneOf){let r=n.oneOf[t];i.property="oneOf/"+t,e(r,n,i,o)}return n.not&&(i.property="not",e(n.not,n,i,o)),i.depth--,n}}},470:function(e){"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),o=a,s=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=a,s=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(o+1,a):r=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===n&&-1!==s?++s:s=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(r=s+"/"+r,i=47===s.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(a+p))return n.slice(a+p+1);if(0===p)return n.slice(a+p)}else s>c&&(47===e.charCodeAt(i+p)?u=p:0===p&&(u=0));break}var d=e.charCodeAt(i+p);if(d!==n.charCodeAt(a+p))break;47===d&&(u=p)}var f="";for(p=i+u+1;p<=o;++p)p!==o&&47!==e.charCodeAt(p)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(n=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,o=-1,s=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!s){i=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(c===n.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=l))}return i===o?o=l:-1===o&&(o=e.length),e.slice(i,o)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){i=r+1;break}}else-1===o&&(s=!1,o=r+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===i&&(o=!1,i=a+1),46===l?-1===n?n=a:1!==s&&(s=1):-1!==n&&(s=-1);else if(!o){r=a+1;break}}return-1===n||-1===i||0===s||1===s&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),o=47===i;o?(n.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,p=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===s?s=u:1!==p&&(p=1):-1!==s&&(p=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===p||1===p&&s===l-1&&s===a+1?-1!==l&&(n.base=n.name=0===a&&o?e.slice(1,l):e.slice(a,l)):(0===a&&o?(n.name=e.slice(1,s),n.base=e.slice(1,l)):(n.name=e.slice(a,s),n.base=e.slice(a,l)),n.ext=e.slice(s,l)),a>0?n.dir=e.slice(0,a-1):o&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},683:function(e){"use strict";e.exports={nop:function(e){return e},clone:function(e){return JSON.parse(JSON.stringify(e))},shallowClone:function(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},deepClone:function e(t){let n=Array.isArray(t)?[]:{};for(let r in t)(t.hasOwnProperty(r)||Array.isArray(t))&&(n[r]="object"==typeof t[r]?e(t[r]):t[r]);return n},fastClone:function(e){return Object.assign({},e)},circularClone:function e(t,n){if(n||(n=new WeakMap),Object(t)!==t||t instanceof Function)return t;if(n.has(t))return n.get(t);try{var r=new t.constructor}catch(e){r=Object.create(Object.getPrototypeOf(t))}return n.set(t,r),Object.assign(r,...Object.keys(t).map((r=>({[r]:e(t[r],n)}))))}}},593:function(e,t,n){"use strict";const r=n(401).recurse,i=n(683).shallowClone,o=n(53).jptr,s=n(592).isRef;e.exports={dereference:function e(t,n,a){a||(a={}),a.cache||(a.cache={}),a.state||(a.state={}),a.state.identityDetection=!0,a.depth=a.depth?a.depth+1:1;let l=a.depth>1?t:i(t),c={data:l},u=a.depth>1?n:i(n);a.master||(a.master=l);let p=function(e){return e&&e.verbose?{warn:function(){var e=Array.prototype.slice.call(arguments);console.warn.apply(console,e)}}:{warn:function(){}}}(a),d=1;for(;d>0;)d=0,r(c,a.state,(function(t,n,r){if(s(t,n)){let i=t[n];if(d++,a.cache[i]){let e=a.cache[i];if(e.resolved)p.warn("Patching %s for %s",i,e.path),r.parent[r.pkey]=e.data,a.$ref&&"object"==typeof r.parent[r.pkey]&&(r.parent[r.pkey][a.$ref]=i);else{if(i===e.path)throw new Error(`Tight circle at ${e.path}`);p.warn("Unresolved ref"),r.parent[r.pkey]=o(e.source,e.path),!1===r.parent[r.pkey]&&(r.parent[r.pkey]=o(e.source,e.key)),a.$ref&&"object"==typeof r.parent[r.pkey]&&(r.parent[a.$ref]=i)}}else{let t={};t.path=r.path.split("/$ref")[0],t.key=i,p.warn("Dereffing %s at %s",i,t.path),t.source=u,t.data=o(t.source,t.key),!1===t.data&&(t.data=o(a.master,t.key),t.source=a.master),!1===t.data&&p.warn("Missing $ref target",t.key),a.cache[i]=t,t.data=r.parent[r.pkey]=e(o(t.source,t.key),t.source,a),a.$ref&&"object"==typeof r.parent[r.pkey]&&(r.parent[r.pkey][a.$ref]=i),t.resolved=!0}}}));return c.data}}},592:function(e){"use strict";e.exports={isRef:function(e,t){return"$ref"===t&&!!e&&"string"==typeof e[t]}}},53:function(e){"use strict";function t(e){return e.replace(/\~1/g,"/").replace(/~0/g,"~")}e.exports={jptr:function(e,n,r){if(void 0===e)return!1;if(!n||"string"!=typeof n||"#"===n)return void 0!==r?r:e;if(n.indexOf("#")>=0){let e=n.split("#");if(e[0])return!1;n=e[1],n=decodeURIComponent(n.slice(1).split("+").join(" "))}n.startsWith("/")&&(n=n.slice(1));let i=n.split("/");for(let o=0;o0?i[o-1]:"",-1!=s||e&&e.hasOwnProperty(i[o]))if(s>=0)n&&(e[s]=r),e=e[s];else{if(-2===s)return n?(Array.isArray(e)&&e.push(r),r):void 0;n&&(e[i[o]]=r),e=e[i[o]]}else{if(void 0===r||"object"!=typeof e||Array.isArray(e))return!1;e[i[o]]=n?r:"0"===i[o+1]||"-"===i[o+1]?[]:{},e=e[i[o]]}}return e},jpescape:function(e){return e.replace(/\~/g,"~0").replace(/\//g,"~1")},jpunescape:t}},401:function(e,t,n){"use strict";const r=n(53).jpescape;e.exports={recurse:function e(t,n,i){if(n||(n={depth:0}),n.depth||(n=Object.assign({},{path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1},n)),"object"!=typeof t)return;let o=n.path;for(let s in t){if(n.key=s,n.path=n.path+"/"+encodeURIComponent(r(s)),n.identityPath=n.seen.get(t[s]),n.identity=void 0!==n.identityPath,t.hasOwnProperty(s)&&i(t,s,n),"object"==typeof t[s]&&!n.identity){n.identityDetection&&!Array.isArray(t[s])&&null!==t[s]&&n.seen.set(t[s],n.path);let r={};r.parent=t,r.path=n.path,r.depth=n.depth?n.depth+1:1,r.pkey=s,r.payload=n.payload,r.seen=n.seen,r.identity=!1,r.identityDetection=n.identityDetection,e(t[s],r,i)}n.path=o}}}},433:function(e,t,n){"use strict";n.r(t);var r=n(379),i=n.n(r),o=n(795),s=n.n(o),a=n(569),l=n.n(a),c=n(565),u=n.n(c),p=n(216),d=n.n(p),f=n(589),h=n.n(f),m=n(295),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),i()(m.Z,g),t.default=m.Z&&m.Z.locals?m.Z.locals:void 0},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},925:function(e,t,n){"use strict";const r=n(45),i=n(416),o=(n(470),n(766)),s=n(416),a=n(66),l=n(53),c=l.jptr,u=n(592).isRef,p=n(683).clone,d=n(683).circularClone,f=n(401).recurse,h=n(856),m=n(804),g=n(342),y=n(711).statusCodes,v=n(109).i8,b="3.0.0";let x;class w extends Error{constructor(e){super(e),this.name="S2OError"}}function k(e,t){let n=new w(e);if(n.options=t,!t.promise)throw n;t.promise.reject(n)}function O(e,t,n){n.warnOnly?t[n.warnProperty||"x-s2o-warning"]=e:k(e,n)}function S(e,t){m.walkSchema(e,{},{},(function(e,n,r){!function(e,t){if(e["x-required"]&&Array.isArray(e["x-required"])&&(e.required||(e.required=[]),e.required=e.required.concat(e["x-required"]),delete e["x-required"]),e["x-anyOf"]&&(e.anyOf=e["x-anyOf"],delete e["x-anyOf"]),e["x-oneOf"]&&(e.oneOf=e["x-oneOf"],delete e["x-oneOf"]),e["x-not"]&&(e.not=e["x-not"],delete e["x-not"]),"boolean"==typeof e["x-nullable"]&&(e.nullable=e["x-nullable"],delete e["x-nullable"]),"object"==typeof e["x-discriminator"]&&"string"==typeof e["x-discriminator"].propertyName){e.discriminator=e["x-discriminator"],delete e["x-discriminator"];for(let t in e.discriminator.mapping){let n=e.discriminator.mapping[t];n.startsWith("#/definitions/")&&(e.discriminator.mapping[t]=n.replace("#/definitions/","#/components/schemas/"))}}}(e),function(e,t,n){if(e.nullable&&n.patches++,e.discriminator&&"string"==typeof e.discriminator&&(e.discriminator={propertyName:e.discriminator}),e.items&&Array.isArray(e.items)&&(0===e.items.length?e.items={}:1===e.items.length?e.items=e.items[0]:e.items={anyOf:e.items}),e.type&&Array.isArray(e.type))if(n.patch){if(n.patches++,0===e.type.length)delete e.type;else{e.oneOf||(e.oneOf=[]);for(let t of e.type){let n={};if("null"===t)e.nullable=!0;else{n.type=t;for(let t of g.arrayProperties)void 0!==e.prop&&(n[t]=e[t],delete e[t])}n.type&&e.oneOf.push(n)}delete e.type,0===e.oneOf.length?delete e.oneOf:e.oneOf.length<2&&(e.type=e.oneOf[0].type,Object.keys(e.oneOf[0]).length>1&&O("Lost properties from oneOf",e,n),delete e.oneOf)}e.type&&Array.isArray(e.type)&&1===e.type.length&&(e.type=e.type[0])}else k("(Patchable) schema type must not be an array",n);e.type&&"null"===e.type&&(delete e.type,e.nullable=!0),"array"!==e.type||e.items||(e.items={}),"file"===e.type&&(e.type="string",e.format="binary"),"boolean"==typeof e.required&&(e.required&&e.name&&(void 0===t.required&&(t.required=[]),Array.isArray(t.required)&&t.required.push(e.name)),delete e.required),e.xml&&"string"==typeof e.xml.namespace&&(e.xml.namespace||delete e.xml.namespace),void 0!==e.allowEmptyValue&&(n.patches++,delete e.allowEmptyValue)}(e,n,t)}))}function E(e,t,n){let r=n.payload.options;if(u(e,t)){if(e[t].startsWith("#/components/"));else if("#/consumes"===e[t])delete e[t],n.parent[n.pkey]=p(r.openapi.consumes);else if("#/produces"===e[t])delete e[t],n.parent[n.pkey]=p(r.openapi.produces);else if(e[t].startsWith("#/definitions/")){let n=e[t].replace("#/definitions/","").split("/");const i=l.jpunescape(n[0]);let o=x.schemas[decodeURIComponent(i)];o?n[0]=o:O("Could not resolve reference "+e[t],e,r),e[t]="#/components/schemas/"+n.join("/")}else if(e[t].startsWith("#/parameters/"))e[t]="#/components/parameters/"+g.sanitise(e[t].replace("#/parameters/",""));else if(e[t].startsWith("#/responses/"))e[t]="#/components/responses/"+g.sanitise(e[t].replace("#/responses/",""));else if(e[t].startsWith("#")){let n=p(l.jptr(r.openapi,e[t]));if(!1===n)O("direct $ref not found "+e[t],e,r);else if(r.refmap[e[t]])e[t]=r.refmap[e[t]];else{let o=e[t];o=o.replace("/properties/headers/",""),o=o.replace("/properties/responses/",""),o=o.replace("/properties/parameters/",""),o=o.replace("/properties/schemas/","");let s="schemas",a=o.lastIndexOf("/schema");if(s=o.indexOf("/headers/")>a?"headers":o.indexOf("/responses/")>a?"responses":o.indexOf("/example")>a?"examples":o.indexOf("/x-")>a?"extensions":o.indexOf("/parameters/")>a?"parameters":"schemas","schemas"===s&&S(n,r),"responses"!==s&&"extensions"!==s){let o=s.substr(0,s.length-1);"parameter"===o&&n.name&&n.name===g.sanitise(n.name)&&(o=encodeURIComponent(n.name));let a=1;for(e["x-miro"]&&(i=(i=e["x-miro"]).indexOf("#")>=0?i.split("#")[1].split("/").pop():i.split("/").pop().split(".")[0],o=encodeURIComponent(g.sanitise(i)),a="");l.jptr(r.openapi,"#/components/"+s+"/"+o+a);)a=""===a?2:++a;let c="#/components/"+s+"/"+o+a,u="";"examples"===s&&(n={value:n},u="/value"),l.jptr(r.openapi,c,n),r.refmap[e[t]]=c+u,e[t]=c+u}}}if(delete e["x-miro"],Object.keys(e).length>1){const i=e[t],o=n.path.indexOf("/schema")>=0;"preserve"===r.refSiblings||(o&&"allOf"===r.refSiblings?(delete e.$ref,n.parent[n.pkey]={allOf:[{$ref:i},e]}):n.parent[n.pkey]={$ref:i})}}var i;if("x-ms-odata"===t&&"string"==typeof e[t]&&e[t].startsWith("#/")){let n=e[t].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),i=x.schemas[decodeURIComponent(n[0])];i?n[0]=i:O("Could not resolve reference "+e[t],e,r),e[t]="#/components/schemas/"+n.join("/")}}function _(e){for(let t in e)for(let n in e[t]){let r=g.sanitise(n);n!==r&&(e[t][r]=e[t][n],delete e[t][n])}}function A(e,t){if("basic"===e.type&&(e.type="http",e.scheme="basic"),"oauth2"===e.type){let n={},r=e.flow;"application"===e.flow&&(r="clientCredentials"),"accessCode"===e.flow&&(r="authorizationCode"),void 0!==e.authorizationUrl&&(n.authorizationUrl=e.authorizationUrl.split("?")[0].trim()||"/"),"string"==typeof e.tokenUrl&&(n.tokenUrl=e.tokenUrl.split("?")[0].trim()||"/"),n.scopes=e.scopes||{},e.flows={},e.flows[r]=n,delete e.flow,delete e.authorizationUrl,delete e.tokenUrl,delete e.scopes,void 0!==e.name&&(t.patch?(t.patches++,delete e.name):k("(Patchable) oauth2 securitySchemes should not have name property",t))}}function R(e){return e&&!e["x-s2o-delete"]}function P(e,t){if(e.$ref)e.$ref=e.$ref.replace("#/responses/","#/components/responses/");else{e.type&&!e.schema&&(e.schema={}),e.type&&(e.schema.type=e.type),e.items&&"array"!==e.items.type&&(e.items.collectionFormat!==e.collectionFormat&&O("Nested collectionFormats are not supported",e,t),delete e.items.collectionFormat),"array"===e.type?("ssv"===e.collectionFormat?O("collectionFormat:ssv is no longer supported for headers",e,t):"pipes"===e.collectionFormat?O("collectionFormat:pipes is no longer supported for headers",e,t):"multi"===e.collectionFormat?e.explode=!0:"tsv"===e.collectionFormat?(O("collectionFormat:tsv is no longer supported",e,t),e["x-collectionFormat"]="tsv"):e.style="simple",delete e.collectionFormat):e.collectionFormat&&(t.patch?(t.patches++,delete e.collectionFormat):k("(Patchable) collectionFormat is only applicable to header.type array",t)),delete e.type;for(let t of g.parameterTypeProperties)void 0!==e[t]&&(e.schema[t]=e[t],delete e[t]);for(let t of g.arrayProperties)void 0!==e[t]&&(e.schema[t]=e[t],delete e[t])}}function C(e,t){if(e.$ref.indexOf("#/parameters/")>=0){let t=e.$ref.split("#/parameters/");e.$ref=t[0]+"#/components/parameters/"+g.sanitise(t[1])}e.$ref.indexOf("#/definitions/")>=0&&O("Definition used as parameter",e,t)}function I(e,t,n,r,i,o,s){let a,l={},u=!0;if(t&&t.consumes&&"string"==typeof t.consumes){if(!s.patch)return k("(Patchable) operation.consumes must be an array",s);s.patches++,t.consumes=[t.consumes]}Array.isArray(o.consumes)||delete o.consumes;let d=((t?t.consumes:null)||o.consumes||[]).filter(g.uniqueOnly);if(e&&e.$ref&&"string"==typeof e.$ref){C(e,s);let t=decodeURIComponent(e.$ref.replace("#/components/parameters/","")),n=!1,r=o.components.parameters[t];if(r&&!r["x-s2o-delete"]||!e.$ref.startsWith("#/")||(e["x-s2o-delete"]=!0,n=!0),n){let t=e.$ref,n=c(o,e.$ref);!n&&t.startsWith("#/")?O("Could not resolve reference "+t,e,s):n&&(e=n)}}if(e&&(e.name||e.in)){"boolean"==typeof e["x-deprecated"]&&(e.deprecated=e["x-deprecated"],delete e["x-deprecated"]),void 0!==e["x-example"]&&(e.example=e["x-example"],delete e["x-example"]),"body"===e.in||e.type||(s.patch?(s.patches++,e.type="string"):k("(Patchable) parameter.type is mandatory for non-body parameters",s)),e.type&&"object"==typeof e.type&&e.type.$ref&&(e.type=c(o,e.type.$ref)),"file"===e.type&&(e["x-s2o-originalType"]=e.type,a=e.type),e.description&&"object"==typeof e.description&&e.description.$ref&&(e.description=c(o,e.description.$ref)),null===e.description&&delete e.description;let t=e.collectionFormat;if("array"!==e.type||t||(t="csv"),t&&("array"!==e.type&&(s.patch?(s.patches++,delete e.collectionFormat):k("(Patchable) collectionFormat is only applicable to param.type array",s)),"csv"!==t||"query"!==e.in&&"cookie"!==e.in||(e.style="form",e.explode=!1),"csv"!==t||"path"!==e.in&&"header"!==e.in||(e.style="simple"),"ssv"===t&&("query"===e.in?e.style="spaceDelimited":O("collectionFormat:ssv is no longer supported except for in:query parameters",e,s)),"pipes"===t&&("query"===e.in?e.style="pipeDelimited":O("collectionFormat:pipes is no longer supported except for in:query parameters",e,s)),"multi"===t&&(e.explode=!0),"tsv"===t&&(O("collectionFormat:tsv is no longer supported",e,s),e["x-collectionFormat"]="tsv"),delete e.collectionFormat),e.type&&"body"!==e.type&&"formData"!==e.in)if(e.items&&e.schema)O("parameter has array,items and schema",e,s);else{e.schema&&s.patches++,e.schema&&"object"==typeof e.schema||(e.schema={}),e.schema.type=e.type,e.items&&(e.schema.items=e.items,delete e.items,f(e.schema.items,null,(function(n,r,i){"collectionFormat"===r&&"string"==typeof n[r]&&(t&&n[r]!==t&&O("Nested collectionFormats are not supported",e,s),delete n[r])})));for(let t of g.parameterTypeProperties)void 0!==e[t]&&(e.schema[t]=e[t]),delete e[t]}e.schema&&S(e.schema,s),e["x-ms-skip-url-encoding"]&&"query"===e.in&&(e.allowReserved=!0,delete e["x-ms-skip-url-encoding"])}if(e&&"formData"===e.in){u=!1,l.content={};let t="application/x-www-form-urlencoded";if(d.length&&d.indexOf("multipart/form-data")>=0&&(t="multipart/form-data"),l.content[t]={},e.schema)l.content[t].schema=e.schema,e.schema.$ref&&(l["x-s2o-name"]=decodeURIComponent(e.schema.$ref.replace("#/components/schemas/","")));else{l.content[t].schema={},l.content[t].schema.type="object",l.content[t].schema.properties={},l.content[t].schema.properties[e.name]={};let n=l.content[t].schema,r=l.content[t].schema.properties[e.name];e.description&&(r.description=e.description),e.example&&(r.example=e.example),e.type&&(r.type=e.type);for(let t of g.parameterTypeProperties)void 0!==e[t]&&(r[t]=e[t]);!0===e.required&&(n.required||(n.required=[]),n.required.push(e.name),l.required=!0),void 0!==e.default&&(r.default=e.default),r.properties&&(r.properties=e.properties),e.allOf&&(r.allOf=e.allOf),"array"===e.type&&e.items&&(r.items=e.items,r.items.collectionFormat&&delete r.items.collectionFormat),"file"!==a&&"file"!==e["x-s2o-originalType"]||(r.type="string",r.format="binary"),T(e,r)}}else e&&"file"===e.type&&(e.required&&(l.required=e.required),l.content={},l.content["application/octet-stream"]={},l.content["application/octet-stream"].schema={},l.content["application/octet-stream"].schema.type="string",l.content["application/octet-stream"].schema.format="binary",T(e,l));if(e&&"body"===e.in){l.content={},e.name&&(l["x-s2o-name"]=(t&&t.operationId?g.sanitiseAll(t.operationId):"")+("_"+e.name).toCamelCase()),e.description&&(l.description=e.description),e.required&&(l.required=e.required),t&&s.rbname&&e.name&&(t[s.rbname]=e.name),e.schema&&e.schema.$ref?l["x-s2o-name"]=decodeURIComponent(e.schema.$ref.replace("#/components/schemas/","")):e.schema&&"array"===e.schema.type&&e.schema.items&&e.schema.items.$ref&&(l["x-s2o-name"]=decodeURIComponent(e.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),d.length||d.push("application/json");for(let t of d)l.content[t]={},l.content[t].schema=p(e.schema||{}),S(l.content[t].schema,s);T(e,l)}if(Object.keys(l).length>0&&(e["x-s2o-delete"]=!0,t)&&(t.requestBody&&u?(t.requestBody["x-s2o-overloaded"]=!0,O("Operation "+(t.operationId||i)+" has multiple requestBodies",t,s)):(t.requestBody||(t=n[r]=function(e,t){let n={};for(let r of Object.keys(e))n[r]=e[r],"parameters"===r&&(n.requestBody={},t.rbname&&(n[t.rbname]=""));return n.requestBody={},n}(t,s)),t.requestBody.content&&t.requestBody.content["multipart/form-data"]&&t.requestBody.content["multipart/form-data"].schema&&t.requestBody.content["multipart/form-data"].schema.properties&&l.content["multipart/form-data"]&&l.content["multipart/form-data"].schema&&l.content["multipart/form-data"].schema.properties?(t.requestBody.content["multipart/form-data"].schema.properties=Object.assign(t.requestBody.content["multipart/form-data"].schema.properties,l.content["multipart/form-data"].schema.properties),t.requestBody.content["multipart/form-data"].schema.required=(t.requestBody.content["multipart/form-data"].schema.required||[]).concat(l.content["multipart/form-data"].schema.required||[]),t.requestBody.content["multipart/form-data"].schema.required.length||delete t.requestBody.content["multipart/form-data"].schema.required):t.requestBody.content&&t.requestBody.content["application/x-www-form-urlencoded"]&&t.requestBody.content["application/x-www-form-urlencoded"].schema&&t.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&l.content["application/x-www-form-urlencoded"]&&l.content["application/x-www-form-urlencoded"].schema&&l.content["application/x-www-form-urlencoded"].schema.properties?(t.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(t.requestBody.content["application/x-www-form-urlencoded"].schema.properties,l.content["application/x-www-form-urlencoded"].schema.properties),t.requestBody.content["application/x-www-form-urlencoded"].schema.required=(t.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(l.content["application/x-www-form-urlencoded"].schema.required||[]),t.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete t.requestBody.content["application/x-www-form-urlencoded"].schema.required):(t.requestBody=Object.assign(t.requestBody,l),t.requestBody["x-s2o-name"]||(t.requestBody.schema&&t.requestBody.schema.$ref?t.requestBody["x-s2o-name"]=decodeURIComponent(t.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):t.operationId&&(t.requestBody["x-s2o-name"]=g.sanitiseAll(t.operationId)))))),e&&!e["x-s2o-delete"]){delete e.type;for(let t of g.parameterTypeProperties)delete e[t];"path"!==e.in||void 0!==e.required&&!0===e.required||(s.patch?(s.patches++,e.required=!0):k("(Patchable) path parameters must be required:true ["+e.name+" in "+i+"]",s))}return t}function T(e,t){for(let n in e)n.startsWith("x-")&&!n.startsWith("x-s2o")&&(t[n]=e[n])}function j(e,t,n,r,i){if(!e)return!1;if(e.$ref&&"string"==typeof e.$ref)e.$ref.indexOf("#/definitions/")>=0?O("definition used as response: "+e.$ref,e,i):e.$ref.startsWith("#/responses/")&&(e.$ref="#/components/responses/"+g.sanitise(decodeURIComponent(e.$ref.replace("#/responses/",""))));else{if((void 0===e.description||null===e.description||""===e.description&&i.patch)&&(i.patch?"object"!=typeof e||Array.isArray(e)||(i.patches++,e.description=y[e]||""):k("(Patchable) response.description is mandatory",i)),void 0!==e.schema){if(S(e.schema,i),e.schema.$ref&&"string"==typeof e.schema.$ref&&e.schema.$ref.startsWith("#/responses/")&&(e.schema.$ref="#/components/responses/"+g.sanitise(decodeURIComponent(e.schema.$ref.replace("#/responses/","")))),n&&n.produces&&"string"==typeof n.produces){if(!i.patch)return k("(Patchable) operation.produces must be an array",i);i.patches++,n.produces=[n.produces]}r.produces&&!Array.isArray(r.produces)&&delete r.produces;let t=((n?n.produces:null)||r.produces||[]).filter(g.uniqueOnly);t.length||t.push("*/*"),e.content={};for(let n of t){if(e.content[n]={},e.content[n].schema=p(e.schema),e.examples&&e.examples[n]){let t={};t.value=e.examples[n],e.content[n].examples={},e.content[n].examples.response=t,delete e.examples[n]}"file"===e.content[n].schema.type&&(e.content[n].schema={type:"string",format:"binary"})}delete e.schema}for(let t in e.examples)e.content||(e.content={}),e.content[t]||(e.content[t]={}),e.content[t].examples={},e.content[t].examples.response={},e.content[t].examples.response.value=e.examples[t];if(delete e.examples,e.headers)for(let t in e.headers)"status code"===t.toLowerCase()?i.patch?(i.patches++,delete e.headers[t]):k('(Patchable) "Status Code" is not a valid header',i):P(e.headers[t],i)}}function L(e,t,n,r,o){for(let s in e){let a=e[s];a&&a["x-trace"]&&"object"==typeof a["x-trace"]&&(a.trace=a["x-trace"],delete a["x-trace"]),a&&a["x-summary"]&&"string"==typeof a["x-summary"]&&(a.summary=a["x-summary"],delete a["x-summary"]),a&&a["x-description"]&&"string"==typeof a["x-description"]&&(a.description=a["x-description"],delete a["x-description"]),a&&a["x-servers"]&&Array.isArray(a["x-servers"])&&(a.servers=a["x-servers"],delete a["x-servers"]);for(let e in a)if(g.httpMethods.indexOf(e)>=0||"x-amazon-apigateway-any-method"===e){let u=a[e];if(u&&u.parameters&&Array.isArray(u.parameters)){if(a.parameters)for(let t of a.parameters)"string"==typeof t.$ref&&(C(t,n),t=c(o,t.$ref)),u.parameters.find((function(e,n,r){return e.name===t.name&&e.in===t.in}))||"formData"!==t.in&&"body"!==t.in&&"file"!==t.type||(u=I(t,u,a,e,s,o,n),n.rbname&&""===u[n.rbname]&&delete u[n.rbname]);for(let t of u.parameters)u=I(t,u,a,e,e+":"+s,o,n);n.rbname&&""===u[n.rbname]&&delete u[n.rbname],n.debug||u.parameters&&(u.parameters=u.parameters.filter(R))}if(u&&u.security&&_(u.security),"object"==typeof u){if(!u.responses){let e={description:"Default response"};u.responses={default:e}}for(let e in u.responses)j(u.responses[e],0,u,o,n)}if(u&&u["x-servers"]&&Array.isArray(u["x-servers"]))u.servers=u["x-servers"],delete u["x-servers"];else if(u&&u.schemes&&u.schemes.length)for(let e of u.schemes)if((!o.schemes||o.schemes.indexOf(e)<0)&&(u.servers||(u.servers=[]),Array.isArray(o.servers)))for(let t of o.servers){let n=p(t),r=i.parse(n.url);r.protocol=e,n.url=r.format(),u.servers.push(n)}if(n.debug&&(u["x-s2o-consumes"]=u.consumes||[],u["x-s2o-produces"]=u.produces||[]),u){if(delete u.consumes,delete u.produces,delete u.schemes,u["x-ms-examples"]){for(let e in u["x-ms-examples"]){let t=u["x-ms-examples"][e],n=g.sanitiseAll(e);if(t.parameters)for(let r in t.parameters){let n=t.parameters[r];for(let t of(u.parameters||[]).concat(a.parameters||[]))t.$ref&&(t=l.jptr(o,t.$ref)),t.name!==r||t.example||(t.examples||(t.examples={}),t.examples[e]={value:n})}if(t.responses)for(let r in t.responses){if(t.responses[r].headers)for(let e in t.responses[r].headers){let n=t.responses[r].headers[e];for(let t in u.responses[r].headers)t===e&&(u.responses[r].headers[t].example=n)}if(t.responses[r].body&&(o.components.examples[n]={value:p(t.responses[r].body)},u.responses[r]&&u.responses[r].content))for(let t in u.responses[r].content){let i=u.responses[r].content[t];i.examples||(i.examples={}),i.examples[e]={$ref:"#/components/examples/"+n}}}}delete u["x-ms-examples"]}if(u.parameters&&0===u.parameters.length&&delete u.parameters,u.requestBody){let n=u.operationId?g.sanitiseAll(u.operationId):g.sanitiseAll(e+s).toCamelCase(),i=g.sanitise(u.requestBody["x-s2o-name"]||n||"");delete u.requestBody["x-s2o-name"];let o=JSON.stringify(u.requestBody),a=g.hash(o);if(!r[a]){let e={};e.name=i,e.body=u.requestBody,e.refs=[],r[a]=e}let c="#/"+t+"/"+encodeURIComponent(l.jpescape(s))+"/"+e+"/requestBody";r[a].refs.push(c)}}}if(a&&a.parameters){for(let e in a.parameters)I(a.parameters[e],null,a,null,s,o,n);!n.debug&&Array.isArray(a.parameters)&&(a.parameters=a.parameters.filter(R))}}}function N(e){return e&&e.url&&"string"==typeof e.url?(e.url=e.url.split("{{").join("{"),e.url=e.url.split("}}").join("}"),e.url.replace(/\{(.+?)\}/g,(function(t,n){e.variables||(e.variables={}),e.variables[n]={default:"unknown"}})),e):e}function $(e,t,n){if(void 0===e.info||null===e.info){if(!t.patch)return n(new w("(Patchable) info object is mandatory"));t.patches++,e.info={version:"",title:""}}if("object"!=typeof e.info||Array.isArray(e.info))return n(new w("info must be an object"));if(void 0===e.info.title||null===e.info.title){if(!t.patch)return n(new w("(Patchable) info.title cannot be null"));t.patches++,e.info.title=""}if(void 0===e.info.version||null===e.info.version){if(!t.patch)return n(new w("(Patchable) info.version cannot be null"));t.patches++,e.info.version=""}if("string"!=typeof e.info.version){if(!t.patch)return n(new w("(Patchable) info.version must be a string"));t.patches++,e.info.version=e.info.version.toString()}if(void 0!==e.info.logo){if(!t.patch)return n(new w("(Patchable) info should not have logo property"));t.patches++,e.info["x-logo"]=e.info.logo,delete e.info.logo}if(void 0!==e.info.termsOfService){if(null===e.info.termsOfService){if(!t.patch)return n(new w("(Patchable) info.termsOfService cannot be null"));t.patches++,e.info.termsOfService=""}try{new URL(e.info.termsOfService)}catch(r){if(!t.patch)return n(new w("(Patchable) info.termsOfService must be a URL"));t.patches++,delete e.info.termsOfService}}}function M(e,t,n){if(void 0===e.paths){if(!t.patch)return n(new w("(Patchable) paths object is mandatory"));t.patches++,e.paths={}}}function D(e,t,n){return o(n,new Promise((function(n,r){if(e||(e={}),t.original=e,t.text||(t.text=a.stringify(e)),t.externals=[],t.externalRefs={},t.rewriteRefs=!0,t.preserveMiro=!0,t.promise={},t.promise.resolve=n,t.promise.reject=r,t.patches=0,t.cache||(t.cache={}),t.source&&(t.cache[t.source]=t.original),function(e,t){const n=new WeakSet;f(e,{identityDetection:!0},(function(e,r,i){"object"==typeof e[r]&&null!==e[r]&&(n.has(e[r])?t.anchors?e[r]=p(e[r]):k("YAML anchor or merge key at "+i.path,t):n.add(e[r]))}))}(e,t),e.openapi&&"string"==typeof e.openapi&&e.openapi.startsWith("3."))return t.openapi=d(e),$(t.openapi,t,r),M(t.openapi,t,r),void h.optionalResolve(t).then((function(){return t.direct?n(t.openapi):n(t)})).catch((function(e){console.warn(e),r(e)}));if(!e.swagger||"2.0"!=e.swagger)return r(new w("Unsupported swagger/OpenAPI version: "+(e.openapi?e.openapi:e.swagger)));let i=t.openapi={};if(i.openapi="string"==typeof t.targetVersion&&t.targetVersion.startsWith("3.")?t.targetVersion:b,t.origin){i["x-origin"]||(i["x-origin"]=[]);let n={};n.url=t.source||t.origin,n.format="swagger",n.version=e.swagger,n.converter={},n.converter.url="https://github.com/mermade/oas-kit",n.converter.version=v,i["x-origin"].push(n)}if(i=Object.assign(i,d(e)),delete i.swagger,f(i,{},(function(e,t,n){null===e[t]&&!t.startsWith("x-")&&"default"!==t&&n.path.indexOf("/example")<0&&delete e[t]})),e.host)for(let t of Array.isArray(e.schemes)?e.schemes:[""]){let n={},r=(e.basePath||"").replace(/\/$/,"");n.url=(t?t+":":"")+"//"+e.host+r,N(n),i.servers||(i.servers=[]),i.servers.push(n)}else if(e.basePath){let t={};t.url=e.basePath,N(t),i.servers||(i.servers=[]),i.servers.push(t)}if(delete i.host,delete i.basePath,i["x-servers"]&&Array.isArray(i["x-servers"])&&(i.servers=i["x-servers"],delete i["x-servers"]),e["x-ms-parameterized-host"]){let t=e["x-ms-parameterized-host"],n={};n.url=t.hostTemplate+(e.basePath?e.basePath:""),n.variables={};const r=n.url.match(/\{\w+\}/g);for(let e in t.parameters){let o=t.parameters[e];o.$ref&&(o=p(c(i,o.$ref))),e.startsWith("x-")||(delete o.required,delete o.type,delete o.in,void 0===o.default&&(o.enum?o.default=o.enum[0]:o.default="none"),o.name||(o.name=r[e].replace("{","").replace("}","")),n.variables[o.name]=o,delete o.name)}i.servers||(i.servers=[]),!1===t.useSchemePrefix?i.servers.push(n):e.schemes.forEach((e=>{i.servers.push(Object.assign({},n,{url:e+"://"+n.url}))})),delete i["x-ms-parameterized-host"]}$(i,t,r),M(i,t,r),"string"==typeof i.consumes&&(i.consumes=[i.consumes]),"string"==typeof i.produces&&(i.produces=[i.produces]),i.components={},i["x-callbacks"]&&(i.components.callbacks=i["x-callbacks"],delete i["x-callbacks"]),i.components.examples={},i.components.headers={},i["x-links"]&&(i.components.links=i["x-links"],delete i["x-links"]),i.components.parameters=i.parameters||{},i.components.responses=i.responses||{},i.components.requestBodies={},i.components.securitySchemes=i.securityDefinitions||{},i.components.schemas=i.definitions||{},delete i.definitions,delete i.responses,delete i.parameters,delete i.securityDefinitions,h.optionalResolve(t).then((function(){(function(e,t){let n={};x={schemas:{}},e.security&&_(e.security);for(let i in e.components.securitySchemes){let n=g.sanitise(i);i!==n&&(e.components.securitySchemes[n]&&k("Duplicate sanitised securityScheme name "+n,t),e.components.securitySchemes[n]=e.components.securitySchemes[i],delete e.components.securitySchemes[i]),A(e.components.securitySchemes[n],t)}for(let i in e.components.schemas){let n=g.sanitiseAll(i),r="";if(i!==n){for(;e.components.schemas[n+r];)r=r?++r:2;e.components.schemas[n+r]=e.components.schemas[i],delete e.components.schemas[i]}x.schemas[i]=n+r,S(e.components.schemas[n+r],t)}t.refmap={},f(e,{payload:{options:t}},E),function(e,t){for(let n in t.refmap)l.jptr(e,n,{$ref:t.refmap[n]})}(e,t);for(let i in e.components.parameters){let n=g.sanitise(i);i!==n&&(e.components.parameters[n]&&k("Duplicate sanitised parameter name "+n,t),e.components.parameters[n]=e.components.parameters[i],delete e.components.parameters[i]),I(e.components.parameters[n],null,null,null,n,e,t)}for(let i in e.components.responses){let n=g.sanitise(i);i!==n&&(e.components.responses[n]&&k("Duplicate sanitised response name "+n,t),e.components.responses[n]=e.components.responses[i],delete e.components.responses[i]);let r=e.components.responses[n];if(j(r,0,null,e,t),r.headers)for(let e in r.headers)"status code"===e.toLowerCase()?t.patch?(t.patches++,delete r.headers[e]):k('(Patchable) "Status Code" is not a valid header',t):P(r.headers[e],t)}for(let i in e.components.requestBodies){let t=e.components.requestBodies[i],r=JSON.stringify(t),o=g.hash(r),s={};s.name=i,s.body=t,s.refs=[],n[o]=s}if(L(e.paths,"paths",t,n,e),e["x-ms-paths"]&&L(e["x-ms-paths"],"x-ms-paths",t,n,e),!t.debug)for(let i in e.components.parameters)e.components.parameters[i]["x-s2o-delete"]&&delete e.components.parameters[i];t.debug&&(e["x-s2o-consumes"]=e.consumes||[],e["x-s2o-produces"]=e.produces||[]),delete e.consumes,delete e.produces,delete e.schemes;let r=[];if(e.components.requestBodies={},!t.resolveInternal){let t=1;for(let i in n){let o=n[i];if(o.refs.length>1){let n="";for(o.name||(o.name="requestBody",n=t++);r.indexOf(o.name+n)>=0;)n=n?++n:2;o.name=o.name+n,r.push(o.name),e.components.requestBodies[o.name]=p(o.body);for(let t in o.refs){let n={};n.$ref="#/components/requestBodies/"+o.name,l.jptr(e,o.refs[t],n)}}}}e.components.responses&&0===Object.keys(e.components.responses).length&&delete e.components.responses,e.components.parameters&&0===Object.keys(e.components.parameters).length&&delete e.components.parameters,e.components.examples&&0===Object.keys(e.components.examples).length&&delete e.components.examples,e.components.requestBodies&&0===Object.keys(e.components.requestBodies).length&&delete e.components.requestBodies,e.components.securitySchemes&&0===Object.keys(e.components.securitySchemes).length&&delete e.components.securitySchemes,e.components.headers&&0===Object.keys(e.components.headers).length&&delete e.components.headers,e.components.schemas&&0===Object.keys(e.components.schemas).length&&delete e.components.schemas,e.components&&0===Object.keys(e.components).length&&delete e.components})(t.openapi,t),t.direct?n(t.openapi):n(t)})).catch((function(e){console.warn(e),r(e)}))})))}function F(e,t,n){return o(n,new Promise((function(n,r){let i=null,o=null;try{i=JSON.parse(e),t.text=JSON.stringify(i,null,2)}catch(n){o=n;try{i=a.parse(e,{schema:"core",prettyErrors:!0}),t.sourceYaml=!0,t.text=e}catch(e){o=e}}i?D(i,t).then((e=>n(e))).catch((e=>r(e))):r(new w(o?o.message:"Could not parse string"))})))}e.exports={S2OError:w,targetVersion:b,convert:D,convertObj:D,convertUrl:function(e,t,n){return o(n,new Promise((function(n,r){t.origin=!0,t.source||(t.source=e),t.verbose&&console.warn("GET "+e),t.fetch||(t.fetch=s);const i=Object.assign({},t.fetchOptions,{agent:t.agent});t.fetch(e,i).then((function(t){if(200!==t.status)throw new w(`Received status code ${t.status}: ${e}`);return t.text()})).then((function(e){F(e,t).then((e=>n(e))).catch((e=>r(e)))})).catch((function(e){r(e)}))})))},convertStr:F,convertFile:function(e,t,n){return o(n,new Promise((function(n,i){r.readFile(e,t.encoding||"utf8",(function(r,o){r?i(r):(t.sourceFile=e,F(o,t).then((e=>n(e))).catch((e=>i(e))))}))})))},convertStream:function(e,t,n){return o(n,new Promise((function(n,r){let i="";e.on("data",(function(e){i+=e})).on("end",(function(){F(i,t).then((e=>n(e))).catch((e=>r(e)))}))})))}}},711:function(e,t,n){"use strict";const r=n(177);e.exports={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},r.STATUS_CODES)}},980:function(e,t,n){var r=n(314),i=["add","done","toJS","fromExternalJS","load","dispose","search","Worker"];e.exports=function(){var e=new Worker(URL.createObjectURL(new Blob(['/*! For license information please see 0a6ad30060afff00cb34.worker.js.LICENSE.txt */\n!function(){var e={336:function(e,t,r){var n,i;!function(){var s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,k,S,E,L,P,b,T,O,I,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",R.utils={},R.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n0){var u=R.utils.clone(t)||{};u.position=[o,a],u.index=i.length,i.push(new R.Token(r.slice(o,s),u))}o=s+1}}return i},R.tokenizer.separator=/[\\s\\-]+/,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var r=R.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},R.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=i),s!=e);)n=r-t,i=t+Math.floor(n/2),s=this.elements[2*i];return s==e||s>e?2*i:sa?l+=2:o==a&&(t+=r[u+1]*n[l+1],u+=2,l+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var s,o=i.str.charAt(0);o in i.node.edges?s=i.node.edges[o]:(s=new R.TokenSet,i.node.edges[o]=s),1==i.str.length&&(s.final=!0),n.push({node:s,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var a=i.node.edges["*"];else a=new R.TokenSet,i.node.edges["*"]=a;if(0==i.str.length&&(a.final=!0),n.push({node:a,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&n.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var u=i.node.edges["*"];else u=new R.TokenSet,i.node.edges["*"]=u;1==i.str.length&&(u.final=!0),n.push({node:u,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var l,c=i.str.charAt(0),h=i.str.charAt(1);h in i.node.edges?l=i.node.edges[h]:(l=new R.TokenSet,i.node.edges[h]=l),1==i.str.length&&(l.final=!0),n.push({node:l,editsRemaining:i.editsRemaining-1,str:c+i.str.slice(2)})}}}return r},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,r=t,n=0,i=e.length;n=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),r=Object.create(null),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var r=e[this._ref],n=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value \'"+t.str+"\'"),new R.QueryParseError(r,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator\'"+t.str+"\'";throw new R.QueryParseError(r,t.start,t.end)}var n=e.peekLexeme();if(null==n)throw r="expecting term or field, found nothing",new R.QueryParseError(r,t.start,t.end);switch(n.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:throw r="expecting term or field, found \'"+n.type+"\'",new R.QueryParseError(r,n.start,n.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"\'"+e+"\'"})).join(", "),n="unrecognised field \'"+t.str+"\', possible fields: "+r;throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i)throw n="expecting term, found nothing",new R.QueryParseError(n,t.start,t.end);if(i.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;throw n="expecting term, found \'"+i.type+"\'",new R.QueryParseError(n,i.start,i.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var n="Unexpected lexeme type \'"+r.type+"\'";throw new R.QueryParseError(n,r.start,r.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="edit distance must be numeric";throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.editDistance=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:throw n="Unexpected lexeme type \'"+i.type+"\'",new R.QueryParseError(n,i.start,i.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="boost must be numeric";throw new R.QueryParseError(n,t.start,t.end)}e.currentClause.boost=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:throw n="Unexpected lexeme type \'"+i.type+"\'",new R.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(n=function(){return R})?n.call(t,r,t,e):n)||(e.exports=i)}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var n={};!function(){"use strict";r.d(n,{add:function(){return l},dispose:function(){return p},done:function(){return c},fromExternalJS:function(){return d},load:function(){return f},search:function(){return y},toJS:function(){return h}});var e=r(336),t=(e,t,r)=>new Promise(((n,i)=>{var s=e=>{try{a(r.next(e))}catch(e){i(e)}},o=e=>{try{a(r.throw(e))}catch(e){i(e)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,o);a((r=r.apply(e,t)).next())}));let i,s,o,a=[];function u(){i=new e.Builder,i.field("title"),i.field("description"),i.ref("ref"),i.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),o=new Promise((e=>{s=e}))}function l(e,t,r){const n=a.push(r)-1,s={title:e.toLowerCase(),description:t.toLowerCase(),ref:n};i.add(s)}function c(){return t(this,null,(function*(){s(i.build())}))}function h(){return t(this,null,(function*(){return{store:a,index:(yield o).toJSON()}}))}function d(e,r){return t(this,null,(function*(){try{if(importScripts(e),!self[r])throw new Error("Broken index file format");f(self[r])}catch(e){console.error("Failed to load search index: "+e.message)}}))}function f(r){return t(this,null,(function*(){a=r.store,s(e.Index.load(r.index))}))}function p(){return t(this,null,(function*(){a=[],u()}))}function y(r,n=0){return t(this,null,(function*(){if(0===r.trim().length)return[];let t=(yield o).query((t=>{r.trim().toLowerCase().split(/\\s+/).forEach((r=>{if(1===r.length)return;const n=(t=>{const r=e.trimmer(new e.Token(t,{}));return"*"+e.stemmer(r)+"*"})(r);t.term(n,{})}))}));return n>0&&(t=t.slice(0,n)),t.map((e=>({meta:a[e.ref],score:e.score})))}))}e.tokenizer.separator=/\\s+/,u(),addEventListener("message",(function(e){var t,r=e.data,i=r.type,s=r.method,o=r.id,a=r.params;"RPC"===i&&s&&((t=n[s])?Promise.resolve().then((function(){return t.apply(n,a)})):Promise.reject("No such method")).then((function(e){postMessage({type:"RPC",id:o,result:e})})).catch((function(e){var t={message:e};e.stack&&(t.message=e.message,t.stack=e.stack,t.name=e.name),postMessage({type:"RPC",id:o,error:t})}))})),postMessage({type:"RPC",method:"ready"})}()}();\n//# sourceMappingURL=0a6ad30060afff00cb34.worker.js.map'])),{name:"[fullhash].worker.js"});return r(e,i),e}},314:function(e){e.exports=function(e,t){var n=0,r={};e.addEventListener("message",(function(t){var n=t.data;if("RPC"===n.type)if(n.id){var i=r[n.id];i&&(delete r[n.id],n.error?i[1](Object.assign(Error(n.error.message),n.error)):i[0](n.result))}else{var o=document.createEvent("Event");o.initEvent(n.method,!1,!1),o.data=n.params,e.dispatchEvent(o)}})),t.forEach((function(t){e[t]=function(){var i=arguments;return new Promise((function(o,s){var a=++n;r[a]=[o,s],e.postMessage({type:"RPC",id:a,method:t,params:[].slice.call(i)})}))}}))}},766:function(e){"use strict";e.exports=n(40472)},376:function(e){"use strict";e.exports=n(4445)},322:function(e){"use strict";e.exports=n(5114)},66:function(e){"use strict";e.exports=n(55006)},416:function(e){"use strict";e.exports=void 0},177:function(){},109:function(e){"use strict";e.exports={i8:"7.0.6"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,exports:{}};return e[n](o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var i={};return function(){"use strict";r.r(i),r.d(i,{AUTH_TYPES:function(){return Jl},ApiContentWrap:function(){return qp},ApiInfo:function(){return uc},ApiInfoModel:function(){return Qn},ApiLogo:function(){return hc},AppStore:function(){return rc},ArraySchema:function(){return sl},BackgroundStub:function(){return Wp},BodyContent:function(){return nu},COMPONENT_REGEXP:function(){return Un},CallbackModel:function(){return pr},ClipboardService:function(){return $s},ContentItem:function(){return fp},ContentItems:function(){return dp},DiscriminatorDropdown:function(){return Ya},Dropdown:function(){return cs},DropdownLabel:function(){return ea},DropdownOrLabel:function(){return ys},DropdownWrapper:function(){return ta},ErrorBoundary:function(){return ie},Example:function(){return Ks},ExampleModel:function(){return Br},ExternalExample:function(){return Zs},FieldModel:function(){return Qr},GROUP_DEPTH:function(){return Hi},GroupModel:function(){return Mi},HistoryService:function(){return qt},IS_BROWSER:function(){return a},InvertedSimpleDropdown:function(){return na},JsonPointer:function(){return Oe},JsonViewer:function(){return Hs},LEGACY_REGEXP:function(){return zn},Loading:function(){return le},MDX_COMPONENT_REGEXP:function(){return Bn},Markdown:function(){return Rs},MarkdownRenderer:function(){return Wn},MarkerService:function(){return Qt},MediaContentModel:function(){return Zr},MediaTypeModel:function(){return Yr},MediaTypesSwitch:function(){return Hc},MenuBuilder:function(){return Yi},MenuItem:function(){return Sp},MenuItemLabel:function(){return Pc},MenuItemLi:function(){return Ac},MenuItemTitle:function(){return Cc},MenuItemUl:function(){return _c},MenuItems:function(){return Ip},MenuStore:function(){return Ji},MiddlePanel:function(){return oo},MimeLabel:function(){return Js},NoSampleLabel:function(){return ra},OLD_SECURITY_DEFINITIONS_JSX_NAME:function(){return ft},ObjectSchema:function(){return Ga},OneOfButton:function(){return gl},OneOfSchema:function(){return yl},OpenAPIParser:function(){return Sr},Operation:function(){return ip},OperationBadge:function(){return Sc},OperationItem:function(){return gp},OperationMenuItemContent:function(){return Ep},OperationModel:function(){return mi},OptionsConsumer:function(){return de},OptionsContext:function(){return ue},OptionsProvider:function(){return pe},Parameters:function(){return eu},PayloadSamples:function(){return $u},Redoc:function(){return Jp},RedocAttribution:function(){return Ic},RedocNormalizedOptions:function(){return Q},RedocStandalone:function(){return ed},RedocWrap:function(){return Up},RequestBodyModel:function(){return Jr},ResponseDetails:function(){return hu},ResponseHeaders:function(){return lu},ResponseModel:function(){return ci},ResponseSamples:function(){return Gu},ResponseTitle:function(){return ru},ResponseView:function(){return mu},ResponsesList:function(){return yu},RightPanel:function(){return ao},Row:function(){return co},SCHEMA_DEFINITION_JSX_NAME:function(){return ht},SECTION_ATTR:function(){return Zi},SECURITY_DEFINITIONS_JSX_NAME:function(){return dt},SECURITY_SCHEMES_SECTION_PREFIX:function(){return mt},Schema:function(){return Rl},SchemaDefinition:function(){return $l},SchemaModel:function(){return Mr},ScrollService:function(){return ro},SearchBox:function(){return Zp},SearchStore:function(){return io},Section:function(){return so},SectionItem:function(){return mp},SecurityDefs:function(){return ec},SecuritySchemeModel:function(){return Ei},SecuritySchemesModel:function(){return _i},SideMenu:function(){return jp},SideNavStyleEnum:function(){return N},SimpleDropdown:function(){return us},SourceCode:function(){return Ys},SourceCodeWithCopy:function(){return Gs},SpecStore:function(){return ji},StickyResponsiveSidebar:function(){return Bp},StoreBuilder:function(){return xo},StoreConsumer:function(){return bo},StoreContext:function(){return yo},StoreProvider:function(){return vo},StyledMarkdownBlock:function(){return xs},ThemeProvider:function(){return J},Throttle:function(){return Et},alphabeticallyByProp:function(){return Ft},appendToMdHeading:function(){return v},argValueToBoolean:function(){return W},buildComponentComment:function(){return qn},concatRefStacks:function(){return Or},convertSwagger2OpenAPI:function(){return ve},createGlobalStyle:function(){return K},createStore:function(){return nc},css:function(){return X},debugTime:function(){return _t},debugTimeEnd:function(){return At},detectType:function(){return Ue},escapeHTMLAttrChars:function(){return P},expandDefaultServerVariables:function(){return ut},extensionsHook:function(){return ne},extractExtensions:function(){return bt},flattenByProp:function(){return m},getBasePath:function(){return E},getContentWithLegacyExamples:function(){return wt},getDefinitionName:function(){return nt},getOperationSummary:function(){return ze},getSerializedValue:function(){return Ze},getStatusCodeType:function(){return Me},highlight:function(){return St},history:function(){return Wt},html2Str:function(){return c},humanizeConstraints:function(){return ot},humanizeNumberRange:function(){return it},isAbsoluteUrl:function(){return O},isArray:function(){return I},isBoolean:function(){return T},isFormUrlEncoded:function(){return Ve},isJsonLike:function(){return We},isNamedDefinition:function(){return tt},isNumeric:function(){return y},isObject:function(){return x},isOperationName:function(){return Fe},isPayloadSample:function(){return fi},isPrimitiveType:function(){return qe},isRedocExtension:function(){return vt},isStatusCode:function(){return $e},keyframes:function(){return Z},langFromMime:function(){return Je},loadAndBundleSpec:function(){return ye},mapLang:function(){return Ot},mapValues:function(){return h},mapWithLast:function(){return f},media:function(){return ee},memoize:function(){return Dt},menuItemDepth:function(){return Rc},mergeObjects:function(){return b},mergeParams:function(){return lt},mergeSimilarMediaTypes:function(){return ct},normalizeServers:function(){return pt},pluralizeType:function(){return xt},pushRef:function(){return kr},querySelector:function(){return l},removeQueryStringAndHash:function(){return A},resolveUrl:function(){return S},safeSlugify:function(){return k},scrollIntoViewIfNeeded:function(){return u},serializeParameterValue:function(){return Ke},serializeParameterValueWithMime:function(){return Xe},setSecuritySchemePrefix:function(){return gt},shortenHTTPVerb:function(){return yt},sortByField:function(){return at},sortByRequired:function(){return st},stripTrailingSlash:function(){return g},styled:function(){return te},titleize:function(){return _},unescapeHTMLChars:function(){return C},urlFormEncodePayload:function(){return Ge},useStore:function(){return wo}});var e=n(67294),t=n(61303);const o={spacing:{unit:5,sectionHorizontal:({spacing:e})=>8*e.unit,sectionVertical:({spacing:e})=>8*e.unit},breakpoints:{small:"50rem",medium:"75rem",large:"105rem"},colors:{tonalOffset:.2,primary:{main:"#32329f",light:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.primary.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.primary.main),contrastText:({colors:e})=>(0,t.readableColor)(e.primary.main)},success:{main:"#1d8127",light:({colors:e})=>(0,t.lighten)(2*e.tonalOffset,e.success.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.success.main),contrastText:({colors:e})=>(0,t.readableColor)(e.success.main)},warning:{main:"#ffa500",light:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.warning.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.warning.main),contrastText:"#ffffff"},error:{main:"#d41f1c",light:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.error.main),dark:({colors:e})=>(0,t.darken)(e.tonalOffset,e.error.main),contrastText:({colors:e})=>(0,t.readableColor)(e.error.main)},gray:{50:"#FAFAFA",100:"#F5F5F5"},text:{primary:"#333333",secondary:({colors:e})=>(0,t.lighten)(e.tonalOffset,e.text.primary)},border:{dark:"rgba(0,0,0, 0.1)",light:"#ffffff"},responses:{success:{color:({colors:e})=>e.success.main,backgroundColor:({colors:e})=>(0,t.transparentize)(.93,e.success.main),tabTextColor:({colors:e})=>e.responses.success.color},error:{color:({colors:e})=>e.error.main,backgroundColor:({colors:e})=>(0,t.transparentize)(.93,e.error.main),tabTextColor:({colors:e})=>e.responses.error.color},redirect:{color:({colors:e})=>e.warning.main,backgroundColor:({colors:e})=>(0,t.transparentize)(.9,e.responses.redirect.color),tabTextColor:({colors:e})=>e.responses.redirect.color},info:{color:"#87ceeb",backgroundColor:({colors:e})=>(0,t.transparentize)(.9,e.responses.info.color),tabTextColor:({colors:e})=>e.responses.info.color}},http:{get:"#2F8132",post:"#186FAF",put:"#95507c",options:"#947014",patch:"#bf581d",delete:"#cc3333",basic:"#707070",link:"#07818F",head:"#A23DAD"}},schema:{linesColor:e=>(0,t.lighten)(e.colors.tonalOffset,(0,t.desaturate)(e.colors.tonalOffset,e.colors.primary.main)),defaultDetailsWidth:"75%",typeNameColor:e=>e.colors.text.secondary,typeTitleColor:e=>e.schema.typeNameColor,requireLabelColor:e=>e.colors.error.main,labelsTextSize:"0.9em",nestingSpacing:"1em",nestedBackground:"#fafafa",arrow:{size:"1.1em",color:e=>e.colors.text.secondary}},typography:{fontSize:"14px",lineHeight:"1.5em",fontWeightRegular:"400",fontWeightBold:"600",fontWeightLight:"300",fontFamily:"Roboto, sans-serif",smoothing:"antialiased",optimizeSpeed:!0,headings:{fontFamily:"Montserrat, sans-serif",fontWeight:"400",lineHeight:"1.6em"},code:{fontSize:"13px",fontFamily:"Courier, monospace",lineHeight:({typography:e})=>e.lineHeight,fontWeight:({typography:e})=>e.fontWeightRegular,color:"#e53935",backgroundColor:"rgba(38, 50, 56, 0.05)",wrap:!1},links:{color:({colors:e})=>e.primary.main,visited:({typography:e})=>e.links.color,hover:({typography:e})=>(0,t.lighten)(.2,e.links.color),textDecoration:"auto",hoverTextDecoration:"auto"}},sidebar:{width:"260px",backgroundColor:"#fafafa",textColor:"#333333",activeTextColor:e=>e.sidebar.textColor!==o.sidebar.textColor?e.sidebar.textColor:e.colors.primary.main,groupItems:{activeBackgroundColor:e=>(0,t.darken)(.1,e.sidebar.backgroundColor),activeTextColor:e=>e.sidebar.activeTextColor,textTransform:"uppercase"},level1Items:{activeBackgroundColor:e=>(0,t.darken)(.05,e.sidebar.backgroundColor),activeTextColor:e=>e.sidebar.activeTextColor,textTransform:"none"},arrow:{size:"1.5em",color:e=>e.sidebar.textColor}},logo:{maxHeight:({sidebar:e})=>e.width,maxWidth:({sidebar:e})=>e.width,gutter:"2px"},rightPanel:{backgroundColor:"#263238",width:"40%",textColor:"#ffffff",servers:{overlay:{backgroundColor:"#fafafa",textColor:"#263238"},url:{backgroundColor:"#fff"}}},codeBlock:{backgroundColor:({rightPanel:e})=>(0,t.darken)(.1,e.backgroundColor)},fab:{backgroundColor:"#f2f2f2",color:"#0065FB"}};var s=o;const a="undefined"!=typeof window&&"HTMLElement"in window;function l(e){return"undefined"!=typeof document?document.querySelector(e):null}function c(e){return e.split(/<[^>]+>/).map((e=>e.trim())).filter((e=>e.length>0)).join(" ")}function u(e,t=!0){const n=e.parentNode;if(!n)return;const r=window.getComputedStyle(n,void 0),i=parseInt(r.getPropertyValue("border-top-width"),10),o=parseInt(r.getPropertyValue("border-left-width"),10),s=e.offsetTop-n.offsetTopn.scrollTop+n.clientHeight,l=e.offsetLeft-n.offsetLeftn.scrollLeft+n.clientWidth,u=s&&!a;(s||a)&&t&&(n.scrollTop=e.offsetTop-n.offsetTop-n.clientHeight/2-i+e.clientHeight/2),(l||c)&&t&&(n.scrollLeft=e.offsetLeft-n.offsetLeft-n.clientWidth/2-o+e.clientWidth/2),(s||a||l||c)&&!t&&e.scrollIntoView(u)}var p=n(31304),d=r.n(p);function f(e,t){const n=[];for(let r=0;r{for(const i of e)n.push(i),i[t]&&r(i[t])};return r(e),n}function g(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function y(e){return!isNaN(parseFloat(e))&&isFinite(e)}function v(e,t,n){const r=new RegExp(`(^|\\n)#\\s?${t}\\s*\\n`,"i"),i=new RegExp(`((\\n|^)#\\s*${t}\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)`,"i");if(r.test(e))return e.replace(i,`$1\n\n${n}\n$4`);{const r=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return`${e}${r}# ${t}\n\n${n}`}}const b=(e,...t)=>{if(!t.length)return e;const n=t.shift();return void 0===n?e:(w(e)&&w(n)&&Object.keys(n).forEach((t=>{w(n[t])?(e[t]||(e[t]={}),b(e[t],n[t])):e[t]=n[t]})),b(e,...t))},x=e=>null!==e&&"object"==typeof e,w=e=>x(e)&&!I(e);function k(e){return d()(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/\--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function O(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function S(e,t){let n;if(t.startsWith("//"))try{n=`${new URL(e).protocol||"https:"}${t}`}catch(e){n=`https:${t}`}else if(O(t))n=t;else if(t.startsWith("/"))try{const r=new URL(e);r.pathname=t,n=r.href}catch(e){n=t}else n=g(e)+"/"+t;return g(n)}function E(e){try{return R(e).pathname}catch(t){return e}}function _(e){return e.charAt(0).toUpperCase()+e.slice(1)}function A(e){try{const t=R(e);return t.search="",t.hash="",t.toString()}catch(t){return e}}function R(e){return"undefined"==typeof URL?new(r(416).URL)(e):new URL(e)}function P(e){return e.replace(/["\\]/g,"\\$&")}function C(e){return e.replace(/&#(\d+);/g,((e,t)=>String.fromCharCode(parseInt(t,10)))).replace(/&/g,"&").replace(/"/g,'"')}function I(e){return Array.isArray(e)}function T(e){return"boolean"==typeof e}const j={enum:"Enum",enumSingleValue:"Value",enumArray:"Items",default:"Default",deprecated:"Deprecated",example:"Example",examples:"Examples",recursive:"Recursive",arrayOf:"Array of ",webhook:"Event",const:"Value",noResultsFound:"No results found",download:"Download",downloadSpecification:"Download OpenAPI specification",responses:"Responses",callbackResponses:"Callback responses",requestSamples:"Request samples",responseSamples:"Response samples"};function L(e,t){const n=j[e];return void 0!==t?n[t]:n}var N=(e=>(e.SummaryOnly="summary-only",e.PathOnly="path-only",e.IdOnly="id-only",e))(N||{}),$=Object.defineProperty,M=Object.defineProperties,D=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,U=(e,t,n)=>t in e?$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t)=>{for(var n in t||(t={}))z.call(t,n)&&U(e,n,t[n]);if(F)for(var n of F(t))B.call(t,n)&&U(e,n,t[n]);return e};function W(e,t){return void 0===e?t||!1:"string"==typeof e?"false"!==e:e}function V(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?e:void 0}class Q{static normalizeExpandResponses(e){if("all"===e)return"all";if("string"==typeof e){const t={};return e.split(",").forEach((e=>{t[e.trim()]=!0})),t}return void 0!==e&&console.warn(`expandResponses must be a string but received value "${e}" of type ${typeof e}`),{}}static normalizeHideHostname(e){return!!e}static normalizeScrollYOffset(e){if("string"==typeof e&&!y(e)){const t=l(e);t||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");const n=t&&t.getBoundingClientRect().bottom||0;return()=>n}return"number"==typeof e||y(e)?()=>"number"==typeof e?e:parseFloat(e):"function"==typeof e?()=>{const t=e();return"number"!=typeof t&&console.warn(`scrollYOffset should return number but returned value "${t}" of type ${typeof t}`),t}:(void 0!==e&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function"),()=>0)}static normalizeShowExtensions(e){if(void 0===e)return!1;if(""===e)return!0;if("string"!=typeof e)return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map((e=>e.trim()))}}static normalizeSideNavStyle(e){const t=N.SummaryOnly;if("string"!=typeof e)return t;switch(e){case t:return e;case N.PathOnly:return N.PathOnly;case N.IdOnly:return N.IdOnly;default:return t}}static normalizePayloadSampleIdx(e){return"number"==typeof e?Math.max(0,e):"string"==typeof e&&isFinite(e)?parseInt(e,10):0}static normalizeJsonSampleExpandLevel(e){return"all"===e?1/0:isNaN(Number(e))?2:Math.ceil(Number(e))}static normalizeGeneratedPayloadSamplesMaxDepth(e){return isNaN(Number(e))?10:Math.max(0,Number(e))}constructor(e,t={}){var n,r,i,o,a;const l=(e=q(q({},t),e)).theme&&e.theme.extensionsHook;var c,u;(null==(n=e.theme)?void 0:n.menu)&&!(null==(r=e.theme)?void 0:r.sidebar)&&(console.warn('Theme setting "menu" is deprecated. Rename to "sidebar"'),e.theme.sidebar=e.theme.menu),(null==(i=e.theme)?void 0:i.codeSample)&&!(null==(o=e.theme)?void 0:o.codeBlock)&&(console.warn('Theme setting "codeSample" is deprecated. Rename to "codeBlock"'),e.theme.codeBlock=e.theme.codeSample),this.theme=function(e){const t={};let n=0;const r=(i,o)=>{Object.keys(i).forEach((s=>{const a=(o?o+".":"")+s,l=i[s];"function"==typeof l?Object.defineProperty(i,s,{get(){if(!t[a]){if(n++,n>1e3)throw new Error(`Theme probably contains circular dependency at ${a}: ${l.toString()}`);t[a]=l(e)}return t[a]},enumerable:!0}):"object"==typeof l&&r(l,a)}))};return r(e,""),JSON.parse(JSON.stringify(e))}(b({},s,(c=q({},e.theme),M(c,D({extensionsHook:void 0}))))),this.theme.extensionsHook=l,u=e.labels,Object.assign(j,u),this.scrollYOffset=Q.normalizeScrollYOffset(e.scrollYOffset),this.hideHostname=Q.normalizeHideHostname(e.hideHostname),this.expandResponses=Q.normalizeExpandResponses(e.expandResponses),this.requiredPropsFirst=W(e.requiredPropsFirst),this.sortPropsAlphabetically=W(e.sortPropsAlphabetically),this.sortEnumValuesAlphabetically=W(e.sortEnumValuesAlphabetically),this.sortOperationsAlphabetically=W(e.sortOperationsAlphabetically),this.sortTagsAlphabetically=W(e.sortTagsAlphabetically),this.nativeScrollbars=W(e.nativeScrollbars),this.pathInMiddlePanel=W(e.pathInMiddlePanel),this.untrustedSpec=W(e.untrustedSpec),this.hideDownloadButton=W(e.hideDownloadButton),this.downloadFileName=e.downloadFileName,this.downloadDefinitionUrl=e.downloadDefinitionUrl,this.disableSearch=W(e.disableSearch),this.onlyRequiredInSamples=W(e.onlyRequiredInSamples),this.showExtensions=Q.normalizeShowExtensions(e.showExtensions),this.sideNavStyle=Q.normalizeSideNavStyle(e.sideNavStyle),this.hideSingleRequestSampleTab=W(e.hideSingleRequestSampleTab),this.menuToggle=W(e.menuToggle,!0),this.jsonSampleExpandLevel=Q.normalizeJsonSampleExpandLevel(e.jsonSampleExpandLevel),this.enumSkipQuotes=W(e.enumSkipQuotes),this.hideSchemaTitles=W(e.hideSchemaTitles),this.simpleOneOfTypeLabel=W(e.simpleOneOfTypeLabel),this.payloadSampleIdx=Q.normalizePayloadSampleIdx(e.payloadSampleIdx),this.expandSingleSchemaField=W(e.expandSingleSchemaField),this.schemaExpansionLevel=function(e,t=0){return"all"===e?1/0:V(e)||t}(e.schemaExpansionLevel),this.showObjectSchemaExamples=W(e.showObjectSchemaExamples),this.showSecuritySchemeType=W(e.showSecuritySchemeType),this.hideSecuritySection=W(e.hideSecuritySection),this.unstable_ignoreMimeParameters=W(e.unstable_ignoreMimeParameters),this.allowedMdComponents=e.allowedMdComponents||{},this.expandDefaultServerVariables=W(e.expandDefaultServerVariables),this.maxDisplayedEnumValues=V(e.maxDisplayedEnumValues);const p=I(e.ignoreNamedSchemas)?e.ignoreNamedSchemas:null==(a=e.ignoreNamedSchemas)?void 0:a.split(",").map((e=>e.trim()));this.ignoreNamedSchemas=new Set(p),this.hideSchemaPattern=W(e.hideSchemaPattern),this.generatedPayloadSamplesMaxDepth=Q.normalizeGeneratedPayloadSamplesMaxDepth(e.generatedPayloadSamplesMaxDepth),this.nonce=e.nonce,this.hideFab=W(e.hideFab),this.minCharacterLengthToInitSearch=V(e.minCharacterLengthToInitSearch)||3,this.showWebhookVerb=W(e.showWebhookVerb)}}var H=n(19521),Y=r.n(H);const{default:G,css:X,createGlobalStyle:K,keyframes:Z,ThemeProvider:J}=H,ee={lessThan:(e,t,n)=>(...r)=>X` + @media ${t?"print, ":""} screen and (max-width: ${t=>t.theme.breakpoints[e]}) ${n||""} { + ${X(...r)}; + } + `,greaterThan:e=>(...t)=>X` + @media (min-width: ${t=>t.theme.breakpoints[e]}) { + ${X(...t)}; + } + `,between:(e,t)=>(...n)=>X` + @media (min-width: ${t=>t.theme.breakpoints[e]}) and (max-width: ${e=>e.theme.breakpoints[t]}) { + ${X(...n)}; + } + `};var te=G;function ne(e){return t=>{if(t.theme.extensionsHook)return t.theme.extensionsHook(e,t)}}const re=te.div` + padding: 20px; + color: red; +`;class ie extends e.Component{constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e){return this.setState({error:e}),!1}render(){return this.state.error?e.createElement(re,null,e.createElement("h1",null,"Something went wrong..."),e.createElement("small",null," ",this.state.error.message," "),e.createElement("p",null,e.createElement("details",null,e.createElement("summary",null,"Stack trace"),e.createElement("pre",null,this.state.error.stack))),e.createElement("small",null," ReDoc Version: ","2.0.0")," ",e.createElement("br",null),e.createElement("small",null," Commit: ","5fb4daa")):e.createElement(e.Fragment,null,e.Children.only(this.props.children))}}const oe=Z` + 0% { + transform: rotate(0deg); } + 100% { + transform: rotate(360deg); + } +`,se=te((t=>e.createElement("svg",{className:t.className,version:"1.1",width:"512",height:"512",viewBox:"0 0 512 512"},e.createElement("path",{d:"M275.682 147.999c0 10.864-8.837 19.661-19.682 19.661v0c-10.875 0-19.681-8.796-19.681-19.661v-96.635c0-10.885 8.806-19.661 19.681-19.661v0c10.844 0 19.682 8.776 19.682 19.661v96.635z"}),e.createElement("path",{d:"M275.682 460.615c0 10.865-8.837 19.682-19.682 19.682v0c-10.875 0-19.681-8.817-19.681-19.682v-96.604c0-10.885 8.806-19.681 19.681-19.681v0c10.844 0 19.682 8.796 19.682 19.682v96.604z"}),e.createElement("path",{d:"M147.978 236.339c10.885 0 19.681 8.755 19.681 19.641v0c0 10.885-8.796 19.702-19.681 19.702h-96.624c-10.864 0-19.661-8.817-19.661-19.702v0c0-10.885 8.796-19.641 19.661-19.641h96.624z"}),e.createElement("path",{d:"M460.615 236.339c10.865 0 19.682 8.755 19.682 19.641v0c0 10.885-8.817 19.702-19.682 19.702h-96.584c-10.885 0-19.722-8.817-19.722-19.702v0c0-10.885 8.837-19.641 19.722-19.641h96.584z"}),e.createElement("path",{d:"M193.546 165.703c7.69 7.66 7.68 20.142 0 27.822v0c-7.701 7.701-20.162 7.701-27.853 0.020l-68.311-68.322c-7.68-7.701-7.68-20.142 0-27.863v0c7.68-7.68 20.121-7.68 27.822 0l68.342 68.342z"}),e.createElement("path",{d:"M414.597 386.775c7.7 7.68 7.7 20.163 0.021 27.863v0c-7.7 7.659-20.142 7.659-27.843-0.062l-68.311-68.26c-7.68-7.7-7.68-20.204 0-27.863v0c7.68-7.7 20.163-7.7 27.842 0l68.291 68.322z"}),e.createElement("path",{d:"M165.694 318.464c7.69-7.7 20.153-7.7 27.853 0v0c7.68 7.659 7.69 20.163 0 27.863l-68.342 68.322c-7.67 7.659-20.142 7.659-27.822-0.062v0c-7.68-7.68-7.68-20.122 0-27.801l68.311-68.322z"}),e.createElement("path",{d:"M386.775 97.362c7.7-7.68 20.142-7.68 27.822 0v0c7.7 7.68 7.7 20.183 0.021 27.863l-68.322 68.311c-7.68 7.68-20.163 7.68-27.843-0.020v0c-7.68-7.68-7.68-20.162 0-27.822l68.322-68.332z"}))))` + animation: 2s ${oe} linear infinite; + width: 50px; + height: 50px; + content: ''; + display: inline-block; + margin-left: -25px; + + path { + fill: ${e=>e.color}; + } +`,ae=te.div` + font-family: helvetica, sans; + width: 100%; + text-align: center; + font-size: 25px; + margin: 30px 0 20px 0; + color: ${e=>e.color}; +`;class le extends e.PureComponent{render(){return e.createElement("div",{style:{textAlign:"center"}},e.createElement(ae,{color:this.props.color},"Loading ..."),e.createElement(se,{color:this.props.color}))}}var ce=n(45697);const ue=e.createContext(new Q({})),pe=ue.Provider,de=ue.Consumer;var fe=n(68949),he=n(43675),me=n(63777),ge=r(925);function ye(e){return t=this,n=function*(){const t=new me.Config({}),n={config:t,base:a?window.location.href:process.cwd()};a&&(t.resolve.http.customFetch=r.g.fetch),"object"==typeof e&&null!==e?n.doc={source:{absoluteRef:""},parsed:e}:n.ref=e;const{bundle:{parsed:i}}=yield(0,he.bundle)(n);return void 0!==i.swagger?ve(i):i},new Promise(((e,r)=>{var i=e=>{try{s(n.next(e))}catch(e){r(e)}},o=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,o);s((n=n.apply(t,null)).next())}));var t,n}function ve(e){return console.warn("[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0"),new Promise(((t,n)=>(0,ge.convertObj)(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},((e,r)=>{if(e)return n(e);t(r&&r.openapi)}))))}var be=n(11851),xe=n(26729),we=n(83573);const ke=we.parse;class Oe{static baseName(e,t=1){const n=Oe.parse(e);return n[n.length-t]}static dirName(e,t=1){const n=Oe.parse(e);return we.compile(n.slice(0,n.length-t))}static relative(e,t){const n=Oe.parse(e);return Oe.parse(t).slice(n.length)}static parse(e){let t=e;return"#"===t.charAt(0)&&(t=t.substring(1)),ke(t)}static join(e,t){const n=Oe.parse(e).concat(t);return we.compile(n)}static get(e,t){return we.get(e,t)}static compile(e){return we.compile(e)}static escape(e){return we.escape(e)}}we.parse=Oe.parse,Object.assign(Oe,we);var Se=r(470),Ee=n(83578),_e=Object.defineProperty,Ae=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Te=(e,t,n)=>t in e?_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,je=(e,t)=>{for(var n in t||(t={}))Ce.call(t,n)&&Te(e,n,t[n]);if(Pe)for(var n of Pe(t))Ie.call(t,n)&&Te(e,n,t[n]);return e},Le=(e,t)=>Ae(e,Re(t));function Ne(e){return"string"==typeof e&&/\dxx/i.test(e)}function $e(e){return"default"===e||y(e)||Ne(e)}function Me(e,t=!1){if("default"===e)return t?"error":"success";let n="string"==typeof e?parseInt(e,10):e;if(Ne(e)&&(n*=100),n<100||n>599)throw new Error("invalid HTTP code");let r="success";return n>=300&&n<400?r="redirect":n>=400?r="error":n<200&&(r="info"),r}const De={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function Fe(e){return e in De}function ze(e){return e.summary||e.operationId||e.description&&e.description.substring(0,50)||e.pathName||""}const Be={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",properties:"object",patternProperties:"object"};function Ue(e){if(void 0!==e.type&&!I(e.type))return e.type;const t=Object.keys(Be);for(const n of t){const t=Be[n];if(void 0!==e[n])return t}return"any"}function qe(e,t=e.type){if(e["x-circular-ref"])return!0;if(void 0!==e.oneOf||void 0!==e.anyOf)return!1;if(e.if&&e.then||e.if&&e.else)return!1;let n=!0;const r=I(t);return("object"===t||r&&(null==t?void 0:t.includes("object")))&&(n=void 0!==e.properties?0===Object.keys(e.properties).length:void 0===e.additionalProperties&&void 0===e.unevaluatedProperties&&void 0===e.patternProperties),!I(e.items)&&!I(e.prefixItems)&&(void 0!==e.items&&!T(e.items)&&("array"===t||r&&(null==t?void 0:t.includes("array")))&&(n=qe(e.items,e.items.type)),n)}function We(e){return-1!==e.search(/json/i)}function Ve(e){return"application/x-www-form-urlencoded"===e}function Qe(e,t,n){return I(e)?e.map((e=>e.toString())).join(n):"object"==typeof e?Object.keys(e).map((t=>`${t}${n}${e[t]}`)).join(n):t+"="+e.toString()}function He(e,t){return I(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):"object"==typeof e?Object.keys(e).map((n=>`${t}[${n}]=${e[n]}`)).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function Ye(e,t,n){const r="__redoc_param_name__",i=t?"*":"";return Ee.parse(`{?${r}${i}}`).expand({[r]:n}).substring(1).replace(/__redoc_param_name__/g,e)}function Ge(e,t={}){if(I(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map((n=>{const r=e[n],{style:i="form",explode:o=!0}=t[n]||{};switch(i){case"form":return Ye(n,o,r);case"spaceDelimited":return Qe(r,n,"%20");case"pipeDelimited":return Qe(r,n,"|");case"deepObject":return He(r,n);default:return console.warn("Incorrect or unsupported encoding style: "+i),""}})).join("&")}function Xe(e,t){return We(t)?JSON.stringify(e):(console.warn(`Parameter serialization as ${t} is not supported`),"")}function Ke(e,t){const{name:n,style:r,explode:i=!1,serializationMime:o}=e;if(o)switch(e.in){case"path":case"header":return Xe(t,o);case"cookie":case"query":return`${n}=${Xe(t,o)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!r)return console.warn(`Missing style attribute or content for parameter ${n}`),"";switch(e.in){case"path":return function(e,t,n,r){const i=n?"*":"";let o="";"label"===t?o=".":"matrix"===t&&(o=";");const s="__redoc_param_name__";return Ee.parse(`{${o}${s}${i}}`).expand({[s]:r}).replace(/__redoc_param_name__/g,e)}(n,r,i,t);case"query":return function(e,t,n,r){switch(t){case"form":return Ye(e,n,r);case"spaceDelimited":return I(r)?n?Ye(e,n,r):`${e}=${r.join("%20")}`:(console.warn("The style spaceDelimited is only applicable to arrays"),"");case"pipeDelimited":return I(r)?n?Ye(e,n,r):`${e}=${r.join("|")}`:(console.warn("The style pipeDelimited is only applicable to arrays"),"");case"deepObject":return!n||I(r)||"object"!=typeof r?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):He(r,e);default:return console.warn("Unexpected style for query: "+t),""}}(n,r,i,t);case"header":return function(e,t,n){if("simple"===e){const e=t?"*":"",r="__redoc_param_name__",i=Ee.parse(`{${r}${e}}`);return decodeURIComponent(i.expand({[r]:n}))}return console.warn("Unexpected style for header: "+e),""}(r,i,t);case"cookie":return function(e,t,n,r){return"form"===t?Ye(e,n,r):(console.warn("Unexpected style for cookie: "+t),"")}(n,r,i,t);default:return console.warn("Unexpected parameter location: "+e.in),""}}function Ze(e,t){return e.in?decodeURIComponent(Ke(e,t)):t}function Je(e){return-1!==e.search(/xml/i)?"xml":-1!==e.search(/csv/i)?"csv":-1!==e.search(/plain/i)?"tex":"clike"}const et=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function tt(e){return et.test(e||"")}function nt(e){var t;const[n]=(null==(t=null==e?void 0:e.match(et))?void 0:t.reverse())||[];return n}function rt(e,t,n){let r;return void 0!==t&&void 0!==n?r=t===n?`= ${t} ${e}`:`[ ${t} .. ${n} ] ${e}`:void 0!==n?r=`<= ${n} ${e}`:void 0!==t&&(r=1===t?"non-empty":`>= ${t} ${e}`),r}function it(e){var t,n;const r="number"==typeof e.exclusiveMinimum?Math.min(e.exclusiveMinimum,null!=(t=e.minimum)?t:1/0):e.minimum,i="number"==typeof e.exclusiveMaximum?Math.max(e.exclusiveMaximum,null!=(n=e.maximum)?n:-1/0):e.maximum,o="number"==typeof e.exclusiveMinimum||e.exclusiveMinimum,s="number"==typeof e.exclusiveMaximum||e.exclusiveMaximum;return void 0!==r&&void 0!==i?`${o?"( ":"[ "}${r} .. ${i}${s?" )":" ]"}`:void 0!==i?`${s?"< ":"<= "}${i}`:void 0!==r?`${o?"> ":">= "}${r}`:void 0}function ot(e){const t=[],n=rt("characters",e.minLength,e.maxLength);void 0!==n&&t.push(n);const r=rt("items",e.minItems,e.maxItems);void 0!==r&&t.push(r);const i=rt("properties",e.minProperties,e.maxProperties);void 0!==i&&t.push(i);const o=function(e){if(void 0===e)return;const t=e.toString(10);return/^0\.0*1$/.test(t)?`decimal places <= ${t.split(".")[1].length}`:`multiple of ${t}`}(e.multipleOf);void 0!==o&&t.push(o);const s=it(e);return void 0!==s&&t.push(s),e.uniqueItems&&t.push("unique"),t}function st(e,t=[]){const n=[],r=[],i=[];return e.forEach((e=>{e.required?t.includes(e.name)?r.push(e):i.push(e):n.push(e)})),r.sort(((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))),[...r,...i,...n]}function at(e,t){return[...e].sort(((e,n)=>e[t].localeCompare(n[t])))}function lt(e,t=[],n=[]){const r={};return n.forEach((t=>{({resolved:t}=e.deref(t)),r[t.name+"_"+t.in]=!0})),(t=t.filter((t=>(({resolved:t}=e.deref(t)),!r[t.name+"_"+t.in])))).concat(n)}function ct(e){const t={};return Object.keys(e).forEach((n=>{const r=e[n],i=n.split(";")[0].trim();t[i]?t[i]=je(je({},t[i]),r):t[i]=r})),t}function ut(e,t={}){return e.replace(/(?:{)([\w-.]+)(?:})/g,((e,n)=>t[n]&&t[n].default||e))}function pt(e,t){const n=void 0===e?A((()=>{if(!a)return"";const e=window.location.href;return e.endsWith(".html")?(0,Se.dirname)(e):e})()):(0,Se.dirname)(e);return 0===t.length&&(t=[{url:"/"}]),t.map((e=>{return Le(je({},e),{url:(t=e.url,S(n,t)),description:e.description||""});var t}))}const dt="SecurityDefinitions",ft="security-definitions",ht="SchemaDefinition";let mt="section/Authentication/";function gt(e){mt=e}const yt=e=>({delete:"del",options:"opts"}[e]||e);function vt(e){return e in{"x-circular-ref":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-code-samples":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-ignoredHeaderParameters":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0}}function bt(e,t){return Object.keys(e).filter((e=>!0===t?e.startsWith("x-")&&!vt(e):e.startsWith("x-")&&t.indexOf(e)>-1)).reduce(((t,n)=>(t[n]=e[n],t)),{})}function xt(e){return e.split(" or ").map((e=>e.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2"))).join(" or ")}function wt(e){let t=e.content;const n=e["x-examples"],r=e["x-example"];if(n){t=je({},t);for(const e of Object.keys(n)){const r=n[e];t[e]=Le(je({},t[e]),{examples:r})}}else if(r){t=je({},t);for(const e of Object.keys(r)){const n=r[e];t[e]=Le(je({},t[e]),{example:n})}}return t}var kt=n(15660);function Ot(e){return{json:"js","c++":"cpp","c#":"csharp","objective-c":"objectivec",shell:"bash",viml:"vim"}[e]||"clike"}function St(e,t="clike"){t=t.toLowerCase();let n=kt.languages[t];return n||(n=kt.languages[Ot(t)]),kt.highlight(e.toString(),n,t)}function Et(e){return(t,n,r)=>{r.value=function(e,t){let n,r,i,o=null,s=0;const a=()=>{s=(new Date).getTime(),o=null,i=e.apply(n,r),o||(n=r=null)};return function(){const l=(new Date).getTime(),c=t-(l-s);return n=this,r=arguments,c<=0||c>t?(o&&(clearTimeout(o),o=null),s=l,i=e.apply(n,r),o||(n=r=null)):o||(o=setTimeout(a,c)),i}}(r.value,e)}}function _t(e){}function At(e){}n(57874),n(4279),n(35433),n(46213),n(2731),n(79016),n(27046),n(50057),n(52503),n(66841),n(96854),n(24335),n(11426),n(20288),n(99945),n(80366),n(82939),n(59385),n(12886),n(35266),n(90874),n(73358),n(97899),kt.languages.insertBefore("javascript","string",{"property string":{pattern:/([{,]\s*)"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,lookbehind:!0}},void 0),kt.languages.insertBefore("javascript","punctuation",{property:{pattern:/([{,]\s*)[a-z]\w*(?=\s*:)/i,lookbehind:!0}},void 0);var Rt=Object.defineProperty,Pt=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Lt=(e,t,n)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t)=>{for(var n in t||(t={}))Tt.call(t,n)&&Lt(e,n,t[n]);if(It)for(var n of It(t))jt.call(t,n)&&Lt(e,n,t[n]);return e},$t=(e,t)=>Pt(e,Ct(t));const Mt={};function Dt(e,t,n){if("function"==typeof n.value)return function(e,t,n){if(!n.value||n.value.length>0)throw new Error("@memoize decorator can only be applied to methods of zero arguments");const r=`_memoized_${t}`,i=n.value;return e[r]=Mt,$t(Nt({},n),{value(){return this[r]===Mt&&(this[r]=i.call(this)),this[r]}})}(e,t,n);if("function"==typeof n.get)return function(e,t,n){const r=`_memoized_${t}`,i=n.get;return e[r]=Mt,$t(Nt({},n),{get(){return this[r]===Mt&&(this[r]=i.call(this)),this[r]}})}(e,t,n);throw new Error("@memoize decorator can be applied to methods or getters, got "+String(n.value)+" instead")}function Ft(e){let t=1;return"-"===e[0]&&(t=-1,e=e.substr(1)),(n,r)=>-1==t?r[e].localeCompare(n[e]):n[e].localeCompare(r[e])}var zt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor;const Ut="hashchange";class qt{constructor(){this.emit=()=>{this._emiter.emit(Ut,this.currentId)},this._emiter=new xe.EventEmitter,this.bind()}get currentId(){return a?decodeURIComponent(window.location.hash.substring(1)):""}linkForId(e){return e?"#"+e:""}subscribe(e){const t=this._emiter.addListener(Ut,e);return()=>t.removeListener(Ut,e)}bind(){a&&window.addEventListener("hashchange",this.emit,!1)}dispose(){a&&window.removeEventListener("hashchange",this.emit)}replace(e,t=!1){a&&null!=e&&e!==this.currentId&&(t?window.history.replaceState(null,"",window.location.href.split("#")[0]+this.linkForId(e)):(window.history.pushState(null,"",window.location.href.split("#")[0]+this.linkForId(e)),this.emit()))}}((e,t,n,r)=>{for(var i,o=Bt(t,n),s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(t,n,o)||o);o&&zt(t,n,o)})([be.bind,be.debounce],qt.prototype,"replace");const Wt=new qt;var Vt=n(813);class Qt{constructor(){this.map=new Map,this.prevTerm=""}add(e){this.map.set(e,new Vt(e))}delete(e){this.map.delete(e)}addOnly(e){this.map.forEach(((t,n)=>{-1===e.indexOf(n)&&(t.unmark(),this.map.delete(n))}));for(const t of e)this.map.has(t)||this.map.set(t,new Vt(t))}clearAll(){this.unmark(),this.map.clear()}mark(e){(e||this.prevTerm)&&(this.map.forEach((t=>{t.unmark(),t.mark(e||this.prevTerm)})),this.prevTerm=e||this.prevTerm)}unmark(){this.map.forEach((e=>e.unmark())),this.prevTerm=""}}let Ht={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Yt=/[&<>"']/,Gt=/[&<>"']/g,Xt=/[<>"']|&(?!#?\w+;)/,Kt=/[<>"']|&(?!#?\w+;)/g,Zt={"&":"&","<":"<",">":">",'"':""","'":"'"},Jt=e=>Zt[e];function en(e,t){if(t){if(Yt.test(e))return e.replace(Gt,Jt)}else if(Xt.test(e))return e.replace(Kt,Jt);return e}const tn=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function nn(e){return e.replace(tn,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const rn=/(^|[^\[])\^/g;function on(e,t){e="string"==typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(rn,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const sn=/[^\w:]/g,an=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ln(e,t,n){if(e){let t;try{t=decodeURIComponent(nn(n)).replace(sn,"").toLowerCase()}catch(e){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}t&&!an.test(n)&&(n=function(e,t){cn[" "+e]||(un.test(e)?cn[" "+e]=e+"/":cn[" "+e]=gn(e,"/",!0));const n=-1===(e=cn[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(pn,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(dn,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const cn={},un=/^[^:]+:\/*[^/]*$/,pn=/^([^:]+:)[\s\S]*$/,dn=/^([^:]+:\/*[^/]*)[\s\S]*$/,fn={exec:function(){}};function hn(e){let t,n,r=1;for(;r{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function bn(e,t,n,r){const i=t.href,o=t.title?en(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:o,text:en(s)}}class xn{constructor(e){this.options=e||Ht}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:gn(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=gn(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,i,o,s,a,l,c,u,p,d,f,h=t[1].trim();const m=h.length>1,g={type:"list",raw:"",ordered:m,start:m?+h.slice(0,-1):"",loose:!1,items:[]};h=m?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=m?h:"[*+-]");const y=new RegExp(`^( {0,3}${h})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=t[2].search(/[^ ]/),o=o>4?1:o,d=c.slice(o),o+=t[1].length),a=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),f=!0),!f){const t=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);for(;e&&(p=e.split("\n",1)[0],c=p,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!t.test(c))&&!r.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(a)break;d+="\n"+c}a||c.trim()||(a=!0),n+=p+"\n",e=e.substring(p.length+1)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const v=g.items.length;for(s=0;s"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const r of t)if("\n"===r&&(n+=1),n>1)return!0;return!1}));!g.loose&&e.length&&t&&(g.loose=!0,g.items[s].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):en(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:mn(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,i,o,s=e.align.length;for(n=0;n({text:e})));for(s=e.header.length,r=0;r/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):en(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=gn(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),bn(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return bn(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=i.length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;if(o=Math.min(o,o+s+a),Math.min(n,o)%2){const t=e.slice(1,n+r.index+o);return{type:"em",raw:e.slice(0,n+r.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+o-1);return{type:"strong",raw:e.slice(0,n+r.index+o+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=en(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=en(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=en(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=en(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=en(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):en(n[0]):n[0]:en(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const wn={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:fn,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};wn.def=on(wn.def).replace("label",wn._label).replace("title",wn._title).getRegex(),wn.bullet=/(?:[*+-]|\d{1,9}[.)])/,wn.listItemStart=on(/^( *)(bull) */).replace("bull",wn.bullet).getRegex(),wn.list=on(wn.list).replace(/bull/g,wn.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+wn.def.source+")").getRegex(),wn._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wn._comment=/|$)/,wn.html=on(wn.html,"i").replace("comment",wn._comment).replace("tag",wn._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wn.paragraph=on(wn._paragraph).replace("hr",wn.hr).replace("heading"," {0,3}#{1,6} ").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",")|<(?:script|pre|style|textarea|!--)").replace("tag",wn._tag).getRegex(),wn.blockquote=on(wn.blockquote).replace("paragraph",wn.paragraph).getRegex(),wn.normal=hn({},wn),wn.gfm=hn({},wn.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),wn.gfm.table=on(wn.gfm.table).replace("hr",wn.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wn._tag).getRegex(),wn.gfm.paragraph=on(wn._paragraph).replace("hr",wn.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",wn.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wn._tag).getRegex(),wn.pedantic=hn({},wn.normal,{html:on("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",wn._comment).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fn,paragraph:on(wn.normal._paragraph).replace("hr",wn.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",wn.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const kn={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fn,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:fn,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}kn._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",kn.punctuation=on(kn.punctuation).replace(/punctuation/g,kn._punctuation).getRegex(),kn.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,kn.escapedEmSt=/\\\*|\\_/g,kn._comment=on(wn._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),kn.emStrong.lDelim=on(kn.emStrong.lDelim).replace(/punct/g,kn._punctuation).getRegex(),kn.emStrong.rDelimAst=on(kn.emStrong.rDelimAst,"g").replace(/punct/g,kn._punctuation).getRegex(),kn.emStrong.rDelimUnd=on(kn.emStrong.rDelimUnd,"g").replace(/punct/g,kn._punctuation).getRegex(),kn._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,kn._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,kn._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])?)+(?![-_])/,kn.autolink=on(kn.autolink).replace("scheme",kn._scheme).replace("email",kn._email).getRegex(),kn._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,kn.tag=on(kn.tag).replace("comment",kn._comment).replace("attribute",kn._attribute).getRegex(),kn._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,kn._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,kn._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,kn.link=on(kn.link).replace("label",kn._label).replace("href",kn._href).replace("title",kn._title).getRegex(),kn.reflink=on(kn.reflink).replace("label",kn._label).replace("ref",wn._label).getRegex(),kn.nolink=on(kn.nolink).replace("ref",wn._label).getRegex(),kn.reflinkSearch=on(kn.reflinkSearch,"g").replace("reflink",kn.reflink).replace("nolink",kn.nolink).getRegex(),kn.normal=hn({},kn),kn.pedantic=hn({},kn.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:on(/^!?\[(label)\]\((.*?)\)/).replace("label",kn._label).getRegex(),reflink:on(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kn._label).getRegex()}),kn.gfm=hn({},kn.normal,{escape:on(kn.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,i,o,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+vn("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+vn("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,Sn))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,Sn))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,On))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),s=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class _n{constructor(e){this.options=e||Ht}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:en(e,!0))+"
\n":"
"+(n?e:en(e,!0))+"
\n"}blockquote(e){return`
\n${e}
\n`}html(e){return e}heading(e,t,n,r){return this.options.headerIds?`${e}\n`:`${e}\n`}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return`
  • ${e}
  • \n`}checkbox(e){return" "}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,n){if(null===(e=ln(this.options.sanitize,this.options.baseUrl,e)))return n;let r='",r}image(e,t,n){if(null===(e=ln(this.options.sanitize,this.options.baseUrl,e)))return n;let r=`${n}":">",r}text(e){return e}}class An{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Rn{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class Pn{constructor(e){this.options=e||Ht,this.options.renderer=this.options.renderer||new _n,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new An,this.slugger=new Rn}static parse(e,t){return new Pn(t).parse(e)}static parseInline(e,t){return new Pn(t).parseInline(e)}parse(e,t=!0){let n,r,i,o,s,a,l,c,u,p,d,f,h,m,g,y,v,b,x,w="";const k=e.length;for(n=0;n0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,v,y);w+=this.renderer.list(u,d,f);continue;case"html":w+=this.renderer.html(p.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;n+1{r(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),s--,0===s&&o()}))}),0))})),void(0===s&&o())}try{const n=En.lex(e,t);return t.walkTokens&&Cn.walkTokens(n,t.walkTokens),Pn.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+en(e.message+"",!0)+"
    ";throw e}}Cn.options=Cn.setOptions=function(e){var t;return hn(Cn.defaults,e),t=Cn.defaults,Ht=t,Cn},Cn.getDefaults=function(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},Cn.defaults=Ht,Cn.use=function(...e){const t=hn({},...e),n=Cn.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach((e=>{if(e.extensions&&(r=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)}))),e.renderer){const n=Cn.defaults.renderer||new _n;for(const t in e.renderer){const r=n[t];n[t]=(...i)=>{let o=e.renderer[t].apply(n,i);return!1===o&&(o=r.apply(n,i)),o}}t.renderer=n}if(e.tokenizer){const n=Cn.defaults.tokenizer||new xn;for(const t in e.tokenizer){const r=n[t];n[t]=(...i)=>{let o=e.tokenizer[t].apply(n,i);return!1===o&&(o=r.apply(n,i)),o}}t.tokenizer=n}if(e.walkTokens){const n=Cn.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),n&&n.call(this,t)}}r&&(t.extensions=n),Cn.setOptions(t)}))},Cn.walkTokens=function(e,t){for(const n of e)switch(t.call(Cn,n),n.type){case"table":for(const e of n.header)Cn.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)Cn.walkTokens(n.tokens,t);break;case"list":Cn.walkTokens(n.items,t);break;default:Cn.defaults.extensions&&Cn.defaults.extensions.childTokens&&Cn.defaults.extensions.childTokens[n.type]?Cn.defaults.extensions.childTokens[n.type].forEach((function(e){Cn.walkTokens(n[e],t)})):n.tokens&&Cn.walkTokens(n.tokens,t)}},Cn.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");yn(t=hn({},Cn.defaults,t||{}));try{const n=En.lexInline(e,t);return t.walkTokens&&Cn.walkTokens(n,t.walkTokens),Pn.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+en(e.message+"",!0)+"
    ";throw e}},Cn.Parser=Pn,Cn.parser=Pn.parse,Cn.Renderer=_n,Cn.TextRenderer=An,Cn.Lexer=En,Cn.lexer=En.lex,Cn.Tokenizer=xn,Cn.Slugger=Rn,Cn.parse=Cn,Cn.options,Cn.setOptions,Cn.use,Cn.walkTokens,Cn.parseInline,Pn.parse,En.lex;var In=Object.defineProperty,Tn=Object.defineProperties,jn=Object.getOwnPropertyDescriptors,Ln=Object.getOwnPropertySymbols,Nn=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,Mn=(e,t,n)=>t in e?In(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dn=(e,t)=>{for(var n in t||(t={}))Nn.call(t,n)&&Mn(e,n,t[n]);if(Ln)for(var n of Ln(t))$n.call(t,n)&&Mn(e,n,t[n]);return e};const Fn=new Cn.Renderer;Cn.setOptions({renderer:Fn,highlight:(e,t)=>St(e,t)});const zn="^ {0,3}\x3c!-- ReDoc-Inject:\\s+?<({component}).*?/?>\\s+?--\x3e\\s*$",Bn="(?:^ {0,3}<({component})([\\s\\S]*?)>([\\s\\S]*?)|^ {0,3}<({component})([\\s\\S]*?)(?:/>|\\n{2,}))",Un="(?:"+zn+"|"+Bn+")";function qn(e){return`\x3c!-- ReDoc-Inject: <${e}> --\x3e`}class Wn{constructor(e,t){this.options=e,this.parentId=t,this.headings=[],this.headingRule=(e,t,n,r)=>(1===t?this.currentTopHeading=this.saveHeading(e,t):2===t&&this.saveHeading(e,t,this.currentTopHeading&&this.currentTopHeading.items,this.currentTopHeading&&this.currentTopHeading.id),this.originalHeadingRule(e,t,n,r)),this.parentId=t,this.parser=new Cn.Parser,this.headingEnhanceRenderer=new Cn.Renderer,this.originalHeadingRule=this.headingEnhanceRenderer.heading.bind(this.headingEnhanceRenderer),this.headingEnhanceRenderer.heading=this.headingRule}static containsComponent(e,t){return new RegExp(Un.replace(/{component}/g,t),"gmi").test(e)}static getTextBeforeHading(e,t){const n=e.search(new RegExp(`^##?\\s+${t}`,"m"));return n>-1?e.substring(0,n):e}saveHeading(e,t,n=this.headings,r){e=C(e);const i={id:r?`${r}/${k(e)}`:`${this.parentId||"section"}/${k(e)}`,name:e,level:t,items:[]};return n.push(i),i}flattenHeadings(e){if(void 0===e)return[];const t=[];for(const n of e)t.push(n),t.push(...this.flattenHeadings(n.items));return t}attachHeadingsDescriptions(e){const t=e=>new RegExp(`##?\\s+${e.name.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}s*(\n|\r\n|$|s*)`),n=this.flattenHeadings(this.headings);if(n.length<1)return;let r=n[0],i=t(r),o=e.search(i);for(let s=1;s-1&&(this.description=this.description.substring(0,n)),this.downloadLink=this.getDownloadLink(),this.downloadFileName=this.getDownloadFileName()}getDownloadLink(){if(this.options.downloadDefinitionUrl)return this.options.downloadDefinitionUrl;if(this.parser.specUrl)return this.parser.specUrl;if(a&&window.Blob&&window.URL&&window.URL.createObjectURL){const e=new Blob([JSON.stringify(this.parser.spec,null,2)],{type:"application/json"});return window.URL.createObjectURL(e)}}getDownloadFileName(){return this.parser.specUrl||this.options.downloadDefinitionUrl?this.options.downloadFileName:this.options.downloadFileName||"openapi.json"}}var Hn=Object.defineProperty,Yn=Object.defineProperties,Gn=Object.getOwnPropertyDescriptors,Xn=Object.getOwnPropertySymbols,Kn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,Jn=(e,t,n)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class er{constructor(e,t){const n=t.spec.components&&t.spec.components.securitySchemes||{};this.schemes=Object.keys(e||{}).map((r=>{const{resolved:i}=t.deref(n[r]),o=e[r]||[];if(!i)return void console.warn(`Non existing security scheme referenced: ${r}. Skipping`);const s=i["x-displayName"]||r;return a=((e,t)=>{for(var n in t||(t={}))Kn.call(t,n)&&Jn(e,n,t[n]);if(Xn)for(var n of Xn(t))Zn.call(t,n)&&Jn(e,n,t[n]);return e})({},i),Yn(a,Gn({id:r,sectionId:r,displayName:s,scopes:o}));var a})).filter((e=>void 0!==e))}}var tr=Object.defineProperty,nr=Object.defineProperties,rr=Object.getOwnPropertyDescriptor,ir=Object.getOwnPropertyDescriptors,or=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,ar=Object.prototype.propertyIsEnumerable,lr=(e,t,n)=>t in e?tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cr=(e,t)=>{for(var n in t||(t={}))sr.call(t,n)&&lr(e,n,t[n]);if(or)for(var n of or(t))ar.call(t,n)&&lr(e,n,t[n]);return e},ur=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?rr(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&tr(t,n,o),o};class pr{constructor(e,t,n,r,i){this.expanded=!1,this.operations=[],(0,fe.makeObservable)(this),this.name=t;const{resolved:o}=e.deref(n);for(const l of Object.keys(o)){const n=o[l],c=Object.keys(n).filter(Fe);for(const o of c){const c=n[o],u=new mi(e,(s=cr({},c),a={pathName:l,pointer:Oe.compile([r,t,l,o]),httpVerb:o,pathParameters:n.parameters||[],pathServers:n.servers},nr(s,ir(a))),void 0,i,!0);this.operations.push(u)}}var s,a}toggle(){this.expanded=!this.expanded}}ur([fe.observable],pr.prototype,"expanded",2),ur([fe.action],pr.prototype,"toggle",1);var dr=Object.defineProperty,fr=Object.defineProperties,hr=Object.getOwnPropertyDescriptors,mr=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,vr=(e,t,n)=>t in e?dr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,br=(e,t)=>{for(var n in t||(t={}))gr.call(t,n)&&vr(e,n,t[n]);if(mr)for(var n of mr(t))yr.call(t,n)&&vr(e,n,t[n]);return e},xr=(e,t)=>fr(e,hr(t)),wr=(e,t)=>{var n={};for(var r in e)gr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&mr)for(var r of mr(e))t.indexOf(r)<0&&yr.call(e,r)&&(n[r]=e[r]);return n};function kr(e,t){return t&&e[e.length-1]!==t?[...e,t]:e}function Or(e,t){return t?e.concat(t):e}class Sr{constructor(e,t,n=new Q({})){this.options=n,this.allowMergeRefs=!1,this.byRef=e=>{let t;if(this.spec){"#"!==e.charAt(0)&&(e="#"+e),e=decodeURIComponent(e);try{t=Oe.get(this.spec,e)}catch(e){}return t||{}}},this.validate(e),this.spec=e,this.allowMergeRefs=e.openapi.startsWith("3.1");const r=a?window.location.href:"";"string"==typeof t&&(this.specUrl=r?new URL(t,r).href:t)}validate(e){if(void 0===e.openapi)throw new Error("Document must be valid OpenAPI 3.0.0 definition")}isRef(e){return!!e&&void 0!==e.$ref&&null!==e.$ref}deref(e,t=[],n=!1){const r=null==e?void 0:e["x-refsStack"];if(t=Or(t,r),this.isRef(e)){const r=nt(e.$ref);if(r&&this.options.ignoreNamedSchemas.has(r))return{resolved:{type:"object",title:r},refsStack:t};let i=this.byRef(e.$ref);if(!i)throw new Error(`Failed to resolve $ref "${e.$ref}"`);let o=t;if(t.includes(e.$ref)||t.length>999)i=Object.assign({},i,{"x-circular-ref":!0});else if(this.isRef(i)){const e=this.deref(i,t,n);o=e.refsStack,i=e.resolved}return o=kr(t,e.$ref),i=this.allowMergeRefs?this.mergeRefs(e,i,n):i,{resolved:i,refsStack:o}}return{resolved:e,refsStack:Or(t,r)}}mergeRefs(e,t,n){const r=e,{$ref:i}=r,o=wr(r,["$ref"]),s=Object.keys(o);if(0===s.length)return t;if(n&&s.some((e=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly"].includes(e)))){const e=o,{description:n,title:r,readOnly:i,writeOnly:s}=e;return{allOf:[{description:n,title:r,readOnly:i,writeOnly:s},t,wr(e,["description","title","readOnly","writeOnly"])]}}return br(br({},t),o)}mergeAllOf(e,t,n){var r;if(e["x-circular-ref"])return e;if(void 0===(e=this.hoistOneOfs(e,n)).allOf)return e;let i=xr(br({},e),{"x-parentRefs":[],allOf:void 0,title:e.title||nt(t)});void 0!==i.properties&&"object"==typeof i.properties&&(i.properties=br({},i.properties)),void 0!==i.items&&"object"==typeof i.items&&(i.items=br({},i.items));const o=function(e,t){const n=new Set;return e.filter((e=>{const t=e.$ref;return!t||t&&!n.has(t)&&n.add(t)}))}(e.allOf.map((e=>{var t;const{resolved:r,refsStack:o}=this.deref(e,n,!0),s=e.$ref||void 0,a=this.mergeAllOf(r,s,o);if(!a["x-circular-ref"]||!a.allOf)return s&&(null==(t=i["x-parentRefs"])||t.push(...a["x-parentRefs"]||[],s)),{$ref:s,refsStack:kr(o,s),schema:a}})).filter((e=>void 0!==e)));for(const{schema:s,refsStack:a}of o){const e=s,{type:n,enum:o,properties:l,items:c,required:u,title:p,description:d,readOnly:f,writeOnly:h,oneOf:m,anyOf:g,"x-circular-ref":y}=e,v=wr(e,["type","enum","properties","items","required","title","description","readOnly","writeOnly","oneOf","anyOf","x-circular-ref"]);if(i.type!==n&&void 0!==i.type&&void 0!==n&&console.warn(`Incompatible types in allOf at "${t}": "${i.type}" and "${n}"`),void 0!==n&&(Array.isArray(n)&&Array.isArray(i.type)?i.type=[...n,...i.type]:i.type=n),void 0!==o&&(Array.isArray(o)&&Array.isArray(i.enum)?i.enum=Array.from(new Set([...o,...i.enum])):i.enum=o),void 0!==l&&"object"==typeof l){i.properties=i.properties||{};for(const e in l){const n=Or(a,null==(r=l[e])?void 0:r["x-refsStack"]);if(i.properties[e]){if(!y){const r=this.mergeAllOf({allOf:[i.properties[e],xr(br({},l[e]),{"x-refsStack":n})],"x-refsStack":n},t+"/properties/"+e,n);i.properties[e]=r}}else i.properties[e]=xr(br({},l[e]),{"x-refsStack":n})}}if(void 0!==c&&!y){const e="boolean"==typeof i.items?{}:Object.assign({},i.items),n="boolean"==typeof s.items?{}:Object.assign({},s.items);i.items=this.mergeAllOf({allOf:[e,n]},t+"/items",a)}void 0!==m&&(i.oneOf=m),void 0!==g&&(i.anyOf=g),void 0!==u&&(i.required=[...i.required||[],...u]),i=br(xr(br({},i),{title:i.title||p,description:i.description||d,readOnly:void 0!==i.readOnly?i.readOnly:f,writeOnly:void 0!==i.writeOnly?i.writeOnly:h,"x-circular-ref":i["x-circular-ref"]||y}),v)}return i}findDerived(e){const t={},n=this.spec.components&&this.spec.components.schemas||{};for(const r in n){const{resolved:i}=this.deref(n[r]);void 0!==i.allOf&&i.allOf.find((t=>void 0!==t.$ref&&e.indexOf(t.$ref)>-1))&&(t["#/components/schemas/"+r]=[i["x-discriminator-value"]||r])}return t}hoistOneOfs(e,t){if(void 0===e.allOf)return e;const n=e.allOf;for(let r=0;r({allOf:[...i,e,...o],"x-refsStack":t})))}}}return e}}var Er=Object.defineProperty,_r=Object.defineProperties,Ar=Object.getOwnPropertyDescriptor,Rr=Object.getOwnPropertyDescriptors,Pr=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,Tr=(e,t,n)=>t in e?Er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jr=(e,t)=>{for(var n in t||(t={}))Cr.call(t,n)&&Tr(e,n,t[n]);if(Pr)for(var n of Pr(t))Ir.call(t,n)&&Tr(e,n,t[n]);return e},Lr=(e,t)=>_r(e,Rr(t)),Nr=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?Ar(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&Er(t,n,o),o};const $r=class{constructor(e,t,n,r,i=!1,o=[]){this.options=r,this.refsStack=o,this.typePrefix="",this.isCircular=!1,this.activeOneOf=0,(0,fe.makeObservable)(this),this.pointer=t.$ref||n||"";const{resolved:s,refsStack:a}=e.deref(t,o,!0);this.refsStack=kr(a,this.pointer),this.rawSchema=s,this.schema=e.mergeAllOf(this.rawSchema,this.pointer,this.refsStack),this.init(e,i),r.showExtensions&&(this.extensions=bt(this.schema,r.showExtensions))}activateOneOf(e){this.activeOneOf=e}hasType(e){return this.type===e||I(this.type)&&this.type.includes(e)}init(e,t){var n,r,i,o,s,a,l,c;const u=this.schema;if(this.isCircular=!!u["x-circular-ref"],this.title=u.title||tt(this.pointer)&&Oe.baseName(this.pointer)||"",this.description=u.description||"",this.type=u.type||Ue(u),this.format=u.format,this.enum=u.enum||[],this.example=u.example,this.examples=u.examples,this.deprecated=!!u.deprecated,this.pattern=u.pattern,this.externalDocs=u.externalDocs,this.constraints=ot(u),this.displayFormat=this.format,this.isPrimitive=qe(u,this.type),this.default=u.default,this.readOnly=!!u.readOnly,this.writeOnly=!!u.writeOnly,this.const=u.const||"",this.contentEncoding=u.contentEncoding,this.contentMediaType=u.contentMediaType,this.minItems=u.minItems,this.maxItems=u.maxItems,(u.nullable||u["x-nullable"])&&(I(this.type)&&!this.type.some((e=>null===e||"null"===e))?this.type=[...this.type,"null"]:I(this.type)||null===this.type&&"null"===this.type||(this.type=[this.type,"null"])),this.displayType=I(this.type)?this.type.map((e=>null===e?"null":e)).join(" or "):this.type,!this.isCircular)if(u.if&&u.then||u.if&&u.else)this.initConditionalOperators(u,e);else if(t||void 0===Fr(u)){if(t&&I(u.oneOf)&&u.oneOf.find((e=>e.$ref===this.pointer))&&delete u.oneOf,void 0!==u.oneOf)return this.initOneOf(u.oneOf,e),this.oneOfType="One of",void(void 0!==u.anyOf&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${this.pointer}`));if(void 0!==u.anyOf)return this.initOneOf(u.anyOf,e),void(this.oneOfType="Any of");if(this.hasType("object"))this.fields=Dr(e,u,this.pointer,this.options,this.refsStack);else if(this.hasType("array")&&(I(u.items)||I(u.prefixItems)?this.fields=Dr(e,u,this.pointer,this.options,this.refsStack):u.items&&(this.items=new $r(e,u.items,this.pointer+"/items",this.options,!1,this.refsStack)),this.displayType=u.prefixItems||I(u.items)?"items":xt((null==(n=this.items)?void 0:n.displayType)||this.displayType),this.displayFormat=(null==(r=this.items)?void 0:r.format)||"",this.typePrefix=(null==(i=this.items)?void 0:i.typePrefix)||""+L("arrayOf"),this.title=this.title||(null==(o=this.items)?void 0:o.title)||"",this.isPrimitive=void 0!==(null==(s=this.items)?void 0:s.isPrimitive)?null==(a=this.items)?void 0:a.isPrimitive:this.isPrimitive,void 0===this.example&&void 0!==(null==(l=this.items)?void 0:l.example)&&(this.example=[this.items.example]),(null==(c=this.items)?void 0:c.isPrimitive)&&(this.enum=this.items.enum),I(this.type))){const e=this.type.filter((e=>"array"!==e));e.length&&(this.displayType+=` or ${e.join(" or ")}`)}this.enum.length&&this.options.sortEnumValuesAlphabetically&&this.enum.sort()}else this.initDiscriminator(u,e)}initOneOf(e,t){if(this.oneOf=e.map(((e,n)=>{const{resolved:r,refsStack:i}=t.deref(e,this.refsStack,!0),o=t.mergeAllOf(r,this.pointer+"/oneOf/"+n,i),s=tt(e.$ref)&&!o.title?Oe.baseName(e.$ref):`${o.title||""}${o.const&&JSON.stringify(o.const)||""}`;return new $r(t,Lr(jr({},o),{title:s,allOf:[Lr(jr({},this.schema),{oneOf:void 0,anyOf:void 0})],discriminator:r.allOf?void 0:o.discriminator}),e.$ref||this.pointer+"/oneOf/"+n,this.options,!1,i)})),this.options.simpleOneOfTypeLabel){const e=function(e){const t=new Set;return function e(n){for(const r of n.oneOf||[])r.oneOf?e(r):r.type&&t.add(r.type)}(e),Array.from(t.values())}(this);this.displayType=e.join(" or ")}else this.displayType=this.oneOf.map((e=>{let t=e.typePrefix+(e.title?`${e.title} (${e.displayType})`:e.displayType);return t.indexOf(" or ")>-1&&(t=`(${t})`),t})).join(" or ")}initDiscriminator(e,t){const n=Fr(e);this.discriminatorProp=n.propertyName;const r=t.findDerived([...this.schema["x-parentRefs"]||[],this.pointer]);if(e.oneOf)for(const u of e.oneOf){if(void 0===u.$ref)continue;const e=Oe.baseName(u.$ref);r[u.$ref]=e}const i=n.mapping||{};let o=n["x-explicitMappingOnly"]||!1;0===Object.keys(i).length&&(o=!1);const s={};for(const u in i){const e=i[u];I(s[e])?s[e].push(u):s[e]=[u]}const a=jr(o?{}:jr({},r),s);let l=[];for(const u of Object.keys(a)){const e=a[u];if(I(e))for(const t of e)l.push({$ref:u,name:t});else l.push({$ref:u,name:e})}const c=Object.keys(i);0!==c.length&&(l=l.sort(((e,t)=>{const n=c.indexOf(e.name),r=c.indexOf(t.name);return n<0&&r<0?e.name.localeCompare(t.name):n<0?1:r<0?-1:n-r}))),this.oneOf=l.map((({$ref:e,name:n})=>{const r=new $r(t,{$ref:e},e,this.options,!0,this.refsStack.slice(0,-1));return r.title=n,r}))}initConditionalOperators(e,t){const n=e,{if:r,else:i={},then:o={}}=n,s=((e,t)=>{var n={};for(var r in e)Cr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Pr)for(var r of Pr(e))t.indexOf(r)<0&&Ir.call(e,r)&&(n[r]=e[r]);return n})(n,["if","else","then"]),a=[{allOf:[s,o,r],title:r&&r["x-displayName"]||(null==r?void 0:r.title)||"case 1"},{allOf:[s,i],title:i&&i["x-displayName"]||(null==i?void 0:i.title)||"case 2"}];this.oneOf=a.map(((e,n)=>new $r(t,jr({},e),this.pointer+"/oneOf/"+n,this.options,!1,this.refsStack))),this.oneOfType="One of"}};let Mr=$r;function Dr(e,t,n,r,i){const o=t.properties||t.prefixItems||t.items||{},s=t.patternProperties||{},a=t.additionalProperties||t.unevaluatedProperties,l=t.prefixItems?t.items:t.additionalItems,c=t.default;let u=Object.keys(o||[]).map((s=>{let a=o[s];a||(console.warn(`Field "${s}" is invalid, skipping.\n Field must be an object but got ${typeof a} at "${n}"`),a={});const l=void 0!==t.required&&t.required.indexOf(s)>-1;return new Qr(e,{name:t.properties?s:`[${s}]`,required:l,schema:Lr(jr({},a),{default:void 0===a.default&&c?c[s]:a.default})},n+"/properties/"+s,r,i)}));return r.sortPropsAlphabetically&&(u=at(u,"name")),r.requiredPropsFirst&&(u=st(u,r.sortPropsAlphabetically?void 0:t.required)),u.push(...Object.keys(s).map((t=>{let o=s[t];return o||(console.warn(`Field "${t}" is invalid, skipping.\n Field must be an object but got ${typeof o} at "${n}"`),o={}),new Qr(e,{name:t,required:!1,schema:o,kind:"patternProperties"},`${n}/patternProperties/${t}`,r,i)}))),"object"!=typeof a&&!0!==a||u.push(new Qr(e,{name:("object"==typeof a&&a["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:!0===a?{}:a,kind:"additionalProperties"},n+"/additionalProperties",r,i)),u.push(...function({parser:e,schema:t=!1,fieldsCount:n,$ref:r,options:i,refsStack:o}){return T(t)?t?[new Qr(e,{name:`[${n}...]`,schema:{}},`${r}/additionalItems`,i,o)]:[]:I(t)?[...t.map(((t,s)=>new Qr(e,{name:`[${n+s}]`,schema:t},`${r}/additionalItems`,i,o)))]:x(t)?[new Qr(e,{name:`[${n}...]`,schema:t},`${r}/additionalItems`,i,o)]:[]}({parser:e,schema:l,fieldsCount:u.length,$ref:n,options:r,refsStack:i})),u}function Fr(e){return e.discriminator||e["x-discriminator"]}Nr([fe.observable],Mr.prototype,"activeOneOf",2),Nr([fe.action],Mr.prototype,"activateOneOf",1);const zr={};class Br{constructor(e,t,n,r){this.mime=n;const{resolved:i}=e.deref(t);this.value=i.value,this.summary=i.summary,this.description=i.description,i.externalValue&&(this.externalValueUrl=new URL(i.externalValue,e.specUrl).href),Ve(n)&&this.value&&"object"==typeof this.value&&(this.value=Ge(this.value,r))}getExternalValue(e){return this.externalValueUrl?(this.externalValueUrl in zr||(zr[this.externalValueUrl]=fetch(this.externalValueUrl).then((t=>t.text().then((n=>{if(!t.ok)return Promise.reject(new Error(n));if(!We(e))return n;try{return JSON.parse(n)}catch(e){return n}}))))),zr[this.externalValueUrl]):Promise.resolve(void 0)}}var Ur=Object.defineProperty,qr=Object.getOwnPropertyDescriptor,Wr=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?qr(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&Ur(t,n,o),o};const Vr={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};class Qr{constructor(e,t,n,r,i){var o,s,a,l,c;this.expanded=void 0,(0,fe.makeObservable)(this);const{resolved:u}=e.deref(t);this.kind=t.kind||"field",this.name=t.name||u.name,this.in=u.in,this.required=!!u.required;let p=u.schema,d="";if(!p&&u.in&&u.content&&(d=Object.keys(u.content)[0],p=u.content[d]&&u.content[d].schema),this.schema=new Mr(e,p||{},n,r,!1,i),this.description=void 0===u.description?this.schema.description||"":u.description,this.example=u.example||this.schema.example,void 0!==u.examples||void 0!==this.schema.examples){const t=u.examples||this.schema.examples;this.examples=I(t)?t:h(t,((t,n)=>new Br(e,t,n,u.encoding)))}d?this.serializationMime=d:u.style?this.style=u.style:this.in&&(this.style=null!=(s=null==(o=Vr[this.in])?void 0:o.style)?s:"form"),void 0===u.explode&&this.in?this.explode=null==(l=null==(a=Vr[this.in])?void 0:a.explode)||l:this.explode=!!u.explode,this.deprecated=void 0===u.deprecated?!!this.schema.deprecated:u.deprecated,r.showExtensions&&(this.extensions=bt(u,r.showExtensions)),this.const=(null==(c=this.schema)?void 0:c.const)||(null==u?void 0:u.const)||""}toggle(){this.expanded=!this.expanded}collapse(){this.expanded=!1}expand(){this.expanded=!0}}Wr([fe.observable],Qr.prototype,"expanded",2),Wr([fe.action],Qr.prototype,"toggle",1),Wr([fe.action],Qr.prototype,"collapse",1),Wr([fe.action],Qr.prototype,"expand",1);var Hr=n(5900);class Yr{constructor(e,t,n,r,i){this.name=t,this.isRequestType=n,this.schema=r.schema&&new Mr(e,r.schema,"",i),this.onlyRequiredInSamples=i.onlyRequiredInSamples,this.generatedPayloadSamplesMaxDepth=i.generatedPayloadSamplesMaxDepth,void 0!==r.examples?this.examples=h(r.examples,(n=>new Br(e,n,t,r.encoding))):void 0!==r.example?this.examples={default:new Br(e,{value:e.deref(r.example).resolved},t,r.encoding)}:We(t)&&this.generateExample(e,r)}generateExample(e,t){const n={skipReadOnly:this.isRequestType,skipWriteOnly:!this.isRequestType,skipNonRequired:this.isRequestType&&this.onlyRequiredInSamples,maxSampleDepth:this.generatedPayloadSamplesMaxDepth};if(this.schema&&this.schema.oneOf){this.examples={};for(const r of this.schema.oneOf){const i=Hr.sample(r.rawSchema,n,e.spec);this.schema.discriminatorProp&&"object"==typeof i&&i&&(i[this.schema.discriminatorProp]=r.title),this.examples[r.title]=new Br(e,{value:i},this.name,t.encoding)}}else this.schema&&(this.examples={default:new Br(e,{value:Hr.sample(t.schema,n,e.spec)},this.name,t.encoding)})}}var Gr=Object.defineProperty,Xr=Object.getOwnPropertyDescriptor,Kr=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?Xr(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&Gr(t,n,o),o};class Zr{constructor(e,t,n,r){this.isRequestType=n,this.activeMimeIdx=0,(0,fe.makeObservable)(this),r.unstable_ignoreMimeParameters&&(t=ct(t)),this.mediaTypes=Object.keys(t).map((i=>{const o=t[i];return new Yr(e,i,n,o,r)}))}activate(e){this.activeMimeIdx=e}get active(){return this.mediaTypes[this.activeMimeIdx]}get hasSample(){return this.mediaTypes.filter((e=>!!e.examples)).length>0}}Kr([fe.observable],Zr.prototype,"activeMimeIdx",2),Kr([fe.action],Zr.prototype,"activate",1),Kr([fe.computed],Zr.prototype,"active",1);class Jr{constructor({parser:e,infoOrRef:t,options:n,isEvent:r}){const i=!r,{resolved:o}=e.deref(t);this.description=o.description||"",this.required=!!o.required;const s=wt(o);void 0!==s&&(this.content=new Zr(e,s,i,n))}}var ei=Object.defineProperty,ti=Object.defineProperties,ni=Object.getOwnPropertyDescriptor,ri=Object.getOwnPropertyDescriptors,ii=Object.getOwnPropertySymbols,oi=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable,ai=(e,t,n)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,li=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?ni(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&ei(t,n,o),o};class ci{constructor({parser:e,code:t,defaultAsError:n,infoOrRef:r,options:i,isEvent:o}){this.expanded=!1,this.headers=[],(0,fe.makeObservable)(this),this.expanded="all"===i.expandResponses||i.expandResponses[t];const{resolved:s}=e.deref(r);this.code=t,void 0!==s.content&&(this.content=new Zr(e,s.content,o,i)),void 0!==s["x-summary"]?(this.summary=s["x-summary"],this.description=s.description||""):(this.summary=s.description||"",this.description=""),this.type=Me(t,n);const a=s.headers;void 0!==a&&(this.headers=Object.keys(a).map((t=>{const n=a[t];return new Qr(e,(r=((e,t)=>{for(var n in t||(t={}))oi.call(t,n)&&ai(e,n,t[n]);if(ii)for(var n of ii(t))si.call(t,n)&&ai(e,n,t[n]);return e})({},n),ti(r,ri({name:t}))),"",i);var r}))),i.showExtensions&&(this.extensions=bt(s,i.showExtensions))}toggle(){this.expanded=!this.expanded}}li([fe.observable],ci.prototype,"expanded",2),li([fe.action],ci.prototype,"toggle",1);var ui=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,di=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?pi(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&ui(t,n,o),o};function fi(e){return"payload"===e.lang&&e.requestBodyContent}let hi=!1;class mi{constructor(e,t,n,r,i=!1){this.parser=e,this.operationSpec=t,this.options=r,this.type="operation",this.items=[],this.ready=!0,this.active=!1,this.expanded=!1,(0,fe.makeObservable)(this),this.pointer=t.pointer,this.description=t.description,this.parent=n,this.externalDocs=t.externalDocs,this.deprecated=!!t.deprecated,this.httpVerb=t.httpVerb,this.deprecated=!!t.deprecated,this.operationId=t.operationId,this.path=t.pathName,this.isCallback=i,this.isWebhook=t.isWebhook,this.isEvent=this.isCallback||this.isWebhook,this.name=ze(t),this.sidebarLabel=r.sideNavStyle===N.IdOnly?this.operationId||this.path:r.sideNavStyle===N.PathOnly?this.path:this.name,this.isCallback?(this.security=(t.security||[]).map((t=>new er(t,e))),this.servers=pt("",t.servers||t.pathServers||[])):(this.operationHash=t.operationId&&"operation/"+t.operationId,this.id=void 0!==t.operationId?(n?n.id+"/":"")+this.operationHash:void 0!==n?n.id+this.pointer:this.pointer,this.security=(t.security||e.spec.security||[]).map((t=>new er(t,e))),this.servers=pt(e.specUrl,t.servers||t.pathServers||e.spec.servers||[])),r.showExtensions&&(this.extensions=bt(t,r.showExtensions))}activate(){this.active=!0}deactivate(){this.active=!1}toggle(){this.expanded=!this.expanded}expand(){this.parent&&this.parent.expand()}collapse(){}get requestBody(){return this.operationSpec.requestBody&&new Jr({parser:this.parser,infoOrRef:this.operationSpec.requestBody,options:this.options,isEvent:this.isEvent})}get codeSamples(){let e=this.operationSpec["x-codeSamples"]||this.operationSpec["x-code-samples"]||[];this.operationSpec["x-code-samples"]&&!hi&&(hi=!0,console.warn('"x-code-samples" is deprecated. Use "x-codeSamples" instead'));const t=this.requestBody&&this.requestBody.content;if(t&&t.hasSample){const n=Math.min(e.length,this.options.payloadSampleIdx);e=[...e.slice(0,n),{lang:"payload",label:"Payload",source:"",requestBodyContent:t},...e.slice(n)]}return e}get parameters(){const e=lt(this.parser,this.operationSpec.pathParameters,this.operationSpec.parameters).map((e=>new Qr(this.parser,e,this.pointer,this.options)));return this.options.sortPropsAlphabetically?at(e,"name"):this.options.requiredPropsFirst?st(e):e}get responses(){let e=!1;return Object.keys(this.operationSpec.responses||[]).filter((t=>"default"===t||("success"===Me(t)&&(e=!0),$e(t)))).map((t=>new ci({parser:this.parser,code:t,defaultAsError:e,infoOrRef:this.operationSpec.responses[t],options:this.options,isEvent:this.isEvent})))}get callbacks(){return Object.keys(this.operationSpec.callbacks||[]).map((e=>new pr(this.parser,e,this.operationSpec.callbacks[e],this.pointer,this.options)))}}di([fe.observable],mi.prototype,"ready",2),di([fe.observable],mi.prototype,"active",2),di([fe.observable],mi.prototype,"expanded",2),di([fe.action],mi.prototype,"activate",1),di([fe.action],mi.prototype,"deactivate",1),di([fe.action],mi.prototype,"toggle",1),di([Dt],mi.prototype,"requestBody",1),di([Dt],mi.prototype,"codeSamples",1),di([Dt],mi.prototype,"parameters",1),di([Dt],mi.prototype,"responses",1),di([Dt],mi.prototype,"callbacks",1);var gi=Object.defineProperty,yi=Object.defineProperties,vi=Object.getOwnPropertyDescriptors,bi=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,ki=(e,t,n)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oi=(e,t)=>{for(var n in t||(t={}))xi.call(t,n)&&ki(e,n,t[n]);if(bi)for(var n of bi(t))wi.call(t,n)&&ki(e,n,t[n]);return e};class Si{constructor(e,t,n){this.operations=[];const{resolved:r}=e.deref(n||{});this.initWebhooks(e,r,t)}initWebhooks(e,t,n){for(const i of Object.keys(t)){const o=t[i],s=Object.keys(o).filter(Fe);for(const t of s){const i=o[t];if(o.$ref){const r=e.deref(o||{});this.initWebhooks(e,{[t]:r},n)}if(!i)continue;const s=new mi(e,(r=Oi({},i),yi(r,vi({httpVerb:t}))),void 0,n,!1);this.operations.push(s)}}var r}}class Ei{constructor(e,t,n){const{resolved:r}=e.deref(n);this.id=t,this.sectionId=mt+t,this.type=r.type,this.displayName=r["x-displayName"]||t,this.description=r.description||"","apiKey"===r.type&&(this.apiKey={name:r.name,in:r.in}),"http"===r.type&&(this.http={scheme:r.scheme,bearerFormat:r.bearerFormat}),"openIdConnect"===r.type&&(this.openId={connectUrl:r.openIdConnectUrl}),"oauth2"===r.type&&r.flows&&(this.flows=r.flows)}}class _i{constructor(e){const t=e.spec.components&&e.spec.components.securitySchemes||{};this.schemes=Object.keys(t).map((n=>new Ei(e,n,t[n])))}}var Ai=Object.defineProperty,Ri=Object.getOwnPropertySymbols,Pi=Object.prototype.hasOwnProperty,Ci=Object.prototype.propertyIsEnumerable,Ii=(e,t,n)=>t in e?Ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ti=(e,t)=>{for(var n in t||(t={}))Pi.call(t,n)&&Ii(e,n,t[n]);if(Ri)for(var n of Ri(t))Ci.call(t,n)&&Ii(e,n,t[n]);return e};class ji{constructor(e,t,n){var r,i,o;this.options=n,this.parser=new Sr(e,t,n),this.info=new Qn(this.parser,this.options),this.externalDocs=this.parser.spec.externalDocs,this.contentItems=Yi.buildStructure(this.parser,this.options),this.securitySchemes=new _i(this.parser);const s=Ti(Ti({},null==(i=null==(r=this.parser)?void 0:r.spec)?void 0:i["x-webhooks"]),null==(o=this.parser)?void 0:o.spec.webhooks);this.webhooks=new Si(this.parser,n,s)}}var Li=Object.defineProperty,Ni=Object.getOwnPropertyDescriptor,$i=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?Ni(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&Li(t,n,o),o};class Mi{constructor(e,t,n){this.items=[],this.active=!1,this.expanded=!1,(0,fe.makeObservable)(this),this.id=t.id||e+"/"+k(t.name),this.type=e,this.name=t["x-displayName"]||t.name,this.level=t.level||1,this.sidebarLabel=this.name,this.description=t.description||"";const r=t.items;r&&r.length&&(this.description=Wn.getTextBeforeHading(this.description,r[0].name)),this.parent=n,this.externalDocs=t.externalDocs,"group"===this.type&&(this.expanded=!0)}activate(){this.active=!0}expand(){this.parent&&this.parent.expand(),this.expanded=!0}collapse(){"group"!==this.type&&(this.expanded=!1)}deactivate(){this.active=!1}}$i([fe.observable],Mi.prototype,"active",2),$i([fe.observable],Mi.prototype,"expanded",2),$i([fe.action],Mi.prototype,"activate",1),$i([fe.action],Mi.prototype,"expand",1),$i([fe.action],Mi.prototype,"collapse",1),$i([fe.action],Mi.prototype,"deactivate",1);var Di=Object.defineProperty,Fi=Object.defineProperties,zi=Object.getOwnPropertyDescriptors,Bi=Object.getOwnPropertySymbols,Ui=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,Wi=(e,t,n)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vi=(e,t)=>{for(var n in t||(t={}))Ui.call(t,n)&&Wi(e,n,t[n]);if(Bi)for(var n of Bi(t))qi.call(t,n)&&Wi(e,n,t[n]);return e},Qi=(e,t)=>Fi(e,zi(t));const Hi=0;class Yi{static buildStructure(e,t){const n=e.spec,r=[],i=Yi.getTagsWithOperations(e,n);return r.push(...Yi.addMarkdownItems(n.info.description||"",void 0,1,t)),n["x-tagGroups"]&&n["x-tagGroups"].length>0?r.push(...Yi.getTagGroupsItems(e,void 0,n["x-tagGroups"],i,t)):r.push(...Yi.getTagsItems(e,i,void 0,void 0,t)),r}static addMarkdownItems(e,t,n,r){const i=new Wn(r,null==t?void 0:t.id).extractHeadings(e||"");i.length&&t&&t.description&&(t.description=Wn.getTextBeforeHading(t.description,i[0].name));const o=(e,t,n=1)=>t.map((t=>{const r=new Mi("section",t,e);return r.depth=n,t.items&&(r.items=o(r,t.items,n+1)),r}));return o(t,i,n)}static getTagGroupsItems(e,t,n,r,i){const o=[];for(const s of n){const n=new Mi("group",s,t);n.depth=Hi,n.items=Yi.getTagsItems(e,r,n,s,i),o.push(n)}return o}static getTagsItems(e,t,n,r,i){let o;o=void 0===r?Object.keys(t):r.tags;const s=o.map((e=>t[e]?(t[e].used=!0,t[e]):(console.warn(`Non-existing tag "${e}" is added to the group "${r.name}"`),null))),a=[];for(const l of s){if(!l)continue;const t=new Mi("tag",l,n);if(t.depth=Hi+1,""!==l.name)t.items=[...Yi.addMarkdownItems(l.description||"",t,t.depth+1,i),...this.getOperationsItems(e,t,l,t.depth+1,i)],a.push(t);else{const n=[...Yi.addMarkdownItems(l.description||"",t,t.depth+1,i),...this.getOperationsItems(e,void 0,l,t.depth+1,i)];a.push(...n)}}return i.sortTagsAlphabetically&&a.sort(Ft("name")),a}static getOperationsItems(e,t,n,r,i){if(0===n.operations.length)return[];const o=[];for(const s of n.operations){const n=new mi(e,s,t,i);n.depth=r,o.push(n)}return i.sortOperationsAlphabetically&&o.sort(Ft("name")),o}static getTagsWithOperations(e,t){const n={},r=t["x-webhooks"]||t.webhooks;for(const o of t.tags||[])n[o.name]=Qi(Vi({},o),{operations:[]});function i(e,t,r){for(const o of Object.keys(t)){const s=t[o],a=Object.keys(s).filter(Fe);for(const t of a){const a=s[t];if(s.$ref){const{resolved:t}=e.deref(s);i(e,{[o]:t},r);continue}let l=null==a?void 0:a.tags;l&&l.length||(l=[""]);for(const e of l){let i=n[e];void 0===i&&(i={name:e,operations:[]},n[e]=i),i["x-traitTag"]||i.operations.push(Qi(Vi({},a),{pathName:o,pointer:Oe.compile(["paths",o,t]),httpVerb:t,pathParameters:s.parameters||[],pathServers:s.servers,isWebhook:!!r}))}}}}return r&&i(e,r,!0),t.paths&&i(e,t.paths),n}}var Gi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,Ki=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?Xi(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&Gi(t,n,o),o};const Zi="data-section-id";class Ji{constructor(e,t,n){this.scroll=t,this.history=n,this.activeItemIdx=-1,this.sideBarOpened=!1,this.updateOnScroll=e=>{const t=e?1:-1;let n=this.activeItemIdx;for(;(-1!==n||e)&&!(n>=this.flatItems.length-1&&e);){if(e){const e=this.getElementAtOrFirstChild(n+1);if(this.scroll.isElementBellow(e))break}else{const e=this.getElementAt(n);if(this.scroll.isElementAbove(e))break}n+=t}this.activate(this.flatItems[n],!0,!0)},this.updateOnHistory=(e=this.history.currentId)=>{if(!e)return;let t;t=this.flatItems.find((t=>t.id===e)),t?this.activateAndScroll(t,!1):(e.startsWith(mt)&&(t=this.flatItems.find((e=>mt.startsWith(e.id))),this.activateAndScroll(t,!1)),this.scroll.scrollIntoViewBySelector(`[${Zi}="${P(e)}"]`))},this.getItemById=e=>this.flatItems.find((t=>t.id===e)),(0,fe.makeObservable)(this),this.items=e.contentItems,this.flatItems=m(this.items||[],"items"),this.flatItems.forEach(((e,t)=>e.absoluteIdx=t)),this.subscribe()}static updateOnHistory(e=Wt.currentId,t){e&&t.scrollIntoViewBySelector(`[${Zi}="${P(e)}"]`)}subscribe(){this._unsubscribe=this.scroll.subscribe(this.updateOnScroll),this._hashUnsubscribe=this.history.subscribe(this.updateOnHistory)}toggleSidebar(){this.sideBarOpened=!this.sideBarOpened}closeSidebar(){this.sideBarOpened=!1}getElementAt(e){const t=this.flatItems[e];return t&&l(`[${Zi}="${P(t.id)}"]`)||null}getElementAtOrFirstChild(e){let t=this.flatItems[e];return t&&"group"===t.type&&(t=t.items[0]),t&&l(`[${Zi}="${P(t.id)}"]`)||null}get activeItem(){return this.flatItems[this.activeItemIdx]||void 0}activate(e,t=!0,n=!1){if((this.activeItem&&this.activeItem.id)!==(e&&e.id)&&(!e||"group"!==e.type)){if(this.deactivate(this.activeItem),!e)return this.activeItemIdx=-1,void this.history.replace("",n);e.depth<=Hi||(this.activeItemIdx=e.absoluteIdx,t&&this.history.replace(encodeURI(e.id),n),e.activate(),e.expand())}}deactivate(e){if(void 0!==e)for(e.deactivate();void 0!==e;)e.collapse(),e=e.parent}activateAndScroll(e,t,n){const r=e&&this.getItemById(e.id)||e;this.activate(r,t,n),this.scrollToActive(),r&&r.items.length||this.closeSidebar()}scrollToActive(){this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx))}dispose(){this._unsubscribe(),this._hashUnsubscribe()}}Ki([fe.observable],Ji.prototype,"activeItemIdx",2),Ki([fe.observable],Ji.prototype,"sideBarOpened",2),Ki([fe.action],Ji.prototype,"toggleSidebar",1),Ki([fe.action],Ji.prototype,"closeSidebar",1),Ki([fe.action],Ji.prototype,"activate",1),Ki([fe.action.bound],Ji.prototype,"activateAndScroll",1);var eo=Object.defineProperty,to=Object.getOwnPropertyDescriptor;const no="scroll";class ro{constructor(e){this.options=e,this._prevOffsetY=0,this._scrollParent=a?window:void 0,this._emiter=new xe,this.bind()}bind(){this._prevOffsetY=this.scrollY(),this._scrollParent&&this._scrollParent.addEventListener("scroll",this.handleScroll)}dispose(){this._scrollParent&&this._scrollParent.removeEventListener("scroll",this.handleScroll),this._emiter.removeAllListeners(no)}scrollY(){return"undefined"!=typeof HTMLElement&&this._scrollParent instanceof HTMLElement?this._scrollParent.scrollTop:void 0!==this._scrollParent?this._scrollParent.pageYOffset:0}isElementBellow(e){if(null!==e)return e.getBoundingClientRect().top>this.options.scrollYOffset()}isElementAbove(e){if(null===e)return;const t=e.getBoundingClientRect().top;return(t>0?Math.floor(t):Math.ceil(t))<=this.options.scrollYOffset()}subscribe(e){const t=this._emiter.addListener(no,e);return()=>t.removeListener(no,e)}scrollIntoView(e){null!==e&&(e.scrollIntoView(),this._scrollParent&&this._scrollParent.scrollBy&&this._scrollParent.scrollBy(0,1-this.options.scrollYOffset()))}scrollIntoViewBySelector(e){const t=l(e);this.scrollIntoView(t)}handleScroll(){const e=this.scrollY()-this._prevOffsetY>0;this._prevOffsetY=this.scrollY(),this._emiter.emit(no,e)}}((e,t,n,r)=>{for(var i,o=to(t,n),s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(t,n,o)||o);o&&eo(t,n,o)})([be.bind,Et(100)],ro.prototype,"handleScroll");class io{constructor(){this.searchWorker=function(){let e;if(a)try{e=r(980)}catch(t){e=r(657).ZP}else e=r(657).ZP;return new e}()}indexItems(e){const t=e=>{e.forEach((e=>{"group"!==e.type&&this.add(e.name,(e.description||"").concat(" ",e.path||""),e.id),t(e.items)}))};t(e),this.searchWorker.done()}add(e,t,n){this.searchWorker.add(e,t,n)}dispose(){this.searchWorker.terminate(),this.searchWorker.dispose()}search(e){return this.searchWorker.search(e)}toJS(){return e=this,t=function*(){return this.searchWorker.toJS()},new Promise(((n,r)=>{var i=e=>{try{s(t.next(e))}catch(e){r(e)}},o=e=>{try{s(t.throw(e))}catch(e){r(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);s((t=t.apply(e,null)).next())}));var e,t}load(e){this.searchWorker.load(e)}fromExternalJS(e,t){e&&t&&this.searchWorker.fromExternalJS(e,t)}}const oo=te.div` + width: calc(100% - ${e=>e.theme.rightPanel.width}); + padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px; + + ${({compact:e,theme:t})=>ee.lessThan("medium",!0)` + width: 100%; + padding: ${`${e?0:t.spacing.sectionVertical}px ${t.spacing.sectionHorizontal}px`}; + `}; +`,so=te.div.attrs((e=>({[Zi]:e.id})))` + padding: ${e=>e.theme.spacing.sectionVertical}px 0; + + &:last-child { + min-height: calc(100vh + 1px); + } + + & > &:last-child { + min-height: initial; + } + + ${ee.lessThan("medium",!0)` + padding: 0; + `} + ${e=>e.underlined?"\n position: relative;\n\n &:not(:last-of-type):after {\n position: absolute;\n bottom: 0;\n width: 100%;\n display: block;\n content: '';\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ":""} +`,ao=te.div` + width: ${e=>e.theme.rightPanel.width}; + color: ${({theme:e})=>e.rightPanel.textColor}; + background-color: ${e=>e.theme.rightPanel.backgroundColor}; + padding: 0 ${e=>e.theme.spacing.sectionHorizontal}px; + + ${ee.lessThan("medium",!0)` + width: 100%; + padding: ${e=>`${e.theme.spacing.sectionVertical}px ${e.theme.spacing.sectionHorizontal}px`}; + `}; +`,lo=te(ao)` + background-color: ${e=>e.theme.rightPanel.backgroundColor}; +`,co=te.div` + display: flex; + width: 100%; + padding: 0; + + ${ee.lessThan("medium",!0)` + flex-direction: column; + `}; +`,uo={1:"1.85714em",2:"1.57143em",3:"1.27em"},po=e=>X` + font-family: ${({theme:e})=>e.typography.headings.fontFamily}; + font-weight: ${({theme:e})=>e.typography.headings.fontWeight}; + font-size: ${uo[e]}; + line-height: ${({theme:e})=>e.typography.headings.lineHeight}; +`,fo=te.h1` + ${po(1)}; + color: ${({theme:e})=>e.colors.text.primary}; + + ${ne("H1")}; +`,ho=te.h2` + ${po(2)}; + color: ${({theme:e})=>e.colors.text.primary}; + margin: 0 0 20px; + + ${ne("H2")}; +`,mo=(te.h2` + ${po(3)}; + color: ${({theme:e})=>e.colors.text.primary}; + + ${ne("H3")}; +`,te.h3` + color: ${({theme:e})=>e.rightPanel.textColor}; + + ${ne("RightPanelHeader")}; +`),go=te.h5` + border-bottom: 1px solid rgba(38, 50, 56, 0.3); + margin: 1em 0 1em 0; + color: rgba(38, 50, 56, 0.5); + font-weight: normal; + text-transform: uppercase; + font-size: 0.929em; + line-height: 20px; + + ${ne("UnderlinedHeader")}; +`,yo=(0,e.createContext)(void 0),{Provider:vo,Consumer:bo}=yo;function xo(t){const{spec:n,specUrl:r,options:i,onLoaded:o,children:s}=t,[a,l]=e.useState(null),[c,u]=e.useState(null);if(c)throw c;e.useEffect((()=>{!function(){return e=this,t=function*(){if(n||r){l(null);try{const e=yield ye(n||r);l(e)}catch(e){throw u(e),e}}},new Promise(((n,r)=>{var i=e=>{try{s(t.next(e))}catch(e){r(e)}},o=e=>{try{s(t.throw(e))}catch(e){r(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,o);s((t=t.apply(e,null)).next())}));var e,t}()}),[n,r]);const p=e.useMemo((()=>{if(!a)return null;try{return new rc(a,r,i)}catch(e){throw o&&o(e),e}}),[a,r,i]);return e.useEffect((()=>{p&&o&&o()}),[p,o]),s({loading:!p,store:p})}function wo(){return(0,e.useContext)(yo)}const ko=e=>X` + ${e} { + cursor: pointer; + margin-left: -20px; + padding: 0; + line-height: 1; + width: 20px; + display: inline-block; + outline: 0; + } + ${e}:before { + content: ''; + width: 15px; + height: 15px; + background-size: contain; + background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg=='); + opacity: 0.5; + visibility: hidden; + display: inline-block; + vertical-align: middle; + } + + h1:hover > ${e}::before, h2:hover > ${e}::before, ${e}:hover::before { + visibility: visible; + } +`,Oo=te((function(t){const n=e.useContext(yo),r=e.useCallback((e=>{n&&function(e,t,n){t.defaultPrevented||0!==t.button||(e=>!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey))(t)||(t.preventDefault(),e.replace(encodeURI(n)))}(n.menu.history,e,t.to)}),[n,t.to]);return n?e.createElement("a",{className:t.className,href:n.menu.history.linkForId(t.to),onClick:r,"aria-label":t.to},t.children):null}))` + ${ko("&")}; +`;function So(t){return e.createElement(Oo,{to:t.to})}const Eo={left:"90deg",right:"-90deg",up:"-180deg",down:"0"},_o=te((t=>e.createElement("svg",{className:t.className,style:t.style,version:"1.1",viewBox:"0 0 24 24",x:"0",xmlns:"http://www.w3.org/2000/svg",y:"0","aria-hidden":"true"},e.createElement("polygon",{points:"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "}))))` + height: ${e=>e.size||"18px"}; + width: ${e=>e.size||"18px"}; + min-width: ${e=>e.size||"18px"}; + vertical-align: middle; + float: ${e=>e.float||""}; + transition: transform 0.2s ease-out; + transform: rotateZ(${e=>Eo[e.direction||"down"]}); + + polygon { + fill: ${({color:e,theme:t})=>e&&t.colors.responses[e]&&t.colors.responses[e].color||e}; + } +`,Ao=te.span` + display: inline-block; + padding: 2px 8px; + margin: 0; + background-color: ${e=>e.theme.colors[e.type].main}; + color: ${e=>e.theme.colors[e.type].contrastText}; + font-size: ${e=>e.theme.typography.code.fontSize}; + vertical-align: middle; + line-height: 1.6; + border-radius: 4px; + font-weight: ${({theme:e})=>e.typography.fontWeightBold}; + font-size: 12px; + + span[type] { + margin-left: 4px; + } +`,Ro=X` + text-decoration: line-through; + color: #707070; +`,Po=te.caption` + text-align: right; + font-size: 0.9em; + font-weight: normal; + color: ${e=>e.theme.colors.text.secondary}; +`,Co=te.td` + border-left: 1px solid ${e=>e.theme.schema.linesColor}; + box-sizing: border-box; + position: relative; + padding: 10px 10px 10px 0; + + ${ee.lessThan("small")` + display: block; + overflow: hidden; + `} + + tr:first-of-type > &, + tr.last > & { + border-left-width: 0; + background-position: top left; + background-repeat: no-repeat; + background-size: 1px 100%; + } + + tr:first-of-type > & { + background-image: linear-gradient( + to bottom, + transparent 0%, + transparent 22px, + ${e=>e.theme.schema.linesColor} 22px, + ${e=>e.theme.schema.linesColor} 100% + ); + } + + tr.last > & { + background-image: linear-gradient( + to bottom, + ${e=>e.theme.schema.linesColor} 0%, + ${e=>e.theme.schema.linesColor} 22px, + transparent 22px, + transparent 100% + ); + } + + tr.last + tr > & { + border-left-color: transparent; + } + + tr.last:first-child > & { + background: none; + border-left-color: transparent; + } +`,Io=te(Co)` + padding: 0; +`,To=te(Co)` + vertical-align: top; + line-height: 20px; + white-space: nowrap; + font-size: 13px; + font-family: ${e=>e.theme.typography.code.fontFamily}; + + &.deprecated { + ${Ro}; + } + + ${({kind:e})=>"patternProperties"===e&&X` + > span.property-name { + display: inline-table; + white-space: break-spaces; + margin-right: 20px; + + ::before, + ::after { + content: '/'; + filter: opacity(0.2); + } + } + `} + + ${({kind:e=""})=>["field","additionalProperties","patternProperties"].includes(e)?"":"font-style: italic"}; + + ${ne("PropertyNameCell")}; +`,jo=te.td` + border-bottom: 1px solid #9fb4be; + padding: 10px 0; + width: ${e=>e.theme.schema.defaultDetailsWidth}; + box-sizing: border-box; + + tr.expanded & { + border-bottom: none; + } + + ${ee.lessThan("small")` + padding: 0 20px; + border-bottom: none; + border-left: 1px solid ${e=>e.theme.schema.linesColor}; + + tr.last > & { + border-left: none; + } + `} + + ${ne("PropertyDetailsCell")}; +`,Lo=te.span` + color: ${e=>e.theme.schema.linesColor}; + font-family: ${e=>e.theme.typography.code.fontFamily}; + margin-right: 10px; + + &::before { + content: ''; + display: inline-block; + vertical-align: middle; + width: 10px; + height: 1px; + background: ${e=>e.theme.schema.linesColor}; + } + + &::after { + content: ''; + display: inline-block; + vertical-align: middle; + width: 1px; + background: ${e=>e.theme.schema.linesColor}; + height: 7px; + } +`,No=te.div` + padding: ${({theme:e})=>e.schema.nestingSpacing}; +`,$o=te.table` + border-collapse: separate; + border-radius: 3px; + font-size: ${e=>e.theme.typography.fontSize}; + + border-spacing: 0; + width: 100%; + + > tr { + vertical-align: middle; + } + + ${ee.lessThan("small")` + display: block; + > tr, > tbody > tr { + display: block; + } + `} + + ${ee.lessThan("small",!1," and (-ms-high-contrast:none)")` + td { + float: left; + width: 100%; + } + `} + + & + ${No}, + & + ${No} + ${No} + ${No}, + & + ${No} + ${No} + ${No} + ${No} + ${No} { + margin: ${({theme:e})=>e.schema.nestingSpacing}; + margin-right: 0; + background: ${({theme:e})=>e.schema.nestedBackground}; + } + + & + ${No} + ${No}, + & + ${No} + ${No} + ${No} + ${No}, + & + ${No} + ${No} + ${No} + ${No} + ${No} + ${No} { + background: #ffffff; + } +`,Mo=te.div` + margin: 0 0 3px 0; + display: inline-block; +`,Do=te.span` + font-size: 0.9em; + margin-right: 10px; + color: ${e=>e.theme.colors.primary.main}; + font-family: ${e=>e.theme.typography.headings.fontFamily}; +} +`,Fo=te.button` + display: inline-block; + margin-right: 10px; + margin-bottom: 5px; + font-size: 0.8em; + cursor: pointer; + border: 1px solid ${e=>e.theme.colors.primary.main}; + padding: 2px 10px; + line-height: 1.5em; + outline: none; + &:focus { + box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary.main}; + } + + ${({deprecated:e})=>e&&Ro||""}; + + ${e=>e.active?`\n color: white;\n background-color: ${e.theme.colors.primary.main};\n &:focus {\n box-shadow: none;\n background-color: ${(0,t.darken)(.15,e.theme.colors.primary.main)};\n }\n `:`\n color: ${e.theme.colors.primary.main};\n background-color: white;\n `} +`,zo=te.div` + font-size: 0.9em; + font-family: ${e=>e.theme.typography.code.fontFamily}; + &::after { + content: ' ['; + } +`,Bo=te.div` + font-size: 0.9em; + font-family: ${e=>e.theme.typography.code.fontFamily}; + &::after { + content: ']'; + } +`;var Uo=n(78369);const qo=te(Uo.Tabs)` + > ul { + list-style: none; + padding: 0; + margin: 0; + margin: 0 -5px; + + > li { + padding: 5px 10px; + display: inline-block; + + background-color: ${({theme:e})=>e.codeBlock.backgroundColor}; + border-bottom: 1px solid rgba(0, 0, 0, 0.5); + cursor: pointer; + text-align: center; + outline: none; + color: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.rightPanel.textColor)}; + margin: 0 + ${({theme:e})=>`${e.spacing.unit}px ${e.spacing.unit}px ${e.spacing.unit}px`}; + border: 1px solid ${({theme:e})=>(0,t.darken)(.05,e.codeBlock.backgroundColor)}; + border-radius: 5px; + min-width: 60px; + font-size: 0.9em; + font-weight: bold; + + &.react-tabs__tab--selected { + color: ${e=>e.theme.colors.text.primary}; + background: ${({theme:e})=>e.rightPanel.textColor}; + &:focus { + outline: auto; + } + } + + &:only-child { + flex: none; + min-width: 100px; + } + + &.tab-success { + color: ${e=>e.theme.colors.responses.success.tabTextColor}; + } + + &.tab-redirect { + color: ${e=>e.theme.colors.responses.redirect.tabTextColor}; + } + + &.tab-info { + color: ${e=>e.theme.colors.responses.info.tabTextColor}; + } + + &.tab-error { + color: ${e=>e.theme.colors.responses.error.tabTextColor}; + } + } + } + > .react-tabs__tab-panel { + background: ${({theme:e})=>e.codeBlock.backgroundColor}; + & > div, + & > pre { + padding: ${e=>4*e.theme.spacing.unit}px; + margin: 0; + } + + & > div > pre { + padding: 0; + } + } +`,Wo=(te(qo)` + > ul { + display: block; + > li { + padding: 2px 5px; + min-width: auto; + margin: 0 15px 0 0; + font-size: 13px; + font-weight: normal; + border-bottom: 1px dashed; + color: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.rightPanel.textColor)}; + border-radius: 0; + background: none; + + &:last-child { + margin-right: 0; + } + + &.react-tabs__tab--selected { + color: ${({theme:e})=>e.rightPanel.textColor}; + background: none; + } + } + } + > .react-tabs__tab-panel { + & > div, + & > pre { + padding: ${e=>2*e.theme.spacing.unit}px 0; + } + } +`,te.div` + /** + * Based on prism-dark.css + */ + + code[class*='language-'], + pre[class*='language-'] { + /* color: white; + background: none; */ + text-shadow: 0 -0.1em 0.2em black; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } + + @media print { + code[class*='language-'], + pre[class*='language-'] { + text-shadow: none; + } + } + + /* Code blocks */ + pre[class*='language-'] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; + } + + .token.comment, + .token.prolog, + .token.doctype, + .token.cdata { + color: hsl(30, 20%, 50%); + } + + .token.punctuation { + opacity: 0.7; + } + + .namespace { + opacity: 0.7; + } + + .token.property, + .token.tag, + .token.number, + .token.constant, + .token.symbol { + color: #4a8bb3; + } + + .token.boolean { + color: #e64441; + } + + .token.selector, + .token.attr-name, + .token.string, + .token.char, + .token.builtin, + .token.inserted { + color: #a0fbaa; + & + a, + & + a:visited { + color: #4ed2ba; + text-decoration: underline; + } + } + + .token.property.string { + color: white; + } + + .token.operator, + .token.entity, + .token.url, + .token.variable { + color: hsl(40, 90%, 60%); + } + + .token.atrule, + .token.attr-value, + .token.keyword { + color: hsl(350, 40%, 70%); + } + + .token.regex, + .token.important { + color: #e90; + } + + .token.important, + .token.bold { + font-weight: bold; + } + .token.italic { + font-style: italic; + } + + .token.entity { + cursor: help; + } + + .token.deleted { + color: red; + } + + ${ne("Prism")}; +`),Vo=te.div` + opacity: 0.7; + transition: opacity 0.3s ease; + text-align: right; + &:focus-within { + opacity: 1; + } + > button { + background-color: transparent; + border: 0; + color: inherit; + padding: 2px 10px; + font-family: ${({theme:e})=>e.typography.fontFamily}; + font-size: ${({theme:e})=>e.typography.fontSize}; + line-height: ${({theme:e})=>e.typography.lineHeight}; + cursor: pointer; + outline: 0; + + :hover, + :focus { + background: rgba(255, 255, 255, 0.1); + } + } +`,Qo=te.div` + &:hover ${Vo} { + opacity: 1; + } +`,Ho=te(Wo.withComponent("pre"))` + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: ${e=>e.theme.typography.code.fontSize}; + overflow-x: auto; + margin: 0; + + white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"}; +`;var Yo=n(84772),Go=r.n(Yo),Xo=Object.defineProperty,Ko=Object.getOwnPropertySymbols,Zo=Object.prototype.hasOwnProperty,Jo=Object.prototype.propertyIsEnumerable,es=(e,t,n)=>t in e?Xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ts=Go()||Yo;let ns="";a&&(ns=r(433),ns="function"==typeof ns.toString&&ns.toString()||"",ns="[object Object]"===ns?"":ns);const rs=K`${ns}`,is=te.div` + position: relative; +`;class os extends e.Component{constructor(){super(...arguments),this.handleRef=e=>{this._container=e}}componentDidMount(){const e=this._container.parentElement&&this._container.parentElement.scrollTop||0;this.inst=new ts(this._container,this.props.options||{}),this._container.scrollTo&&this._container.scrollTo(0,e)}componentDidUpdate(){this.inst.update()}componentWillUnmount(){this.inst.destroy()}render(){const{children:t,className:n,updateFn:r}=this.props;return r&&r(this.componentDidUpdate.bind(this)),e.createElement(e.Fragment,null,ns&&e.createElement(rs,null),e.createElement(is,{className:`scrollbar-container ${n}`,ref:this.handleRef},t))}}function ss(t){return e.createElement(ue.Consumer,null,(n=>n.nativeScrollbars?e.createElement("div",{style:{overflow:"auto",overscrollBehavior:"contain",msOverflowStyle:"-ms-autohiding-scrollbar"}},t.children):e.createElement(os,((e,t)=>{for(var n in t||(t={}))Zo.call(t,n)&&es(e,n,t[n]);if(Ko)for(var n of Ko(t))Jo.call(t,n)&&es(e,n,t[n]);return e})({},t),t.children)))}const as=te((({className:t,style:n})=>e.createElement("svg",{className:t,style:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("polyline",{points:"6 9 12 15 18 9"}))))` + position: absolute; + pointer-events: none; + z-index: 1; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + right: 8px; + margin: auto; + text-align: center; + polyline { + color: ${e=>"dark"===e.variant&&"white"}; + } +`,ls=e.memo((t=>{const{options:n,onChange:r,placeholder:i,value:o="",variant:s,className:a}=t;return e.createElement("div",{className:a},e.createElement(as,{variant:s}),e.createElement("select",{onChange:e=>{const{selectedIndex:t}=e.target;r(n[i?t-1:t])},value:o,className:"dropdown-select"},i&&e.createElement("option",{disabled:!0,hidden:!0,value:i},i),n.map((({idx:t,value:n,title:r},i)=>e.createElement("option",{key:t||n+i,value:n},r||n)))),e.createElement("label",null,o))})),cs=Y()(ls)` + label { + box-sizing: border-box; + min-width: 100px; + outline: none; + display: inline-block; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + color: ${({theme:e})=>e.colors.text.primary}; + vertical-align: bottom; + width: ${({fullWidth:e})=>e?"100%":"auto"}; + text-transform: none; + padding: 0 22px 0 4px; + + font-size: 0.929em; + line-height: 1.5em; + font-family: inherit; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + .dropdown-select { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + border: none; + appearance: none; + cursor: pointer; + + color: ${({theme:e})=>e.colors.text.primary}; + line-height: inherit; + font-family: inherit; + } + box-sizing: border-box; + min-width: 100px; + outline: none; + display: inline-block; + border-radius: 2px; + border: 1px solid rgba(38, 50, 56, 0.5); + vertical-align: bottom; + padding: 2px 0px 2px 6px; + position: relative; + width: auto; + background: white; + color: #263238; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + font-size: 0.929em; + line-height: 1.5em; + cursor: pointer; + transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; + + &:hover, + &:focus-within { + border: 1px solid ${e=>e.theme.colors.primary.main}; + color: ${e=>e.theme.colors.primary.main}; + box-shadow: 0px 0px 0px 1px ${e=>e.theme.colors.primary.main}; + } +`,us=Y()(cs)` + margin-left: 10px; + text-transform: none; + font-size: 0.969em; + + font-size: 1em; + border: none; + padding: 0 1.2em 0 0; + background: transparent; + + &:hover, + &:focus-within { + border: none; + box-shadow: none; + label { + color: ${e=>e.theme.colors.primary.main}; + text-shadow: 0px 0px 0px ${e=>e.theme.colors.primary.main}; + } + } +`,ps=Y().span` + margin-left: 10px; + text-transform: none; + font-size: 0.929em; + color: black; +`;var ds=Object.defineProperty,fs=Object.getOwnPropertySymbols,hs=Object.prototype.hasOwnProperty,ms=Object.prototype.propertyIsEnumerable,gs=(e,t,n)=>t in e?ds(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function ys(t){const{Label:n=ps,Dropdown:r=us}=t;return 1===t.options.length?e.createElement(n,null,t.options[0].value):e.createElement(r,((e,t)=>{for(var n in t||(t={}))hs.call(t,n)&&gs(e,n,t[n]);if(fs)for(var n of fs(t))ms.call(t,n)&&gs(e,n,t[n]);return e})({},t))}var vs=n(27856);const bs=X` + a { + text-decoration: ${e=>e.theme.typography.links.textDecoration}; + color: ${e=>e.theme.typography.links.color}; + + &:visited { + color: ${e=>e.theme.typography.links.visited}; + } + + &:hover { + color: ${e=>e.theme.typography.links.hover}; + text-decoration: ${e=>e.theme.typography.links.hoverTextDecoration}; + } + } +`,xs=te(Wo)` + font-family: ${e=>e.theme.typography.fontFamily}; + font-weight: ${e=>e.theme.typography.fontWeightRegular}; + line-height: ${e=>e.theme.typography.lineHeight}; + + p { + &:last-child { + margin-bottom: 0; + } + } + + ${({compact:e})=>e&&"\n p:first-child {\n margin-top: 0;\n }\n p:last-child {\n margin-bottom: 0;\n }\n "} + + ${({inline:e})=>e&&" p {\n display: inline-block;\n }"} + + h1 { + ${po(1)}; + color: ${e=>e.theme.colors.primary.main}; + margin-top: 0; + } + + h2 { + ${po(2)}; + color: ${e=>e.theme.colors.text.primary}; + } + + code { + color: ${({theme:e})=>e.typography.code.color}; + background-color: ${({theme:e})=>e.typography.code.backgroundColor}; + + font-family: ${e=>e.theme.typography.code.fontFamily}; + border-radius: 2px; + border: 1px solid rgba(38, 50, 56, 0.1); + padding: 0 ${({theme:e})=>e.spacing.unit}px; + font-size: ${e=>e.theme.typography.code.fontSize}; + font-weight: ${({theme:e})=>e.typography.code.fontWeight}; + + word-break: break-word; + } + + pre { + font-family: ${e=>e.theme.typography.code.fontFamily}; + white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"}; + background-color: ${({theme:e})=>e.codeBlock.backgroundColor}; + color: white; + padding: ${e=>4*e.theme.spacing.unit}px; + overflow-x: auto; + line-height: normal; + border-radius: 0px; + border: 1px solid rgba(38, 50, 56, 0.1); + + code { + background-color: transparent; + color: white; + padding: 0; + + &:before, + &:after { + content: none; + } + } + } + + blockquote { + margin: 0; + margin-bottom: 1em; + padding: 0 15px; + color: #777; + border-left: 4px solid #ddd; + } + + img { + max-width: 100%; + box-sizing: content-box; + } + + ul, + ol { + padding-left: 2em; + margin: 0; + margin-bottom: 1em; + + ul, + ol { + margin-bottom: 0; + margin-top: 0; + } + } + + table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; + border-collapse: collapse; + border-spacing: 0; + margin-top: 1.5em; + margin-bottom: 1.5em; + } + + table tr { + background-color: #fff; + border-top: 1px solid #ccc; + + &:nth-child(2n) { + background-color: ${({theme:e})=>e.schema.nestedBackground}; + } + } + + table th, + table td { + padding: 6px 13px; + border: 1px solid #ddd; + } + + table th { + text-align: left; + font-weight: bold; + } + + ${ko(".share-link")}; + + ${bs} + + ${ne("Markdown")}; +`;var ws=Object.defineProperty,ks=Object.getOwnPropertySymbols,Os=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable,Es=(e,t,n)=>t in e?ws(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const _s=xs.withComponent("span");function As(t){const n=t.inline?_s:xs;return e.createElement(de,null,(r=>{return e.createElement(n,((e,t)=>{for(var n in t||(t={}))Os.call(t,n)&&Es(e,n,t[n]);if(ks)for(var n of ks(t))Ss.call(t,n)&&Es(e,n,t[n]);return e})({className:"redoc-markdown "+(t.className||""),dangerouslySetInnerHTML:{__html:(i=r.untrustedSpec,o=t.html,i?vs.sanitize(o):o)},"data-role":t["data-role"]},t));var i,o}))}class Rs extends e.Component{render(){const{source:t,inline:n,compact:r,className:i,"data-role":o}=this.props,s=new Wn;return e.createElement(As,{html:s.renderMd(t),inline:n,compact:r,className:i,"data-role":o})}}const Ps=te.div` + position: relative; +`,Cs=te.div` + position: absolute; + min-width: 80px; + max-width: 500px; + background: #fff; + bottom: 100%; + left: 50%; + margin-bottom: 10px; + transform: translateX(-50%); + + border-radius: 4px; + padding: 0.3em 0.6em; + text-align: center; + box-shadow: 0px 0px 5px 0px rgba(204, 204, 204, 1); +`,Is=te.div` + background: #fff; + color: #000; + display: inline; + font-size: 0.85em; + white-space: nowrap; +`,Ts=te.div` + position: absolute; + width: 0; + height: 0; + bottom: -5px; + left: 50%; + margin-left: -5px; + border-left: solid transparent 5px; + border-right: solid transparent 5px; + border-top: solid #fff 5px; +`,js=te.div` + position: absolute; + width: 100%; + height: 20px; + bottom: -20px; +`;class Ls extends e.Component{render(){const{open:t,title:n,children:r}=this.props;return e.createElement(Ps,null,r,t&&e.createElement(Cs,null,e.createElement(Is,null,n),e.createElement(Ts,null),e.createElement(js,null)))}}const Ns="undefined"!=typeof document&&document.queryCommandSupported&&document.queryCommandSupported("copy");class $s{static isSupported(){return Ns}static selectElement(e){let t,n;document.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(e),t.select()):document.createRange&&window.getSelection&&(n=window.getSelection(),t=document.createRange(),t.selectNodeContents(e),n.removeAllRanges(),n.addRange(t))}static deselect(){if(document.selection)document.selection.empty();else if(window.getSelection){const e=window.getSelection();e&&e.removeAllRanges()}}static copySelected(){let e;try{e=document.execCommand("copy")}catch(t){e=!1}return e}static copyElement(e){$s.selectElement(e);const t=$s.copySelected();return t&&$s.deselect(),t}static copyCustom(e){const t=document.createElement("textarea");t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="2em",t.style.height="2em",t.style.padding="0",t.style.border="none",t.style.outline="none",t.style.boxShadow="none",t.style.background="transparent",t.value=e,document.body.appendChild(t),t.select();const n=$s.copySelected();return document.body.removeChild(t),n}}const Ms=t=>{const[n,r]=e.useState(!1),i=()=>{const e="string"==typeof t.data?t.data:JSON.stringify(t.data,null,2);$s.copyCustom(e),o()},o=()=>{r(!0),setTimeout((()=>{r(!1)}),1500)};return t.children({renderCopyButton:()=>e.createElement("button",{onClick:i},e.createElement(Ls,{title:$s.isSupported()?"Copied":"Not supported in your browser",open:n},"Copy"))})};let Ds=1;function Fs(e,t){Ds=1;let n="";return n+='
    ',n+="",n+=Ws(e,t),n+="",n+="
    ",n}function zs(e){return void 0!==e?e.toString().replace(/&/g,"&").replace(/"/g,""").replace(//g,">"):""}function Bs(e){return JSON.stringify(e).slice(1,-1)}function Us(e,t){return''+zs(e)+""}function qs(e){return''+e+""}function Ws(e,t){const n=typeof e;let r="";return null==e?r+=Us("null","token keyword"):e&&e.constructor===Array?(Ds++,r+=function(e,t){const n=Ds>t?"collapsed":"";let r=`${qs("[")}
      `,i=!1;const o=e.length;for(let s=0;s
      ',r+=Ws(e[s],t),s";return r+=`
    ${qs("]")}`,i||(r=qs("[ ]")),r}(e,t),Ds--):e&&e.constructor===Date?r+=Us('"'+e.toISOString()+'"',"token string"):"object"===n?(Ds++,r+=function(e,t){const n=Ds>t?"collapsed":"",r=Object.keys(e),i=r.length;let o=`${qs("{")}
      `,s=!1;for(let a=0;a
      ',o+='"'+zs(l)+'": ',o+=Ws(e[l],t),a"}return o+=`
    ${qs("}")}`,s||(o=qs("{ }")),o}(e,t),Ds--):"number"===n?r+=Us(e,"token number"):"string"===n?/^(http|https):\/\/[^\s]+$/.test(e)?r+=Us('"',"token string")+'
    '+zs(Bs(e))+""+Us('"',"token string"):r+=Us('"'+Bs(e)+'"',"token string"):"boolean"===n&&(r+=Us(e,"token boolean")),r}const Vs=X` + .redoc-json code > .collapser { + display: none; + pointer-events: none; + } + + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: ${e=>e.theme.typography.code.fontSize}; + + white-space: ${({theme:e})=>e.typography.code.wrap?"pre-wrap":"pre"}; + contain: content; + overflow-x: auto; + + .callback-function { + color: gray; + } + + .collapser:after { + content: '-'; + cursor: pointer; + } + + .collapsed > .collapser:after { + content: '+'; + cursor: pointer; + } + + .ellipsis:after { + content: ' … '; + } + + .collapsible { + margin-left: 2em; + } + + .hoverable { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 2px; + padding-right: 2px; + border-radius: 2px; + } + + .hovered { + background-color: rgba(235, 238, 249, 1); + } + + .collapser { + background-color: transparent; + border: 0; + color: #fff; + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: ${e=>e.theme.typography.code.fontSize}; + padding-right: 6px; + padding-left: 6px; + padding-top: 0; + padding-bottom: 0; + display: flex; + align-items: center; + justify-content: center; + width: 15px; + height: 15px; + position: absolute; + top: 4px; + left: -1.5em; + cursor: default; + user-select: none; + -webkit-user-select: none; + padding: 2px; + &:focus { + outline-color: #fff; + outline-style: dotted; + outline-width: 1px; + } + } + + ul { + list-style-type: none; + padding: 0px; + margin: 0px 0px 0px 26px; + } + + li { + position: relative; + display: block; + } + + .hoverable { + display: inline-block; + } + + .selected { + outline-style: solid; + outline-width: 1px; + outline-style: dotted; + } + + .collapsed > .collapsible { + display: none; + } + + .ellipsis { + display: none; + } + + .collapsed > .ellipsis { + display: inherit; + } +`,Qs=te.div` + &:hover > ${Vo} { + opacity: 1; + } +`,Hs=te((t=>{const[n,r]=e.useState(),i=({renderCopyButton:n})=>{const i=t.data&&Object.values(t.data).some((e=>"object"==typeof e&&null!==e));return e.createElement(Qs,null,e.createElement(Vo,null,n(),i&&e.createElement(e.Fragment,null,e.createElement("button",{onClick:o}," Expand all "),e.createElement("button",{onClick:s}," Collapse all "))),e.createElement(ue.Consumer,null,(n=>e.createElement(Wo,{className:t.className,ref:e=>r(e),dangerouslySetInnerHTML:{__html:Fs(t.data,n.jsonSampleExpandLevel)}}))))},o=()=>{const e=null==n?void 0:n.getElementsByClassName("collapsible");for(const t of Array.prototype.slice.call(e)){const e=t.parentNode;e.classList.remove("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","collapse")}},s=()=>{const e=null==n?void 0:n.getElementsByClassName("collapsible"),t=Array.prototype.slice.call(e,1);for(const n of t){const e=n.parentNode;e.classList.add("collapsed"),e.querySelector(".collapser").setAttribute("aria-label","expand")}},a=e=>{let t;"collapser"===e.className&&(t=e.parentElement.getElementsByClassName("collapsible")[0],t.parentElement.classList.contains("collapsed")?(t.parentElement.classList.remove("collapsed"),e.setAttribute("aria-label","collapse")):(t.parentElement.classList.add("collapsed"),e.setAttribute("aria-label","expand")))},l=e.useCallback((e=>{a(e.target)}),[]),c=e.useCallback((e=>{"Enter"===e.key&&a(e.target)}),[]);return e.useEffect((()=>(null==n||n.addEventListener("click",l),null==n||n.addEventListener("focus",c),()=>{null==n||n.removeEventListener("click",l),null==n||n.removeEventListener("focus",c)})),[l,c,n]),e.createElement(Ms,{data:t.data},i)}))` + ${Vs}; +`,Ys=t=>{const{source:n,lang:r}=t;return e.createElement(Ho,{dangerouslySetInnerHTML:{__html:St(n,r)}})},Gs=t=>{const{source:n,lang:r}=t;return e.createElement(Ms,{data:n},(({renderCopyButton:t})=>e.createElement(Qo,null,e.createElement(Vo,null,t()),e.createElement(Ys,{lang:r,source:n}))))};function Xs({value:t,mimeType:n}){return We(n)?e.createElement(Hs,{data:t}):("object"==typeof t&&(t=JSON.stringify(t,null,2)),e.createElement(Gs,{lang:Je(n),source:t}))}function Ks({example:t,mimeType:n}){return void 0===t.value&&t.externalValueUrl?e.createElement(Zs,{example:t,mimeType:n}):e.createElement(Xs,{value:t.value,mimeType:n})}function Zs({example:t,mimeType:n}){const r=function(t,n){const[,r]=(0,e.useState)(!0),i=(0,e.useRef)(void 0),o=(0,e.useRef)(void 0);return o.current!==t&&(i.current=void 0),o.current=t,(0,e.useEffect)((()=>{(()=>{return e=this,o=function*(){r(!0);try{i.current=yield t.getExternalValue(n)}catch(e){i.current=e}r(!1)},new Promise(((t,n)=>{var r=e=>{try{s(o.next(e))}catch(e){n(e)}},i=e=>{try{s(o.throw(e))}catch(e){n(e)}},s=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,i);s((o=o.apply(e,null)).next())}));var e,o})()}),[t,n]),i.current}(t,n);return void 0===r?e.createElement("span",null,"Loading..."):r instanceof Error?e.createElement(Ho,null,"Error loading external example: ",e.createElement("br",null),e.createElement("a",{className:"token string",href:t.externalValueUrl,target:"_blank",rel:"noopener noreferrer"},t.externalValueUrl)):e.createElement(Xs,{value:r,mimeType:n})}const Js=te.div` + padding: 0.9em; + background-color: ${({theme:e})=>(0,t.transparentize)(.6,e.rightPanel.backgroundColor)}; + margin: 0 0 10px 0; + display: block; + font-family: ${({theme:e})=>e.typography.headings.fontFamily}; + font-size: 0.929em; + line-height: 1.5em; +`,ea=te.span` + font-family: ${({theme:e})=>e.typography.headings.fontFamily}; + font-size: 12px; + position: absolute; + z-index: 1; + top: -11px; + left: 12px; + font-weight: ${({theme:e})=>e.typography.fontWeightBold}; + color: ${({theme:e})=>(0,t.transparentize)(.3,e.rightPanel.textColor)}; +`,ta=te.div` + position: relative; +`,na=te(cs)` + label { + color: ${({theme:e})=>e.rightPanel.textColor}; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + font-size: 1em; + text-transform: none; + border: none; + } + margin: 0 0 10px 0; + display: block; + background-color: ${({theme:e})=>(0,t.transparentize)(.6,e.rightPanel.backgroundColor)}; + border: none; + padding: 0.9em 1.6em 0.9em 0.9em; + box-shadow: none; + &:hover, + &:focus-within { + border: none; + box-shadow: none; + background-color: ${({theme:e})=>(0,t.transparentize)(.3,e.rightPanel.backgroundColor)}; + } +`,ra=te.div` + font-family: ${e=>e.theme.typography.code.fontFamily}; + font-size: 12px; + color: #ee807f; +`;class ia extends e.Component{constructor(){super(...arguments),this.state={activeIdx:0},this.switchMedia=({idx:e})=>{void 0!==e&&this.setState({activeIdx:e})}}render(){const{activeIdx:t}=this.state,n=this.props.mediaType.examples||{},r=this.props.mediaType.name,i=e.createElement(ra,null,"No sample"),o=Object.keys(n);if(0===o.length)return i;if(o.length>1){const i=o.map(((e,t)=>({value:n[e].summary||e,idx:t}))),s=n[o[t]],a=s.description;return e.createElement(oa,null,e.createElement(ta,null,e.createElement(ea,null,"Example"),this.props.renderDropdown({value:i[t].value,options:i,onChange:this.switchMedia,ariaLabel:"Example"})),e.createElement("div",null,a&&e.createElement(Rs,{source:a}),e.createElement(Ks,{example:s,mimeType:r})))}{const t=n[o[0]];return e.createElement(oa,null,t.description&&e.createElement(Rs,{source:t.description}),e.createElement(Ks,{example:t,mimeType:r}))}}}const oa=te.div` + margin-top: 15px; +`;var sa=n(84851);const aa=te(To)` + button { + background-color: transparent; + border: 0; + outline: 0; + font-size: 13px; + font-family: ${e=>e.theme.typography.code.fontFamily}; + cursor: pointer; + padding: 0; + color: ${e=>e.theme.colors.text.primary}; + &:focus { + font-weight: ${({theme:e})=>e.typography.fontWeightBold}; + } + ${({kind:e})=>"patternProperties"===e&&X` + display: inline-flex; + margin-right: 20px; + + > span.property-name { + white-space: break-spaces; + text-align: left; + + ::before, + ::after { + content: '/'; + filter: opacity(0.2); + } + } + + > svg { + align-self: center; + } + `} + } + ${_o} { + height: ${({theme:e})=>e.schema.arrow.size}; + width: ${({theme:e})=>e.schema.arrow.size}; + polygon { + fill: ${({theme:e})=>e.schema.arrow.color}; + } + } +`,la=te.span` + vertical-align: middle; + font-size: ${({theme:e})=>e.typography.code.fontSize}; + line-height: 20px; +`,ca=te(la)` + color: ${e=>(0,t.transparentize)(.1,e.theme.schema.typeNameColor)}; +`,ua=te(la)` + color: ${e=>e.theme.schema.typeNameColor}; +`,pa=te(la)` + color: ${e=>e.theme.schema.typeTitleColor}; + word-break: break-word; +`,da=ua,fa=te(la.withComponent("div"))` + color: ${e=>e.theme.schema.requireLabelColor}; + font-size: ${e=>e.theme.schema.labelsTextSize}; + font-weight: normal; + margin-left: 20px; + line-height: 1; +`,ha=te(fa)` + color: ${e=>e.theme.colors.primary.light}; +`,ma=te(la)` + color: ${({theme:e})=>e.colors.warning.main}; + font-size: 13px; +`,ga=te(la)` + color: #0e7c86; + &::before, + &::after { + font-weight: bold; + } +`,ya=te(la)` + border-radius: 2px; + word-break: break-word; + ${({theme:e})=>`\n background-color: ${(0,t.transparentize)(.95,e.colors.text.primary)};\n color: ${(0,t.transparentize)(.1,e.colors.text.primary)};\n\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${(0,t.transparentize)(.9,e.colors.text.primary)};\n font-family: ${e.typography.code.fontFamily};\n}`}; + & + & { + margin-left: 0; + } + ${ne("ExampleValue")}; +`,va=te(ya)``,ba=te(la)` + border-radius: 2px; + ${({theme:e})=>`\n background-color: ${(0,t.transparentize)(.95,e.colors.primary.light)};\n color: ${(0,t.transparentize)(.1,e.colors.primary.main)};\n\n margin: 0 ${e.spacing.unit}px;\n padding: 0 ${e.spacing.unit}px;\n border: 1px solid ${(0,t.transparentize)(.9,e.colors.primary.main)};\n}`}; + & + & { + margin-left: 0; + } + ${ne("ConstraintItem")}; +`,xa=te.button` + background-color: transparent; + border: 0; + color: ${({theme:e})=>e.colors.text.secondary}; + margin-left: ${({theme:e})=>e.spacing.unit}px; + border-radius: 2px; + cursor: pointer; + outline-color: ${({theme:e})=>e.colors.text.secondary}; + font-size: 12px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;const wa=te.div` + ${bs}; + ${({compact:e})=>e?"":"margin: 1em 0"} +`;let ka=class extends e.Component{render(){const{externalDocs:t}=this.props;return t&&t.url?e.createElement(wa,{compact:this.props.compact},e.createElement("a",{href:t.url},t.description||t.url)):null}};ka=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],ka);class Oa extends e.PureComponent{constructor(){super(...arguments),this.state={collapsed:!0}}toggle(){this.setState({collapsed:!this.state.collapsed})}render(){const{values:t,isArrayType:n}=this.props,{collapsed:r}=this.state,{enumSkipQuotes:i,maxDisplayedEnumValues:o}=this.context;if(!t.length)return null;const s=this.state.collapsed&&o?t.slice(0,o):t,a=!!o&&t.length>o,l=o?r?`\u2026 ${t.length-o} more`:"Hide":"";return e.createElement("div",null,e.createElement(la,null,n?L("enumArray"):""," ",1===t.length?L("enumSingleValue"):L("enum"),":")," ",s.map(((t,n)=>{const r=i?String(t):JSON.stringify(t);return e.createElement(e.Fragment,{key:n},e.createElement(ya,null,r)," ")})),a?e.createElement(Sa,{onClick:()=>{this.toggle()}},l):null)}}Oa.contextType=ue;const Sa=te.span` + color: ${e=>e.theme.colors.primary.main}; + vertical-align: middle; + font-size: 13px; + line-height: 20px; + padding: 0 5px; + cursor: pointer; +`,Ea=te(xs)` + margin: 2px 0; +`;class _a extends e.PureComponent{render(){const t=this.props.extensions;return e.createElement(ue.Consumer,null,(n=>e.createElement(e.Fragment,null,n.showExtensions&&Object.keys(t).map((n=>e.createElement(Ea,{key:n},e.createElement(la,null," ",n.substring(2),": ")," ",e.createElement(va,null,"string"==typeof t[n]?t[n]:JSON.stringify(t[n]))))))))}}function Aa({field:t}){return t.examples?e.createElement(e.Fragment,null,e.createElement(la,null," ",L("examples"),": "),I(t.examples)?t.examples.map(((n,r)=>{const i=Ze(t,n),o=t.in?String(i):JSON.stringify(i);return e.createElement(e.Fragment,{key:r},e.createElement(ya,null,o)," ")})):e.createElement(Ra,null,Object.values(t.examples).map(((n,r)=>e.createElement("li",{key:r+n.value},e.createElement(ya,null,Ze(t,n.value))," -"," ",n.summary||n.description))))):null}const Ra=te.ul` + margin-top: 1em; + list-style-position: outside; +`;class Pa extends e.PureComponent{render(){return 0===this.props.constraints.length?null:e.createElement("span",null," ",this.props.constraints.map((t=>e.createElement(ba,{key:t}," ",t," "))))}}const Ca=e.memo((function({value:t,label:n,raw:r}){if(void 0===t)return null;const i=r?String(t):JSON.stringify(t);return e.createElement("div",null,e.createElement(la,null," ",n," ")," ",e.createElement(ya,null,i))}));function Ia(t){const n=t.schema.pattern,{hideSchemaPattern:r}=e.useContext(ue),[i,o]=e.useState(!1),s=e.useCallback((()=>o(!i)),[i]);return!n||r?null:e.createElement(e.Fragment,null,e.createElement(ga,null,i||n.length<45?n:`${n.substr(0,45)}...`),n.length>45&&e.createElement(xa,{onClick:s},i?"Hide pattern":"Show pattern"))}function Ta({schema:t}){const{hideSchemaPattern:n}=e.useContext(ue);return t&&("string"!==t.type||t.constraints.length)&&((null==t?void 0:t.pattern)&&!n||t.items||t.displayFormat||t.constraints.length)?e.createElement(ja,null,"[ items",t.displayFormat&&e.createElement(da,null," <",t.displayFormat," >"),e.createElement(Pa,{constraints:t.constraints}),e.createElement(Ia,{schema:t}),t.items&&e.createElement(Ta,{schema:t.items})," ]"):null}const ja=te(ca)` + margin: 0 5px; + vertical-align: text-top; +`;var La=Object.defineProperty,Na=Object.getOwnPropertySymbols,$a=Object.prototype.hasOwnProperty,Ma=Object.prototype.propertyIsEnumerable,Da=(e,t,n)=>t in e?La(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fa=(e,t)=>{for(var n in t||(t={}))$a.call(t,n)&&Da(e,n,t[n]);if(Na)for(var n of Na(t))Ma.call(t,n)&&Da(e,n,t[n]);return e};const za=(0,sa.observer)((t=>{const{enumSkipQuotes:n,hideSchemaTitles:r}=e.useContext(ue),{showExamples:i,field:o,renderDiscriminatorSwitch:s}=t,{schema:a,description:l,deprecated:c,extensions:u,in:p,const:d}=o,f="array"===a.type,h=n||"header"===p,m=e.useMemo((()=>!i||void 0===o.example&&void 0===o.examples?null:void 0!==o.examples?e.createElement(Aa,{field:o}):e.createElement(Ca,{label:L("example")+":",value:Ze(o,o.example),raw:Boolean(o.in)})),[o,i]);return e.createElement("div",null,e.createElement("div",null,e.createElement(ca,null,a.typePrefix),e.createElement(ua,null,a.displayType),a.displayFormat&&e.createElement(da,null," ","<",a.displayFormat,">"," "),a.contentEncoding&&e.createElement(da,null," ","<",a.contentEncoding,">"," "),a.contentMediaType&&e.createElement(da,null," ","<",a.contentMediaType,">"," "),a.title&&!r&&e.createElement(pa,null," (",a.title,") "),e.createElement(Pa,{constraints:a.constraints}),e.createElement(Ia,{schema:a}),a.isCircular&&e.createElement(ma,null," ",L("recursive")," "),f&&a.items&&e.createElement(Ta,{schema:a.items})),c&&e.createElement("div",null,e.createElement(Ao,{type:"warning"}," ",L("deprecated")," ")),e.createElement(Ca,{raw:h,label:L("default")+":",value:a.default}),!s&&e.createElement(Oa,{isArrayType:f,values:a.enum})," ",m,e.createElement(_a,{extensions:Fa(Fa({},u),a.extensions)}),e.createElement("div",null,e.createElement(Rs,{compact:!0,source:l})),a.externalDocs&&e.createElement(ka,{externalDocs:a.externalDocs,compact:!0}),s&&s(t)||null,d&&e.createElement(Ca,{label:L("const")+":",value:d})||null)})),Ba=e.memo(za);var Ua=Object.defineProperty,qa=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),Wa=Object.prototype.hasOwnProperty,Va=Object.prototype.propertyIsEnumerable,Qa=(e,t,n)=>t in e?Ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Ha=class extends e.Component{constructor(){super(...arguments),this.toggle=()=>{void 0===this.props.field.expanded&&this.props.expandByDefault?this.props.field.collapse():this.props.field.toggle()},this.handleKeyPress=e=>{"Enter"===e.key&&(e.preventDefault(),this.toggle())}}render(){const{className:t="",field:n,isLast:r,expandByDefault:i}=this.props,{name:o,deprecated:s,required:a,kind:l}=n,c=!n.schema.isPrimitive&&!n.schema.isCircular,u=void 0===n.expanded?i:n.expanded,p=e.createElement(e.Fragment,null,"additionalProperties"===l&&e.createElement(ha,null,"additional property"),"patternProperties"===l&&e.createElement(ha,null,"pattern property"),a&&e.createElement(fa,null,"required")),d=c?e.createElement(aa,{className:s?"deprecated":"",kind:l,title:o},e.createElement(Lo,null),e.createElement("button",{onClick:this.toggle,onKeyPress:this.handleKeyPress,"aria-label":"expand properties"},e.createElement("span",{className:"property-name"},o),e.createElement(_o,{direction:u?"down":"right"})),p):e.createElement(To,{className:s?"deprecated":void 0,kind:l,title:o},e.createElement(Lo,null),e.createElement("span",{className:"property-name"},o),p);return e.createElement(e.Fragment,null,e.createElement("tr",{className:r?"last "+t:t},d,e.createElement(jo,null,e.createElement(Ba,((e,t)=>{for(var n in t||(t={}))Wa.call(t,n)&&Qa(e,n,t[n]);if(qa)for(var n of qa(t))Va.call(t,n)&&Qa(e,n,t[n]);return e})({},this.props)))),u&&c&&e.createElement("tr",{key:n.name+"inner"},e.createElement(Io,{colSpan:2},e.createElement(No,null,e.createElement(Rl,{schema:n.schema,skipReadOnly:this.props.skipReadOnly,skipWriteOnly:this.props.skipWriteOnly,showTitle:this.props.showTitle,level:this.props.level})))))}};Ha=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Ha),Object.defineProperty,Object.getOwnPropertyDescriptor;let Ya=class extends e.Component{constructor(){super(...arguments),this.changeActiveChild=e=>{void 0!==e.idx&&this.props.parent.activateOneOf(e.idx)}}sortOptions(e,t){if(0===t.length)return;const n={};t.forEach(((e,t)=>{n[e]=t})),e.sort(((e,t)=>n[e.value]>n[t.value]?1:-1))}render(){const{parent:t,enumValues:n}=this.props;if(void 0===t.oneOf)return null;const r=t.oneOf.map(((e,t)=>({value:e.title,idx:t}))),i=r[t.activeOneOf].value;return this.sortOptions(r,n),e.createElement(cs,{value:i,options:r,onChange:this.changeActiveChild,ariaLabel:"Example"})}};Ya=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Ya);const Ga=(0,sa.observer)((({schema:{fields:t=[],title:n},showTitle:r,discriminator:i,skipReadOnly:o,skipWriteOnly:s,level:a})=>{const{expandSingleSchemaField:l,showObjectSchemaExamples:c,schemaExpansionLevel:u}=e.useContext(ue),p=e.useMemo((()=>o||s?t.filter((e=>!(o&&e.schema.readOnly||s&&e.schema.writeOnly))):t),[o,s,t]),d=l&&1===p.length||u>=a;return e.createElement($o,null,r&&e.createElement(Po,null,n),e.createElement("tbody",null,f(p,((t,n)=>e.createElement(Ha,{key:t.name,isLast:n,field:t,expandByDefault:d,renderDiscriminatorSwitch:(null==i?void 0:i.fieldName)===t.name?()=>e.createElement(Ya,{parent:i.parentSchema,enumValues:t.schema.enum}):void 0,className:t.expanded?"expanded":void 0,showExamples:c,skipReadOnly:o,skipWriteOnly:s,showTitle:r,level:a})))))}));var Xa=Object.defineProperty,Ka=Object.defineProperties,Za=Object.getOwnPropertyDescriptors,Ja=Object.getOwnPropertySymbols,el=Object.prototype.hasOwnProperty,tl=Object.prototype.propertyIsEnumerable,nl=(e,t,n)=>t in e?Xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rl=(e,t)=>{for(var n in t||(t={}))el.call(t,n)&&nl(e,n,t[n]);if(Ja)for(var n of Ja(t))tl.call(t,n)&&nl(e,n,t[n]);return e},il=(e,t)=>Ka(e,Za(t));const ol=te.div` + padding-left: ${({theme:e})=>2*e.spacing.unit}px; +`;class sl extends e.PureComponent{render(){const t=this.props.schema,n=t.items,r=void 0===t.minItems&&void 0===t.maxItems?"":`(${ot(t)})`;return t.fields?e.createElement(Ga,il(rl({},this.props),{level:this.props.level})):!t.displayType||n||r.length?e.createElement("div",null,e.createElement(zo,null," Array ",r),e.createElement(ol,null,e.createElement(Rl,il(rl({},this.props),{schema:n}))),e.createElement(Bo,null)):e.createElement("div",null,e.createElement(ua,null,t.displayType))}}var al=Object.defineProperty,ll=Object.defineProperties,cl=Object.getOwnPropertyDescriptor,ul=Object.getOwnPropertyDescriptors,pl=Object.getOwnPropertySymbols,dl=Object.prototype.hasOwnProperty,fl=Object.prototype.propertyIsEnumerable,hl=(e,t,n)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ml=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?cl(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&al(t,n,o),o};let gl=class extends e.Component{constructor(){super(...arguments),this.activateOneOf=()=>{this.props.schema.activateOneOf(this.props.idx)}}render(){const{idx:t,schema:n,subSchema:r}=this.props;return e.createElement(Fo,{deprecated:r.deprecated,active:t===n.activeOneOf,onClick:this.activateOneOf},r.title||r.typePrefix+r.displayType)}};gl=ml([sa.observer],gl);let yl=class extends e.Component{render(){const{schema:{oneOf:t},schema:n}=this.props;if(void 0===t)return null;const r=t[n.activeOneOf];return e.createElement("div",null,e.createElement(Do,null," ",n.oneOfType," "),e.createElement(Mo,null,t.map(((t,r)=>e.createElement(gl,{key:t.pointer,schema:n,subSchema:t,idx:r})))),e.createElement("div",null,t[n.activeOneOf].deprecated&&e.createElement(Ao,{type:"warning"},"Deprecated")),e.createElement(Pa,{constraints:r.constraints}),e.createElement(Rl,(i=((e,t)=>{for(var n in t||(t={}))dl.call(t,n)&&hl(e,n,t[n]);if(pl)for(var n of pl(t))fl.call(t,n)&&hl(e,n,t[n]);return e})({},this.props),ll(i,ul({schema:r})))));var i}};yl=ml([sa.observer],yl);const vl=(0,sa.observer)((({schema:t})=>e.createElement("div",null,e.createElement(ua,null,t.displayType),t.title&&e.createElement(pa,null," ",t.title," "),e.createElement(ma,null," ",L("recursive")," "))));var bl=Object.defineProperty,xl=Object.defineProperties,wl=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),kl=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Sl=Object.prototype.propertyIsEnumerable,El=(e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_l=(e,t)=>{for(var n in t||(t={}))Ol.call(t,n)&&El(e,n,t[n]);if(kl)for(var n of kl(t))Sl.call(t,n)&&El(e,n,t[n]);return e},Al=(e,t)=>xl(e,wl(t));let Rl=class extends e.Component{render(){var t;const n=this.props,{schema:r}=n,i=((e,t)=>{var n={};for(var r in e)Ol.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&kl)for(var r of kl(e))t.indexOf(r)<0&&Sl.call(e,r)&&(n[r]=e[r]);return n})(n,["schema"]),o=(i.level||0)+1;if(!r)return e.createElement("em",null," Schema not provided ");const{type:s,oneOf:a,discriminatorProp:l,isCircular:c}=r;if(c)return e.createElement(vl,{schema:r});if(void 0!==l){if(!a||!a.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${r.title}`),null;const t=a[r.activeOneOf];return t.isCircular?e.createElement(vl,{schema:t}):e.createElement(Ga,Al(_l({},i),{level:o,schema:t,discriminator:{fieldName:l,parentSchema:r}}))}if(void 0!==a)return e.createElement(yl,_l({schema:r},i));const u=I(s)?s:[s];if(u.includes("object")){if(null==(t=r.fields)?void 0:t.length)return e.createElement(Ga,Al(_l({},this.props),{level:o}))}else if(u.includes("array"))return e.createElement(sl,Al(_l({},this.props),{level:o}));const p={schema:r,name:"",required:!1,description:r.description,externalDocs:r.externalDocs,deprecated:!1,toggle:()=>null,expanded:!1};return e.createElement("div",null,e.createElement(Ba,{field:p}))}};Rl=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Rl);var Pl=Object.defineProperty,Cl=Object.defineProperties,Il=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,jl=Object.prototype.hasOwnProperty,Ll=Object.prototype.propertyIsEnumerable,Nl=(e,t,n)=>t in e?Pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class $l extends e.PureComponent{constructor(){super(...arguments),this.renderDropdown=t=>{return e.createElement(ys,(n=((e,t)=>{for(var n in t||(t={}))jl.call(t,n)&&Nl(e,n,t[n]);if(Tl)for(var n of Tl(t))Ll.call(t,n)&&Nl(e,n,t[n]);return e})({Label:ps,Dropdown:na},t),Cl(n,Il({variant:"dark"}))));var n}}static getMediaType(e,t){if(!e)return{};const n={schema:{$ref:e}};return t&&(n.examples={example:{$ref:t}}),n}get mediaModel(){const{parser:e,schemaRef:t,exampleRef:n,options:r}=this.props;return this._mediaModel||(this._mediaModel=new Yr(e,"json",!1,$l.getMediaType(t,n),r)),this._mediaModel}render(){const{showReadOnly:t=!0,showWriteOnly:n=!1}=this.props;return e.createElement(so,null,e.createElement(co,null,e.createElement(oo,null,e.createElement(Rl,{skipWriteOnly:!n,skipReadOnly:!t,schema:this.mediaModel.schema})),e.createElement(lo,null,e.createElement(Ml,null,e.createElement(ia,{renderDropdown:this.renderDropdown,mediaType:this.mediaModel})))))}}const Ml=te.div` + background: ${({theme:e})=>e.codeBlock.backgroundColor}; + & > div, + & > pre { + padding: ${e=>4*e.theme.spacing.unit}px; + margin: 0; + } + + & > div > pre { + padding: 0; + } +`,Dl=(Y().div` + background-color: #e4e7eb; +`,Y().ul` + display: inline; + list-style: none; + padding: 0; + + li { + display: inherit; + + &:after { + content: ','; + } + &:last-child:after { + content: none; + } + } +`,Y().code` + font-size: ${e=>e.theme.typography.code.fontSize}; + font-family: ${e=>e.theme.typography.code.fontFamily}; + margin: 0 3px; + padding: 0.2em; + display: inline-block; + line-height: 1; + + &:after { + content: ','; + font-weight: normal; + } + + &:last-child:after { + content: none; + } +`),Fl=Y().span` + &:after { + content: ' and '; + font-weight: normal; + } + + &:last-child:after { + content: none; + } + + ${bs}; +`,zl=Y().span` + ${e=>!e.expanded&&"white-space: nowrap;"} + &:after { + content: ' or '; + ${e=>e.expanded&&"content: ' or \\a';"} + white-space: pre; + } + + &:last-child:after, + &:only-child:after { + content: none; + } + + ${bs}; +`,Bl=Y().div` + flex: 1 1 auto; + cursor: pointer; +`,Ul=Y().div` + width: ${e=>e.theme.schema.defaultDetailsWidth}; + text-overflow: ellipsis; + border-radius: 4px; + overflow: hidden; + ${e=>e.expanded&&`background: ${e.theme.colors.gray[100]};\n padding: 8px 9.6px;\n margin: 20px 0;\n width: 100%;\n `}; + ${ee.lessThan("small")` + margin-top: 10px; + `} +`,ql=Y()(go)` + display: inline-block; + margin: 0; +`,Wl=Y().div` + width: 100%; + display: flex; + margin: 1em 0; + flex-direction: ${e=>e.expanded?"column":"row"}; + ${ee.lessThan("small")` + flex-direction: column; + `} +`,Vl=Y().div` + margin: 0.5em 0; +`,Ql=Y().div` + border-bottom: 1px solid ${({theme:e})=>e.colors.border.dark}; + margin-bottom: 1.5em; + padding-bottom: 0.7em; + + h5 { + line-height: 1em; + margin: 0 0 0.6em; + font-size: ${({theme:e})=>e.typography.fontSize}; + } + + .redoc-markdown p:first-child { + display: inline; + } +`;function Hl({children:t,height:n}){const r=e.createRef(),[i,o]=e.useState(!1),[s,a]=e.useState(!1);return e.useEffect((()=>{r.current&&r.current.clientHeight+20{o(!i)}},i?"See less":"See more")))}const Yl=Y().div` + overflow-y: hidden; +`,Gl=Y().div` + text-align: center; + line-height: 1.5em; + ${({dimmed:e})=>e&&"background-image: linear-gradient(to bottom, transparent,rgb(255 255 255));\n position: relative;\n top: -0.5em;\n padding-top: 0.5em;\n background-position-y: -1em;\n "} +`,Xl=Y().a` + cursor: pointer; +`,Kl=e.memo((function(t){const{type:n,flow:r,RequiredScopes:i}=t,o=Object.keys((null==r?void 0:r.scopes)||{});return e.createElement(e.Fragment,null,e.createElement(Vl,null,e.createElement("b",null,"Flow type: "),e.createElement("code",null,n," ")),("implicit"===n||"authorizationCode"===n)&&e.createElement(Vl,null,e.createElement("strong",null," Authorization URL: "),e.createElement("code",null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:r.authorizationUrl},r.authorizationUrl))),("password"===n||"clientCredentials"===n||"authorizationCode"===n)&&e.createElement(Vl,null,e.createElement("b",null," Token URL: "),e.createElement("code",null,r.tokenUrl)),r.refreshUrl&&e.createElement(Vl,null,e.createElement("strong",null," Refresh URL: "),r.refreshUrl),!!o.length&&e.createElement(e.Fragment,null,i||null,e.createElement(Vl,null,e.createElement("b",null," Scopes: ")),e.createElement(Hl,{height:"4em"},e.createElement("ul",null,o.map((t=>e.createElement("li",{key:t},e.createElement("code",null,t)," -"," ",e.createElement(Rs,{className:"redoc-markdown",inline:!0,source:r.scopes[t]||""}))))))))}));function Zl(t){const{RequiredScopes:n,scheme:r}=t;return e.createElement(xs,null,r.apiKey?e.createElement(e.Fragment,null,e.createElement(Vl,null,e.createElement("b",null,_(r.apiKey.in||"")," parameter name: "),e.createElement("code",null,r.apiKey.name)),n):r.http?e.createElement(e.Fragment,null,e.createElement(Vl,null,e.createElement("b",null,"HTTP Authorization Scheme: "),e.createElement("code",null,r.http.scheme)),e.createElement(Vl,null,"bearer"===r.http.scheme&&r.http.bearerFormat&&e.createElement(e.Fragment,null,e.createElement("b",null,"Bearer format: "),e.createElement("code",null,r.http.bearerFormat))),n):r.openId?e.createElement(e.Fragment,null,e.createElement(Vl,null,e.createElement("b",null,"Connect URL: "),e.createElement("code",null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:r.openId.connectUrl},r.openId.connectUrl))),n):r.flows?Object.keys(r.flows).map((t=>e.createElement(Kl,{key:t,type:t,RequiredScopes:n,flow:r.flows[t]}))):null)}const Jl={oauth2:"OAuth2",apiKey:"API Key",http:"HTTP",openIdConnect:"OpenID Connect"};class ec extends e.PureComponent{render(){return this.props.securitySchemes.schemes.map((t=>e.createElement(so,{id:t.sectionId,key:t.id},e.createElement(co,null,e.createElement(oo,null,e.createElement(ho,null,e.createElement(So,{to:t.sectionId}),t.displayName),e.createElement(Rs,{source:t.description||""}),e.createElement(Ql,null,e.createElement(Vl,null,e.createElement("b",null,"Security Scheme Type: "),e.createElement("span",null,Jl[t.type]||t.type)),e.createElement(Zl,{scheme:t})))))))}}var tc=(e,t,n)=>new Promise(((r,i)=>{var o=e=>{try{a(n.next(e))}catch(e){i(e)}},s=e=>{try{a(n.throw(e))}catch(e){i(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}));function nc(e,t){return tc(this,arguments,(function*(e,t,n={}){const r=yield ye(e||t);return new rc(r,t,n)}))}class rc{constructor(e,t,n={},r=!0){this.marker=new Qt,this.disposer=null,this.rawOptions=n,this.options=new Q(n,ic),this.scroll=new ro(this.options),Ji.updateOnHistory(Wt.currentId,this.scroll),this.spec=new ji(e,t,this.options),this.menu=new Ji(this.spec,this.scroll,Wt),this.options.disableSearch||(this.search=new io,r&&this.search.indexItems(this.menu.items),this.disposer=(0,fe.observe)(this.menu,"activeItemIdx",(e=>{this.updateMarkOnMenu(e.newValue)})))}static fromJS(e){const t=new rc(e.spec.data,e.spec.url,e.options,!1);return t.menu.activeItemIdx=e.menu.activeItemIdx||0,t.menu.activate(t.menu.flatItems[t.menu.activeItemIdx]),t.options.disableSearch||t.search.load(e.searchIndex),t}onDidMount(){this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx)}dispose(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),null!=this.disposer&&this.disposer()}toJS(){return tc(this,null,(function*(){return{menu:{activeItemIdx:this.menu.activeItemIdx},spec:{url:this.spec.parser.specUrl,data:this.spec.parser.spec},searchIndex:this.search?yield this.search.toJS():void 0,options:this.rawOptions}}))}updateMarkOnMenu(e){const t=Math.max(0,e),n=Math.min(this.menu.flatItems.length,t+5),r=[];for(let i=t;i({securitySchemes:e.spec.securitySchemes})},[ft]:{component:ec,propsSelector:e=>({securitySchemes:e.spec.securitySchemes})},[ht]:{component:$l,propsSelector:e=>({parser:e.spec.parser,options:e.options})}}},oc=te(fo)` + margin-top: 0; + margin-bottom: 0.5em; + + ${ne("ApiHeader")}; +`,sc=te.a` + border: 1px solid ${e=>e.theme.colors.primary.main}; + color: ${e=>e.theme.colors.primary.main}; + font-weight: normal; + margin-left: 0.5em; + padding: 4px 8px 4px; + display: inline-block; + text-decoration: none; + cursor: pointer; + + ${ne("DownloadButton")}; +`,ac=te.span` + &::before { + content: '|'; + display: inline-block; + opacity: 0.5; + width: ${15}px; + text-align: center; + } + + &:last-child::after { + display: none; + } +`,lc=te.div` + overflow: hidden; +`,cc=te.div` + display: flex; + flex-wrap: wrap; + // hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888 + margin-left: -${15}px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let uc=class extends e.Component{constructor(){super(...arguments),this.handleDownloadClick=e=>{e.target.href||(e.target.href=this.props.store.spec.info.downloadLink)}}render(){const{store:t}=this.props,{info:n,externalDocs:r}=t.spec,i=t.options.hideDownloadButton,o=n.downloadFileName,s=n.downloadLink,a=n.license&&e.createElement(ac,null,"License:"," ",n.license.identifier?n.license.identifier:e.createElement("a",{href:n.license.url},n.license.name))||null,l=n.contact&&n.contact.url&&e.createElement(ac,null,"URL: ",e.createElement("a",{href:n.contact.url},n.contact.url))||null,c=n.contact&&n.contact.email&&e.createElement(ac,null,n.contact.name||"E-mail",":"," ",e.createElement("a",{href:"mailto:"+n.contact.email},n.contact.email))||null,u=n.termsOfService&&e.createElement(ac,null,e.createElement("a",{href:n.termsOfService},"Terms of Service"))||null,p=n.version&&e.createElement("span",null,"(",n.version,")")||null;return e.createElement(so,null,e.createElement(co,null,e.createElement(oo,{className:"api-info"},e.createElement(oc,null,n.title," ",p),!i&&e.createElement("p",null,L("downloadSpecification"),":",e.createElement(sc,{download:o||!0,target:"_blank",href:s,onClick:this.handleDownloadClick},L("download"))),e.createElement(xs,null,(n.license||n.contact||n.termsOfService)&&e.createElement(lc,null,e.createElement(cc,null,c," ",l," ",a," ",u))||null),e.createElement(Rs,{source:t.spec.info.summary,"data-role":"redoc-summary"}),e.createElement(Rs,{source:t.spec.info.description,"data-role":"redoc-description"}),r&&e.createElement(ka,{externalDocs:r}))))}};uc=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],uc);const pc=te.img` + max-height: ${e=>e.theme.logo.maxHeight}; + max-width: ${e=>e.theme.logo.maxWidth}; + padding: ${e=>e.theme.logo.gutter}; + width: 100%; + display: block; +`,dc=te.div` + text-align: center; +`,fc=te.a` + display: inline-block; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let hc=class extends e.Component{render(){const{info:t}=this.props,n=t["x-logo"];if(!n||!n.url)return null;const r=n.href||t.contact&&t.contact.url,i=n.altText?n.altText:"logo",o=e.createElement(pc,{src:n.url,alt:i});return e.createElement(dc,{style:{backgroundColor:n.backgroundColor}},r?(s=r,t=>e.createElement(fc,{href:s},t))(o):o);var s}};hc=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],hc);var mc=Object.defineProperty,gc=Object.getOwnPropertySymbols,yc=Object.prototype.hasOwnProperty,vc=Object.prototype.propertyIsEnumerable,bc=(e,t,n)=>t in e?mc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xc=(e,t)=>{for(var n in t||(t={}))yc.call(t,n)&&bc(e,n,t[n]);if(gc)for(var n of gc(t))vc.call(t,n)&&bc(e,n,t[n]);return e};class wc extends e.Component{render(){return e.createElement(de,null,(t=>e.createElement(bo,null,(e=>this.renderWithOptionsAndStore(t,e)))))}renderWithOptionsAndStore(t,n){const{source:r,htmlWrap:i=(e=>e)}=this.props;if(!n)throw new Error("When using components in markdown, store prop must be provided");const o=new Wn(t,this.props.parentId).renderMdWithComponents(r);return o.length?o.map(((t,r)=>{if("string"==typeof t)return e.cloneElement(i(e.createElement(As,{html:t,inline:!1,compact:!1})),{key:r});const o=t.component;return e.createElement(o,xc({key:r},xc(xc({},t.props),t.propsSelector(n))))})):null}}var kc=n(94184),Oc=r.n(kc);const Sc=te.span.attrs((e=>({className:`operation-type ${e.type}`})))` + width: 9ex; + display: inline-block; + height: ${e=>e.theme.typography.code.fontSize}; + line-height: ${e=>e.theme.typography.code.fontSize}; + background-color: #333; + border-radius: 3px; + background-repeat: no-repeat; + background-position: 6px 4px; + font-size: 7px; + font-family: Verdana, sans-serif; // web-safe + color: white; + text-transform: uppercase; + text-align: center; + font-weight: bold; + vertical-align: middle; + margin-right: 6px; + margin-top: 2px; + + &.get { + background-color: ${e=>e.theme.colors.http.get}; + } + + &.post { + background-color: ${e=>e.theme.colors.http.post}; + } + + &.put { + background-color: ${e=>e.theme.colors.http.put}; + } + + &.options { + background-color: ${e=>e.theme.colors.http.options}; + } + + &.patch { + background-color: ${e=>e.theme.colors.http.patch}; + } + + &.delete { + background-color: ${e=>e.theme.colors.http.delete}; + } + + &.basic { + background-color: ${e=>e.theme.colors.http.basic}; + } + + &.link { + background-color: ${e=>e.theme.colors.http.link}; + } + + &.head { + background-color: ${e=>e.theme.colors.http.head}; + } + + &.hook { + background-color: ${e=>e.theme.colors.primary.main}; + } +`;function Ec(e,{theme:t},n){return e>1?t.sidebar.level1Items[n]:1===e?t.sidebar.groupItems[n]:""}const _c=te.ul` + margin: 0; + padding: 0; + + &:first-child { + padding-bottom: 32px; + } + + & & { + font-size: 0.929em; + } + + ${e=>e.expanded?"":"display: none;"}; +`,Ac=te.li` + list-style: none inside none; + overflow: hidden; + text-overflow: ellipsis; + padding: 0; + ${e=>0===e.depth?"margin-top: 15px":""}; +`,Rc={0:X` + opacity: 0.7; + text-transform: ${({theme:e})=>e.sidebar.groupItems.textTransform}; + font-size: 0.8em; + padding-bottom: 0; + cursor: default; + `,1:X` + font-size: 0.929em; + text-transform: ${({theme:e})=>e.sidebar.level1Items.textTransform}; + `},Pc=te.label.attrs((e=>({role:"menuitem",className:Oc()("-depth"+e.depth,{active:e.active})})))` + cursor: pointer; + color: ${e=>e.active?Ec(e.depth,e,"activeTextColor"):e.theme.sidebar.textColor}; + margin: 0; + padding: 12.5px ${e=>4*e.theme.spacing.unit}px; + ${({depth:e,type:t,theme:n})=>"section"===t&&e>1&&"padding-left: "+8*n.spacing.unit+"px;"||""} + display: flex; + justify-content: space-between; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + ${e=>Rc[e.depth]}; + background-color: ${e=>e.active?Ec(e.depth,e,"activeBackgroundColor"):e.theme.sidebar.backgroundColor}; + + ${e=>e.deprecated&&Ro||""}; + + &:hover { + color: ${e=>Ec(e.depth,e,"activeTextColor")}; + background-color: ${e=>Ec(e.depth,e,"activeBackgroundColor")}; + } + + ${_o} { + height: ${({theme:e})=>e.sidebar.arrow.size}; + width: ${({theme:e})=>e.sidebar.arrow.size}; + polygon { + fill: ${({theme:e})=>e.sidebar.arrow.color}; + } + } +`,Cc=te.span` + display: inline-block; + vertical-align: middle; + width: ${e=>e.width?e.width:"auto"}; + overflow: hidden; + text-overflow: ellipsis; +`,Ic=te.div` + ${({theme:e})=>X` + font-size: 0.8em; + margin-top: ${2*e.spacing.unit}px; + text-align: center; + position: fixed; + width: ${e.sidebar.width}; + bottom: 0; + background: ${e.sidebar.backgroundColor}; + + a, + a:visited, + a:hover { + color: ${e.sidebar.textColor} !important; + padding: ${e.spacing.unit}px 0; + border-top: 1px solid ${(0,t.darken)(.1,e.sidebar.backgroundColor)}; + text-decoration: none; + display: flex; + align-items: center; + justify-content: center; + } + `}; + img { + width: 15px; + margin-right: 5px; + } + + ${ee.lessThan("small")` + width: 100%; + `}; +`,Tc=te.button` + border: 0; + width: 100%; + text-align: left; + & > * { + vertical-align: middle; + } + + ${_o} { + polygon { + fill: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.colors.gray[100])}; + } + } +`,jc=te.span` + text-decoration: ${e=>e.deprecated?"line-through":"none"}; + margin-right: 8px; +`,Lc=te(Sc)` + margin: 0 5px 0 0; +`,Nc=te((t=>{const{name:n,opened:r,className:i,onClick:o,httpVerb:s,deprecated:a}=t;return e.createElement(Tc,{className:i,onClick:o||void 0},e.createElement(Lc,{type:s},yt(s)),e.createElement(_o,{size:"1.5em",direction:r?"down":"right",float:"left"}),e.createElement(jc,{deprecated:a},n),a?e.createElement(Ao,{type:"warning"}," ",L("deprecated")," "):null)}))` + padding: 10px; + border-radius: 2px; + margin-bottom: 4px; + line-height: 1.5em; + background-color: ${({theme:e})=>e.colors.gray[100]}; + cursor: pointer; + outline-color: ${({theme:e})=>(0,t.darken)(e.colors.tonalOffset,e.colors.gray[100])}; +`,$c=te.div` + padding: 10px 25px; + background-color: ${({theme:e})=>e.colors.gray[50]}; + margin-bottom: 5px; + margin-top: 5px; +`;class Mc extends e.PureComponent{constructor(){super(...arguments),this.selectElement=()=>{$s.selectElement(this.child)}}render(){const{children:t}=this.props;return e.createElement("div",{ref:e=>this.child=e,onClick:this.selectElement,onFocus:this.selectElement,tabIndex:0,role:"button"},t)}}const Dc=te.div` + cursor: pointer; + position: relative; + margin-bottom: 5px; +`,Fc=te.span` + font-family: ${e=>e.theme.typography.code.fontFamily}; + margin-left: 10px; + flex: 1; + overflow-x: hidden; + text-overflow: ellipsis; +`,zc=te.button` + outline: 0; + color: inherit; + width: 100%; + text-align: left; + cursor: pointer; + padding: 10px 30px 10px ${e=>e.inverted?"10px":"20px"}; + border-radius: ${e=>e.inverted?"0":"4px 4px 0 0"}; + background-color: ${e=>e.inverted?"transparent":e.theme.codeBlock.backgroundColor}; + display: flex; + white-space: nowrap; + align-items: center; + border: ${e=>e.inverted?"0":"1px solid transparent"}; + border-bottom: ${e=>e.inverted?"1px solid #ccc":"0"}; + transition: border-color 0.25s ease; + + ${e=>e.expanded&&!e.inverted&&`border-color: ${e.theme.colors.border.dark};`||""} + + .${Fc} { + color: ${e=>e.inverted?e.theme.colors.text.primary:"#ffffff"}; + } + &:focus { + box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25); + } +`,Bc=te.span.attrs((e=>({className:`http-verb ${e.type}`})))` + font-size: ${e=>e.compact?"0.8em":"0.929em"}; + line-height: ${e=>e.compact?"18px":"20px"}; + background-color: ${e=>e.theme.colors.http[e.type]||"#999999"}; + color: #ffffff; + padding: ${e=>e.compact?"2px 8px":"3px 10px"}; + text-transform: uppercase; + font-family: ${e=>e.theme.typography.headings.fontFamily}; + margin: 0; +`,Uc=te.div` + position: absolute; + width: 100%; + z-index: 100; + background: ${e=>e.theme.rightPanel.servers.overlay.backgroundColor}; + color: ${e=>e.theme.rightPanel.servers.overlay.textColor}; + box-sizing: border-box; + box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33); + overflow: hidden; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + transition: all 0.25s ease; + visibility: hidden; + ${e=>e.expanded?"visibility: visible;":"transform: translateY(-50%) scaleY(0);"} +`,qc=te.div` + padding: 10px; +`,Wc=te.div` + padding: 5px; + border: 1px solid #ccc; + background: ${e=>e.theme.rightPanel.servers.url.backgroundColor}; + word-break: break-all; + color: ${e=>e.theme.colors.primary.main}; + > span { + color: ${e=>e.theme.colors.text.primary}; + } +`;class Vc extends e.Component{constructor(e){super(e),this.toggle=()=>{this.setState({expanded:!this.state.expanded})},this.state={expanded:!1}}render(){const{operation:t,inverted:n,hideHostname:r}=this.props,{expanded:i}=this.state;return e.createElement(ue.Consumer,null,(o=>e.createElement(Dc,null,e.createElement(zc,{onClick:this.toggle,expanded:i,inverted:n},e.createElement(Bc,{type:t.httpVerb,compact:this.props.compact},t.httpVerb),e.createElement(Fc,null,t.path),e.createElement(_o,{float:"right",color:n?"black":"white",size:"20px",direction:i?"up":"down",style:{marginRight:"-25px"}})),e.createElement(Uc,{expanded:i,"aria-hidden":!i},t.servers.map((n=>{const i=o.expandDefaultServerVariables?ut(n.url,n.variables):n.url,s=E(i);return e.createElement(qc,{key:i},e.createElement(Rs,{source:n.description||"",compact:!0}),e.createElement(Mc,null,e.createElement(Wc,null,e.createElement("span",null,r||o.hideHostname?"/"===s?"":s:i),t.path)))}))))))}}class Qc extends e.PureComponent{render(){const{place:t,parameters:n}=this.props;return n&&n.length?e.createElement("div",{key:t},e.createElement(go,null,t," Parameters"),e.createElement($o,null,e.createElement("tbody",null,f(n,((t,n)=>e.createElement(Ha,{key:t.name,isLast:n,field:t,showExamples:!0})))))):null}}Object.defineProperty,Object.getOwnPropertyDescriptor;let Hc=class extends e.Component{constructor(){super(...arguments),this.switchMedia=({idx:e})=>{this.props.content&&void 0!==e&&this.props.content.activate(e)}}render(){const{content:t}=this.props;if(!t||!t.mediaTypes||!t.mediaTypes.length)return null;const n=t.activeMimeIdx,r=t.mediaTypes.map(((e,t)=>({value:e.name,idx:t}))),i=({children:t})=>this.props.withLabel?e.createElement(ta,null,e.createElement(ea,null,"Content type"),t):t;return e.createElement(e.Fragment,null,e.createElement(i,null,this.props.renderDropdown({value:r[n].value,options:r,onChange:this.switchMedia,ariaLabel:"Content type"})),this.props.children(t.active))}};Hc=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Hc);var Yc=Object.defineProperty,Gc=Object.getOwnPropertySymbols,Xc=Object.prototype.hasOwnProperty,Kc=Object.prototype.propertyIsEnumerable,Zc=(e,t,n)=>t in e?Yc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Jc=["path","query","cookie","header"];class eu extends e.PureComponent{orderParams(e){const t={};return e.forEach((e=>{var n,r,i;i=e,(n=t)[r=e.in]||(n[r]=[]),n[r].push(i)})),t}render(){const{body:t,parameters:n=[]}=this.props;if(void 0===t&&void 0===n)return null;const r=this.orderParams(n),i=n.length>0?Jc:[],o=t&&t.content,s=t&&t.description;return e.createElement(e.Fragment,null,i.map((t=>e.createElement(Qc,{key:t,place:t,parameters:r[t]}))),o&&e.createElement(nu,{content:o,description:s}))}}function tu(t){return e.createElement(go,{key:"header"},"Request Body schema: ",e.createElement(ys,((e,t)=>{for(var n in t||(t={}))Xc.call(t,n)&&Zc(e,n,t[n]);if(Gc)for(var n of Gc(t))Kc.call(t,n)&&Zc(e,n,t[n]);return e})({},t)))}function nu(t){const{content:n,description:r}=t,{isRequestType:i}=n;return e.createElement(Hc,{content:n,renderDropdown:tu},(({schema:t})=>e.createElement(e.Fragment,null,void 0!==r&&e.createElement(Rs,{source:r}),"object"===(null==t?void 0:t.type)&&e.createElement(Pa,{constraints:(null==t?void 0:t.constraints)||[]}),e.createElement(Rl,{skipReadOnly:i,skipWriteOnly:!i,key:"schema",schema:t}))))}const ru=e.memo((function({title:t,type:n,empty:r,code:i,opened:o,className:s,onClick:a}){return e.createElement("button",{className:s,onClick:!r&&a||void 0,"aria-expanded":o,disabled:r},!r&&e.createElement(_o,{size:"1.5em",color:n,direction:o?"down":"right",float:"left"}),e.createElement(au,null,i," "),e.createElement(Rs,{compact:!0,inline:!0,source:t}))})),iu=te(ru)` + display: block; + border: 0; + width: 100%; + text-align: left; + padding: 10px; + border-radius: 2px; + margin-bottom: 4px; + line-height: 1.5em; + cursor: pointer; + + color: ${e=>e.theme.colors.responses[e.type].color}; + background-color: ${e=>e.theme.colors.responses[e.type].backgroundColor}; + &:focus { + outline: auto ${e=>e.theme.colors.responses[e.type].color}; + } + ${e=>e.empty?'\ncursor: default;\n&::before {\n content: "\u2014";\n font-weight: bold;\n width: 1.5em;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n}\n&:focus {\n outline: 0;\n}\n':""}; +`,ou=te.div` + padding: 10px; +`,su=te(go.withComponent("caption"))` + text-align: left; + margin-top: 1em; + caption-side: top; +`,au=te.strong` + vertical-align: top; +`;class lu extends e.PureComponent{render(){const{headers:t}=this.props;return void 0===t||0===t.length?null:e.createElement($o,null,e.createElement(su,null," Response Headers "),e.createElement("tbody",null,f(t,((t,n)=>e.createElement(Ha,{isLast:n,key:t.name,field:t,showExamples:!0})))))}}var cu=Object.defineProperty,uu=Object.getOwnPropertySymbols,pu=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable,fu=(e,t,n)=>t in e?cu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class hu extends e.PureComponent{constructor(){super(...arguments),this.renderDropdown=t=>e.createElement(go,{key:"header"},"Response Schema: ",e.createElement(ys,((e,t)=>{for(var n in t||(t={}))pu.call(t,n)&&fu(e,n,t[n]);if(uu)for(var n of uu(t))du.call(t,n)&&fu(e,n,t[n]);return e})({},t)))}render(){const{description:t,extensions:n,headers:r,content:i}=this.props.response;return e.createElement(e.Fragment,null,t&&e.createElement(Rs,{source:t}),e.createElement(_a,{extensions:n}),e.createElement(lu,{headers:r}),e.createElement(Hc,{content:i,renderDropdown:this.renderDropdown},(({schema:t})=>e.createElement(e.Fragment,null,"object"===(null==t?void 0:t.type)&&e.createElement(Pa,{constraints:(null==t?void 0:t.constraints)||[]}),e.createElement(Rl,{skipWriteOnly:!0,key:"schema",schema:t})))))}}const mu=(0,sa.observer)((({response:t})=>{const{extensions:n,headers:r,type:i,summary:o,description:s,code:a,expanded:l,content:c}=t,u=e.useMemo((()=>void 0===c?[]:c.mediaTypes.filter((e=>void 0!==e.schema))),[c]),p=e.useMemo((()=>!(n&&0!==Object.keys(n).length||0!==r.length||0!==u.length||s)),[n,r,u,s]);return e.createElement("div",null,e.createElement(iu,{onClick:()=>t.toggle(),type:i,empty:p,title:o||"",code:a,opened:l}),l&&!p&&e.createElement(ou,null,e.createElement(hu,{response:t})))})),gu=te.h3` + font-size: 1.3em; + padding: 0.2em 0; + margin: 3em 0 1.1em; + color: ${({theme:e})=>e.colors.text.primary}; + font-weight: normal; +`;class yu extends e.PureComponent{render(){const{responses:t,isCallback:n}=this.props;return t&&0!==t.length?e.createElement("div",null,e.createElement(gu,null,L(n?"callbackResponses":"responses")),t.map((t=>e.createElement(mu,{key:t.code,response:t})))):null}}function vu(t){const{security:n,showSecuritySchemeType:r,expanded:i}=t,o=n.schemes.length>1;return 0===n.schemes.length?e.createElement(zl,{expanded:i},"None"):e.createElement(zl,{expanded:i},o&&"(",n.schemes.map((t=>e.createElement(Fl,{key:t.id},r&&`${Jl[t.type]||t.type}: `,e.createElement("i",null,t.displayName),i&&t.scopes.length?[" (",t.scopes.map((t=>e.createElement(Dl,{key:t},t))),") "]:null))),o&&") ")}const bu=({scopes:t})=>t.length?e.createElement("div",null,e.createElement("b",null,"Required scopes: "),t.map(((t,n)=>e.createElement(e.Fragment,{key:n},e.createElement("code",null,t)," ")))):null;function xu(t){const n=wo(),r=null==n?void 0:n.options.showSecuritySchemeType,[i,o]=(0,e.useState)(!1),{securities:s}=t;if(!(null==s?void 0:s.length)||(null==n?void 0:n.options.hideSecuritySection))return null;const a=null==n?void 0:n.spec.securitySchemes.schemes.filter((({id:e})=>s.find((t=>t.schemes.find((t=>t.id===e))))));return e.createElement(e.Fragment,null,e.createElement(Wl,{expanded:i},e.createElement(Bl,{onClick:()=>o(!i)},e.createElement(ql,null,"Authorizations:"),e.createElement(_o,{size:"1.3em",direction:i?"down":"right"})),e.createElement(Ul,{expanded:i},s.map(((t,n)=>e.createElement(vu,{key:n,expanded:i,showSecuritySchemeType:r,security:t}))))),i&&(null==a?void 0:a.length)&&a.map(((t,n)=>e.createElement(Ql,{key:n},e.createElement("h5",null,e.createElement(wu,null)," ",Jl[t.type]||t.type,": ",t.id),e.createElement(Rs,{source:t.description||""}),e.createElement(Zl,{key:t.id,scheme:t,RequiredScopes:e.createElement(bu,{scopes:ku(t.id,s)})})))))}const wu=()=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"11",height:"11"},e.createElement("path",{fill:"currentColor",d:"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z"}));function ku(e,t){const n=[];let r=t.length;for(;r--;){const i=t[r];let o=i.schemes.length;for(;o--;){const t=i.schemes[o];t.id===e&&Array.isArray(t.scopes)&&n.push(...t.scopes)}}return Array.from(new Set(n))}Object.defineProperty,Object.getOwnPropertyDescriptor;let Ou=class extends e.Component{render(){const{operation:t}=this.props,{description:n,externalDocs:r}=t,i=!(!n&&!r);return e.createElement($c,null,i&&e.createElement(Su,null,void 0!==n&&e.createElement(Rs,{source:n}),r&&e.createElement(ka,{externalDocs:r})),e.createElement(Vc,{operation:this.props.operation,inverted:!0,compact:!0}),e.createElement(_a,{extensions:t.extensions}),e.createElement(xu,{securities:t.security}),e.createElement(eu,{parameters:t.parameters,body:t.requestBody}),e.createElement(yu,{responses:t.responses,isCallback:t.isCallback}))}};Ou=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Ou);const Su=te.div` + margin-bottom: ${({theme:e})=>3*e.spacing.unit}px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Eu=class extends e.Component{constructor(){super(...arguments),this.toggle=()=>{this.props.callbackOperation.toggle()}}render(){const{name:t,expanded:n,httpVerb:r,deprecated:i}=this.props.callbackOperation;return e.createElement(e.Fragment,null,e.createElement(Nc,{onClick:this.toggle,name:t,opened:n,httpVerb:r,deprecated:i}),n&&e.createElement(Ou,{operation:this.props.callbackOperation}))}};Eu=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Eu);class _u extends e.PureComponent{render(){const{callbacks:t}=this.props;return t&&0!==t.length?e.createElement("div",null,e.createElement(Au,null," Callbacks "),t.map((t=>t.operations.map(((n,r)=>e.createElement(Eu,{key:`${t.name}_${r}`,callbackOperation:n})))))):null}}const Au=te.h3` + font-size: 1.3em; + padding: 0.2em 0; + margin: 3em 0 1.1em; + color: ${({theme:e})=>e.colors.text.primary}; + font-weight: normal; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Ru=class extends e.Component{constructor(e){super(e),this.switchItem=({idx:e})=>{this.props.items&&void 0!==e&&this.setState({activeItemIdx:e})},this.state={activeItemIdx:0}}render(){const{items:t}=this.props;if(!t||!t.length)return null;const n=({children:t})=>this.props.label?e.createElement(ta,null,e.createElement(ea,null,this.props.label),t):t;return e.createElement(e.Fragment,null,e.createElement(n,null,this.props.renderDropdown({value:this.props.options[this.state.activeItemIdx].value,options:this.props.options,onChange:this.switchItem,ariaLabel:this.props.label||"Callback"})),this.props.children(t[this.state.activeItemIdx]))}};Ru=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Ru);var Pu=Object.defineProperty,Cu=Object.defineProperties,Iu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Tu=Object.getOwnPropertySymbols,ju=Object.prototype.hasOwnProperty,Lu=Object.prototype.propertyIsEnumerable,Nu=(e,t,n)=>t in e?Pu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let $u=class extends e.Component{constructor(){super(...arguments),this.renderDropdown=t=>{return e.createElement(ys,(n=((e,t)=>{for(var n in t||(t={}))ju.call(t,n)&&Nu(e,n,t[n]);if(Tu)for(var n of Tu(t))Lu.call(t,n)&&Nu(e,n,t[n]);return e})({Label:Js,Dropdown:na},t),Cu(n,Iu({variant:"dark"}))));var n}}render(){const t=this.props.content;return void 0===t?null:e.createElement(Hc,{content:t,renderDropdown:this.renderDropdown,withLabel:!0},(t=>e.createElement(ia,{key:"samples",mediaType:t,renderDropdown:this.renderDropdown})))}};$u=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],$u);class Mu extends e.Component{render(){const t=this.props.callback.codeSamples.find((e=>fi(e)));return t?e.createElement(Du,null,e.createElement($u,{content:t.requestBodyContent})):null}}const Du=te.div` + margin-top: 15px; +`;var Fu=Object.defineProperty,zu=Object.defineProperties,Bu=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),Uu=Object.getOwnPropertySymbols,qu=Object.prototype.hasOwnProperty,Wu=Object.prototype.propertyIsEnumerable,Vu=(e,t,n)=>t in e?Fu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Qu=class extends e.Component{constructor(){super(...arguments),this.renderDropdown=t=>{return e.createElement(ys,(n=((e,t)=>{for(var n in t||(t={}))qu.call(t,n)&&Vu(e,n,t[n]);if(Uu)for(var n of Uu(t))Wu.call(t,n)&&Vu(e,n,t[n]);return e})({Label:Js,Dropdown:na},t),zu(n,Bu({variant:"dark"}))));var n}}render(){const{callbacks:t}=this.props;if(!t||0===t.length)return null;const n=t.map((e=>e.operations.map((e=>e)))).reduce(((e,t)=>e.concat(t)),[]);if(!n.some((e=>e.codeSamples.length>0)))return null;const r=n.map(((e,t)=>({value:`${e.httpVerb.toUpperCase()}: ${e.name}`,idx:t})));return e.createElement("div",null,e.createElement(mo,null," Callback payload samples "),e.createElement(Hu,null,e.createElement(Ru,{items:n,renderDropdown:this.renderDropdown,label:"Callback",options:r},(t=>e.createElement(Mu,{key:"callbackPayloadSample",callback:t,renderDropdown:this.renderDropdown})))))}};Qu.contextType=ue,Qu=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Qu);const Hu=te.div` + background: ${({theme:e})=>e.codeBlock.backgroundColor}; + padding: ${e=>4*e.theme.spacing.unit}px; +`;Object.defineProperty,Object.getOwnPropertyDescriptor;let Yu=class extends e.Component{render(){const{operation:t}=this.props,n=t.codeSamples,r=n.length>0,i=1===n.length&&this.context.hideSingleRequestSampleTab;return r&&e.createElement("div",null,e.createElement(mo,null," ",L("requestSamples")," "),e.createElement(qo,{defaultIndex:0},e.createElement(Uo.TabList,{hidden:i},n.map((t=>e.createElement(Uo.Tab,{key:t.lang+"_"+(t.label||"")},void 0!==t.label?t.label:t.lang)))),n.map((t=>e.createElement(Uo.TabPanel,{key:t.lang+"_"+(t.label||"")},fi(t)?e.createElement("div",null,e.createElement($u,{content:t.requestBodyContent})):e.createElement(Gs,{lang:t.lang,source:t.source}))))))||null}};Yu.contextType=ue,Yu=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Yu),Object.defineProperty,Object.getOwnPropertyDescriptor;let Gu=class extends e.Component{render(){const{operation:t}=this.props,n=t.responses.filter((e=>e.content&&e.content.hasSample));return n.length>0&&e.createElement("div",null,e.createElement(mo,null," ",L("responseSamples")," "),e.createElement(qo,{defaultIndex:0},e.createElement(Uo.TabList,null,n.map((t=>e.createElement(Uo.Tab,{className:"tab-"+t.type,key:t.code},t.code)))),n.map((t=>e.createElement(Uo.TabPanel,{key:t.code},e.createElement("div",null,e.createElement($u,{content:t.content})))))))||null}};Gu=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Gu);var Xu=Object.defineProperty,Ku=Object.defineProperties,Zu=Object.getOwnPropertyDescriptors,Ju=Object.getOwnPropertySymbols,ep=Object.prototype.hasOwnProperty,tp=Object.prototype.propertyIsEnumerable,np=(e,t,n)=>t in e?Xu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const rp=te.div` + margin-bottom: ${({theme:e})=>6*e.spacing.unit}px; +`,ip=(0,sa.observer)((({operation:t})=>{const{name:n,description:r,deprecated:i,externalDocs:o,isWebhook:s,httpVerb:a}=t,l=!(!r&&!o),{showWebhookVerb:c}=e.useContext(ue);return e.createElement(ue.Consumer,null,(u=>{return e.createElement(co,(p=((e,t)=>{for(var n in t||(t={}))ep.call(t,n)&&np(e,n,t[n]);if(Ju)for(var n of Ju(t))tp.call(t,n)&&np(e,n,t[n]);return e})({},{[Zi]:t.operationHash}),d={id:t.operationHash},Ku(p,Zu(d))),e.createElement(oo,null,e.createElement(ho,null,e.createElement(So,{to:t.id}),n," ",i&&e.createElement(Ao,{type:"warning"}," Deprecated "),s&&e.createElement(Ao,{type:"primary"}," ","Webhook ",c&&a&&"| "+a.toUpperCase())),u.pathInMiddlePanel&&!s&&e.createElement(Vc,{operation:t,inverted:!0}),l&&e.createElement(rp,null,void 0!==r&&e.createElement(Rs,{source:r}),o&&e.createElement(ka,{externalDocs:o})),e.createElement(_a,{extensions:t.extensions}),e.createElement(xu,{securities:t.security}),e.createElement(eu,{parameters:t.parameters,body:t.requestBody}),e.createElement(yu,{responses:t.responses}),e.createElement(_u,{callbacks:t.callbacks})),e.createElement(lo,null,!u.pathInMiddlePanel&&!s&&e.createElement(Vc,{operation:t}),e.createElement(Yu,{operation:t}),e.createElement(Gu,{operation:t}),e.createElement(Qu,{callbacks:t.callbacks})));var p,d}))}));var op=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,ap=Object.getOwnPropertySymbols,lp=Object.prototype.hasOwnProperty,cp=Object.prototype.propertyIsEnumerable,up=(e,t,n)=>t in e?op(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pp=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?sp(t,n):t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&op(t,n,o),o};let dp=class extends e.Component{render(){const t=this.props.items;return 0===t.length?null:t.map((t=>e.createElement(fp,{key:t.id,item:t})))}};dp=pp([sa.observer],dp);let fp=class extends e.Component{render(){const t=this.props.item;let n;const{type:r}=t;switch(r){case"group":n=null;break;case"tag":case"section":default:n=e.createElement(mp,((e,t)=>{for(var n in t||(t={}))lp.call(t,n)&&up(e,n,t[n]);if(ap)for(var n of ap(t))cp.call(t,n)&&up(e,n,t[n]);return e})({},this.props));break;case"operation":n=e.createElement(gp,{item:t})}return e.createElement(e.Fragment,null,n&&e.createElement(so,{id:t.id,underlined:"operation"===t.type},n),t.items&&e.createElement(dp,{items:t.items}))}};fp=pp([sa.observer],fp);const hp=t=>e.createElement(oo,{compact:!0},t);let mp=class extends e.Component{render(){const{name:t,description:n,externalDocs:r,level:i}=this.props.item,o=2===i?ho:fo;return e.createElement(e.Fragment,null,e.createElement(co,null,e.createElement(oo,{compact:!1},e.createElement(o,null,e.createElement(So,{to:this.props.item.id}),t))),e.createElement(wc,{parentId:this.props.item.id,source:n||"",htmlWrap:hp}),r&&e.createElement(co,null,e.createElement(oo,null,e.createElement(ka,{externalDocs:r}))))}};mp=pp([sa.observer],mp);let gp=class extends e.Component{render(){return e.createElement(ip,{operation:this.props.item})}};gp=pp([sa.observer],gp);var yp=Object.defineProperty,vp=Object.defineProperties,bp=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),xp=Object.getOwnPropertySymbols,wp=Object.prototype.hasOwnProperty,kp=Object.prototype.propertyIsEnumerable,Op=(e,t,n)=>t in e?yp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Sp=class extends e.Component{constructor(){super(...arguments),this.ref=e.createRef(),this.activate=e=>{this.props.onActivate(this.props.item),e.stopPropagation()}}componentDidMount(){this.scrollIntoViewIfActive()}componentDidUpdate(){this.scrollIntoViewIfActive()}scrollIntoViewIfActive(){this.props.item.active&&this.ref.current&&u(this.ref.current)}render(){const{item:t,withoutChildren:n}=this.props;return e.createElement(Ac,{onClick:this.activate,depth:t.depth,"data-item-id":t.id},"operation"===t.type?e.createElement(Ep,(r=((e,t)=>{for(var n in t||(t={}))wp.call(t,n)&&Op(e,n,t[n]);if(xp)for(var n of xp(t))kp.call(t,n)&&Op(e,n,t[n]);return e})({},this.props),vp(r,bp({item:t})))):e.createElement(Pc,{depth:t.depth,active:t.active,type:t.type,ref:this.ref},e.createElement(Cc,{title:t.sidebarLabel},t.sidebarLabel,this.props.children),t.depth>0&&t.items.length>0&&e.createElement(_o,{float:"right",direction:t.expanded?"down":"right"})||null),!n&&t.items&&t.items.length>0&&e.createElement(Ip,{expanded:t.expanded,items:t.items,onActivate:this.props.onActivate}));var r}};Sp=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Sp);const Ep=(0,sa.observer)((t=>{const{item:n}=t,r=e.createRef(),{showWebhookVerb:i}=e.useContext(ue);return e.useEffect((()=>{t.item.active&&r.current&&u(r.current)}),[t.item.active,r]),e.createElement(Pc,{depth:n.depth,active:n.active,deprecated:n.deprecated,ref:r},n.isWebhook?e.createElement(Sc,{type:"hook"},i?n.httpVerb:L("webhook")):e.createElement(Sc,{type:n.httpVerb},yt(n.httpVerb)),e.createElement(Cc,{width:"calc(100% - 38px)"},n.sidebarLabel,t.children))}));var _p=Object.defineProperty,Ap=(Object.getOwnPropertyDescriptor,Object.getOwnPropertySymbols),Rp=Object.prototype.hasOwnProperty,Pp=Object.prototype.propertyIsEnumerable,Cp=(e,t,n)=>t in e?_p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;let Ip=class extends e.Component{render(){const{items:t,root:n,className:r}=this.props,i=null==this.props.expanded||this.props.expanded;return e.createElement(_c,((e,t)=>{for(var n in t||(t={}))Rp.call(t,n)&&Cp(e,n,t[n]);if(Ap)for(var n of Ap(t))Pp.call(t,n)&&Cp(e,n,t[n]);return e})({className:r,style:this.props.style,expanded:i},n?{role:"menu"}:{}),t.map(((t,n)=>e.createElement(Sp,{key:n,item:t,onActivate:this.props.onActivate}))))}};function Tp(){const[t,n]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{n(!0)}),[]),t?e.createElement("img",{alt:"redocly logo",onError:()=>n(!1),src:"https://cdn.redoc.ly/redoc/logo-mini.svg"}):null}Ip=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Ip),Object.defineProperty,Object.getOwnPropertyDescriptor;let jp=class extends e.Component{constructor(){super(...arguments),this.activate=e=>{if(e&&e.active&&this.context.menuToggle)return e.expanded?e.collapse():e.expand();this.props.menu.activateAndScroll(e,!0),setTimeout((()=>{this._updateScroll&&this._updateScroll()}))},this.saveScrollUpdate=e=>{this._updateScroll=e}}render(){const t=this.props.menu;return e.createElement(ss,{updateFn:this.saveScrollUpdate,className:this.props.className,options:{wheelPropagation:!1}},e.createElement(Ip,{items:t.items,onActivate:this.activate,root:!0}),e.createElement(Ic,null,e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://redocly.com/redoc/"},e.createElement(Tp,null),"API docs by Redocly")))}};jp.contextType=ue,jp=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],jp);const Lp=({open:t})=>{const n=t?8:-4;return e.createElement($p,null,e.createElement(Np,{size:15,style:{transform:`translate(2px, ${n}px) rotate(180deg)`,transition:"transform 0.2s ease"}}),e.createElement(Np,{size:15,style:{transform:`translate(2px, ${0-n}px)`,transition:"transform 0.2s ease"}}))},Np=({size:t=10,className:n="",style:r})=>e.createElement("svg",{className:n,style:r||{},viewBox:"0 0 926.23699 573.74994",version:"1.1",x:"0px",y:"0px",width:t,height:t},e.createElement("g",{transform:"translate(904.92214,-879.1482)"},e.createElement("path",{d:"\n m -673.67664,1221.6502 -231.2455,-231.24803 55.6165,\n -55.627 c 30.5891,-30.59485 56.1806,-55.627 56.8701,-55.627 0.6894,\n 0 79.8637,78.60862 175.9427,174.68583 l 174.6892,174.6858 174.6892,\n -174.6858 c 96.079,-96.07721 175.253196,-174.68583 175.942696,\n -174.68583 0.6895,0 26.281,25.03215 56.8701,\n 55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864\n -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688,\n -104.0616 -231.873,-231.248 z\n ",fill:"currentColor"}))),$p=te.div` + user-select: none; + width: 20px; + height: 20px; + align-self: center; + display: flex; + flex-direction: column; + color: ${e=>e.theme.colors.primary.main}; +`;let Mp;Object.defineProperty,Object.getOwnPropertyDescriptor,a&&(Mp=r(322));const Dp=Mp&&Mp(),Fp=te.div` + width: ${e=>e.theme.sidebar.width}; + background-color: ${e=>e.theme.sidebar.backgroundColor}; + overflow: hidden; + display: flex; + flex-direction: column; + + backface-visibility: hidden; + /* contain: strict; TODO: breaks layout since Chrome 80*/ + + height: 100vh; + position: sticky; + position: -webkit-sticky; + top: 0; + + ${ee.lessThan("small")` + position: fixed; + z-index: 20; + width: 100%; + background: ${({theme:e})=>e.sidebar.backgroundColor}; + display: ${e=>e.open?"flex":"none"}; + `}; + + @media print { + display: none; + } +`,zp=te.div` + outline: none; + user-select: none; + background-color: ${({theme:e})=>e.fab.backgroundColor}; + color: ${e=>e.theme.colors.primary.main}; + display: none; + cursor: pointer; + position: fixed; + right: 20px; + z-index: 100; + border-radius: 50%; + box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); + ${ee.lessThan("small")` + display: flex; + `}; + + bottom: 44px; + + width: 60px; + height: 60px; + padding: 0 20px; + svg { + color: ${({theme:e})=>e.fab.color}; + } + + @media print { + display: none; + } +`;let Bp=class extends e.Component{constructor(){super(...arguments),this.state={offsetTop:"0px"},this.toggleNavMenu=()=>{this.props.menu.toggleSidebar()}}componentDidMount(){Dp&&Dp.add(this.stickyElement),this.setState({offsetTop:this.getScrollYOffset(this.context)})}componentWillUnmount(){Dp&&Dp.remove(this.stickyElement)}getScrollYOffset(e){let t;return t=void 0!==this.props.scrollYOffset?Q.normalizeScrollYOffset(this.props.scrollYOffset)():e.scrollYOffset(),t+"px"}render(){const t=this.props.menu.sideBarOpened,n=this.state.offsetTop;return e.createElement(e.Fragment,null,e.createElement(Fp,{open:t,className:this.props.className,style:{top:n,height:`calc(100vh - ${n})`},ref:e=>{this.stickyElement=e}},this.props.children),!this.context.hideFab&&e.createElement(zp,{onClick:this.toggleNavMenu},e.createElement(Lp,{open:t})))}};Bp.contextType=ue,Bp=((e,t,n,r)=>{for(var i,o=t,s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(o)||o);return o})([sa.observer],Bp);const Up=te.div` + ${({theme:e})=>`\n font-family: ${e.typography.fontFamily};\n font-size: ${e.typography.fontSize};\n font-weight: ${e.typography.fontWeightRegular};\n line-height: ${e.typography.lineHeight};\n color: ${e.colors.text.primary};\n display: flex;\n position: relative;\n text-align: left;\n\n -webkit-font-smoothing: ${e.typography.smoothing};\n font-smoothing: ${e.typography.smoothing};\n ${e.typography.optimizeSpeed?"text-rendering: optimizeSpeed !important":""};\n\n tap-highlight-color: rgba(0, 0, 0, 0);\n text-size-adjust: 100%;\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n }\n`}; +`,qp=te.div` + z-index: 1; + position: relative; + overflow: hidden; + width: calc(100% - ${e=>e.theme.sidebar.width}); + ${ee.lessThan("small",!0)` + width: 100%; + `}; + + contain: layout; +`,Wp=te.div` + background: ${({theme:e})=>e.rightPanel.backgroundColor}; + position: absolute; + top: 0; + bottom: 0; + right: 0; + width: ${({theme:e})=>{if(e.rightPanel.width.endsWith("%")){const t=parseInt(e.rightPanel.width,10);return`calc((100% - ${e.sidebar.width}) * ${t/100})`}return e.rightPanel.width}}; + ${ee.lessThan("medium",!0)` + display: none; + `}; +`,Vp=te.div` + padding: 5px 0; +`,Qp=te.input.attrs((()=>({className:"search-input"})))` + width: calc(100% - ${e=>8*e.theme.spacing.unit}px); + box-sizing: border-box; + margin: 0 ${e=>4*e.theme.spacing.unit}px; + padding: 5px ${e=>2*e.theme.spacing.unit}px 5px + ${e=>4*e.theme.spacing.unit}px; + border: 0; + border-bottom: 1px solid + ${({theme:e})=>((0,t.getLuminance)(e.sidebar.backgroundColor)>.5?t.darken:t.lighten)(.1,e.sidebar.backgroundColor)}; + font-family: ${({theme:e})=>e.typography.fontFamily}; + font-weight: bold; + font-size: 13px; + color: ${e=>e.theme.sidebar.textColor}; + background-color: transparent; + outline: none; +`,Hp=te((t=>e.createElement("svg",{className:t.className,version:"1.1",viewBox:"0 0 1000 1000",x:"0px",xmlns:"http://www.w3.org/2000/svg",y:"0px"},e.createElement("path",{d:"M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z"})))).attrs({className:"search-icon"})` + position: absolute; + left: ${e=>4*e.theme.spacing.unit}px; + height: 1.8em; + width: 0.9em; + + path { + fill: ${e=>e.theme.sidebar.textColor}; + } +`,Yp=te.div` + padding: ${e=>e.theme.spacing.unit}px 0; + background-color: ${({theme:e})=>(0,t.darken)(.05,e.sidebar.backgroundColor)}}; + color: ${e=>e.theme.sidebar.textColor}; + min-height: 150px; + max-height: 250px; + border-top: ${({theme:e})=>(0,t.darken)(.1,e.sidebar.backgroundColor)}}; + border-bottom: ${({theme:e})=>(0,t.darken)(.1,e.sidebar.backgroundColor)}}; + margin-top: 10px; + line-height: 1.4; + font-size: 0.9em; + + li { + background-color: inherit; + } + + ${Pc} { + padding-top: 6px; + padding-bottom: 6px; + + &:hover, + &.active { + background-color: ${({theme:e})=>(0,t.darken)(.1,e.sidebar.backgroundColor)}; + } + + > svg { + display: none; + } + } +`,Gp=te.i` + position: absolute; + display: inline-block; + width: ${e=>2*e.theme.spacing.unit}px; + text-align: center; + right: ${e=>4*e.theme.spacing.unit}px; + line-height: 2em; + vertical-align: middle; + margin-right: 2px; + cursor: pointer; + font-style: normal; + color: '#666'; +`;var Xp=Object.defineProperty,Kp=Object.getOwnPropertyDescriptor;class Zp extends e.PureComponent{constructor(e){super(e),this.activeItemRef=null,this.clear=()=>{this.setState({results:[],noResults:!1,term:"",activeItemIdx:-1}),this.props.marker.unmark()},this.handleKeyDown=e=>{if(27===e.keyCode&&this.clear(),40===e.keyCode&&(this.setState({activeItemIdx:Math.min(this.state.activeItemIdx+1,this.state.results.length-1)}),e.preventDefault()),38===e.keyCode&&(this.setState({activeItemIdx:Math.max(0,this.state.activeItemIdx-1)}),e.preventDefault()),13===e.keyCode){const e=this.state.results[this.state.activeItemIdx];if(e){const t=this.props.getItemById(e.meta);t&&this.props.onActivate(t)}}},this.search=e=>{const{minCharacterLengthToInitSearch:t}=this.context,n=e.target.value;n.lengththis.searchCallback(this.state.term)))},this.state={results:[],noResults:!1,term:"",activeItemIdx:-1}}clearResults(e){this.setState({results:[],noResults:!1,term:e}),this.props.marker.unmark()}setResults(e,t){this.setState({results:e,noResults:0===e.length}),this.props.marker.mark(t)}searchCallback(e){this.props.search.search(e).then((t=>{this.setResults(t,e)}))}render(){const{activeItemIdx:t}=this.state,n=this.state.results.filter((e=>this.props.getItemById(e.meta))).map((e=>({item:this.props.getItemById(e.meta),score:e.score}))).sort(((e,t)=>t.score-e.score));return e.createElement(Vp,{role:"search"},this.state.term&&e.createElement(Gp,{onClick:this.clear},"\xd7"),e.createElement(Hp,null),e.createElement(Qp,{value:this.state.term,onKeyDown:this.handleKeyDown,placeholder:"Search...","aria-label":"Search",type:"text",onChange:this.search}),n.length>0&&e.createElement(ss,{options:{wheelPropagation:!1}},e.createElement(Yp,{"data-role":"search:results"},n.map(((n,r)=>e.createElement(Sp,{item:Object.create(n.item,{active:{value:r===t}}),onActivate:this.props.onActivate,withoutChildren:!0,key:n.item.id,"data-role":"search:result"}))))),this.state.term&&this.state.noResults?e.createElement(Yp,{"data-role":"search:results"},L("noResultsFound")):null)}}Zp.contextType=ue,((e,t,n,r)=>{for(var i,o=Kp(t,n),s=e.length-1;s>=0;s--)(i=e[s])&&(o=i(t,n,o)||o);o&&Xp(t,n,o)})([be.bind,(0,be.debounce)(400)],Zp.prototype,"searchCallback");class Jp extends e.Component{componentDidMount(){this.props.store.onDidMount()}componentWillUnmount(){this.props.store.dispose()}render(){const{store:{spec:t,menu:n,options:r,search:i,marker:o}}=this.props,s=this.props.store;return e.createElement(J,{theme:r.theme},e.createElement(vo,{value:s},e.createElement(pe,{value:r},e.createElement(Up,{className:"redoc-wrap"},e.createElement(Bp,{menu:n,className:"menu-content"},e.createElement(hc,{info:t.info}),!r.disableSearch&&e.createElement(Zp,{search:i,marker:o,getItemById:n.getItemById,onActivate:n.activateAndScroll})||null,e.createElement(jp,{menu:n})),e.createElement(qp,{className:"api-content"},e.createElement(uc,{store:s}),e.createElement(dp,{items:n.items})),e.createElement(Wp,null)))))}}Jp.propTypes={store:ce.instanceOf(rc).isRequired};const ed=function(t){const{spec:n,specUrl:i,options:o={},onLoaded:s}=t,a=W(o.hideLoading,!1),l=new Q(o);if(void 0!==l.nonce)try{r.nc=l.nonce}catch(e){}return e.createElement(ie,null,e.createElement(xo,{spec:n,specUrl:i,options:o,onLoaded:s},(({loading:t,store:n})=>t?a?null:e.createElement(le,{color:l.theme.colors.primary.main}):e.createElement(Jp,{store:n}))))}}(),i}()},31304:function(e){var t;t=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial"}'),t=JSON.parse('{"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"vi":{"\u0110":"D","\u0111":"d"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"}}');function n(n,r){if("string"!=typeof n)throw new Error("slugify: string argument expected");var i=t[(r="string"==typeof r?{replacement:r}:r||{}).locale]||{},o=void 0===r.replacement?"-":r.replacement,s=n.split("").reduce((function(t,n){return t+(i[n]||e[n]||n).replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"").trim().replace(new RegExp("[\\s"+o+"]+","g"),o);return r.lower&&(s=s.toLowerCase()),r.strict&&(s=s.replace(new RegExp("[^a-zA-Z0-9"+o+"]","g"),"").replace(new RegExp("[\\s"+o+"]+","g"),o)),s}return n.extend=function(t){for(var n in t)e[n]=t[n]},n},e.exports=t(),e.exports.default=t()},5114:e=>{e.exports=function(e,t){e||(e=document),t||(t=window);var n,r,i=[],o=!1,s=e.documentElement,a=function(){},l="hidden",c="visibilitychange";void 0!==e.webkitHidden&&(l="webkitHidden",c="webkitvisibilitychange"),t.getComputedStyle||f();for(var u=["","-webkit-","-moz-","-ms-"],p=document.createElement("div"),d=u.length-1;d>=0;d--){try{p.style.position=u[d]+"sticky"}catch($){}""!=p.style.position&&f()}function f(){C=N=I=T=j=L=a}function h(e){return parseFloat(e)||0}function m(){n={top:t.pageYOffset,left:t.pageXOffset}}function g(){if(t.pageXOffset!=n.left)return m(),void I();t.pageYOffset!=n.top&&(m(),v())}function y(e){setTimeout((function(){t.pageYOffset!=n.top&&(n.top=t.pageYOffset,v())}),0)}function v(){for(var e=i.length-1;e>=0;e--)b(i[e])}function b(e){if(e.inited){var t=n.top<=e.limit.start?0:n.top>=e.limit.end?2:1;e.mode!=t&&function(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}(e,t)}}function x(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||function(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),b(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=E(e.clone))}function w(e){var t=!0;e.clone&&function(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}(e),function(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}(e.node.style,e.css);for(var n=i.length-1;n>=0;n--)if(i[n].node!==e.node&&i[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function k(){for(var e=i.length-1;e>=0;e--)x(i[e])}function O(){for(var e=i.length-1;e>=0;e--)w(i[e])}function S(e){var t=getComputedStyle(e),n=e.parentNode,r=getComputedStyle(n),i=e.style.position;e.style.position="relative";var o={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},a={top:h(t.top),marginBottom:h(t.marginBottom),paddingLeft:h(t.paddingLeft),paddingRight:h(t.paddingRight),borderLeftWidth:h(t.borderLeftWidth),borderRightWidth:h(t.borderRightWidth)};e.style.position=i;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=_(e),u=_(n),p={node:n,css:{position:n.style.position},computed:{position:r.position},numeric:{borderLeftWidth:h(r.borderLeftWidth),borderRightWidth:h(r.borderRightWidth),borderTopWidth:h(r.borderTopWidth),borderBottomWidth:h(r.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:s.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:o,numeric:a,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-a.top,end:u.doc.top+n.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-a.top-a.marginBottom}}}function E(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function _(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function A(){r=setInterval((function(){!function(){for(var e=i.length-1;e>=0;e--)if(i[e].inited){var t=Math.abs(E(i[e].clone)-i[e].docOffsetTop),n=Math.abs(i[e].parent.node.offsetHeight-i[e].parent.height);if(t>=2||n>=2)return!1}return!0}()&&I()}),500)}function R(){clearInterval(r)}function P(){o&&(document[l]?R():A())}function C(){o||(m(),k(),t.addEventListener("scroll",g),t.addEventListener("wheel",y),t.addEventListener("resize",I),t.addEventListener("orientationchange",I),e.addEventListener(c,P),A(),o=!0)}function I(){if(o){O();for(var e=i.length-1;e>=0;e--)i[e]=S(i[e].node);k()}}function T(){t.removeEventListener("scroll",g),t.removeEventListener("wheel",y),t.removeEventListener("resize",I),t.removeEventListener("orientationchange",I),e.removeEventListener(c,P),R(),o=!1}function j(){T(),O()}function L(){for(j();i.length;)i.pop()}function N(e){for(var t=i.length-1;t>=0;t--)if(i[t].node===e)return;var n=S(e);i.push(n),o?x(n):C()}return m(),{stickies:i,add:N,remove:function(e){for(var t=i.length-1;t>=0;t--)i[t].node===e&&(w(i[t]),i.splice(t,1))},init:C,rebuild:I,pause:T,stop:j,kill:L}}},19521:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ServerStyleSheet:()=>ze,StyleSheetConsumer:()=>ie,StyleSheetContext:()=>re,StyleSheetManager:()=>ue,ThemeConsumer:()=>Te,ThemeContext:()=>Ie,ThemeProvider:()=>je,__PRIVATE__:()=>qe,createGlobalStyle:()=>De,css:()=>xe,default:()=>We,isStyledComponent:()=>x,keyframes:()=>Fe,useTheme:()=>Ue,version:()=>k,withTheme:()=>Be});var r=n(59864),i=n(67294),o=n(96774),s=n.n(o);const a=function(e){function t(e,r,l,c,d){for(var f,h,m,g,x,k=0,O=0,S=0,E=0,_=0,T=0,L=m=f=0,$=0,M=0,D=0,F=0,z=l.length,B=z-1,U="",q="",W="",V="";$f)&&(F=(U=U.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:s=s.replace(l,"-webkit-"+l)+";"+s;break;case 207:case 102:s=s.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var A=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&_(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=C&&(C=t+1),R.set(e,t),P.set(t,e)},L="style["+w+'][data-styled-version="5.3.8"]',N=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),$=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(w))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(w,"active"),r.setAttribute("data-styled-version","5.3.8");var s=D();return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},z=function(){function e(e){var t=this.element=F(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(c+=e+",")})),r+=""+a+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),Q=/(a)(d)/gi,H=function(e){return String.fromCharCode(e+(e>25?39:97))};function Y(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=H(t%52)+n;return(H(t%52)+n).replace(Q,"$1-$2")}var G=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},X=function(e){return G(5381,e)};function K(e){for(var t=0;t>>0);if(!t.hasNameForId(r,s)){var a=n(o,"."+s,void 0,r);t.insertRules(r,s,a)}i.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,c=G(this.baseHash,n.hash),u="",p=0;p>>0);if(!t.hasNameForId(r,m)){var g=n(u,"."+m,void 0,r);t.insertRules(r,m,g)}i.push(m)}}return i.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,i,o=void 0===e?y:e,s=o.options,l=void 0===s?y:s,c=o.plugins,u=void 0===c?g:c,p=new a(l),d=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,s,a,l,c,u,p){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),h=function(e,r,o){return 0===r&&-1!==te.indexOf(o[n.length])||o.match(i)?e:"."+t};function m(e,o,s,a){void 0===a&&(a="&");var l=e.replace(ee,""),c=o&&s?s+" "+o+" { "+l+" }":l;return t=a,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),p(s||!o?"":o,c)}return p.use([].concat(u,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,h))},f,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||_(15),G(e,t.name)}),5381).toString():"",m}var re=i.createContext(),ie=re.Consumer,oe=i.createContext(),se=(oe.Consumer,new V),ae=ne();function le(){return(0,i.useContext)(re)||se}function ce(){return(0,i.useContext)(oe)||ae}function ue(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=le(),a=(0,i.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,i.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,i.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i.createElement(re.Provider,{value:a},i.createElement(oe.Provider,{value:l},e.children))}var pe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=ae);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return _(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ae),this.name+e.hash},e}(),de=/([A-Z])/,fe=/([A-Z])/g,he=/^ms-/,me=function(e){return"-"+e.toLowerCase()};function ge(e){return de.test(e)?e.replace(fe,me).replace(he,"-ms-"):e}var ye=function(e){return null==e||!1===e||""===e};function ve(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],s=0,a=e.length;s1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,Oe=/(^-|-$)/g;function Se(e){return e.replace(ke,"-").replace(Oe,"")}var Ee=function(e){return Y(X(e)>>>0)};function _e(e){return"string"==typeof e&&!0}var Ae=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Re=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Pe(e,t,n){var r=e[n];Ae(t)&&Ae(r)?Ce(r,t):e[n]=t}function Ce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(_e(e)?e:Se(b(e)));return Ne(e,f({},i,{attrs:w,componentId:o}),n)},Object.defineProperty(O,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ce({},e.defaultProps,t):t}}),O.toString=function(){return"."+O.styledComponentId},o&&d()(O,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),O}var $e=function(e){return function e(t,n,i){if(void 0===i&&(i=y),!(0,r.isValidElementType)(n))return _(1,String(n));var o=function(){return t(n,i,xe.apply(void 0,arguments))};return o.withConfig=function(r){return e(t,n,f({},i,{},r))},o.attrs=function(r){return e(t,n,f({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(Ne,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){$e[e]=$e(e)}));var Me=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=K(e),V.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(ve(this.rules,t,n,r).join(""),""),o=this.componentId+e;n.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&V.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function De(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?_(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return _(2);var n=((t={})[w]="",t["data-styled-version"]="5.3.8",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=D();return r&&(n.nonce=r),[i.createElement("style",f({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new V({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?_(2):i.createElement(ue,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return _(3)},e}(),Be=function(e){var t=i.forwardRef((function(t,n){var r=(0,i.useContext)(Ie),o=e.defaultProps,s=we(t,r,o);return i.createElement(e,f({},t,{theme:s,ref:n}))}));return d()(t,e),t.displayName="WithTheme("+b(e)+")",t},Ue=function(){return(0,i.useContext)(Ie)},qe={StyleSheet:V,masterSheet:se};const We=$e},83578:function(e){e.exports=function(){function e(){}return e.prototype.encodeReserved=function(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")},e.prototype.encodeUnreserved=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},e.prototype.encodeValue=function(e,t,n){return t="+"===e||"#"===e?this.encodeReserved(t):this.encodeUnreserved(t),n?this.encodeUnreserved(n)+"="+t:t},e.prototype.isDefined=function(e){return null!=e},e.prototype.isKeyOperator=function(e){return";"===e||"&"===e||"?"===e},e.prototype.getValues=function(e,t,n,r){var i=e[n],o=[];if(this.isDefined(i)&&""!==i)if("string"==typeof i||"number"==typeof i||"boolean"==typeof i)i=i.toString(),r&&"*"!==r&&(i=i.substring(0,parseInt(r,10))),o.push(this.encodeValue(t,i,this.isKeyOperator(t)?n:null));else if("*"===r)Array.isArray(i)?i.filter(this.isDefined).forEach((function(e){o.push(this.encodeValue(t,e,this.isKeyOperator(t)?n:null))}),this):Object.keys(i).forEach((function(e){this.isDefined(i[e])&&o.push(this.encodeValue(t,i[e],e))}),this);else{var s=[];Array.isArray(i)?i.filter(this.isDefined).forEach((function(e){s.push(this.encodeValue(t,e))}),this):Object.keys(i).forEach((function(e){this.isDefined(i[e])&&(s.push(this.encodeUnreserved(e)),s.push(this.encodeValue(t,i[e].toString())))}),this),this.isKeyOperator(t)?o.push(this.encodeUnreserved(n)+"="+s.join(",")):0!==s.length&&o.push(s.join(","))}else";"===t?this.isDefined(i)&&o.push(this.encodeUnreserved(n)):""!==i||"&"!==t&&"?"!==t?""===i&&o.push(""):o.push(this.encodeUnreserved(n)+"=");return o},e.prototype.parse=function(e){var t=this,n=["+","#",".","/",";","?","&"];return{expand:function(r){return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,i,o){if(i){var s=null,a=[];if(-1!==n.indexOf(i.charAt(0))&&(s=i.charAt(0),i=i.substr(1)),i.split(/,/g).forEach((function(e){var n=/([^:\*]*)(?::(\d+)|(\*))?/.exec(e);a.push.apply(a,t.getValues(r,s,n[1],n[2]||n[3]))})),s&&"+"!==s){var l=",";return"?"===s?l="&":"#"!==s&&(l=s),(0!==a.length?s:"")+a.join(l)}return a.join(",")}return t.encodeReserved(o)}))}}},new e}()},55006:(e,t,n)=>{e.exports=n(96128).YAML},96128:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}n.d(t,{YAML:()=>nn});var E={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},_={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},A="tag:yaml.org,2002:",R={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function P(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function C(e){var t,n;return"string"==typeof e?(t=P(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=P(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function I(e,t){if("number"!=typeof e||e<0)return null;var n=C(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:80,o=function(e,t){var n=C(t),r=n.lineStarts,i=n.src;if(!r||!(e>=1)||e>r.length)return null;for(var o=r[e-1],s=r[e];s&&s>o&&"\n"===i[s-1];)--s;return i.slice(o,s)}(n.line,t);if(!o)return null;var s=n.col;if(o.length>i)if(s<=i-10)o=o.substr(0,i-1)+"\u2026";else{var a=Math.round(i/2);o.length>s+a&&(o=o.substr(0,s+a-1)+"\u2026"),s-=o.length-i,o="\u2026"+o.substr(1-i)}var l=1,c="";r&&(r.line===n.line&&s+(r.col-n.col)<=i+1?l=r.col-n.col:(l=Math.min(o.length+1,i)-s,c="\u2026"));var u=s>1?" ".repeat(s-1):"",p="^".repeat(l);return"".concat(o,"\n").concat(u).concat(p).concat(c)}var j=function(){function e(t,n){i(this,e),this.start=t,this.end=n||t}return s(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var o=i;i=r);)++i;return this.origEnd=r+i,o}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),L=function(){function e(t,n,r){i(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return s(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==E.DIRECTIVES_END&&r!==E.DOCUMENT_END)return!1;var o=e[t+1],s=e[t+2];if(o!==r||s!==r)return!1;var a=e[t+3];return!a||"\n"===a||"\t"===a||" "===a}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var o=e.endOfWhiteSpace(t,i),s=t[o];return s&&"\n"!==s?null:o}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,o=!1,s="",a=t[n+1];" "===a||"\t"===a||"\n"===a;){switch(a){case"\n":i=0,n+=1,s+="\n";break;case"\t":i<=r&&(o=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}a=t[n+1]}return s||(s=" "),a&&i<=r&&(o=!0),{fold:s,offset:n,error:o}}}]),e}(),N=function(e){l(n,e);var t=g(n);function n(e,r,o){var s;if(i(this,n),!(o&&r instanceof L))throw new Error("Invalid arguments for new ".concat(e));return(s=t.call(this)).name=e,s.message=o,s.source=r,s}return s(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new j(this.offset,this.offset+1);var t=e&&I(this.offset,e);if(t){var n={line:t.line,col:t.col+1};this.linePos={start:t,end:n}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var r=this.linePos.start,i=r.line,o=r.col;this.message+=" at line ".concat(i,", column ").concat(o);var s=e&&T(this.linePos,e);s&&(this.message+=":\n\n".concat(s,"\n"))}delete this.source}}}]),n}(f(Error)),$=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(N),M=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLSemanticError",e,r)}return n}(N),D=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(N),F=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLWarning",e,r)}return n}(N),z=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,n=e.end,r=this.context.src,i=r[n-1];tc?r.slice(c,s+1):a)}else o+=a}var p=r[t];switch(p){case"\t":return{errors:[new M(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":var d="Plain value cannot start with reserved character ".concat(p);return{errors:[new M(this,d)],str:o};default:return o}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,i=t.inFlow,o=t.src,s=e,a=e,l=o[s];"\n"===l&&!L.atDocumentBoundary(o,s+1);l=o[s]){var c=L.endOfBlockIndent(o,r,s+1);if(null===c||"#"===o[c])break;s="\n"===o[c]?c:a=n.endOfLine(o,c,i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=a,a}},{key:"parse",value:function(e,t){this.context=e;var r=e.inFlow,i=e.src,o=t,s=i[o];return s&&"#"!==s&&"\n"!==s&&(o=n.endOfLine(i,t,r)),this.valueRange=new j(t,o),o=L.endOfWhiteSpace(i,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var o=e[i+1];if(":"===r&&(!o||"\n"===o||"\t"===o||" "===o||n&&","===o))break;if((" "===r||"\t"===r)&&"#"===o)break;i+=1,r=o}return i}}]),n}(L),B=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.call(this,_.BLANK_LINE)}return s(n,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(e,t){return this.context=e,this.range=new j(t,t+1),t+1}}]),n}(L),U=function(e){l(n,e);var t=g(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,r)).node=null,o}return s(n,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.atLineStart,o=e.lineStart;i||this.type!==_.SEQ_ITEM||(this.error=new M(this,"Sequence items must not have preceding content on the same line"));for(var s=i?t-o:e.indent,a=L.endOfWhiteSpace(r,t+1),l=r[a],c="#"===l,u=[],p=null;"\n"===l||"#"===l;){if("#"===l){var d=L.endOfLine(r,a+1);u.push(new j(a,d)),a=d}else{i=!0,o=a+1,"\n"===r[L.endOfWhiteSpace(r,o)]&&0===u.length&&(o=(p=new B).parse({src:r},o)),a=L.endOfIndent(r,o)}l=r[a]}if(L.nextNodeIsIndented(l,a-(o+s),this.type!==_.SEQ_ITEM)?this.node=n({atLineStart:i,inCollection:!1,indent:s,lineStart:o,parent:this},a):l&&o>t+1&&(a=o-1),this.node){if(p){var f=e.parent.items||e.parent.contents;f&&f.push(p)}u.length&&Array.prototype.push.apply(this.props,u),a=this.node.range.end}else if(c){var h=u[0];this.props.push(h),a=h.end}else a=L.endOfLine(r,t+1);var m=this.node?this.node.valueRange.end:a;return this.valueRange=new j(t,m),a}},{key:"setOrigRanges",value:function(e,t){return t=y(c(n.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,n=this.range,r=this.value;if(null!=r)return r;var i=t?e.slice(n.start,t.range.start)+String(t):e.slice(n.start,n.end);return L.addStringTerminator(e,n.end,i)}}]),n}(L),q=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.call(this,_.COMMENT)}return s(n,[{key:"parse",value:function(e,t){this.context=e;var n=this.parseComment(t);return this.range=new j(t,n),n}}]),n}(L);function W(e){for(var t=e;t instanceof U;)t=t.node;if(!(t instanceof V))return null;for(var n=t.items.length,r=-1,i=n-1;i>=0;--i){var o=t.items[i];if(o.type===_.COMMENT){var s=o.context,a=s.indent,l=s.lineStart;if(a>0&&o.range.start>=l+a)break;r=i}else{if(o.type!==_.BLANK_LINE)break;r=i}}if(-1===r)return null;for(var c=t.items.splice(r,n-r),u=c[0].range.start;t.range.end=u,t.valueRange&&t.valueRange.end>u&&(t.valueRange.end=u),t!==e;)t=t.context.parent;return c}var V=function(e){l(n,e);var t=g(n);function n(e){var r;i(this,n),r=t.call(this,e.type===_.SEQ_ITEM?_.SEQ:_.MAP);for(var o=e.props.length-1;o>=0;--o)if(e.props[o].start0}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,i=e.src,o=L.startOfLine(i,t),s=this.items[0];s.context.parent=this,this.valueRange=j.copy(s.valueRange);for(var a=s.range.start-s.context.lineStart,l=t,c=i[l=L.normalizeOffset(i,l)],u=L.endOfWhiteSpace(i,o)===l,p=!1;c;){for(;"\n"===c||"#"===c;){if(u&&"\n"===c&&!p){var d=new B;if(l=d.parse({src:i},l),this.valueRange.end=l,l>=i.length){c=null;break}this.items.push(d),l-=1}else if("#"===c){if(l=i.length){c=null;break}}if(o=l+1,l=L.endOfIndent(i,o),L.atBlank(i,l)){var h=L.endOfWhiteSpace(i,l),m=i[h];m&&"\n"!==m&&"#"!==m||(l=h)}c=i[l],u=!0}if(!c)break;if(l!==o+a&&(u||":"!==c)){if(lt&&(l=o);break}if(!this.error){this.error=new D(this,"All collection items must start at the same column")}}if(s.type===_.SEQ_ITEM){if("-"!==c){o>t&&(l=o);break}}else if("-"===c&&!this.error){var g=i[l+1];if(!g||"\n"===g||"\t"===g||" "===g){this.error=new D(this,"A collection cannot be both a mapping and a sequence")}}var y=r({atLineStart:u,inCollection:!0,indent:a,lineStart:o,parent:this},l);if(!y)return l;if(this.items.push(y),this.valueRange.end=y.valueRange.end,c=i[l=L.normalizeOffset(i,y.range.end)],u=!1,p=y.includesTrailingLines,c){for(var v=l-1,b=i[v];" "===b||"\t"===b;)b=i[--v];"\n"===b&&(o=v+1,u=!0)}var x=W(y);x&&Array.prototype.push.apply(this.items,x)}return l}},{key:"setOrigRanges",value:function(e,t){return t=y(c(n.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(n){t=n.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;for(var i=e.slice(n.start,t[0].range.start)+String(t[0]),o=1;o=i+r||("#"===o||"\n"===o)&&n.nextContentHasIndent(e,t,r))}}]),n}(L),Q=function(e){l(n,e);var t=g(n);function n(){var e;return i(this,n),(e=t.call(this,_.DIRECTIVE)).name=null,e}return s(n,[{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"\t"!==r&&" "!==r;)r=t[n+=1];return this.name=t.slice(e,n),n}},{key:"parseParameters",value:function(e){for(var t=this.context.src,n=e,r=t[n];r&&"\n"!==r&&"#"!==r;)r=t[n+=1];return this.valueRange=new j(e,n),n}},{key:"parse",value:function(e,t){this.context=e;var n=this.parseName(t+1);return n=this.parseParameters(n),n=this.parseComment(n),this.range=new j(t,n),n}}]),n}(L),H=function(e){l(n,e);var t=g(n);function n(){var e;return i(this,n),(e=t.call(this,_.DOCUMENT)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return s(n,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var r=!0,i=!1,o=e;!L.atDocumentBoundary(t,o,E.DIRECTIVES_END);)switch(t[o=n.startCommentOrEndBlankLine(t,o)]){case"\n":if(r){var s=new B;(o=s.parse({src:t},o))0&&(this.contents=this.directives,this.directives=[]),o}return t[o]?(this.directivesEndMarker=new j(o,o+3),o+3):(i?this.error=new M(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),o)}},{key:"parseContents",value:function(e){var t=this.context,r=t.parseNode,i=t.src;this.contents||(this.contents=[]);for(var o=e;"-"===i[o-1];)o-=1;var s=L.endOfWhiteSpace(i,e),a=o===e;for(this.valueRange=new j(s);!L.atDocumentBoundary(i,s,E.DOCUMENT_END);){switch(i[s]){case"\n":if(a){var l=new B;(s=l.parse({src:i},s))0&&((t.length>0||e[0].type===_.COMMENT)&&(r+="---\n"),r+=e.join("")),"\n"!==r[r.length-1]&&(r+="\n"),r}}],[{key:"startCommentOrEndBlankLine",value:function(e,t){var n=L.endOfWhiteSpace(e,t),r=e[n];return"#"===r||"\n"===r?n:t}}]),n}(L),Y=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=L.endOfIdentifier(n,t+1);return this.valueRange=new j(t+1,r),r=L.endOfWhiteSpace(n,r),r=this.parseComment(r)}}]),n}(L),G="CLIP",X="KEEP",K="STRIP",Z=function(e){l(n,e);var t=g(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,r)).blockIndent=null,o.chomping=G,o.header=null,o}return s(n,[{key:"includesTrailingLines",get:function(){return this.chomping===X}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,n=e.end,r=this.context,i=r.indent,o=r.src;if(this.valueRange.isEmpty())return"";for(var s=null,a=o[n-1];"\n"===a||"\t"===a||" "===a;){if((n-=1)<=t){if(this.chomping===X)break;return""}"\n"===a&&(s=n),a=o[n-1]}var l=n+1;s&&(this.chomping===X?(l=s,n=this.valueRange.end):n=s);for(var c=i+this.blockIndent,u=this.type===_.BLOCK_FOLDED,p=!0,d="",f="",h=!1,m=t;ma&&(a=p);o="\n"===r[c]?c:s=L.endOfLine(r,c)}return this.chomping!==X&&(o=r[s]?s+1:s),this.valueRange=new j(e+1,o),o}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,r=this.parseBlockHeader(t);return r=L.endOfWhiteSpace(n,r),r=this.parseComment(r),r=this.parseBlockValue(r)}},{key:"setOrigRanges",value:function(e,t){return t=y(c(n.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}}]),n}(L),J=function(e){l(n,e);var t=g(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,r)).items=null,o}return s(n,[{key:"prevNodeIsJsonLike",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===_.COMMENT&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,r=e.src,i=e.indent,o=e.lineStart,s=r[t];this.items=[{char:s,offset:t}];var a=L.endOfWhiteSpace(r,t+1);for(s=r[a];s&&"]"!==s&&"}"!==s;){switch(s){case"\n":if(o=a+1,"\n"===r[L.endOfWhiteSpace(r,o)]){var l=new B;o=l.parse({src:r},o),this.items.push(l)}if((a=L.endOfIndent(r,o))<=o+i&&(s=r[a],an.offset);)++r;n.origOffset=n.offset+r,t=r}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,n=this.range,r=this.value;if(null!=r)return r;var i=t.filter((function(e){return e instanceof L})),o="",s=n.start;return i.forEach((function(t){var n=e.slice(s,t.range.start);s=t.range.end,"\n"===(o+=n+String(t))[o.length-1]&&"\n"!==e[s-1]&&"\n"===e[s]&&(s+=1)})),o+=e.slice(s,n.end),L.addStringTerminator(e,n.end,o)}}]),n}(L),ee=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,o=i.indent,s=i.src;'"'!==s[r-1]&&e.push(new D(this,'Missing closing "quote'));for(var a="",l=n+1;lp?s.slice(p,l+1):c)}else a+=c}return e.length>0?{errors:e,str:a}:a}},{key:"parseCharCode",value:function(e,t,n){var r=this.context.src,i=r.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(o)?(n.push(new D(this,"Invalid escape sequence ".concat(r.substr(e-2,t+2)))),r.substr(e-2,t+2)):String.fromCodePoint(o)}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new j(t,i),i=L.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n&&'"'!==n;)n=e[t+="\\"===n?2:1];return t+1}}]),n}(L),te=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,n=t.start,r=t.end,i=this.context,o=i.indent,s=i.src;"'"!==s[r-1]&&e.push(new D(this,"Missing closing 'quote"));for(var a="",l=n+1;lp?s.slice(p,l+1):c)}else a+=c}return e.length>0?{errors:e,str:a}:a}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,i=n.endOfQuote(r,t+1);return this.valueRange=new j(t,i),i=L.endOfWhiteSpace(r,i),i=this.parseComment(i)}}],[{key:"endOfQuote",value:function(e,t){for(var n=e[t];n;)if("'"===n){if("'"!==e[t+1])break;n=e[t+=2]}else n=e[t+=1];return t+1}}]),n}(L);var ne=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.atLineStart,s=r.inCollection,l=r.inFlow,c=r.indent,u=r.lineStart,p=r.parent;i(this,e),a(this,"parseNode",(function(n,r){if(L.atDocumentBoundary(t.src,r))return null;var i=new e(t,n),o=i.parseProps(r),s=o.props,a=o.type,l=o.valueStart,c=function(e,t){switch(e){case _.ALIAS:return new Y(e,t);case _.BLOCK_FOLDED:case _.BLOCK_LITERAL:return new Z(e,t);case _.FLOW_MAP:case _.FLOW_SEQ:return new J(e,t);case _.MAP_KEY:case _.MAP_VALUE:case _.SEQ_ITEM:return new U(e,t);case _.COMMENT:case _.PLAIN:return new z(e,t);case _.QUOTE_DOUBLE:return new ee(e,t);case _.QUOTE_SINGLE:return new te(e,t);default:return null}}(a,s),u=c.parse(i,l);if(c.range=new j(r,u),u<=r&&(c.error=new Error("Node#parse consumed no characters"),c.error.parseEnd=u,c.error.source=c,c.range.end=r+1),i.nodeStartsCollection(c)){c.error||i.atLineStart||i.parent.type!==_.DOCUMENT||(c.error=new D(c,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var p=new V(c);return u=p.parse(new e(i),u),p.range=new j(r,u),p}return c})),this.atLineStart=null!=o?o:n.atLineStart||!1,this.inCollection=null!=s?s:n.inCollection||!1,this.inFlow=null!=l?l:n.inFlow||!1,this.indent=null!=c?c:n.indent,this.lineStart=null!=u?u:n.lineStart,this.parent=null!=p?p:n.parent||{},this.root=n.root,this.src=n.src}return s(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,n=this.inFlow,r=this.src;if(t||n)return!1;if(e instanceof U)return!0;var i=e.range.end;return"\n"!==r[i]&&"\n"!==r[i-1]&&":"===r[i=L.endOfWhiteSpace(r,i)]}},{key:"parseProps",value:function(t){for(var n=this.inFlow,r=this.parent,i=this.src,o=[],s=!1,a=i[t=this.atLineStart?L.endOfIndent(i,t):L.endOfWhiteSpace(i,t)];a===E.ANCHOR||a===E.COMMENT||a===E.TAG||"\n"===a;){if("\n"===a){var l=t,c=void 0;do{c=l+1,l=L.endOfIndent(i,c)}while("\n"===i[l]);var u=l-(c+this.indent),p=r.type===_.SEQ_ITEM&&r.context.atLineStart;if("#"!==i[l]&&!L.nextNodeIsIndented(i[l],u,!p))break;this.atLineStart=!0,this.lineStart=c,s=!1,t=l}else if(a===E.COMMENT){var d=L.endOfLine(i,t+1);o.push(new j(t,d)),t=d}else{var f=L.endOfIdentifier(i,t+1);a===E.TAG&&","===i[f]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(i.slice(t+1,f+13))&&(f=L.endOfIdentifier(i,f+5)),o.push(new j(t,f)),s=!0,t=L.endOfWhiteSpace(i,f)}a=i[t]}return s&&":"===a&&L.atBlank(i,t+1,!0)&&(t-=1),{props:o,type:e.parseType(i,t,n),valueStart:t}}}],[{key:"parseType",value:function(e,t,n){switch(e[t]){case"*":return _.ALIAS;case">":return _.BLOCK_FOLDED;case"|":return _.BLOCK_LITERAL;case"{":return _.FLOW_MAP;case"[":return _.FLOW_SEQ;case"?":return!n&&L.atBlank(e,t+1,!0)?_.MAP_KEY:_.PLAIN;case":":return!n&&L.atBlank(e,t+1,!0)?_.MAP_VALUE:_.PLAIN;case"-":return!n&&L.atBlank(e,t+1,!0)?_.SEQ_ITEM:_.PLAIN;case'"':return _.QUOTE_DOUBLE;case"'":return _.QUOTE_SINGLE;default:return _.PLAIN}}}]),e}();function re(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,n){return e.length>1&&t.push(n),"\n"})));var n=[],r=0;do{var i=new H,o=new ne({src:e});r=i.parse(o,r),n.push(i)}while(r=0;--i){var o=t[i];if(Number.isInteger(o)&&o>=0){var s=[];s[o]=r,r=s}else{var a={};Object.defineProperty(a,o,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=a}}return e.createNode(r,!1)}var ce=function(e){return null==e||"object"===r(e)&&e[Symbol.iterator]().next().done},ue=function(e){l(n,e);var t=g(n);function n(e){var r;return i(this,n),a(h(r=t.call(this)),"items",[]),r.schema=e,r}return s(n,[{key:"addIn",value:function(e,t){if(ce(e))this.add(t);else{var r=b(e),i=r[0],o=r.slice(1),s=this.get(i,!0);if(s instanceof n)s.addIn(o,t);else{if(void 0!==s||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,le(this.schema,o,t))}}}},{key:"deleteIn",value:function(e){var t=b(e),r=t[0],i=t.slice(1);if(0===i.length)return this.delete(r);var o=this.get(r,!0);if(o instanceof n)return o.deleteIn(i);throw new Error("Expected YAML collection at ".concat(r,". Remaining path: ").concat(i))}},{key:"getIn",value:function(e,t){var r=b(e),i=r[0],o=r.slice(1),s=this.get(i,!0);return 0===o.length?!t&&s instanceof ae?s.value:s:s instanceof n?s.getIn(o,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof ae&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=b(e),r=t[0],i=t.slice(1);if(0===i.length)return this.has(r);var o=this.get(r,!0);return o instanceof n&&o.hasIn(i)}},{key:"setIn",value:function(e,t){var r=b(e),i=r[0],o=r.slice(1);if(0===o.length)this.set(i,t);else{var s=this.get(i,!0);if(s instanceof n)s.setIn(o,t);else{if(void 0!==s||!this.schema)throw new Error("Expected YAML collection at ".concat(i,". Remaining path: ").concat(o));this.set(i,le(this.schema,o,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,r,i){var o=this,s=t.blockItem,a=t.flowChars,l=t.isMap,c=t.itemIndent,u=e,p=u.indent,d=u.indentStep,f=u.stringify,h=this.type===_.FLOW_MAP||this.type===_.FLOW_SEQ||e.inFlow;h&&(c+=d);var m=l&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:m,indent:c,inFlow:h,type:null});var g,y=!1,v=!1,b=this.items.reduce((function(t,n,r){var i;n&&(!y&&n.spaceBefore&&t.push({type:"comment",str:""}),n.commentBefore&&n.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),n.comment&&(i=n.comment),h&&(!y&&n.spaceBefore||n.commentBefore||n.comment||n.key&&(n.key.commentBefore||n.key.comment)||n.value&&(n.value.commentBefore||n.value.comment))&&(v=!0)),y=!1;var s=f(n,e,(function(){return i=null}),(function(){return y=!0}));return h&&!v&&s.includes("\n")&&(v=!0),h&&rn.maxFlowStringSingleLineLength){g=x;var O,E=S(k);try{for(E.s();!(O=E.n()).done;){var A=O.value;g+=A?"\n".concat(d).concat(p).concat(A):"\n"}}catch(T){E.e(T)}finally{E.f()}g+="\n".concat(p).concat(w)}else g="".concat(x," ").concat(k.join(" ")," ").concat(w)}else{var R=b.map(s);g=R.shift();var P,C=S(R);try{for(C.s();!(P=C.n()).done;){var I=P.value;g+=I?"\n".concat(p).concat(I):"\n"}}catch(T){C.e(T)}finally{C.f()}}return this.comment?(g+="\n"+this.comment.replace(/^/gm,"".concat(p,"#")),r&&r()):y&&i&&i(),g}}]),n}(oe);function pe(e){var t=e instanceof ae?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}a(ue,"maxFlowStringSingleLineLength",60);var de=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=pe(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var n=pe(e);if("number"==typeof n){var r=this.items[n];return!t&&r instanceof ae?r.value:r}}},{key:"has",value:function(e){var t=pe(e);return"number"==typeof t&&t1&&void 0!==arguments[1]?arguments[1]:null;return i(this,n),(r=t.call(this)).key=e,r.value=o,r.type=n.Type.PAIR,r}return s(n,[{key:"commentBefore",get:function(){return this.key instanceof oe?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new ae(null)),!(this.key instanceof oe)){throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.")}this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var n=se(this.key,"",e);if(t instanceof Map){var i=se(this.value,n,e);t.set(n,i)}else if(t instanceof Set)t.add(n);else{var o=function(e,t,n){return null===t?"":"object"!==r(t)?String(t):e instanceof oe&&n&&n.doc?e.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(t)}(this.key,n,e),s=se(this.value,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}return t}},{key:"toJSON",value:function(e,t){var n=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,n)}},{key:"toString",value:function(e,t,n){if(!e||!e.doc)return JSON.stringify(this);var i=e.doc.options,o=i.indent,s=i.indentSeq,a=i.simpleKeys,l=this.key,c=this.value,u=l instanceof oe&&l.comment;if(a){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(l instanceof ue){throw new Error("With simple keys, collection cannot be used as a key value")}}var p=!a&&(!l||u||(l instanceof oe?l instanceof ue||l.type===_.BLOCK_FOLDED||l.type===_.BLOCK_LITERAL:"object"===r(l))),d=e,f=d.doc,h=d.indent,m=d.indentStep,g=d.stringify;e=Object.assign({},e,{implicitKey:!p,indent:h+m});var y=!1,v=g(l,e,(function(){return u=null}),(function(){return y=!0}));if(v=ie(v,e.indent,u),!p&&v.length>1024){if(a)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(e.allNullValues&&!a)return this.comment?(v=ie(v,e.indent,this.comment),t&&t()):y&&!u&&n&&n(),e.inFlow&&!p?v:"? ".concat(v);v=p?"? ".concat(v,"\n").concat(h,":"):"".concat(v,":"),this.comment&&(v=ie(v,e.indent,this.comment),t&&t());var b="",x=null;if(c instanceof oe){if(c.spaceBefore&&(b="\n"),c.commentBefore){var w=c.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));b+="\n".concat(w)}x=c.comment}else c&&"object"===r(c)&&(c=f.schema.createNode(c,!0));e.implicitKey=!1,!p&&!this.comment&&c instanceof ae&&(e.indentAtStart=v.length+1),y=!1,!s&&o>=2&&!e.inFlow&&!p&&c instanceof de&&c.type!==_.FLOW_SEQ&&!c.tag&&!f.anchors.getName(c)&&(e.indent=e.indent.substr(2));var k=g(c,e,(function(){return x=null}),(function(){return y=!0})),O=" ";if(b||this.comment)O="".concat(b,"\n").concat(e.indent);else if(!p&&c instanceof ue){("["===k[0]||"{"===k[0])&&!k.includes("\n")||(O="\n".concat(e.indent))}else"\n"===k[0]&&(O="");return y&&!x&&n&&n(),ie(v+O+k,e.indent,x)}}]),n}(oe);a(fe,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var he=function e(t,n){if(t instanceof me){var r=n.get(t.source);return r.count*r.aliasCount}if(t instanceof ue){var i,o=0,s=S(t.items);try{for(s.s();!(i=s.n()).done;){var a=e(i.value,n);a>o&&(o=a)}}catch(u){s.e(u)}finally{s.f()}return o}if(t instanceof fe){var l=e(t.key,n),c=e(t.value,n);return Math.max(l,c)}return 1},me=function(e){l(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this)).source=e,r.type=_.ALIAS,r}return s(n,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return se(this.source,e,t);var n=t.anchors,r=t.maxAliasCount,i=n.get(this.source);if(!i||void 0===i.res){var o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new $(this.cstNode,o):new ReferenceError(o)}if(r>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=he(this.source,n)),i.count*i.aliasCount>r)){var s="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new $(this.cstNode,s):new ReferenceError(s)}return i.res}},{key:"toString",value:function(e){return n.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var n=e.range,r=e.source,i=t.anchors,o=t.doc,s=t.implicitKey,a=t.inStringifyKey,l=Object.keys(i).find((function(e){return i[e]===r}));if(!l&&a&&(l=o.anchors.getName(r)||o.anchors.newName()),l)return"*".concat(l).concat(s?" ":"");var c=o.anchors.getName(r)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(c," [").concat(n,"]"))}}]),n}(oe);function ge(e,t){var n,r=t instanceof ae?t.value:t,i=S(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o instanceof fe){if(o.key===t||o.key===r)return o;if(o.key&&o.key.value===r)return o}}}catch(s){i.e(s)}finally{i.f()}}a(me,"default",!0);var ye=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"add",value:function(e,t){e?e instanceof fe||(e=new fe(e.key||e,e.value)):e=new fe(e);var n=ge(this.items,e.key),r=this.schema&&this.schema.sortMapEntries;if(n){if(!t)throw new Error("Key ".concat(e.key," already set"));n.value=e.value}else if(r){var i=this.items.findIndex((function(t){return r(e,t)<0}));-1===i?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=ge(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var n=ge(this.items,e),r=n&&n.value;return!t&&r instanceof ae?r.value:r}},{key:"has",value:function(e){return!!ge(this.items,e)}},{key:"set",value:function(e,t){this.add(new fe(e,t),!0)}},{key:"toJSON",value:function(e,t,n){var r=n?new n:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(r);var i,o=S(this.items);try{for(o.s();!(i=o.n()).done;){i.value.addToJSMap(t,r)}}catch(s){o.e(s)}finally{o.f()}return r}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);var i,o=S(this.items);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof fe))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(s)," instead"))}}catch(a){o.e(a)}finally{o.f()}return y(c(n.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,r)}}]),n}(ue),ve="<<",be=function(e){l(n,e);var t=g(n);function n(e){var r;if(i(this,n),e instanceof fe){var o=e.value;o instanceof de||((o=new de).items.push(e.value),o.range=e.value.range),(r=t.call(this,e.key,o)).range=e.range}else r=t.call(this,new ae(ve),new de);return r.type=fe.Type.MERGE_PAIR,m(r)}return s(n,[{key:"addToJSMap",value:function(e,t){var n,r=S(this.value.items);try{for(r.s();!(n=r.n()).done;){var i=n.value.source;if(!(i instanceof ye))throw new Error("Merge sources must be maps");var o,s=S(i.toJSON(null,e,Map));try{for(s.s();!(o=s.n()).done;){var a=v(o.value,2),l=a[0],c=a[1];t instanceof Map?t.has(l)||t.set(l,c):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||Object.defineProperty(t,l,{value:c,writable:!0,enumerable:!0,configurable:!0})}}catch(u){s.e(u)}finally{s.f()}}}catch(u){r.e(u)}finally{r.f()}return t}},{key:"toString",value:function(e,t){var r=this.value;if(r.items.length>1)return y(c(n.prototype),"toString",this).call(this,e,t);this.value=r.items[0];var i=y(c(n.prototype),"toString",this).call(this,e,t);return this.value=r,i}}]),n}(fe),xe={defaultType:_.BLOCK_LITERAL,lineWidth:76},we={trueStr:"true",falseStr:"false"},ke={asBigInt:!1},Oe={nullStr:"null"},Se={defaultType:_.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Ee(e,t,n){var r,i=S(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,s=o.format,a=o.test,l=o.resolve;if(a){var c=e.match(a);if(c){var u=l.apply(null,c);return u instanceof ae||(u=new ae(u)),s&&(u.format=s),u}}}}catch(p){i.e(p)}finally{i.f()}return n&&(e=n(e)),new ae(e)}var _e="flow",Ae="block",Re="quoted",Pe=function(e,t){for(var n=e[t+1];" "===n||"\t"===n;){do{n=e[t+=1]}while(n&&"\n"!==n);n=e[t+1]}return t};function Ce(e,t,n,r){var i=r.indentAtStart,o=r.lineWidth,s=void 0===o?80:o,a=r.minContentWidth,l=void 0===a?20:a,c=r.onFold,u=r.onOverflow;if(!s||s<0)return e;var p=Math.max(1+l,1+s-t.length);if(e.length<=p)return e;var d=[],f={},h=s-t.length;"number"==typeof i&&(i>s-Math.max(2,l)?d.push(0):h=s-i);var m,g=void 0,y=void 0,v=!1,b=-1,x=-1,w=-1;for(n===Ae&&-1!==(b=Pe(e,b))&&(h=b+p);m=e[b+=1];){if(n===Re&&"\\"===m){switch(x=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}w=b}if("\n"===m)n===Ae&&(b=Pe(e,b)),h=b+p,g=void 0;else{if(" "===m&&y&&" "!==y&&"\n"!==y&&"\t"!==y){var k=e[b+1];k&&" "!==k&&"\n"!==k&&"\t"!==k&&(g=b)}if(b>=h)if(g)d.push(g),h=g+p,g=void 0;else if(n===Re){for(;" "===y||"\t"===y;)y=m,m=e[b+=1],v=!0;var O=b>w+1?b-2:x-1;if(f[O])return e;d.push(O),f[O]=!0,h=O+p,g=void 0}else v=!0}y=m}if(v&&u&&u(),0===d.length)return e;c&&c();for(var S=e.slice(0,d[0]),E=0;Er)return!0;if(i-(s=o+1)<=r)return!1}return!0}(s,Se.fold.lineWidth,a.length)),u=c?"|":">";if(!s)return u+"\n";var p="",d="";if(s=s.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?u+="-":s!==e&&t===e.length-1||(u+="+",r&&r()),d=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(u+=l);var t=e.match(/ +$/);return t?(p=e.slice(0,-t[0].length),t[0]):(p=e,"")})),d&&(d=d.replace(/\n+(?!\n|$)/g,"$&".concat(a))),p&&(p=p.replace(/\n+/g,"$&".concat(a))),i&&(u+=" #"+i.replace(/ ?[\r\n]+/g," "),n&&n()),!s)return"".concat(u).concat(l,"\n").concat(a).concat(d);if(c)return s=s.replace(/\n+/g,"$&".concat(a)),"".concat(u,"\n").concat(a).concat(p).concat(s).concat(d);s=s.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(a));var f=Ce("".concat(p).concat(s).concat(d),a,Ae,Se.fold);return"".concat(u,"\n").concat(a).concat(f)}function $e(e,t,n,r){var i=Se.defaultType,o=t.implicitKey,s=t.inFlow,a=e,l=a.type,c=a.value;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));var u=function(i){switch(i){case _.BLOCK_FOLDED:case _.BLOCK_LITERAL:return Ne(e,t,n,r);case _.QUOTE_DOUBLE:return je(c,t);case _.QUOTE_SINGLE:return Le(c,t);case _.PLAIN:return function(e,t,n,r){var i=e.comment,o=e.type,s=e.value,a=t.actualString,l=t.implicitKey,c=t.indent,u=t.inFlow;if(l&&/[\n[\]{},]/.test(s)||u&&/[[\]{},]/.test(s))return je(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||u||-1===s.indexOf("\n")?-1!==s.indexOf('"')&&-1===s.indexOf("'")?Le(s,t):je(s,t):Ne(e,t,n,r);if(!l&&!u&&o!==_.PLAIN&&-1!==s.indexOf("\n"))return Ne(e,t,n,r);if(""===c&&Te(s))return t.forceBlockIndent=!0,Ne(e,t,n,r);var p=s.replace(/\n+/g,"$&\n".concat(c));if(a){var d=t.doc.schema.tags;if("string"!=typeof Ee(p,d,d.scalarFallback).value)return je(s,t)}var f=l?p:Ce(p,c,_e,Ie(t));return!i||u||-1===f.indexOf("\n")&&-1===i.indexOf("\n")?f:(n&&n(),function(e,t,n){if(!n)return e;var r=n.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(r,"\n").concat(t).concat(e)}(f,c,i))}(e,t,n,r);default:return null}};l!==_.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?l=_.QUOTE_DOUBLE:!o&&!s||l!==_.BLOCK_FOLDED&&l!==_.BLOCK_LITERAL||(l=_.QUOTE_DOUBLE);var p=u(l);if(null===p&&null===(p=u(i)))throw new Error("Unsupported default string type ".concat(i));return p}function Me(e){var t=e.format,n=e.minFractionDigits,r=e.tag,i=e.value;if("bigint"==typeof i)return String(i);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";var o=JSON.stringify(i);if(!t&&n&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(o)){var s=o.indexOf(".");s<0&&(s=o.length,o+=".");for(var a=n-(o.length-s-1);a-- >0;)o+="0"}return o}function De(e,t){var n,r,i;switch(t.type){case _.FLOW_MAP:n="}",r="flow map";break;case _.FLOW_SEQ:n="]",r="flow sequence";break;default:return void e.push(new M(t,"Not a flow collection!?"))}for(var o=t.items.length-1;o>=0;--o){var s=t.items[o];if(!s||s.type!==_.COMMENT){i=s;break}}if(i&&i.char!==n){var a,l="Expected ".concat(r," to end with ").concat(n);"number"==typeof i.offset?(a=new M(t,l)).offset=i.offset+1:(a=new M(i,l),i.range&&i.range.end&&(a.offset=i.range.end-i.range.start)),e.push(a)}}function Fe(e,t){var n=t.context.src[t.range.start-1];if("\n"!==n&&"\t"!==n&&" "!==n){e.push(new M(t,"Comments must be separated from other tokens by white space characters"))}}function ze(e,t){var n=String(t),r=n.substr(0,8)+"..."+n.substr(-8);return new M(e,'The "'.concat(r,'" key is too long'))}function Be(e,t){var n,r=S(t);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.afterKey,s=i.before,a=i.comment,l=e.items[s];l?(o&&l.value&&(l=l.value),void 0===a?!o&&l.commentBefore||(l.spaceBefore=!0):l.commentBefore?l.commentBefore+="\n"+a:l.commentBefore=a):void 0!==a&&(e.comment?e.comment+="\n"+a:e.comment=a)}}catch(c){r.e(c)}finally{r.f()}}function Ue(e,t){var n=t.strValue;return n?"string"==typeof n?n:(n.errors.forEach((function(n){n.source||(n.source=t),e.errors.push(n)})),n.str):""}function qe(e,t){var n=t.tag,r=t.type,i=!1;if(n){var o=n.handle,s=n.suffix,a=n.verbatim;if(a){if("!"!==a&&"!!"!==a)return a;var l="Verbatim tags aren't resolved, so ".concat(a," is invalid.");e.errors.push(new M(t,l))}else if("!"!==o||s)try{return function(e,t){var n=t.tag,r=n.handle,i=n.suffix,o=e.tagPrefixes.find((function(e){return e.handle===r}));if(!o){var s=e.getDefaults().tagPrefixes;if(s&&(o=s.find((function(e){return e.handle===r}))),!o)throw new M(t,"The ".concat(r," tag handle is non-default and was not declared."))}if(!i)throw new M(t,"The ".concat(r," tag has no suffix."));if("!"===r&&"1.0"===(e.version||e.options.version)){if("^"===i[0])return e.warnings.push(new F(t,"YAML 1.0 ^ tag expansion is not supported")),i;if(/[:/]/.test(i)){var a=i.match(/^([a-z0-9-]+)\/(.*)/i);return a?"tag:".concat(a[1],".yaml.org,2002:").concat(a[2]):"tag:".concat(i)}}return o.prefix+decodeURIComponent(i)}(e,t)}catch(c){e.errors.push(c)}else i=!0}switch(r){case _.BLOCK_FOLDED:case _.BLOCK_LITERAL:case _.QUOTE_DOUBLE:case _.QUOTE_SINGLE:return R.STR;case _.FLOW_MAP:case _.MAP:return R.MAP;case _.FLOW_SEQ:case _.SEQ:return R.SEQ;case _.PLAIN:return i?R.STR:null;default:return null}}function We(e,t,n){var r,i=e.schema.tags,o=[],s=S(i);try{for(s.s();!(r=s.n()).done;){var a=r.value;if(a.tag===n){if(!a.test){var l=a.resolve(e,t);return l instanceof ue?l:new ae(l)}o.push(a)}}}catch(u){s.e(u)}finally{s.f()}var c=Ue(e,t);return"string"==typeof c&&o.length>0?Ee(c,o,i.scalarFallback):null}function Ve(e,t,n){try{var r=We(e,t,n);if(r)return n&&t.tag&&(r.tag=n),r}catch(l){return l.source||(l.source=t),e.errors.push(l),null}try{var i=function(e){switch(e.type){case _.FLOW_MAP:case _.MAP:return R.MAP;case _.FLOW_SEQ:case _.SEQ:return R.SEQ;default:return R.STR}}(t);if(!i)throw new Error("The tag ".concat(n," is unavailable"));var o="The tag ".concat(n," is unavailable, falling back to ").concat(i);e.warnings.push(new F(t,o));var s=We(e,t,i);return s.tag=n,s}catch(l){var a=new $(t,l.message);return a.stack=l.stack,e.errors.push(a),null}}var Qe=function(e){if(!e)return!1;var t=e.type;return t===_.MAP_KEY||t===_.MAP_VALUE||t===_.SEQ_ITEM};function He(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var n=function(e,t){var n,r={before:[],after:[]},i=!1,o=!1,s=S(Qe(t.context.parent)?t.context.parent.props.concat(t.props):t.props);try{for(s.s();!(n=s.n()).done;){var a=n.value,l=a.start,c=a.end;switch(t.context.src[l]){case E.COMMENT:t.commentHasRequiredWhitespace(l)||e.push(new M(t,"Comments must be separated from other tokens by white space characters"));var u=t.header,p=t.valueRange;(p&&(l>p.start||u&&l>u.start)?r.after:r.before).push(t.context.src.slice(l+1,c));break;case E.ANCHOR:i&&e.push(new M(t,"A node can have at most one anchor")),i=!0;break;case E.TAG:o&&e.push(new M(t,"A node can have at most one tag")),o=!0}}}catch(d){s.e(d)}finally{s.f()}return{comments:r,hasAnchor:i,hasTag:o}}(e.errors,t),r=n.comments,i=n.hasAnchor,o=n.hasTag;if(i){var s=e.anchors,a=t.anchor,l=s.getNode(a);l&&(s.map[s.newName(a)]=l),s.map[a]=t}if(t.type===_.ALIAS&&(i||o)){e.errors.push(new M(t,"An alias node must not specify any properties"))}var c=function(e,t){var n=e.anchors,r=e.errors,i=e.schema;if(t.type===_.ALIAS){var o=t.rawValue,s=n.getNode(o);if(!s){var a="Aliased anchor not found: ".concat(o);return r.push(new $(t,a)),null}var l=new me(s);return n._cstAliases.push(l),l}var c=qe(e,t);if(c)return Ve(e,t,c);if(t.type!==_.PLAIN){var u="Failed to resolve ".concat(t.type," node here");return r.push(new D(t,u)),null}try{return Ee(Ue(e,t),i.tags,i.tags.scalarFallback)}catch(p){return p.source||(p.source=t),r.push(p),null}}(e,t);if(c){c.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(c.cstNode=t),e.options.keepNodeTypes&&(c.type=t.type);var u=r.before.join("\n");u&&(c.commentBefore=c.commentBefore?"".concat(c.commentBefore,"\n").concat(u):u);var p=r.after.join("\n");p&&(c.comment=c.comment?"".concat(c.comment,"\n").concat(p):p)}return t.resolved=c}function Ye(e,t){if(t.type!==_.MAP&&t.type!==_.FLOW_MAP){var n="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new D(t,n)),null}var r=t.type===_.FLOW_MAP?function(e,t){for(var n=[],r=[],i=void 0,o=!1,s="{",a=0;a0){(c=new z(_.PLAIN,[])).context={parent:a,src:a.context.src};var u=a.range.start+1;if(c.range={start:u,end:u},c.valueRange={start:u,end:u},"number"==typeof a.range.origStart){var p=a.range.origStart+1;c.range.origStart=c.range.origEnd=p,c.valueRange.origStart=c.valueRange.origEnd=p}}var d=new fe(i,He(e,c));Xe(a,d),r.push(d),i&&"number"==typeof o&&a.range.start>o+1024&&e.errors.push(ze(t,i)),i=void 0,o=null;break;default:void 0!==i&&r.push(new fe(i)),i=He(e,a),o=a.range.start,a.error&&e.errors.push(a.error);e:for(var f=s+1;;++f){var h=t.items[f];switch(h&&h.type){case _.BLANK_LINE:case _.COMMENT:continue e;case _.MAP_VALUE:break e;default:var m="Implicit map keys need to be followed by map values";e.errors.push(new M(a,m));break e}}if(a.valueRangeContainsNewline){var g="Implicit map keys need to be on a single line";e.errors.push(new M(a,g))}}}void 0!==i&&r.push(new fe(i));return{comments:n,items:r}}(e,t),i=r.comments,o=r.items,s=new ye;s.items=o,Be(s,i);for(var a=!1,l=0;lr.valueRange.start)return!1;if(i[s]!==E.COMMENT)return!1;for(var a=n;as+1024&&e.errors.push(ze(t,o));for(var m=l.context.src,g=s;g1){throw new M(t,"Each pair must have its own sequence indicator")}var o=i.items[0]||new fe;i.commentBefore&&(o.commentBefore=o.commentBefore?"".concat(i.commentBefore,"\n").concat(o.commentBefore):i.commentBefore),i.comment&&(o.comment=o.comment?"".concat(i.comment,"\n").concat(o.comment):i.comment),i=o}n.items[r]=i instanceof fe?i:new fe(i)}}return n}function et(e,t,n){var r=new de(e);r.tag="tag:yaml.org,2002:pairs";var i,o=S(t);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=void 0,l=void 0;if(Array.isArray(s)){if(2!==s.length)throw new TypeError("Expected [key, value] tuple: ".concat(s));a=s[0],l=s[1]}else if(s&&s instanceof Object){var c=Object.keys(s);if(1!==c.length)throw new TypeError("Expected { key: value } tuple: ".concat(s));l=s[a=c[0]]}else a=s;var u=e.createPair(a,l,n);r.items.push(u)}}catch(p){o.e(p)}finally{o.f()}return r}var tt={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Je,createNode:et},nt=function(e){l(n,e);var t=g(n);function n(){var e;return i(this,n),a(h(e=t.call(this)),"add",ye.prototype.add.bind(h(e))),a(h(e),"delete",ye.prototype.delete.bind(h(e))),a(h(e),"get",ye.prototype.get.bind(h(e))),a(h(e),"has",ye.prototype.has.bind(h(e))),a(h(e),"set",ye.prototype.set.bind(h(e))),e.tag=n.tag,e}return s(n,[{key:"toJSON",value:function(e,t){var n=new Map;t&&t.onCreate&&t.onCreate(n);var r,i=S(this.items);try{for(i.s();!(r=i.n()).done;){var o=r.value,s=void 0,a=void 0;if(o instanceof fe?(s=se(o.key,"",t),a=se(o.value,s,t)):s=se(o,"",t),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}}catch(l){i.e(l)}finally{i.f()}return n}}]),n}(de);a(nt,"tag","tag:yaml.org,2002:omap");var rt={identify:function(e){return e instanceof Map},nodeClass:nt,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var n,r=Je(e,t),i=[],o=S(r.items);try{for(o.s();!(n=o.n()).done;){var s=n.value.key;if(s instanceof ae){if(i.includes(s.value)){throw new M(t,"Ordered maps must not include duplicate keys")}i.push(s.value)}}}catch(a){o.e(a)}finally{o.f()}return Object.assign(new nt,r)},createNode:function(e,t,n){var r=et(e,t,n),i=new nt;return i.items=r.items,i}},it=function(e){l(n,e);var t=g(n);function n(){var e;return i(this,n),(e=t.call(this)).tag=n.tag,e}return s(n,[{key:"add",value:function(e){var t=e instanceof fe?e:new fe(e);ge(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var n=ge(this.items,e);return!t&&n instanceof fe?n.key instanceof ae?n.key.value:n.key:n}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(r(t)));var n=ge(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new fe(e))}},{key:"toJSON",value:function(e,t){return y(c(n.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return y(c(n.prototype),"toString",this).call(this,e,t,r);throw new Error("Set items must all have null values")}}]),n}(ye);a(it,"tag","tag:yaml.org,2002:set");var ot={identify:function(e){return e instanceof Set},nodeClass:it,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var n=Ye(e,t);if(!n.hasAllNullValues())throw new M(t,"Set items must all have null values");return Object.assign(new it,n)},createNode:function(e,t,n){var r,i=new it,o=S(t);try{for(o.s();!(r=o.n()).done;){var s=r.value;i.items.push(e.createPair(s,null,n))}}catch(a){o.e(a)}finally{o.f()}return i}},st=function(e,t){var n=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-n:n},at=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return Me(t);var n="";t<0&&(n="-",t=Math.abs(t));var r=[t%60];return t<60?r.unshift(0):(t=Math.round((t-r[0])/60),r.unshift(t%60),t>=60&&(t=Math.round((t-r[0])/60),r.unshift(t))),n+r.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},lt={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,n){return st(t,n.replace(/_/g,""))},stringify:at},ct={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,n){return st(t,n.replace(/_/g,""))},stringify:at},ut={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,n,r,i,o,s,a,l){a&&(a=(a+"00").substr(1,3));var c=Date.UTC(t,n-1,r,i||0,o||0,s||0,a||0);if(l&&"Z"!==l){var u=st(l[0],l.slice(1));Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function pt(e){var t="undefined"!=typeof process&&{}||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function dt(e,t){if(pt(!1)){var n="undefined"!=typeof process&&process.emitWarning;n?n(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var ft={};var ht={createNode:function(e,t,n){var i=new ye(e);if(t instanceof Map){var o,s=S(t);try{for(s.s();!(o=s.n()).done;){var a=v(o.value,2),l=a[0],c=a[1];i.items.push(e.createPair(l,c,n))}}catch(f){s.e(f)}finally{s.f()}}else if(t&&"object"===r(t))for(var u=0,p=Object.keys(t);u=0?n+r.toString(t):Me(e)}var xt={identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new ae(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Oe,stringify:function(){return Oe.nullStr}},wt={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:we,stringify:function(e){return e.value?we.trueStr:we.falseStr}},kt={identify:function(e){return yt(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return vt(e,t,8)},options:ke,stringify:function(e){return bt(e,8,"0o")}},Ot={identify:yt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return vt(e,e,10)},options:ke,stringify:Me},St={identify:function(e){return yt(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return vt(e,t,16)},options:ke,stringify:function(e){return bt(e,16,"0x")}},Et={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Me},_t={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},At={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,n){var r=t||n,i=new ae(parseFloat(e));return r&&"0"===r[r.length-1]&&(i.minFractionDigits=r.length),i},stringify:Me},Rt=gt.concat([xt,wt,kt,Ot,St,Et,_t,At]),Pt=function(e){return"bigint"==typeof e||Number.isInteger(e)},Ct=function(e){var t=e.value;return JSON.stringify(t)},It=[ht,mt,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Ue,stringify:Ct},{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new ae(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:Ct},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:Ct},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return ke.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return Pt(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:Ct}];It.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var Tt=function(e){return e.value?we.trueStr:we.falseStr},jt=function(e){return"bigint"==typeof e||Number.isInteger(e)};function Lt(e,t,n){var r=t.replace(/_/g,"");if(ke.asBigInt){switch(n){case 2:r="0b".concat(r);break;case 8:r="0o".concat(r);break;case 16:r="0x".concat(r)}var i=BigInt(r);return"-"===e?BigInt(-1)*i:i}var o=parseInt(r,n);return"-"===e?-1*o:o}function Nt(e,t,n){var r=e.value;if(jt(r)){var i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return Me(e)}var $t=gt.concat([{identify:function(e){return null==e},createNode:function(e,t,n){return n.wrapScalars?new ae(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:Oe,stringify:function(){return Oe.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:we,stringify:Tt},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:we,stringify:Tt},{identify:jt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,n){return Lt(t,n,2)},stringify:function(e){return Nt(e,2,"0b")}},{identify:jt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,n){return Lt(t,n,8)},stringify:function(e){return Nt(e,8,"0")}},{identify:jt,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,n){return Lt(t,n,10)},stringify:Me},{identify:jt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,n){return Lt(t,n,16)},stringify:function(e){return Nt(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Me},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var n=new ae(parseFloat(e.replace(/_/g,"")));if(t){var r=t.replace(/_/g,"");"0"===r[r.length-1]&&(n.minFractionDigits=r.length)}return n},stringify:Me}],Ze,rt,tt,ot,lt,ct,ut),Mt={core:Rt,failsafe:gt,json:It,yaml11:$t},Dt={binary:Ze,bool:wt,float:At,floatExp:_t,floatNaN:Et,floatTime:ct,int:Ot,intHex:St,intOct:kt,intTime:lt,map:ht,null:xt,omap:rt,pairs:tt,seq:mt,set:ot,timestamp:ut};function Ft(e,t,n){if(e instanceof oe)return e;var i=n.defaultPrefix,o=n.onTagObj,s=n.prevObjects,a=n.schema,l=n.wrapScalars;t&&t.startsWith("!!")&&(t=i+t.slice(2));var c=function(e,t,n){if(t){var r=n.filter((function(e){return e.tag===t})),i=r.find((function(e){return!e.format}))||r[0];if(!i)throw new Error("Tag ".concat(t," not found"));return i}return n.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,a.tags);if(!c){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==r(e))return l?new ae(e):e;c=e instanceof Map?ht:e[Symbol.iterator]?mt:ht}o&&(o(c),delete n.onTagObj);var u={value:void 0,node:void 0};if(e&&"object"===r(e)&&s){var p=s.get(e);if(p){var d=new me(p);return n.aliasNodes.push(d),d}u.value=e,s.set(e,u)}return u.node=c.createNode?c.createNode(n.schema,e,n):l?new ae(e):e,t&&u.node instanceof oe&&(u.node.tag=t),u.node}var zt=function(e,t){return e.keyt.key?1:0},Bt=function(){function e(t){var n=t.customTags,r=t.merge,o=t.schema,s=t.sortMapEntries,a=t.tags;i(this,e),this.merge=!!r,this.name=o,this.sortMapEntries=!0===s?zt:s||null,!n&&a&&function(e,t){if(!ft[e]&&pt(!0)){ft[e]=!0;var n="The option '".concat(e,"' will be removed in a future release");dt(n+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}("tags","customTags"),this.tags=function(e,t,n,r){var i=e[r.replace(/\W/g,"")];if(!i){var o=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(r,'"; use one of ').concat(o))}if(Array.isArray(n)){var s,a=S(n);try{for(a.s();!(s=a.n()).done;){var l=s.value;i=i.concat(l)}}catch(f){a.e(f)}finally{a.f()}}else"function"==typeof n&&(i=n(i.slice()));for(var c=0;c");var s=t.substr(i.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return i.handle+s}function Qt(e,t,n,i){var o,s=t.doc,a=s.anchors,l=s.schema;if(!(e instanceof oe)){var c={aliasNodes:[],onTagObj:function(e){return o=e},prevObjects:new Map};e=l.createNode(e,!0,null,c);var u,p=S(c.aliasNodes);try{for(p.s();!(u=p.n()).done;){var d=u.value;d.source=d.source.node;var f=a.getName(d.source);f||(f=a.newName(),a.map[f]=d.source)}}catch(g){p.e(g)}finally{p.f()}}if(e instanceof fe)return e.toString(t,n,i);o||(o=function(e,t){if(t instanceof me)return me;if(t.tag){var n=e.filter((function(e){return e.tag===t.tag}));if(n.length>0)return n.find((function(e){return e.format===t.format}))||n[0]}var i,o;if(t instanceof ae){o=t.value;var s=e.filter((function(e){return e.identify&&e.identify(o)||e.class&&o instanceof e.class}));i=s.find((function(e){return e.format===t.format}))||s.find((function(e){return!e.format}))}else o=t,i=e.find((function(e){return e.nodeClass&&o instanceof e.nodeClass}));if(!i){var a=o&&o.constructor?o.constructor.name:r(o);throw new Error("Tag not resolved for ".concat(a," value"))}return i}(l.tags,e));var h=function(e,t,n){var r=n.anchors,i=n.doc,o=[],s=i.anchors.getName(e);return s&&(r[s]=e,o.push("&".concat(s))),e.tag?o.push(Vt(i,e.tag)):t.default||o.push(Vt(i,t.tag)),o.join(" ")}(e,o,t);h.length>0&&(t.indentAtStart=(t.indentAtStart||0)+h.length+1);var m="function"==typeof o.stringify?o.stringify(e,t,n,i):e instanceof ae?$e(e,t,n,i):e.toString(t,n,i);return h?e instanceof ae||"{"===m[0]||"["===m[0]?"".concat(h," ").concat(m):"".concat(h,"\n").concat(t.indent).concat(m):m}var Ht=function(){function e(t){i(this,e),a(this,"map",Object.create(null)),this.prefix=t}return s(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new me(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new be,n=arguments.length,r=new Array(n),i=0;i0&&!e.commentBefore&&(e.commentBefore=r.before.join("\n"),r.before=[]))}}catch(p){s.e(p)}finally{s.f()}if(e.contents=i||null,i){var c=r.before.join("\n");if(c){var u=i instanceof ue&&i.items[0]?i.items[0]:i;u.commentBefore=u.commentBefore?"".concat(c,"\n").concat(u.commentBefore):c}e.comment=r.after.join("\n")||null}else e.comment=r.before.concat(r.after).join("\n")||null}(this,o),this.anchors.resolveNodes(),this.options.prettyErrors){var c,u=S(this.errors);try{for(u.s();!(c=u.n()).done;){var p=c.value;p instanceof N&&p.makePretty()}}catch(m){u.e(m)}finally{u.f()}var d,f=S(this.warnings);try{for(f.s();!(d=f.n()).done;){var h=d.value;h instanceof N&&h.makePretty()}}catch(m){f.e(m)}finally{f.f()}}return this}},{key:"listNonDefaultTags",value:function(){return Gt(this.contents).filter((function(e){return 0!==e.indexOf(Bt.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var n=this.tagPrefixes.find((function(t){return t.handle===e}));n?n.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var n=this,r=this.options,i=r.keepBlobsInJSON,o=r.mapAsMap,s=r.maxAliasCount,a=i&&("string"!=typeof e||!(this.contents instanceof ae)),l={doc:this,indentStep:" ",keep:a,mapAsMap:a&&!!o,maxAliasCount:s,stringify:Qt},c=Object.keys(this.anchors.map);c.length>0&&(l.anchors=new Map(c.map((function(e){return[n.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var u=se(this.contents,e,l);if("function"==typeof t&&l.anchors){var p,d=S(l.anchors.values());try{for(d.s();!(p=d.n()).done;){var f=p.value,h=f.count;t(f.res,h)}}catch(m){d.e(m)}finally{d.f()}}return u}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var n=[],r=!1;if(this.version){var i="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?i="%YAML:1.0":"1.1"===this.version&&(i="%YAML 1.1")),n.push(i),r=!0}var o=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,i=e.prefix;o.some((function(e){return 0===e.indexOf(i)}))&&(n.push("%TAG ".concat(t," ").concat(i)),r=!0)})),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&(!r&&this.directivesEndMarker||n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));var s={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Qt},a=!1,l=null;if(this.contents){this.contents instanceof oe&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),s.forceBlockIndent=!!this.comment,l=this.contents.comment);var c=l?null:function(){return a=!0},u=Qt(this.contents,s,(function(){return l=null}),c);n.push(ie(u,"",l))}else void 0!==this.contents&&n.push(Qt(this.contents,s));return this.comment&&(a&&!l||""===n[n.length-1]||n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join("\n")+"\n"}}]),e}();a(Jt,"defaults",Wt);var en=function(e){l(n,e);var t=g(n);function n(e){return i(this,n),t.call(this,Object.assign({},Ut,e))}return n}(Jt);function tn(e,t){var n=re(e),r=new en(t).parse(n[0]);if(n.length>1){r.errors.unshift(new M(n[1],"Source contains multiple documents; please use YAML.parseAllDocuments()"))}return r}var nn={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;void 0===n&&"string"==typeof t&&(n=t,t=!0);var r=Object.assign({},Jt.defaults[Ut.version],Ut);return new Bt(r).createNode(e,t,n)},defaultOptions:Ut,Document:en,parse:function(e,t){var n=tn(e,t);if(n.warnings.forEach((function(e){return dt(e)})),n.errors.length>0)throw n.errors[0];return n.toJSON()},parseAllDocuments:function(e,t){var n,r,i=[],o=S(re(e));try{for(o.s();!(r=o.n()).done;){var s=r.value,a=new en(t);a.parse(s,n),i.push(a),n=a}}catch(l){o.e(l)}finally{o.f()}return i},parseCST:re,parseDocument:tn,scalarOptions:qt,stringify:function(e,t){var n=new en(t);return n.contents=e,String(n)}}},43244:e=>{"use strict";e.exports=JSON.parse('{"i8":"1.0.0-beta.123"}')}}]); \ No newline at end of file diff --git a/assets/js/6669.645df4e4.js.LICENSE.txt b/assets/js/6669.645df4e4.js.LICENSE.txt new file mode 100644 index 0000000000..a4546664db --- /dev/null +++ b/assets/js/6669.645df4e4.js.LICENSE.txt @@ -0,0 +1,106 @@ +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ + +/*! + * Redocusaurus + * https://redocusaurus.vercel.app/ + * (c) 2023 Rohit Gohri + * Released under the MIT License + */ + +/*! + * Stickyfill -- `position: sticky` polyfill + * v. 1.1.1 | https://github.com/wilddeer/stickyfill + * Copyright Oleg Korsunsky | http://wd.dizaina.net/ + * + * MIT License + */ + +/*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + +/*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * perfect-scrollbar v1.5.3 + * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors + * Licensed under MIT + */ + +/*! For license information please see redoc.browser.lib.js.LICENSE.txt */ + +/*!*************************************************** +* mark.js v8.11.1 +* https://markjs.io/ +* Copyright (c) 2014–2018, Julian KΓΌhnel +* Released under the MIT license https://git.io/vwTVl +*****************************************************/ + +/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */ + +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ diff --git a/assets/js/668e3470.68e1a92f.js b/assets/js/668e3470.68e1a92f.js new file mode 100644 index 0000000000..1c7b71ee02 --- /dev/null +++ b/assets/js/668e3470.68e1a92f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1765],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=l(r),d=o,m=u["".concat(s,".").concat(d)]||u[d]||f[d]||a;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,c=new Array(a);c[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var n=r(87462),o=(r(67294),r(3905));const a={},c="CLI Reference",i={unversionedId:"cli/reference/tracetest_get",id:"cli/reference/tracetest_get",title:"CLI Reference",description:"tracetest get",source:"@site/docs/cli/reference/tracetest_get.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_get",permalink:"/cli/reference/tracetest_get",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_get.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_export"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_list"}},s={},l=[{value:"tracetest get",id:"tracetest-get",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:l},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,o.kt)("h2",{id:"tracetest-get"},"tracetest get"),(0,o.kt)("p",null,"Get resource"),(0,o.kt)("h3",{id:"synopsis"},"Synopsis"),(0,o.kt)("p",null,"Get a resource from your Tracetest server"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"tracetest get analyzer|config|datastore|demo|env|organization|pollingprofile|test|testrunner|testsuite|variableset [flags]\n")),(0,o.kt)("h3",{id:"options"},"Options"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," -h, --help help for get\n --id string id of the resource to get\n")),(0,o.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,o.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/cli/reference/tracetest"},"tracetest"),"\t - CLI to configure, install and execute tests on a Tracetest server")),(0,o.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/679291bf.3f3eb74a.js b/assets/js/679291bf.3f3eb74a.js new file mode 100644 index 0000000000..788d4264ac --- /dev/null +++ b/assets/js/679291bf.3f3eb74a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[8298],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>m});var n=r(67294);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var i=n.createContext({}),c=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,s=e.mdxType,a=e.originalType,i=e.parentName,l=o(e,["components","mdxType","originalType","parentName"]),u=c(r),d=s,m=u["".concat(i,".").concat(d)]||u[d]||h[d]||a;return r?n.createElement(m,p(p({ref:t},l),{},{components:r})):n.createElement(m,p({ref:t},l))}));function m(e,t){var r=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var a=r.length,p=new Array(a);p[0]=d;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[u]="string"==typeof e?e:s,p[1]=o;for(var c=2;c{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>p,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var n=r(87462),s=(r(67294),r(3905));const a={},p="OpenTelemetry Store - User Purchasing Products",o={unversionedId:"live-examples/opentelemetry-store/use-cases/user-purchasing-products",id:"live-examples/opentelemetry-store/use-cases/user-purchasing-products",title:"OpenTelemetry Store - User Purchasing Products",description:"In this use case, we want to validate the following story:",source:"@site/docs/live-examples/opentelemetry-store/use-cases/user-purchasing-products.md",sourceDirName:"live-examples/opentelemetry-store/use-cases",slug:"/live-examples/opentelemetry-store/use-cases/user-purchasing-products",permalink:"/live-examples/opentelemetry-store/use-cases/user-purchasing-products",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/live-examples/opentelemetry-store/use-cases/user-purchasing-products.md",tags:[],version:"current",frontMatter:{},sidebar:"liveExamplesSidebar",previous:{title:"OpenTelemetry Store - Get recommended products",permalink:"/live-examples/opentelemetry-store/use-cases/get-recommended-products"}},i={},c=[{value:"Building a Test Suite for This Scenario",id:"building-a-test-suite-for-this-scenario",level:2},{value:"Mapping Environment Variables",id:"mapping-environment-variables",level:3},{value:"Creating Tests",id:"creating-tests",level:3},{value:"Creating the Test Suite",id:"creating-the-test-suite",level:3}],l={toc:c},u="wrapper";function h(e){let{components:t,...r}=e;return(0,s.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,s.kt)("h1",{id:"opentelemetry-store---user-purchasing-products"},"OpenTelemetry Store - User Purchasing Products"),(0,s.kt)("p",null,"In this use case, we want to validate the following story:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre"},"As a consumer, after landing at home page\nI want to see the shop recommended products, add the first one to my cart and pay for it on checkout\nSo I can have it shipped to my home\n")),(0,s.kt)("p",null,"Something interesting about this process is that it is a composition of many of the previous use cases, executed in sequence:"),(0,s.kt)("ol",null,(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("a",{parentName:"li",href:"/live-examples/opentelemetry-store/use-cases/get-recommended-products"},"Get Recommended Products")),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("a",{parentName:"li",href:"/live-examples/opentelemetry-store/use-cases/add-item-into-shopping-cart"},"Add Item into Shopping Cart")),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("a",{parentName:"li",href:"/live-examples/opentelemetry-store/use-cases/check-shopping-cart-contents"},"Check Shopping Cart Contents")),(0,s.kt)("li",{parentName:"ol"},(0,s.kt)("a",{parentName:"li",href:"/live-examples/opentelemetry-store/use-cases/checkout"},"Checkout"))),(0,s.kt)("p",null,"So in this case, we need to trigger four tests in sequence to achieve test the entire scenario and make these tests share data."),(0,s.kt)("h2",{id:"building-a-test-suite-for-this-scenario"},"Building a Test Suite for This Scenario"),(0,s.kt)("p",null,"Using Tracetest, we can do that by ",(0,s.kt)("a",{parentName:"p",href:"/web-ui/creating-tests"},"creating a test")," for each step and later grouping these tests as ",(0,s.kt)("a",{parentName:"p",href:"/web-ui/creating-test-suites"},"Test Suites")," that have an ",(0,s.kt)("a",{parentName:"p",href:"/concepts/variable-sets"},"variable set"),"]."),(0,s.kt)("p",null,"We can do that by creating the tests and Test Suites through the Web UI or using the CLI. In this example, we will use the CLI to create a Variable Set and then create the Test Suite with all tests needed. The ",(0,s.kt)("a",{parentName:"p",href:"/concepts/assertions"},"assertions")," that we will check are the same for every single test."),(0,s.kt)("h3",{id:"mapping-environment-variables"},"Mapping Environment Variables"),(0,s.kt)("p",null,"The first thing that we need to think about is to map the variables that are needed in this process. At first glance, we can identify the vars to the API address and the user ID:\nWith these variables, we can create the following definition file as saving as ",(0,s.kt)("inlineCode",{parentName:"p"},"user-buying-products.env"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-sh"},"OTEL_API_URL=http://otel-shop-demo-frontend:8080/api\nUSER_ID=2491f868-88f1-4345-8836-d5d8511a9f83\n")),(0,s.kt)("h3",{id:"creating-tests"},"Creating Tests"),(0,s.kt)("p",null,"After creating the environment file, we will create a test for each step, starting with ",(0,s.kt)("a",{parentName:"p",href:"/live-examples/opentelemetry-store/use-cases/get-recommended-products"},"Get Recommended Products"),", which will be saved as ",(0,s.kt)("inlineCode",{parentName:"p"},"get-recommended-products.yaml"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: Get recommended products\n trigger:\n type: http\n httpRequest:\n url: ${var:OTEL_API_URL}/recommendations?productIds=&sessionId=${var:USER_ID}¤cyCode=\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="rpc" name="grpc.hipstershop.ProductCatalogService/GetProduct" rpc.system="grpc" rpc.method="GetProduct" rpc.service="hipstershop.ProductCatalogService"]\n assertions: # It should have 4 products on this list.\n - attr:tracetest.selected_spans.count = 4\n - selector: span[tracetest.span.type="rpc" name="/hipstershop.FeatureFlagService/GetFlag" rpc.system="grpc" rpc.method="GetFlag" rpc.service="hipstershop.FeatureFlagService"]\n assertions: # The feature flagger should be called for one product.\n - attr:tracetest.selected_spans.count = 1\n outputs:\n - name: PRODUCT_ID\n selector: span[tracetest.span.type="general" name="Tracetest trigger"]\n value: attr:tracetest.response.body | json_path \'$[0].id\'\n')),(0,s.kt)("p",null,"Note that we have one important changes here: we are now using environment variables on the definition, like ",(0,s.kt)("inlineCode",{parentName:"p"},"${var:OTEL_API_URL}")," and ",(0,s.kt)("inlineCode",{parentName:"p"},"${var:USER_ID}")," on the trigger section and an output to fetch the first ",(0,s.kt)("inlineCode",{parentName:"p"},"${var:PRODUCT_ID}")," that the user chose. This new environment variable will be used in the next tests."),(0,s.kt)("p",null,"The next step is to define the ",(0,s.kt)("a",{parentName:"p",href:"/live-examples/opentelemetry-store/use-cases/add-item-into-shopping-cart"},"Add Item into Shopping Cart")," test, which will be saved as ",(0,s.kt)("inlineCode",{parentName:"p"},"add-product-into-shopping-cart.yaml"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: Add product into shopping cart\n description: Add a selected product to user shopping cart\n trigger:\n type: http\n httpRequest:\n url: ${var:OTEL_API_URL}/cart\n method: POST\n headers:\n - key: Content-Type\n value: application/json\n body: \'{"item":{"productId":"${var:PRODUCT_ID}","quantity":1},"userId":"${var:USER_ID}"}\'\n specs:\n - selector: span[tracetest.span.type="http" name="hipstershop.CartService/AddItem"]\n # The correct ProductID was sent to the Product Catalog API.\n assertions:\n - attr:app.product.id = "${var:PRODUCT_ID}"\n - selector: span[tracetest.span.type="database" name="HMSET" db.system="redis" db.redis.database_index="0"]\n # The product persisted correctly on the shopping cart.\n assertions:\n - attr:tracetest.selected_spans.count >= 1\n')),(0,s.kt)("p",null,"After that, we will ",(0,s.kt)("a",{parentName:"p",href:"/live-examples/opentelemetry-store/use-cases/check-shopping-cart-contents"},"Check Shopping Cart Contents")," (on ",(0,s.kt)("inlineCode",{parentName:"p"},"check-shopping-cart-contents.yaml"),"), simulating a user validating the products selected before finishing the purchase:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: Check shopping cart contents\n trigger:\n type: http\n httpRequest:\n url: ${var:OTEL_API_URL}/cart?sessionId=${var:USER_ID}¤cyCode=\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="rpc" name="hipstershop.ProductCatalogService/GetProduct" rpc.system="grpc" rpc.method="GetProduct" rpc.service="hipstershop.ProductCatalogService"]\n # The product previously added exists in the cart.\n assertions:\n - attr:app.product.id = "${var:PRODUCT_ID}"\n - selector: span[tracetest.span.type="general" name="Tracetest trigger"]\n # The size of the shopping cart should be at least 1.\n assertions:\n - attr:tracetest.response.body | json_path \'$.items.length\' >= 1\n')),(0,s.kt)("p",null,"And finally, we have the ",(0,s.kt)("a",{parentName:"p",href:"/live-examples/opentelemetry-store/use-cases/checkout"},"Checkout")," action (",(0,s.kt)("inlineCode",{parentName:"p"},"checkout.yaml"),"), where the user inputs the billing and shipping info and finishes buying the item in the shopping cart:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n name: Checking out shopping cart\n description: Checking out shopping cart\n trigger:\n type: http\n httpRequest:\n url: ${var:OTEL_API_URL}/checkout\n method: POST\n headers:\n - key: Content-Type\n value: application/json\n body: \'{"userId":"${var:USER_ID}","email":"someone@example.com","address":{"streetAddress":"1600 Amphitheatre Parkway","state":"CA","country":"United States","city":"Mountain View","zipCode":"94043"},"userCurrency":"USD","creditCard":{"creditCardCvv":672,"creditCardExpirationMonth":1,"creditCardExpirationYear":2030,"creditCardNumber":"4432-8015-6152-0454"}}\'\n specs:\n - selector: span[tracetest.span.type="rpc" name="hipstershop.CheckoutService/PlaceOrder"\n rpc.system="grpc" rpc.method="PlaceOrder" rpc.service="hipstershop.CheckoutService"]\n assertions: \n # An order was placed.\n - attr:app.user.id = "${var:USER_ID}"\n - attr:app.order.items.count = 1\n - selector: span[tracetest.span.type="rpc" name="hipstershop.PaymentService/Charge" rpc.system="grpc" rpc.method="Charge" rpc.service="hipstershop.PaymentService"]\n assertions: \n # The user was charged.\n - attr:rpc.grpc.status_code = 0\n - attr:tracetest.selected_spans.count >= 1\n - selector: span[tracetest.span.type="rpc" name="hipstershop.ShippingService/ShipOrder" rpc.system="grpc" rpc.method="ShipOrder" rpc.service="hipstershop.ShippingService"]\n assertions: \n # The product was shipped.\n - attr:rpc.grpc.status_code = 0\n - attr:tracetest.selected_spans.count >= 1\n - selector: span[tracetest.span.type="rpc" name="hipstershop.CartService/EmptyCart"\n rpc.system="grpc" rpc.method="EmptyCart" rpc.service="hipstershop.CartService"]\n assertions: \n # The shopping cart was emptied.\n - attr:rpc.grpc.status_code = 0\n - attr:tracetest.selected_spans.count >= 1\n')),(0,s.kt)("h3",{id:"creating-the-test-suite"},"Creating the Test Suite"),(0,s.kt)("p",null,"Now we wrap these files and create a Test Suite that will run these tests in sequence and will fail if any of the tests fail. We will call it ",(0,s.kt)("inlineCode",{parentName:"p"},"testsuite.yaml"),":"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-yml"},"type: TestSuite\nspec:\n name: User purchasing products\n description: Simulate a process of a user purchasing products on Astronomy store\n steps:\n - ./get-recommended-products.yaml\n - ./add-product-into-shopping-cart.yaml\n - ./check-shopping-cart-contents.yaml\n - ./checkout.yaml\n")),(0,s.kt)("p",null,"By having the test, Test Suite and environment files in the same directory, we can call the CLI and execute this Test Suite:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-sh"},"tracetest run testsuite -f testsuite.yaml -e user-buying-products.env\n")),(0,s.kt)("p",null,"The result should be an output like this:"),(0,s.kt)("pre",null,(0,s.kt)("code",{parentName:"pre",className:"language-sh"},"\u2714 User purchasing products (http://localhost:11633/testsuite/kRDUir0VR/run/1)\n \u2714 Get recommended products (http://localhost:11633/test/XxH8irA4R/run/1/test)\n \u2714 Add product into shopping cart (http://localhost:11633/test/j_N8i9AVR/run/1/test)\n \u2714 Check shopping cart contents (http://localhost:11633/test/Y2jim9AVg/run/1/test)\n \u2714 Checking out shopping cart (http://localhost:11633/test/VPCim90Vg/run/1/test)\n")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6863ef38.adeb61b7.js b/assets/js/6863ef38.adeb61b7.js new file mode 100644 index 0000000000..84e271b3fa --- /dev/null +++ b/assets/js/6863ef38.adeb61b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4271],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=n.createContext({}),l=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(i.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),d=l(r),f=a,b=d["".concat(i,".").concat(f)]||d[f]||u[f]||o;return r?n.createElement(b,c(c({ref:t},p),{},{components:r})):n.createElement(b,c({ref:t},p))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,c=new Array(o);c[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[d]="string"==typeof e?e:a,c[1]=s;for(var l=2;l{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>l});var n=r(87462),a=(r(67294),r(3905));const o={},c="CLI Reference",s={unversionedId:"cli/reference/tracetest_dashboard",id:"cli/reference/tracetest_dashboard",title:"CLI Reference",description:"tracetest dashboard",source:"@site/docs/cli/reference/tracetest_dashboard.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_dashboard",permalink:"/cli/reference/tracetest_dashboard",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_dashboard.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_configure"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_delete"}},i={},l=[{value:"tracetest dashboard",id:"tracetest-dashboard",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:l},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,a.kt)("h2",{id:"tracetest-dashboard"},"tracetest dashboard"),(0,a.kt)("p",null,"Opens the Tracetest Dashboard URL"),(0,a.kt)("h3",{id:"synopsis"},"Synopsis"),(0,a.kt)("p",null,"Opens the Tracetest Dashboard URL"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"tracetest dashboard [flags]\n")),(0,a.kt)("h3",{id:"options"},"Options"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"}," -h, --help help for dashboard\n")),(0,a.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,a.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/cli/reference/tracetest"},"tracetest"),"\t - CLI to configure, install and execute tests on a Tracetest server")),(0,a.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/68cbae84.ec8f2f39.js b/assets/js/68cbae84.ec8f2f39.js new file mode 100644 index 0000000000..91efd18610 --- /dev/null +++ b/assets/js/68cbae84.ec8f2f39.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[685],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>b});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},c="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,u=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(r),m=a,b=c["".concat(u,".").concat(m)]||c[m]||y[m]||i;return r?n.createElement(b,o(o({ref:t},p),{},{components:r})):n.createElement(b,o({ref:t},p))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>y,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(87462),a=(r(67294),r(3905));const i={},o="no-empty-attributes",l={unversionedId:"analyzer/rules/no-empty-attributes",id:"analyzer/rules/no-empty-attributes",title:"no-empty-attributes",description:"Disallow empty attribute values.",source:"@site/docs/analyzer/rules/no-empty-attributes.md",sourceDirName:"analyzer/rules",slug:"/analyzer/rules/no-empty-attributes",permalink:"/analyzer/rules/no-empty-attributes",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/analyzer/rules/no-empty-attributes.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"required-attributes",permalink:"/analyzer/rules/required-attributes"},next:{title:"Security",permalink:"/analyzer/plugins/security"}},u={},s=[{value:"Rule Details",id:"rule-details",level:2},{value:"Options",id:"options",level:2},{value:"When Not To Use It",id:"when-not-to-use-it",level:2}],p={toc:s},c="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(c,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"no-empty-attributes"},"no-empty-attributes"),(0,a.kt)("p",null,"Disallow empty attribute values."),(0,a.kt)("h2",{id:"rule-details"},"Rule Details"),(0,a.kt)("p",null,"An\xa0",(0,a.kt)("inlineCode",{parentName:"p"},"Attribute"),"\xa0is a key-value pair, which is encapsulated as part of a span. The attribute value should not be empty to be considered valid."),(0,a.kt)("h2",{id:"options"},"Options"),(0,a.kt)("p",null,"This rule has the following options:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'"error"')," requires attribute values to not be empty"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'"disabled"')," disables the attribute values verification"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("inlineCode",{parentName:"li"},'"warning"')," verifies attribute values to not be empty but does not impact the analyzer score")),(0,a.kt)("h2",{id:"when-not-to-use-it"},"When Not To Use It"),(0,a.kt)("p",null,"If you intentionally use empty attribute values then you can disable this rule."))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/69425d0e.20d9db77.js b/assets/js/69425d0e.20d9db77.js new file mode 100644 index 0000000000..9095e171ab --- /dev/null +++ b/assets/js/69425d0e.20d9db77.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9353],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),i=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},p=function(e){var t=i(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=i(r),f=o,m=u["".concat(l,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(m,s(s({ref:t},p),{},{components:r})):n.createElement(m,s({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,s=new Array(a);s[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,s[1]=c;for(var i=2;i{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>i});var n=r(87462),o=(r(67294),r(3905));const a={},s="Deployment",c={unversionedId:"deployment/overview",id:"deployment/overview",title:"Deployment",description:"This section contains a general overview of deploying Tracetest in production. You can find platform-specific guides for:",source:"@site/docs/deployment/overview.md",sourceDirName:"deployment",slug:"/deployment/overview",permalink:"/deployment/overview",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/deployment/overview.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"OpenTelemetry Collector Configuration File Reference",permalink:"/configuration/opentelemetry-collector-configuration-file-reference"},next:{title:"Docker Deployment",permalink:"/deployment/docker"}},l={},i=[],p={toc:i},u="wrapper";function d(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"deployment"},"Deployment"),(0,o.kt)("p",null,"This section contains a general overview of deploying Tracetest in production. You can find platform-specific guides for:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"./docker"},"Docker")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"./kubernetes"},"Kubernetes"))),(0,o.kt)("p",null,"As shown in the diagram below, a typical production Tracetest deployment consists of Postgres, an OpenTelemetry Colletor and a ",(0,o.kt)("a",{parentName:"p",href:"../configuration/overview"},"trace data store"),". But, if you do not want to use a trace data store, you can rely entirely on OpenTelemetry Collector."),(0,o.kt)("mermaid",{value:'flowchart TD\n A(("Tracetest"))\n B[(Postgres)]\n C(OpenTelemetry Collector)\n D("Trace data store (optional)")\n\n\n A <--\x3e |Tracetest stores test run data in Postgres| B\n C --\x3e |OTel Collector sends traces to the trace data store| D\n D --\x3e |Tracetest fetches traces to enrich e2e and integration tests| A\n\n classDef tracetest fill:#61175e,stroke:#61175e,stroke-width:4px,color:#ffffff;\n\n class A tracetest'}),(0,o.kt)("p",null,"Postgres stores all Tracetest-related data."),(0,o.kt)("p",null,"OpenTelemetry Collector ingests traces from your distributed system and forwards them to a trace data store."),(0,o.kt)("p",null,"A trace data store is used to store traces. Tracetest will fetch trace data from the trace data store when running tests."),(0,o.kt)("p",null,"Tracetest can be configured via a configuration file:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-yaml"},"# tracetest.yaml\n\npostgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n")),(0,o.kt)("p",null,"Read more in the ",(0,o.kt)("a",{parentName:"p",href:"/configuration/overview"},"configuration docs"),"."),(0,o.kt)("p",null,"Or, continue reading to see how to run Tracetest in production with ",(0,o.kt)("a",{parentName:"p",href:"./docker"},"Docker")," or ",(0,o.kt)("a",{parentName:"p",href:"./kubernetes"},"Kubernetes"),"."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6945.c51afbb3.js b/assets/js/6945.c51afbb3.js new file mode 100644 index 0000000000..859ee9e99b --- /dev/null +++ b/assets/js/6945.c51afbb3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[6945],{46945:(e,s,t)=>{t.r(s)}}]); \ No newline at end of file diff --git a/assets/js/6a1ebbe5.30525c33.js b/assets/js/6a1ebbe5.30525c33.js new file mode 100644 index 0000000000..ef73243aa7 --- /dev/null +++ b/assets/js/6a1ebbe5.30525c33.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[318],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),c=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(i.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),m=r,g=u["".concat(i,".").concat(m)]||u[m]||d[m]||l;return n?a.createElement(g,o(o({ref:t},p),{},{components:n})):a.createElement(g,o({ref:t},p))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=m;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:r,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>d,frontMatter:()=>l,metadata:()=>s,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));const l={},o="Run Tracetest Locally",s={unversionedId:"run-locally",id:"run-locally",title:"Run Tracetest Locally",description:"Tracetest depends on a postgres database and a trace store backend (Jaeger or Tempo). The frontend requires node and npm and the backend requires the go tooling.",source:"@site/docs/run-locally.md",sourceDirName:".",slug:"/run-locally",permalink:"/run-locally",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/run-locally.md",tags:[],version:"current",frontMatter:{}},i={},c=[{value:"Run on Local Kubernetes",id:"run-on-local-kubernetes",level:2},{value:"Installing Jaeger",id:"installing-jaeger",level:3},{value:"Install Tracetest",id:"install-tracetest",level:3},{value:"Run a Development Build",id:"run-a-development-build",level:2}],p={toc:c},u="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"run-tracetest-locally"},"Run Tracetest Locally"),(0,r.kt)("p",null,"Tracetest depends on a postgres database and a trace store backend (Jaeger or Tempo). The frontend requires node and npm and the backend requires the go tooling."),(0,r.kt)("h2",{id:"run-on-local-kubernetes"},(0,r.kt)("strong",{parentName:"h2"},"Run on Local Kubernetes")),(0,r.kt)("p",null,"Tracetest and its dependencies can be installed in a local Kubernetes cluster (microk8s, minikube, Kubernetes for Docker Desktop, etc).\nFollowing the ",(0,r.kt)("a",{parentName:"p",href:"./getting-started/installation"},"install steps")," will install a running instance of Tracetest and Postgres. Installing Jaeger is the easiest way to get a trace store backend."),(0,r.kt)("p",null,"The Tracetest install can be exposed with a ",(0,r.kt)("inlineCode",{parentName:"p"},"LoadBalancer"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"NodePort")," or any similar mechanism. It can also be kept internally, only expose the Jaeger and postgres port,\nand use them to run local development builds. This is useful to quickly test changes on both the front and back end."),(0,r.kt)("h3",{id:"installing-jaeger"},(0,r.kt)("strong",{parentName:"h3"},"Installing Jaeger")),(0,r.kt)("p",null,"Before installing Tracetest, we need to setup the ",(0,r.kt)("a",{parentName:"p",href:"https://www.jaegertracing.io/docs/1.32/operator/"},"Jaeger operator"),", which in turn has a dependency on ",(0,r.kt)("a",{parentName:"p",href:"https://cert-manager.io/"},"cert-mnanager"),".\ncert-manager has different ",(0,r.kt)("a",{parentName:"p",href:"https://cert-manager.io/docs/installation/"},"install options"),". The simplest way to do this is to use a static install:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml\n")),(0,r.kt)("p",null,"Once the pods in ",(0,r.kt)("inlineCode",{parentName:"p"},"cert-manager")," namespace are running, we can install the Jaeger operator:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"kubectl create namespace observability\nkubectl create -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.32.0/jaeger-operator.yaml -n observability\n")),(0,r.kt)("p",null,"Now, create an ",(0,r.kt)("inlineCode",{parentName:"p"},"AllInOne")," jaeger instance:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"cat <{n.d(t,{Zo:()=>c,kt:()=>k});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),p=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(o.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,o=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(n),m=r,k=u["".concat(o,".").concat(m)]||u[m]||d[m]||s;return n?a.createElement(k,l(l({ref:t},c),{},{components:n})):a.createElement(k,l({ref:t},c))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,l=new Array(s);l[0]=m;var i={};for(var o in t)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i[u]="string"==typeof e?e:r,l[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>d,frontMatter:()=>s,metadata:()=>i,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const s={},l="Tekton Cloud-native Pipeline",i={unversionedId:"ci-cd-automation/tekton-pipeline",id:"ci-cd-automation/tekton-pipeline",title:"Tekton Cloud-native Pipeline",description:"Check out the source code on GitHub here.",source:"@site/docs/ci-cd-automation/tekton-pipeline.md",sourceDirName:"ci-cd-automation",slug:"/ci-cd-automation/tekton-pipeline",permalink:"/ci-cd-automation/tekton-pipeline",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/ci-cd-automation/tekton-pipeline.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Testkube Kubernetes-native Test Runner Pipeline",permalink:"/ci-cd-automation/testkube-pipeline"},next:{title:"Tools and Integrations",permalink:"/tools-and-integrations/overview"}},o={},p=[{value:"Running Event-driven Trace-based Tests",id:"running-event-driven-trace-based-tests",level:2},{value:"Why do we want to run Tracetest with Tekton?",id:"why-do-we-want-to-run-tracetest-with-tekton",level:2},{value:"Infrastructure Overview",id:"infrastructure-overview",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Quickstart",id:"quickstart",level:2},{value:"1. Install Tekton Pipelines and Triggers",id:"1-install-tekton-pipelines-and-triggers",level:2},{value:"2. Install Tracetest CLI",id:"2-install-tracetest-cli",level:2},{value:"3. Install Tracetest in Your Kubernetes Cluster",id:"3-install-tracetest-in-your-kubernetes-cluster",level:2},{value:"4. Create a Test in Tracetest",id:"4-create-a-test-in-tracetest",level:2},{value:"5. Create a Task in Tekton",id:"5-create-a-task-in-tekton",level:2},{value:"6. Run the Tracetest Trace-based Test in Tekton with a TaskRun",id:"6-run-the-tracetest-trace-based-test-in-tekton-with-a-taskrun",level:2},{value:"7. Trigger Trace-based Tests with an EventListener",id:"7-trigger-trace-based-tests-with-an-eventlistener",level:2},{value:"Create a TriggerTemplate and TriggerBinding",id:"create-a-triggertemplate-and-triggerbinding",level:3},{value:"Create an EventListener",id:"create-an-eventlistener",level:3},{value:"Next Steps",id:"next-steps",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(u,(0,a.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"tekton-cloud-native-pipeline"},"Tekton Cloud-native Pipeline"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/quick-start-tekton"},"Check out the source code on GitHub here."))),(0,r.kt)("h2",{id:"running-event-driven-trace-based-tests"},"Running Event-driven Trace-based Tests"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tekton.dev/"},"Tekton")," is a powerful and flexible open-source framework for creating CI/CD systems, allowing developers to build, test, and deploy across cloud providers and on-premise systems."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,r.kt)("h2",{id:"why-do-we-want-to-run-tracetest-with-tekton"},"Why do we want to run Tracetest with Tekton?"),(0,r.kt)("p",null,"Tracetest leverages existing OpenTelemetry instrumentation to run assertions against every part of an HTTP transaction."),(0,r.kt)("p",null,"By running Tracetest with Tekton you can now add trace-based testing to the native CI/CD pipeline in your Kubernetes cluster. It allows you to run scheduled test runs and synthetic tests. All while following the trace-based testing principle and enabling full in-depth assertions against trace data, not just the response."),(0,r.kt)("h2",{id:"infrastructure-overview"},"Infrastructure Overview"),(0,r.kt)("p",null,"The following is high level sequence diagram on how Tekton and Tracetest interact with the different pieces of the system:"),(0,r.kt)("mermaid",{value:"sequenceDiagram\n Tekton CLI->>+Tekton CRDs: Configure Tekton CRDs\n Tekton CRDs->>+Tracetest Server: Trigger test run\n Tracetest Server->>+Instrumented Service: Trigger request\n Instrumented Service--\x3e>-Tracetest Server: Get response\n Instrumented Service->>+Data Store: Send telemetry data\n Tracetest Server->>+Data Store: Fetch trace\n Data Store--\x3e>-Tracetest Server: Get trace\n Tracetest Server->>+Tracetest Server: Run assertions\n Tekton CRDs--\x3e>-Tekton CLI: Send details"}),(0,r.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("p",null,"Make sure you have these three things installed before starting."),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"A running Kubernetes cluster (either locally or in the cloud)."),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("a",{parentName:"li",href:"https://kubernetes.io/docs/tasks/tools/"},"Kubectl")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("a",{parentName:"li",href:"https://helm.sh/docs/intro/install/"},"Helm")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("a",{parentName:"li",href:"https://tekton.dev/docs/cli/"},"Tekton CLI"))),(0,r.kt)("h2",{id:"quickstart"},"Quickstart"),(0,r.kt)("p",null,"Follow these steps to get started."),(0,r.kt)("h2",{id:"1-install-tekton-pipelines-and-triggers"},"1. Install Tekton Pipelines and Triggers"),(0,r.kt)("p",null,"Install Tekton Pipelines by following ",(0,r.kt)("a",{parentName:"p",href:"https://tekton.dev/docs/getting-started/tasks/#install-tekton-pipelines"},"these instructions for Pipelines"),", and ",(0,r.kt)("a",{parentName:"p",href:"https://tekton.dev/docs/getting-started/triggers/#install-tekton-triggers"},"there instructions for Triggers"),". Or, run the command below."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl apply --filename \\\nhttps://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml\n\nkubectl apply --filename \\\nhttps://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml\n\nkubectl apply --filename \\\nhttps://storage.googleapis.com/tekton-releases/triggers/latest/interceptors.yaml\n")),(0,r.kt)("h2",{id:"2-install-tracetest-cli"},"2. Install Tracetest CLI"),(0,r.kt)("p",null,"Install Tracetest CLI by following ",(0,r.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/getting-started/installation"},"these instructions")," for your OS."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"# MacOS example\nbrew install kubeshop/tracetest/tracetest\n")),(0,r.kt)("h2",{id:"3-install-tracetest-in-your-kubernetes-cluster"},"3. Install Tracetest in Your Kubernetes Cluster"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest server install\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"How do you want to run TraceTest? [type to search]:\n Using Docker Compose\n> Using Kubernetes\n")),(0,r.kt)("p",null,"Select ",(0,r.kt)("inlineCode",{parentName:"p"},"Using Kubernetes"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"Do you have OpenTelemetry based tracing already set up, or would you like us to install a demo tracing environment and app? [type to search]:\n I have a tracing environment already. Just install Tracetest\n> Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app.\n")),(0,r.kt)("p",null,"Select ",(0,r.kt)("inlineCode",{parentName:"p"},"Just learning tracing! Install Tracetest, OpenTelemetry Collector and the sample app."),"."),(0,r.kt)("p",null,"Confirm that Tracetest is running:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl get all -n tracetest\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"NAME READY STATUS RESTARTS AGE\npod/otel-collector-7f4d87489f-vp6zn 1/1 Running 0 5m41s\npod/tracetest-78b9c84c57-t4prx 1/1 Running 3 (4m15s ago) 5m29s\npod/tracetest-postgresql-0 1/1 Running 0 5m42s\n\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\nservice/otel-collector ClusterIP 10.96.173.226 4317/TCP 5m46s\nservice/tracetest ClusterIP 10.96.248.146 11633/TCP,4317/TCP 5m42s\nservice/tracetest-postgresql ClusterIP 10.96.155.147 5432/TCP 5m42s\nservice/tracetest-postgresql-hl ClusterIP None 5432/TCP 5m42s\n\nNAME READY UP-TO-DATE AVAILABLE AGE\ndeployment.apps/otel-collector 1/1 1 1 5m46s\ndeployment.apps/tracetest 1/1 1 1 5m42s\n\nNAME DESIRED CURRENT READY AGE\nreplicaset.apps/otel-collector-7f4d87489f 1 1 1 5m46s\nreplicaset.apps/tracetest-78b9c84c57 1 1 1 5m42s\n\nNAME READY AGE\nstatefulset.apps/tracetest-postgresql 1/1 5m42s\n")),(0,r.kt)("p",null,"By default, Tracetest is installed in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," namespace."),(0,r.kt)("p",null,"To explore the Tracetest Web UI, run the command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl --kubeconfig /.kube/config --context --namespace tracetest port-forward svc/tracetest 11633\n")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1679064296/Blogposts/Docs/screely-1679064291876_jxlhmn.png",alt:"Tracetest Web UI"})),(0,r.kt)("h2",{id:"4-create-a-test-in-tracetest"},"4. Create a Test in Tracetest"),(0,r.kt)("p",null,"Start by clicking ",(0,r.kt)("inlineCode",{parentName:"p"},"Create")," > ",(0,r.kt)("inlineCode",{parentName:"p"},"Create New Test")," > ",(0,r.kt)("inlineCode",{parentName:"p"},"HTTP Request")," > ",(0,r.kt)("inlineCode",{parentName:"p"},"Next")," > ",(0,r.kt)("inlineCode",{parentName:"p"},"Choose Example")," (dropdown) > ",(0,r.kt)("inlineCode",{parentName:"p"},"Pokeshop - List")," (generates a sample test from the Tracetest demo) > ",(0,r.kt)("inlineCode",{parentName:"p"},"Next")," > ",(0,r.kt)("inlineCode",{parentName:"p"},"URL")," is prefilled with ",(0,r.kt)("inlineCode",{parentName:"p"},"http://demo-pokemon-api.demo/pokemon?take=20&skip=0")," > ",(0,r.kt)("inlineCode",{parentName:"p"},"Create & Run"),"."),(0,r.kt)("p",null,"This will trigger the test and display a distributed trace in the ",(0,r.kt)("inlineCode",{parentName:"p"},"Trace")," tab to run assertions against."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1679064990/Blogposts/Docs/screely-1679064984975_s0psbr.png",alt:"Tracetest distributed trace test run view"})),(0,r.kt)("p",null,"Proceed to add a test spec to assert all database queries return within 500 ms. Click the ",(0,r.kt)("inlineCode",{parentName:"p"},"Test")," tab and proceed to click the ",(0,r.kt)("inlineCode",{parentName:"p"},"Add Test Spec")," button."),(0,r.kt)("p",null,"In the span selector make sure to add this selector:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-css"},'span[tracetest.span.type="database"]\n')),(0,r.kt)("p",null,"In the assertion field add:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-css"},"attr:tracetest.span.duration < 500ms\n")),(0,r.kt)("p",null,"Save the test spec and publish the test."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1679071121/Blogposts/Docs/screely-1679071115690_hqhzh2.png",alt:"Assertion for database queries"})),(0,r.kt)("p",null,"The database spans that are returning in more than 500ms are labeled in red."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1679071183/Blogposts/Docs/screely-1679071177655_cjqwlk.png",alt:"Assertions failing"})),(0,r.kt)("p",null,"This is an example of a trace-based test that asserts against every single part of an HTTP transaction, including all interactions with the database."),(0,r.kt)("p",null,"However, Tracetest cannot run this test as part of your CI/CD without integrating with another tool."),(0,r.kt)("p",null,"Let's introduce how Tekton makes it possible."),(0,r.kt)("h2",{id:"5-create-a-task-in-tekton"},"5. Create a Task in Tekton"),(0,r.kt)("p",null,"Click the \u2699\ufe0f button in the top right. Then click ",(0,r.kt)("inlineCode",{parentName:"p"},"Test Definition"),"."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1679065450/Blogposts/Docs/screely-1679065444972_zzsila.png",alt:"test settings"})),(0,r.kt)("p",null,"This will open a YAML definition for the test run."),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1679071430/Blogposts/Docs/screely-1679071422136_ygbo8q.png",alt:"tracetest test yaml file"})),(0,r.kt)("p",null,"Save this into a file called ",(0,r.kt)("inlineCode",{parentName:"p"},"test-api.yaml"),":"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'type: Test\nspec:\n id: RUkKQ_aVR\n name: Pokeshop - List\n description: Get a Pokemon\n trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon?take=20&skip=0\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - name: Database queries less than 500 ms\n selector: span[tracetest.span.type="database"]\n assertions:\n - attr:tracetest.span.duration < 500ms\n')),(0,r.kt)("p",null,"Create another YAML file, name it ",(0,r.kt)("inlineCode",{parentName:"p"},"install-and-run-tracetest.yaml"),".\nThis contains the Tekton ",(0,r.kt)("inlineCode",{parentName:"p"},"Task")," definition."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'apiVersion: tekton.dev/v1beta1\nkind: Task\nmetadata:\n name: install-and-run-tracetest\nspec:\n steps:\n - name: create-test-files\n image: ubuntu\n script: |\n #!/usr/bin/env bash\n cat </workspace/test-api.yaml\n type: Test\n spec:\n id: RUkKQ_aVR\n name: Pokeshop - List\n description: Get a Pokemon\n trigger:\n type: http\n httpRequest:\n url: http://demo-pokemon-api.demo/pokemon?take=20&skip=0\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - name: Database queries less than 500 ms\n selector: span[tracetest.span.type="database"]\n assertions:\n - attr:tracetest.span.duration < 500ms\n EOF\n volumeMounts:\n - name: custom\n mountPath: /workspace\n - name: install-and-run-tracetest\n image: kubeshop/tracetest:v0.11.9 # The official Tracetest image comes with the Tracetest CLI installed\n script: |\n # Configure and Run Tracetest CLI\n tracetest configure -g --endpoint http://tracetest.tracetest.svc.cluster.local:11633/\n tracetest run test -f /workspace/test-api.yaml\n volumeMounts:\n - name: custom\n mountPath: /workspace\n volumes:\n - name: custom\n emptyDir: {}\n')),(0,r.kt)("p",null,"Make sure to use the Tracetest service as the endpoint for your ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest configure")," command. This may vary depending on your installation."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"http://tracetest.tracetest.svc.cluster.local:11633/\n")),(0,r.kt)("h2",{id:"6-run-the-tracetest-trace-based-test-in-tekton-with-a-taskrun"},"6. Run the Tracetest Trace-based Test in Tekton with a TaskRun"),(0,r.kt)("p",null,"Finally, to run the test, create a ",(0,r.kt)("inlineCode",{parentName:"p"},"TaskRun"),"."),(0,r.kt)("p",null,"Create a file called ",(0,r.kt)("inlineCode",{parentName:"p"},"install-and-run-tracetest-run-yaml"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"apiVersion: tekton.dev/v1beta1\nkind: TaskRun\nmetadata:\n name: install-and-run-tracetest-run\nspec:\n taskRef:\n name: install-and-run-tracetest\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl apply -f ./install-and-run-tracetest-run-yaml\n")),(0,r.kt)("p",null,"Here's how to check the logs:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl logs --selector=tekton.dev/taskRun=install-and-run-tracetest-run\n")),(0,r.kt)("p",null,"You can also trigger a Task with the Tekton CLI."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tkn task start install-and-run-tracetest\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"TaskRun started: install-and-run-tracetest-run-xmhfg\n\nIn order to track the TaskRun progress run:\ntkn taskrun logs install-and-run-tracetest-run-xmhfg -f -n default\n")),(0,r.kt)("p",null,"To preview which tasks failed or succeeded, use this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tkn taskrun list\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"NAME STARTED DURATION STATUS\ninstall-and-run-tracetest-run 3 minutes ago 23s Succeeded\ninstall-and-run-tracetest-run-nmptn 7 minutes ago 33s Failed\ninstall-and-run-tracetest-run-bhf7v 20 minutes ago 23s Succeeded\ninstall-and-run-tracetest-run-wm8bj 21 minutes ago 22s Succeeded\ninstall-and-run-tracetest-run-dbrbt 23 minutes ago 24s Failed\n")),(0,r.kt)("h2",{id:"7-trigger-trace-based-tests-with-an-eventlistener"},"7. Trigger Trace-based Tests with an EventListener"),(0,r.kt)("p",null,"By using Tektons's ",(0,r.kt)("a",{parentName:"p",href:"https://tekton.dev/docs/getting-started/triggers/"},"triggers"),", you can trigger tests via an ",(0,r.kt)("a",{parentName:"p",href:"https://tekton.dev/docs/getting-started/triggers/#create-an-eventlistener"},"eventlistener"),"."),(0,r.kt)("h3",{id:"create-a-triggertemplate-and-triggerbinding"},"Create a TriggerTemplate and TriggerBinding"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="install-and-run-tracetest-trigger-binding.yaml"',title:'"install-and-run-tracetest-trigger-binding.yaml"'},"apiVersion: triggers.tekton.dev/v1beta1\nkind: TriggerTemplate\nmetadata:\n name: install-and-run-tracetest-template\nspec:\n resourcetemplates:\n - apiVersion: tekton.dev/v1beta1\n kind: TaskRun\n metadata:\n generateName: install-and-run-tracetest-run-\n spec:\n taskRef:\n name: install-and-run-tracetest\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="install-and-run-tracetest-trigger-template.yaml"',title:'"install-and-run-tracetest-trigger-template.yaml"'},"apiVersion: triggers.tekton.dev/v1beta1\nkind: TriggerBinding\nmetadata:\n name: install-and-run-tracetest-binding\nspec:\n params:\n - name: run\n value: $(body.run)\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl apply -f install-and-run-tracetest-trigger-binding.yaml\nkubectl apply -f install-and-run-tracetest-trigger-template.yaml\n")),(0,r.kt)("h3",{id:"create-an-eventlistener"},"Create an EventListener"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="install-and-run-tracetest-listener.yaml"',title:'"install-and-run-tracetest-listener.yaml"'},"apiVersion: triggers.tekton.dev/v1beta1\nkind: EventListener\nmetadata:\n name: install-and-run-tracetest-listener\nspec:\n serviceAccountName: tekton-robot\n triggers:\n - name: install-and-run-tracetest-trigger \n bindings:\n - ref: install-and-run-tracetest-binding\n template:\n ref: install-and-run-tracetest-template\n")),(0,r.kt)("p",null,"The EventListener requires a service account to run. To create the service account for this example create a file named ",(0,r.kt)("inlineCode",{parentName:"p"},"tekton-robot-rbac.yaml")," and add the following:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml",metastring:'title="tekton-robot-rbac.yaml"',title:'"tekton-robot-rbac.yaml"'},"apiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: tekton-robot\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: RoleBinding\nmetadata:\n name: triggers-example-eventlistener-binding\nsubjects:\n- kind: ServiceAccount\n name: tekton-robot\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: tekton-triggers-eventlistener-roles\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: triggers-example-eventlistener-clusterbinding\nsubjects:\n- kind: ServiceAccount\n name: tekton-robot\n namespace: default\nroleRef:\n apiGroup: rbac.authorization.k8s.io\n kind: ClusterRole\n name: tekton-triggers-eventlistener-clusterroles\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl apply -f tekton-robot-rbac.yaml\nkubectl apply -f install-and-run-tracetest-listener.yaml\n")),(0,r.kt)("p",null,"Enable port forwarding."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"kubectl port-forward service/el-hello-listener 8080\n")),(0,r.kt)("p",null,"Hitting the port forwarded endpoint will trigger the task."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text"},"curl -v \\\n -H 'content-Type: application/json' \\\n -d '{\"run\":true}' \\\n http://localhost:8080\n")),(0,r.kt)("p",null,"Checking the taskruns will confirm this."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tkn taskrun list\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"NAME STARTED DURATION STATUS\ninstall-and-run-tracetest-run-69zrz 4 seconds ago --- Running(Pending)\n")),(0,r.kt)("p",null,"Finally, check the logs:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tkn taskrun logs -f install-and-run-tracetest-run-69zrz\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-text",metastring:'title="Expected output"',title:'"Expected','output"':!0},"[install-and-run-tracetest] \u2714 Pokeshop - List (http://tracetest.tracetest.svc.cluster.local:11633/test/RUkKQ_aVR/run/5/test)\n[install-and-run-tracetest] \u2714 Database queries less than 500 ms\n")),(0,r.kt)("h2",{id:"next-steps"},"Next Steps"),(0,r.kt)("p",null,"To explore more options that Tekton gives you, check out ",(0,r.kt)("a",{parentName:"p",href:"https://tekton.dev/docs/getting-started/"},"the docs")," to learn more!"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6c69b60b.ab04d832.js b/assets/js/6c69b60b.ab04d832.js new file mode 100644 index 0000000000..fd4e66000a --- /dev/null +++ b/assets/js/6c69b60b.ab04d832.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3700],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(n),f=a,b=u["".concat(l,".").concat(f)]||u[f]||p[f]||i;return n?r.createElement(b,o(o({ref:t},d),{},{components:n})):r.createElement(b,o({ref:t},d))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var r=n(87462),a=(n(67294),n(3905));const i={},o="Undefined Variables",s={unversionedId:"web-ui/undefined-variables",id:"web-ui/undefined-variables",title:"Undefined Variables",description:"When a user runs a Test or a Test Suite, any variables that will be needed but are not defined will be prompted for:",source:"@site/docs/web-ui/undefined-variables.md",sourceDirName:"web-ui",slug:"/web-ui/undefined-variables",permalink:"/web-ui/undefined-variables",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/web-ui/undefined-variables.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Exporting Tests",permalink:"/web-ui/exporting-tests"},next:{title:"Creating Test Suites",permalink:"/web-ui/creating-test-suites"}},l={},c=[],d={toc:c},u="wrapper";function p(e){let{components:t,...i}=e;return(0,a.kt)(u,(0,r.Z)({},d,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"undefined-variables"},"Undefined Variables"),(0,a.kt)("p",null,"When a user runs a Test or a Test Suite, any variables that will be needed but are not defined will be prompted for:"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Undefined Variables Modal",src:n(32125).Z,width:"2874",height:"1522"})),(0,a.kt)("p",null,"Undefined variables are dependent on the environment selected and whether or not the variable is defined in the current environment. Select the environment to run the Test or Test Suite in from the dropdown list at the top right of the page:"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"Select Environment Drop Down",src:n(96200).Z,width:"2808",height:"1486"})),(0,a.kt)("admonition",{type:"tip"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"/concepts/ad-hoc-testing"},"Check out use-cases for using undefined variables here."))))}p.isMDXComponent=!0},96200:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/select-environment-drop-down-f4376ade8720811cc9ead8e90379a3b1.png"},32125:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/undefined-variables-modal-b589b034b7a4cdf6132ab49f8ee3ccab.png"}}]); \ No newline at end of file diff --git a/assets/js/6e697461.2302711a.js b/assets/js/6e697461.2302711a.js new file mode 100644 index 0000000000..e523b3cc77 --- /dev/null +++ b/assets/js/6e697461.2302711a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7591],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>g});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),u=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(c.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),l=u(r),f=a,g=l["".concat(c,".").concat(f)]||l[f]||d[f]||o;return r?n.createElement(g,i(i({ref:t},p),{},{components:r})):n.createElement(g,i({ref:t},p))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[l]="string"==typeof e?e:a,i[1]=s;for(var u=2;u{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(87462),a=(r(67294),r(3905));const o={},i="Configuring Data Stores",s={unversionedId:"web-ui/creating-data-stores",id:"web-ui/creating-data-stores",title:"Configuring Data Stores",description:"This page shows how to configure data stores in the Tracetest Web UI.",source:"@site/docs/web-ui/creating-data-stores.md",sourceDirName:"web-ui",slug:"/web-ui/creating-data-stores",permalink:"/web-ui/creating-data-stores",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/web-ui/creating-data-stores.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"prefer-dns",permalink:"/analyzer/rules/prefer-dns"},next:{title:"Creating Tests",permalink:"/web-ui/creating-tests"}},c={},u=[{value:"Supported Trace Data Stores",id:"supported-trace-data-stores",level:2}],p={toc:u},l="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(l,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"configuring-data-stores"},"Configuring Data Stores"),(0,a.kt)("p",null,"This page shows how to configure data stores in the Tracetest Web UI."),(0,a.kt)("p",null,"Open the ",(0,a.kt)("strong",{parentName:"p"},"settings")," and select the ",(0,a.kt)("strong",{parentName:"p"},"Configure Data Store")," tab."),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1685971832/docs/Jaeger-settings-1477bdfe17b0675850681e0cfb85859a_ziy7un.png",alt:null})),(0,a.kt)("p",null,"To help you configure the connection, you can use the ",(0,a.kt)("strong",{parentName:"p"},"Test Connection")," button to validate if the connection is successful and Tracetest can fetch traces from the data store."),(0,a.kt)("p",null,(0,a.kt)("img",{parentName:"p",src:"https://res.cloudinary.com/djwdcmwdz/image/upload/v1685972024/docs/demo.tracetest.io_transaction_QZ3ejgl4R_run_2_3_wrwikl.png",alt:null})),(0,a.kt)("h2",{id:"supported-trace-data-stores"},"Supported Trace Data Stores"),(0,a.kt)("p",null,"Select from the ",(0,a.kt)("a",{parentName:"p",href:"/configuration/overview"},"list of available data stores")," and configure the connection."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6f73cd28.bf2cf6b2.js b/assets/js/6f73cd28.bf2cf6b2.js new file mode 100644 index 0000000000..cab47a384f --- /dev/null +++ b/assets/js/6f73cd28.bf2cf6b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[2289],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>m});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),l=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=l(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,s=e.originalType,p=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=l(n),h=a,m=u["".concat(p,".").concat(h)]||u[h]||d[h]||s;return n?r.createElement(m,o(o({ref:t},c),{},{components:n})):r.createElement(m,o({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var s=n.length,o=new Array(s);o[0]=h;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[u]="string"==typeof e?e:a,o[1]=i;for(var l=2;l{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>o,default:()=>d,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var r=n(87462),a=(n(67294),n(3905));const s={},o="Running Tracetest with Azure App Insights (ApplicationInsights Node.js SDK)",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-azure-app-insights",id:"examples-tutorials/recipes/running-tracetest-with-azure-app-insights",title:"Running Tracetest with Azure App Insights (ApplicationInsights Node.js SDK)",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-azure-app-insights.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights",permalink:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-azure-app-insights.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest with SigNoz (OpenTelemetry Collector & Pokeshop API)",permalink:"/examples-tutorials/recipes/running-tracetest-with-signoz-pokeshop"},next:{title:"Running Tracetest with Azure App Insights (Node.js + OpenTelemetry Collector)",permalink:"/examples-tutorials/recipes/running-tracetest-with-azure-app-insights-collector"}},p={},l=[{value:"Sample Node.js App with Azure App Insights and Tracetest",id:"sample-nodejs-app-with-azure-app-insights-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. Node.js App",id:"1-nodejs-app",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"Node.js App",id:"nodejs-app",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the Node.js App and Tracetest",id:"run-both-the-nodejs-app-and-tracetest",level:2},{value:"Learn More",id:"learn-more",level:2}],c={toc:l},u="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-tracetest-with-azure-app-insights-applicationinsights-nodejs-sdk"},"Running Tracetest with Azure App Insights (ApplicationInsights Node.js SDK)"),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-azure-app-insights"},"Check out the source code on GitHub here."))),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,a.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview"},"Azure Application Insights")," is an extension of Azure Monitor and provides application performance monitoring (APM) features. APM tools are useful to monitor applications from development, through test, and into production in the following ways:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Proactively understand how an application is performing."),(0,a.kt)("li",{parentName:"ul"},"Reactively review application execution data to determine the cause of an incident.")),(0,a.kt)("h2",{id:"sample-nodejs-app-with-azure-app-insights-and-tracetest"},"Sample Node.js App with Azure App Insights and Tracetest"),(0,a.kt)("p",null,"This is a simple quick start guide on how to configure a Node.js app to use instrumentation with traces and Tracetest for enhancing your E2E and integration tests with trace-based testing. The infrastructure will use Azure App Insights as the trace data store and a Node.js app to generate the telemetry data."),(0,a.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,a.kt)("p",null,"You will need ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,a.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this quick start app!"),(0,a.kt)("p",null,"You will also need an ",(0,a.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-azure-ad-api"},"App Insights API Access Key")," and the resource ARM ID for your App Insights instance."),(0,a.kt)("h2",{id:"project-structure"},"Project Structure"),(0,a.kt)("p",null,"The project is built with Docker Compose."),(0,a.kt)("h3",{id:"1-nodejs-app"},"1. Node.js App"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," in the root directory is for the Node.js app."),(0,a.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml"),", and ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"root")," directory are for the setting up the Node.js App and Tracetest."),(0,a.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,a.kt)("p",null,"All ",(0,a.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network and will be reachable by hostname from within other services."),(0,a.kt)("h2",{id:"nodejs-app"},"Node.js App"),(0,a.kt)("p",null,"The Node.js app is a simple Express app, contained in the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/index.js")," file."),(0,a.kt)("p",null,"It is instrumented using the ",(0,a.kt)("a",{parentName:"p",href:"https://www.npmjs.com/package/applicationinsights"},"applicationinsights SDK")," wrapping the application code to send telemetry data directly to the Azure cloud."),(0,a.kt)("p",null,"The following is the code instrumentation section from the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/tracing.js")," file."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'const {\n ApplicationInsightsClient,\n ApplicationInsightsConfig,\n} = require("applicationinsights");\nconst {\n ExpressInstrumentation,\n} = require("@opentelemetry/instrumentation-express");\nconst { HttpInstrumentation } = require("@opentelemetry/instrumentation-http");\n\nconst config = new ApplicationInsightsConfig();\nconfig.azureMonitorExporterConfig.connectionString = process.env.CONNECTION_STRING;\n\nconst appInsights = new ApplicationInsightsClient(config);\n\nconst traceHandler = appInsights.getTraceHandler();\ntraceHandler.addInstrumentation(new ExpressInstrumentation());\ntraceHandler.addInstrumentation(new HttpInstrumentation());\n')),(0,a.kt)("p",null,"To start the server, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"npm start\n")),(0,a.kt)("p",null,"As you can see the ",(0,a.kt)("inlineCode",{parentName:"p"},"Dockerfile")," uses the command above."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-Dockerfile"},'FROM node:slim\nWORKDIR /usr/src/app\n\nCOPY ./src/package*.json ./\n\nRUN npm install\nCOPY ./src .\n\nEXPOSE 3000\nCMD [ "npm", "start" ]\n')),(0,a.kt)("h2",{id:"tracetest"},"Tracetest"),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," includes two other services."),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running the trace-based tests."),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,a.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},'services:\n postgres:\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test:\n - CMD-SHELL\n - pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n timeout: 5s\n interval: 1s\n retries: 60\n image: postgres:14\n networks:\n default: null\n tracetest:\n command: --provisioning-file /app/provision.yaml\n platform: linux/amd64\n depends_on:\n postgres:\n condition: service_healthy\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n extra_hosts:\n host.docker.internal: host-gateway\n healthcheck:\n test:\n - CMD\n - wget\n - --spider\n - localhost:11633\n timeout: 3s\n interval: 1s\n retries: 60\n image: kubeshop/tracetest:${TAG:-latest}\n networks:\n default: null\n ports:\n - mode: ingress\n target: 11633\n published: 11633\n protocol: tcp\n volumes:\n - type: bind\n source: tracetest/tracetest.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: tracetest/tracetest-provision.yaml\n target: /app/provision.yaml\nnetworks:\n default:\n name: _default\n')),(0,a.kt)("p",null,"Tracetest depends on Postgres and requires config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,a.kt)("inlineCode",{parentName:"p"},"root")," directory and the respective config files."),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"postgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n")),(0,a.kt)("p",null,"The ",(0,a.kt)("inlineCode",{parentName:"p"},"tracetest.provision.yaml")," file defines the trace data store, set to Azure App Insights, meaning the traces will be stored in App Insights and Tracetest will fetch them from when running tests."),(0,a.kt)("p",null,"But how does Tracetest fetch traces?"),(0,a.kt)("p",null,"Tracetest uses the Golang ",(0,a.kt)("a",{parentName:"p",href:"https://learn.microsoft.com/en-us/azure/developer/go/"},"Azure SDK")," library to pull to fetch trace data."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-yaml"},"type: DataStore\nspec:\n name: AzureAppInsights\n type: azureappinsights\n default: true\n azureappinsights:\n connectionType: direct\n resourceArmId: \n accessToken: \n useAzureActiveDirectoryAuth: false\n")),(0,a.kt)("p",null,"How do traces reach Azure App Insights?"),(0,a.kt)("p",null,"The application code in the ",(0,a.kt)("inlineCode",{parentName:"p"},"src/tracing.js")," file uses the native App Insights library which sends telemetry straight to the Azure Cloud."),(0,a.kt)("h2",{id:"run-both-the-nodejs-app-and-tracetest"},"Run Both the Node.js App and Tracetest"),(0,a.kt)("p",null,"To start both the Node.js app and Tracetest, run this command:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose -f ./docker-compose.yaml -f ./tracetest/docker-compose.yaml up -d\n")),(0,a.kt)("p",null,"This will start your Tracetest instance on ",(0,a.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),". Open it and start creating tests!\nMake sure to use the ",(0,a.kt)("inlineCode",{parentName:"p"},"http://app:3000/")," URL in your test creation because your Node.js app and Tracetest are in the same network."),(0,a.kt)("h2",{id:"learn-more"},"Learn More"),(0,a.kt)("p",null,"Please visit our ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/70484780.05643214.js b/assets/js/70484780.05643214.js new file mode 100644 index 0000000000..8ce191ffa3 --- /dev/null +++ b/assets/js/70484780.05643214.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[1440],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,s=e.originalType,l=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),u=c(n),f=o,h=u["".concat(l,".").concat(f)]||u[f]||d[f]||s;return n?r.createElement(h,i(i({ref:t},p),{},{components:n})):r.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var s=n.length,i=new Array(s);i[0]=f;var a={};for(var l in t)hasOwnProperty.call(t,l)&&(a[l]=t[l]);a.originalType=e,a[u]="string"==typeof e?e:o,i[1]=a;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var r=n(87462),o=(n(67294),n(3905));const s={},i="Edit a Test",a={unversionedId:"run-exports",id:"run-exports",title:"Edit a Test",description:"Tracetest allows you to export the different set of information displayed for assertions and checks in a way you can use it as input for other tools, create text based tests to use on your CI/CD pipelines using the CLI and more options.",source:"@site/docs/run-exports.md",sourceDirName:".",slug:"/run-exports",permalink:"/run-exports",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/run-exports.md",tags:[],version:"current",frontMatter:{}},l={},c=[{value:"JUnit Results XML",id:"junit-results-xml",level:2},{value:"Test Definition YAML",id:"test-definition-yaml",level:2}],p={toc:c},u="wrapper";function d(e){let{components:t,...s}=e;return(0,o.kt)(u,(0,r.Z)({},p,s,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"edit-a-test"},"Edit a Test"),(0,o.kt)("p",null,"Tracetest allows you to export the different set of information displayed for assertions and checks in a way you can use it as input for other tools, create text based tests to use on your CI/CD pipelines using the CLI and more options."),(0,o.kt)("p",null,"The current supported exports are:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"JUnit results XML."),(0,o.kt)("li",{parentName:"ol"},"Test Definition YAML.")),(0,o.kt)("p",null,"To access any of the available exports, go to the run/trace page details for any test and, at the header level, you'll find a three dot menu which will display the options."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Export Trace Options",src:n(29639).Z,width:"3354",height:"850"})),(0,o.kt)("h2",{id:"junit-results-xml"},"JUnit Results XML"),(0,o.kt)("p",null,"To access the JUnit XML file, select the JUnit option from the dropdown and you'll find the file viewer modal with the location to download the file.\nThe JUnit report contains the results from each of the assertions added to the test and their statuses. Depending on how many assertions the test has, this file will grow."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Export Trace JUnit",src:n(84).Z,width:"2474",height:"1248"})),(0,o.kt)("h2",{id:"test-definition-yaml"},"Test Definition YAML"),(0,o.kt)("p",null,"The Tracetest CLI allows you to execute text based tests. This means you can store all of your tests in a repo, keep track of the different versions and use them for your CI/CD process.\nAn easy way to start is to export the test definition directly from the UI by selecting the option from the dropdown.\nThe file viewer modal will popup where you can copy paste or download the file."),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Export Trace Test Definition",src:n(3070).Z,width:"2518",height:"1422"})))}d.isMDXComponent=!0},84:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/exports-junit-b9e427516121a5310af5cbec3d8bf780.png"},3070:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/exports-test-definition-17e5df5e4f432d6096272a6406944556.png"},29639:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/exports-trace-options-94e1015a6002079400ab91cd6903a578.png"}}]); \ No newline at end of file diff --git a/assets/js/724.e63d6ed1.js b/assets/js/724.e63d6ed1.js new file mode 100644 index 0000000000..132787c8b0 --- /dev/null +++ b/assets/js/724.e63d6ed1.js @@ -0,0 +1,41582 @@ +exports.id = 724; +exports.ids = [724]; +exports.modules = { + +/***/ 84182: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(__webpack_require__(82241)); + else {} +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_643__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_643__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_643__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_643__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_643__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_643__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_643__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_643__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_643__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_643__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_643__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_643__(__nested_webpack_require_643__.s = 7); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_3185__) { + +"use strict"; + + +var FDLayoutConstants = __nested_webpack_require_3185__(0).FDLayoutConstants; + +function CoSEConstants() {} + +//CoSEConstants inherits static props in FDLayoutConstants +for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; +} + +CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; +CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; +CoSEConstants.TILE = true; +CoSEConstants.TILING_PADDING_VERTICAL = 10; +CoSEConstants.TILING_PADDING_HORIZONTAL = 10; +CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; // make this true when cose is used incrementally as a part of other non-incremental layout + +module.exports = CoSEConstants; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __nested_webpack_require_4002__) { + +"use strict"; + + +var FDLayoutEdge = __nested_webpack_require_4002__(0).FDLayoutEdge; + +function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); +} + +CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); +for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; +} + +module.exports = CoSEEdge; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __nested_webpack_require_4409__) { + +"use strict"; + + +var LGraph = __nested_webpack_require_4409__(0).LGraph; + +function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); +} + +CoSEGraph.prototype = Object.create(LGraph.prototype); +for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; +} + +module.exports = CoSEGraph; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __nested_webpack_require_4790__) { + +"use strict"; + + +var LGraphManager = __nested_webpack_require_4790__(0).LGraphManager; + +function CoSEGraphManager(layout) { + LGraphManager.call(this, layout); +} + +CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); +for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; +} + +module.exports = CoSEGraphManager; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __nested_webpack_require_5205__) { + +"use strict"; + + +var FDLayoutNode = __nested_webpack_require_5205__(0).FDLayoutNode; +var IMath = __nested_webpack_require_5205__(0).IMath; + +function CoSENode(gm, loc, size, vNode) { + FDLayoutNode.call(this, gm, loc, size, vNode); +} + +CoSENode.prototype = Object.create(FDLayoutNode.prototype); +for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; +} + +CoSENode.prototype.move = function () { + var layout = this.graphManager.getLayout(); + this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + + if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); + } + + if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); + } + + // a simple node, just move it + if (this.child == null) { + this.moveBy(this.displacementX, this.displacementY); + } + // an empty compound node, again just move it + else if (this.child.getNodes().length == 0) { + this.moveBy(this.displacementX, this.displacementY); + } + // non-empty compound node, propogate movement to children as well + else { + this.propogateDisplacementToChildren(this.displacementX, this.displacementY); + } + + layout.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; +}; + +CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) { + var nodes = this.getChild().getNodes(); + var node; + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + if (node.getChild() == null) { + node.moveBy(dX, dY); + node.displacementX += dX; + node.displacementY += dY; + } else { + node.propogateDisplacementToChildren(dX, dY); + } + } +}; + +CoSENode.prototype.setPred1 = function (pred1) { + this.pred1 = pred1; +}; + +CoSENode.prototype.getPred1 = function () { + return pred1; +}; + +CoSENode.prototype.getPred2 = function () { + return pred2; +}; + +CoSENode.prototype.setNext = function (next) { + this.next = next; +}; + +CoSENode.prototype.getNext = function () { + return next; +}; + +CoSENode.prototype.setProcessed = function (processed) { + this.processed = processed; +}; + +CoSENode.prototype.isProcessed = function () { + return processed; +}; + +module.exports = CoSENode; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __nested_webpack_require_8085__) { + +"use strict"; + + +var FDLayout = __nested_webpack_require_8085__(0).FDLayout; +var CoSEGraphManager = __nested_webpack_require_8085__(4); +var CoSEGraph = __nested_webpack_require_8085__(3); +var CoSENode = __nested_webpack_require_8085__(5); +var CoSEEdge = __nested_webpack_require_8085__(2); +var CoSEConstants = __nested_webpack_require_8085__(1); +var FDLayoutConstants = __nested_webpack_require_8085__(0).FDLayoutConstants; +var LayoutConstants = __nested_webpack_require_8085__(0).LayoutConstants; +var Point = __nested_webpack_require_8085__(0).Point; +var PointD = __nested_webpack_require_8085__(0).PointD; +var Layout = __nested_webpack_require_8085__(0).Layout; +var Integer = __nested_webpack_require_8085__(0).Integer; +var IGeometry = __nested_webpack_require_8085__(0).IGeometry; +var LGraph = __nested_webpack_require_8085__(0).LGraph; +var Transform = __nested_webpack_require_8085__(0).Transform; + +function CoSELayout() { + FDLayout.call(this); + + this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled +} + +CoSELayout.prototype = Object.create(FDLayout.prototype); + +for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; +} + +CoSELayout.prototype.newGraphManager = function () { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; +}; + +CoSELayout.prototype.newGraph = function (vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); +}; + +CoSELayout.prototype.newNode = function (vNode) { + return new CoSENode(this.graphManager, vNode); +}; + +CoSELayout.prototype.newEdge = function (vEdge) { + return new CoSEEdge(null, null, vEdge); +}; + +CoSELayout.prototype.initParameters = function () { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { + this.idealEdgeLength = 10; + } else { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + + this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + + // variables for tree reduction support + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + + // variables for cooling + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations; + this.coolingAdjuster = 1; + } +}; + +CoSELayout.prototype.layout = function () { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + + this.level = 0; + return this.classicLayout(); +}; + +CoSELayout.prototype.classicLayout = function () { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + + if (!this.incremental) { + var forest = this.getFlatForest(); + + // The graph associated with this layout is flat and a forest + if (forest.length > 0) { + this.positionNodesRadially(forest); + } + // The graph associated with this layout is not flat or a forest + else { + // Reduce the trees when incremental mode is not enabled and graph is not a forest + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.positionNodesRandomly(); + } + } else { + if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { + // Reduce the trees in incremental mode if only this constant is set to true + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + } + } + + this.initSpringEmbedder(); + this.runSpringEmbedder(); + + return true; +}; + +CoSELayout.prototype.tick = function () { + this.totalIterations++; + + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + this.coolingCycle++; + + if (this.layoutQuality == 0) { + // quality - "draft" + this.coolingAdjuster = this.coolingCycle; + } else if (this.layoutQuality == 1) { + // quality - "default" + this.coolingAdjuster = this.coolingCycle / 3; + } + + // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 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)); + } + // Operations while tree is growing again + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) { + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.graphManager.updateBounds(); + this.updateGrid(); + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + // Operations after growth is finished + if (this.isGrowthFinished) { + if (this.isConverged()) { + return true; + } + if (this.afterGrowthIterations % 10 == 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + } + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + + return false; // Layout is not ended yet return false +}; + +CoSELayout.prototype.getPositionsData = function () { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i = 0; i < allNodes.length; i++) { + var rect = allNodes[i].rect; + var id = allNodes[i].id; + pData[id] = { + id: id, + x: rect.getCenterX(), + y: rect.getCenterY(), + w: rect.width, + h: rect.height + }; + } + + return pData; +}; + +CoSELayout.prototype.runSpringEmbedder = function () { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + + // If aminate option is 'during' signal that layout is supposed to start iterating + if (FDLayoutConstants.ANIMATE === 'during') { + this.emit('layoutstarted'); + } else { + // If aminate option is 'during' tick() function will be called on index.js + while (!layoutEnded) { + layoutEnded = this.tick(); + } + + this.graphManager.updateBounds(); + } +}; + +CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { + var nodeList = []; + var graph; + + var graphs = this.graphManager.getGraphs(); + var size = graphs.length; + var i; + for (i = 0; i < size; i++) { + graph = graphs[i]; + + graph.updateConnected(); + + if (!graph.isConnected) { + nodeList = nodeList.concat(graph.getNodes()); + } + } + + return nodeList; +}; + +CoSELayout.prototype.createBendpoints = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + var visited = new Set(); + var i; + for (i = 0; i < edges.length; i++) { + var edge = edges[i]; + + if (!visited.has(edge)) { + var source = edge.getSource(); + var target = edge.getTarget(); + + if (source == target) { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } else { + var edgeList = []; + + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + + if (!visited.has(edgeList[0])) { + if (edgeList.length > 1) { + var k; + for (k = 0; k < edgeList.length; k++) { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function (edge) { + visited.add(edge); + }); + } + } + } + + if (visited.size == edges.length) { + break; + } + } +}; + +CoSELayout.prototype.positionNodesRadially = function (forest) { + // We tile the trees to a grid row by row; first tree starts at (0,0) + var currentStartingPoint = new Point(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point = new PointD(0, 0); + + for (var i = 0; i < forest.length; i++) { + if (i % numberOfColumns == 0) { + // Start of a new row, make the x coordinate 0, increment the + // y coordinate with the max height of the previous row + currentX = 0; + currentY = height; + + if (i != 0) { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + + height = 0; + } + + var tree = forest[i]; + + // Find the center of the tree + var centerNode = Layout.findCenterOfTree(tree); + + // Set the staring point of the next tree + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + + // Do a radial layout starting with the center + point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + + if (point.y > height) { + height = Math.floor(point.y); + } + + currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + + this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); +}; + +CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds = LGraph.calculateBounds(tree); + + var transform = new Transform(); + transform.setDeviceOrgX(bounds.getMinX()); + transform.setDeviceOrgY(bounds.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + node.transform(transform); + } + + var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); + + return transform.inverseTransformPoint(bottomRight); +}; + +CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { + // First, position this node by finding its angle. + var halfInterval = (endAngle - startAngle + 1) / 2; + + if (halfInterval < 0) { + halfInterval += 180; + } + + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = nodeAngle * IGeometry.TWO_PI / 360; + + // Make polar to java cordinate conversion. + var cos_teta = Math.cos(teta); + var x_ = distance * Math.cos(teta); + var y_ = distance * Math.sin(teta); + + node.setCenter(x_, y_); + + // Traverse all neighbors of this node and recursively call this + // function. + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node.getEdges()); + var childCount = neighborEdges.length; + + if (parentOfNode != null) { + childCount--; + } + + var branchCount = 0; + + var incEdgesCount = neighborEdges.length; + var startIndex; + + var edges = node.getEdgesBetween(parentOfNode); + + // If there are multiple edges, prune them until there remains only one + // edge. + while (edges.length > 1) { + //neighborEdges.remove(edges.remove(0)); + var temp = edges[0]; + edges.splice(0, 1); + var index = neighborEdges.indexOf(temp); + if (index >= 0) { + neighborEdges.splice(index, 1); + } + incEdgesCount--; + childCount--; + } + + if (parentOfNode != null) { + //assert edges.length == 1; + startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; + } else { + startIndex = 0; + } + + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + + for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { + var currentNeighbor = neighborEdges[i].getOtherEnd(node); + + // Don't back traverse to root node in current tree. + if (currentNeighbor == parentOfNode) { + continue; + } + + var childStartAngle = (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + + CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); + + branchCount++; + } +}; + +CoSELayout.maxDiagonalInTree = function (tree) { + var maxDiagonal = Integer.MIN_VALUE; + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + var diagonal = node.getDiagonal(); + + if (diagonal > maxDiagonal) { + maxDiagonal = diagonal; + } + } + + return maxDiagonal; +}; + +CoSELayout.prototype.calcRepulsionRange = function () { + // formula is 2 x (level + 1) x idealEdgeLength + return 2 * (this.level + 1) * this.idealEdgeLength; +}; + +// Tiling methods + +// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's +CoSELayout.prototype.groupZeroDegreeMembers = function () { + var self = this; + // array of [parent_id x oneDegreeNode_id] + var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members + this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled + this.idToDummyNode = {}; // A map of id to dummy node + + var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled + var allNodes = this.graphManager.getAllNodes(); + + // Fill zero degree list + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + var parent = node.getParent(); + // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list + if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) { + zeroDegree.push(node); + } + } + + // Create a map of parent node and its zero degree members + for (var i = 0; i < zeroDegree.length; i++) { + var node = zeroDegree[i]; // Zero degree node itself + var p_id = node.getParent().id; // Parent id + + if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = []; + + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups + } + + // If there are at least two nodes at a level, create a dummy compound for them + Object.keys(tempMemberGroups).forEach(function (p_id) { + if (tempMemberGroups[p_id].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon + self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups + + var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound + + // Create a dummy compound with calculated id + var dummyCompound = new CoSENode(self.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent.paddingLeft || 0; + dummyCompound.paddingRight = parent.paddingRight || 0; + dummyCompound.paddingBottom = parent.paddingBottom || 0; + dummyCompound.paddingTop = parent.paddingTop || 0; + + self.idToDummyNode[dummyCompoundId] = dummyCompound; + + var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); + var parentGraph = parent.getChild(); + + // Add dummy compound to parent the graph + parentGraph.add(dummyCompound); + + // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent + for (var i = 0; i < tempMemberGroups[p_id].length; i++) { + var node = tempMemberGroups[p_id][i]; + + parentGraph.remove(node); + dummyParentGraph.add(node); + } + } + }); +}; + +CoSELayout.prototype.clearCompounds = function () { + var childGraphMap = {}; + var idToNode = {}; + + // Get compound ordering by finding the inner one first + this.performDFSOnCompounds(); + + for (var i = 0; i < this.compoundOrder.length; i++) { + + idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; + childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); + + // Remove children of compounds + this.graphManager.remove(this.compoundOrder[i].getChild()); + this.compoundOrder[i].child = null; + } + + this.graphManager.resetAllNodes(); + + // Tile the removed children + this.tileCompoundMembers(childGraphMap, idToNode); +}; + +CoSELayout.prototype.clearZeroDegreeMembers = function () { + var self = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + + Object.keys(this.memberGroups).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound + + tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + // Set the width and height of the dummy compound as calculated + compoundNode.rect.width = tiledZeroDegreePack[id].width; + compoundNode.rect.height = tiledZeroDegreePack[id].height; + }); +}; + +CoSELayout.prototype.repopulateCompounds = function () { + for (var i = this.compoundOrder.length - 1; i >= 0; i--) { + var lCompoundNode = this.compoundOrder[i]; + var id = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + + this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin); + } +}; + +CoSELayout.prototype.repopulateZeroDegreeMembers = function () { + var self = this; + var tiledPack = this.tiledZeroDegreePack; + + Object.keys(tiledPack).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + + // Adjust the positions of nodes wrt its compound + self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin); + }); +}; + +CoSELayout.prototype.getToBeTiled = function (node) { + var id = node.id; + //firstly check the previous results + if (this.toBeTiled[id] != null) { + return this.toBeTiled[id]; + } + + //only compound nodes are to be tiled + var childGraph = node.getChild(); + if (childGraph == null) { + this.toBeTiled[id] = false; + return false; + } + + var children = childGraph.getNodes(); // Get the children nodes + + //a compound node is not to be tiled if all of its compound children are not to be tiled + for (var i = 0; i < children.length; i++) { + var theChild = children[i]; + + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id] = false; + return false; + } + + //pass the children not having the compound structure + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id] = false; + return false; + } + } + this.toBeTiled[id] = true; + return true; +}; + +// Get degree of a node depending of its edges and independent of its children +CoSELayout.prototype.getNodeDegree = function (node) { + var id = node.id; + var edges = node.getEdges(); + var degree = 0; + + // For the edges connected + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; +}; + +// Get degree of a node with its children +CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { + var degree = this.getNodeDegree(node); + if (node.getChild() == null) { + return degree; + } + var children = node.getChild().getNodes(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; +}; + +CoSELayout.prototype.performDFSOnCompounds = function () { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); +}; + +CoSELayout.prototype.fillCompexOrderByDFS = function (children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } +}; + +/** +* This method places each zero degree member wrt given (x,y) coordinates (top left). +*/ +CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) { + x += compoundHorizontalMargin; + y += compoundVerticalMargin; + + var left = x; + + for (var i = 0; i < organization.rows.length; i++) { + var row = organization.rows[i]; + x = left; + var maxHeight = 0; + + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + + lnode.rect.x = x; // + lnode.rect.width / 2; + lnode.rect.y = y; // + lnode.rect.height / 2; + + x += lnode.rect.width + organization.horizontalPadding; + + if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height; + } + + y += maxHeight + organization.verticalPadding; + } +}; + +CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { + var self = this; + this.tiledMemberPack = []; + + Object.keys(childGraphMap).forEach(function (id) { + // Get the compound node + var compoundNode = idToNode[id]; + + self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + compoundNode.rect.width = self.tiledMemberPack[id].width; + compoundNode.rect.height = self.tiledMemberPack[id].height; + }); +}; + +CoSELayout.prototype.tileNodes = function (nodes, minWidth) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, // assume minHeight equals to minWidth + verticalPadding: verticalPadding, + horizontalPadding: horizontalPadding + }; + + // Sort the nodes in ascending order of their areas + nodes.sort(function (n1, n2) { + if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1; + if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1; + return 0; + }); + + // Create the organization -> tile members + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth); + } else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + + this.shiftToLastRow(organization); + } + + return organization; +}; + +CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { + var minCompoundSize = minWidth; + + // Add new row if needed + if (rowIndex == organization.rows.length) { + var secondDimension = []; + + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + + // Update row width + var w = organization.rowWidth[rowIndex] + node.rect.width; + + if (organization.rows[rowIndex].length > 0) { + w += organization.horizontalPadding; + } + + organization.rowWidth[rowIndex] = w; + // Update compound width + if (organization.width < w) { + organization.width = w; + } + + // Update height + var h = node.rect.height; + if (rowIndex > 0) h += organization.verticalPadding; + + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + + organization.height += extraHeight; + + // Insert node + organization.rows[rowIndex].push(node); +}; + +//Scans the rows of an organization and returns the one with the min width +CoSELayout.prototype.getShortestRowIndex = function (organization) { + var r = -1; + var min = Number.MAX_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] < min) { + r = i; + min = organization.rowWidth[i]; + } + } + return r; +}; + +//Scans the rows of an organization and returns the one with the max width +CoSELayout.prototype.getLongestRowIndex = function (organization) { + var r = -1; + var max = Number.MIN_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + + if (organization.rowWidth[i] > max) { + r = i; + max = organization.rowWidth[i]; + } + } + + return r; +}; + +/** +* This method checks whether adding extra width to the organization violates +* the aspect ratio(1) or not. +*/ +CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { + + var sri = this.getShortestRowIndex(organization); + + if (sri < 0) { + return true; + } + + var min = organization.rowWidth[sri]; + + if (min + organization.horizontalPadding + extraWidth <= organization.width) return true; + + var hDiff = 0; + + // Adding to an existing row + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + + var add_to_row_ratio; + if (organization.width - min >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + + // Adding a new row for this node + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + + if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio; + + if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio; + + return add_to_row_ratio < add_new_row_ratio; +}; + +//If moving the last node from the longest row and adding it to the last +//row makes the bounding box smaller, do it. +CoSELayout.prototype.shiftToLastRow = function (organization) { + var longest = this.getLongestRowIndex(organization); + var last = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node = row[row.length - 1]; + + var diff = node.width + organization.horizontalPadding; + + // Check if there is enough space on the last row + if (organization.width - organization.rowWidth[last] > diff && longest != last) { + // Remove the last element of the longest row + row.splice(-1, 1); + + // Push it to the last row + organization.rows[last].push(node); + + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last] = organization.rowWidth[last] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + + // Update heights of the organization + var maxHeight = Number.MIN_VALUE; + for (var i = 0; i < row.length; i++) { + if (row[i].height > maxHeight) maxHeight = row[i].height; + } + if (longest > 0) maxHeight += organization.verticalPadding; + + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding; + + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.height += finalTotal - prevTotal; + + this.shiftToLastRow(organization); + } +}; + +CoSELayout.prototype.tilingPreLayout = function () { + if (CoSEConstants.TILE) { + // Find zero degree nodes and create a compound for each level + this.groupZeroDegreeMembers(); + // Tile and clear children of each compound + this.clearCompounds(); + // Separately tile and clear zero degree nodes for each level + this.clearZeroDegreeMembers(); + } +}; + +CoSELayout.prototype.tilingPostLayout = function () { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: Tree Reduction methods +// ----------------------------------------------------------------------------- +// Reduce trees +CoSELayout.prototype.reduceTrees = function () { + var prunedNodesAll = []; + var containsLeaf = true; + var node; + + while (containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); + containsLeaf = true; + } + } + if (containsLeaf == true) { + var prunedNodesInStep = []; + for (var j = 0; j < prunedNodesInStepTemp.length; j++) { + if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; +}; + +// Grow tree one step +CoSELayout.prototype.growTree = function (prunedNodesAll) { + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + + var nodeData; + for (var i = 0; i < prunedNodesInStep.length; i++) { + nodeData = prunedNodesInStep[i]; + + this.findPlaceforPrunedNode(nodeData); + + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + + prunedNodesAll.splice(prunedNodesAll.length - 1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); +}; + +// Find an appropriate position to replace pruned node, this method can be improved +CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) { + + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if (prunedNode == nodeData[1].source) { + nodeToConnect = nodeData[1].target; + } else { + nodeToConnect = nodeData[1].source; + } + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; + + if (startGridY > 0) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; + } + } + if (finishGridX < this.grid.length - 1) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; + } + } + if (finishGridY < this.grid[0].length - 1) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; + } + } + if (startGridX > 0) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; + } + } + var min = Integer.MAX_VALUE; + var minCount; + var minIndex; + for (var j = 0; j < controlRegions.length; j++) { + if (controlRegions[j] < min) { + min = controlRegions[j]; + minCount = 1; + minIndex = j; + } else if (controlRegions[j] == min) { + minCount++; + } + } + + if (minCount == 3 && min == 0) { + if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { + gridForPrunedNode = 1; + } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 0; + } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 3; + } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 2; + } + } else if (minCount == 2 && min == 0) { + var random = Math.floor(Math.random() * 2); + if (controlRegions[0] == 0 && controlRegions[1] == 0) { + ; + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 1; + } + } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 3; + } + } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 3; + } + } else { + if (random == 0) { + gridForPrunedNode = 2; + } else { + gridForPrunedNode = 3; + } + } + } else if (minCount == 4 && min == 0) { + var random = Math.floor(Math.random() * 4); + gridForPrunedNode = random; + } else { + gridForPrunedNode = minIndex; + } + + if (gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); + } else if (gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } else if (gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); + } else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } +}; + +module.exports = CoSELayout; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __nested_webpack_require_45620__) { + +"use strict"; + + +var coseBase = {}; + +coseBase.layoutBase = __nested_webpack_require_45620__(0); +coseBase.CoSEConstants = __nested_webpack_require_45620__(1); +coseBase.CoSEEdge = __nested_webpack_require_45620__(2); +coseBase.CoSEGraph = __nested_webpack_require_45620__(3); +coseBase.CoSEGraphManager = __nested_webpack_require_45620__(4); +coseBase.CoSELayout = __nested_webpack_require_45620__(6); +coseBase.CoSENode = __nested_webpack_require_45620__(5); + +module.exports = coseBase; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 14607: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(__webpack_require__(84182)); + else {} +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_659__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_659__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_659__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_659__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_659__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_659__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_659__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_659__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_659__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_659__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_659__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_659__(__nested_webpack_require_659__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_3201__) { + +"use strict"; + + +var LayoutConstants = __nested_webpack_require_3201__(0).layoutBase.LayoutConstants; +var FDLayoutConstants = __nested_webpack_require_3201__(0).layoutBase.FDLayoutConstants; +var CoSEConstants = __nested_webpack_require_3201__(0).CoSEConstants; +var CoSELayout = __nested_webpack_require_3201__(0).CoSELayout; +var CoSENode = __nested_webpack_require_3201__(0).CoSENode; +var PointD = __nested_webpack_require_3201__(0).layoutBase.PointD; +var DimensionD = __nested_webpack_require_3201__(0).layoutBase.DimensionD; + +var defaults = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: 'default', + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: 'end', + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 +}; + +function extend(defaults, options) { + var obj = {}; + + for (var i in defaults) { + obj[i] = defaults[i]; + } + + for (var i in options) { + obj[i] = options[i]; + } + + return obj; +}; + +function _CoSELayout(_options) { + this.options = extend(defaults, _options); + getUserOptions(this.options); +} + +var getUserOptions = function getUserOptions(options) { + if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; + if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; + if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; +}; + +_CoSELayout.prototype.run = function () { + var ready; + var frameId; + var options = this.options; + var idToLNode = this.idToLNode = {}; + var layout = this.layout = new CoSELayout(); + var self = this; + + self.stopped = false; + + this.cy = this.options.cy; + + this.cy.trigger({ type: 'layoutstart', layout: this }); + + var gm = layout.newGraphManager(); + this.gm = gm; + + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout); + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + + var getPositions = function getPositions(ele, i) { + if (typeof ele === "number") { + ele = i; + } + var theId = ele.data('id'); + var lNode = self.idToLNode[theId]; + + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + + /* + * Reposition nodes in iterations animatedly + */ + var iterateAnimated = function iterateAnimated() { + // Thigs to perform after nodes are repositioned on screen + var afterReposition = function afterReposition() { + if (options.fit) { + options.cy.fit(options.eles, options.padding); + } + + if (!ready) { + ready = true; + self.cy.one('layoutready', options.ready); + self.cy.trigger({ type: 'layoutready', layout: self }); + } + }; + + var ticksPerFrame = self.options.refresh; + var isDone; + + for (var i = 0; i < ticksPerFrame && !isDone; i++) { + isDone = self.stopped || self.layout.tick(); + } + + // If layout is done + if (isDone) { + // If the layout is not a sublayout and it is successful perform post layout. + if (layout.checkLayoutSuccess() && !layout.isSubLayout) { + layout.doPostLayout(); + } + + // If layout has a tilingPostLayout function property call it. + if (layout.tilingPostLayout) { + layout.tilingPostLayout(); + } + + layout.isLayoutFinished = true; + + self.options.eles.nodes().positions(getPositions); + + afterReposition(); + + // trigger layoutstop when the layout stops (e.g. finishes) + self.cy.one('layoutstop', self.options.stop); + self.cy.trigger({ type: 'layoutstop', layout: self }); + + if (frameId) { + cancelAnimationFrame(frameId); + } + + ready = false; + return; + } + + var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling + + // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds) + // use position of their ancestors or dummy ancestors + options.eles.nodes().positions(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + // If ele is a compound node, then its position will be defined by its children + if (!ele.isParent()) { + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well) + while (pNode == null) { + pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if (temp == undefined) { + break; + } + } + if (pNode != null) { + return { + x: pNode.x, + y: pNode.y + }; + } else { + return { + x: ele.position('x'), + y: ele.position('y') + }; + } + } + }); + + afterReposition(); + + frameId = requestAnimationFrame(iterateAnimated); + }; + + /* + * Listen 'layoutstarted' event and start animated iteration if animate option is 'during' + */ + layout.addListener('layoutstarted', function () { + if (self.options.animate === 'during') { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + + layout.runLayout(); // Run cose layout + + /* + * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed) + */ + if (this.options.animate !== "during") { + self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter + ready = false; + } + + return this; // chaining +}; + +//Get the top most ones of a list of nodes +_CoSELayout.prototype.getTopMostNodes = function (nodes) { + var nodesMap = {}; + for (var i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + var roots = nodes.filter(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +_CoSELayout.prototype.processChildrenList = function (parent, children, layout) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = theChild.children(); + var theNode; + + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node + theNode.id = theChild.data("id"); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt(theChild.css('padding')); + theNode.paddingTop = parseInt(theChild.css('padding')); + theNode.paddingRight = parseInt(theChild.css('padding')); + theNode.paddingBottom = parseInt(theChild.css('padding')); + + //Attach the label properties to compound if labels will be included in node dimensions + if (this.options.nodeDimensionsIncludeLabels) { + if (theChild.isParent()) { + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + + // Map the layout node + this.idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout); + } + } +}; + +/** + * @brief : called on continuous layouts to stop them before they finish + */ +_CoSELayout.prototype.stop = function () { + this.stopped = true; + + return this; // chaining +}; + +var register = function register(cytoscape) { + // var Layout = getLayout( cytoscape ); + + cytoscape('layout', 'cose-bilkent', _CoSELayout); +}; + +// auto reg for globals +if (typeof cytoscape !== 'undefined') { + register(cytoscape); +} + +module.exports = register; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 71377: +/***/ (function(module) { + +/** + * Copyright (c) 2016-2022, The Cytoscape Consortium. + * + * 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. + */ + +(function (global, factory) { + true ? module.exports = factory() : + 0; +})(this, (function () { 'use strict'; + + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; + } + + function _defineProperty$1(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); + } + + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + + function _iterableToArrayLimit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + + if (_i == null) return; + var _arr = []; + var _n = true; + var _d = false; + + var _s, _e; + + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; + } + + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var window$1 = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef + + var navigator = window$1 ? window$1.navigator : null; + window$1 ? window$1.document : null; + + var typeofstr = _typeof(''); + + var typeofobj = _typeof({}); + + var typeoffn = _typeof(function () {}); + + var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); + + var instanceStr = function instanceStr(obj) { + return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; + }; + + var string = function string(obj) { + return obj != null && _typeof(obj) == typeofstr; + }; + var fn$6 = function fn(obj) { + return obj != null && _typeof(obj) === typeoffn; + }; + var array = function array(obj) { + return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); + }; + var plainObject = function plainObject(obj) { + return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object; + }; + var object = function object(obj) { + return obj != null && _typeof(obj) === typeofobj; + }; + var number$1 = function number(obj) { + return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); + }; + var integer = function integer(obj) { + return number$1(obj) && Math.floor(obj) === obj; + }; + var htmlElement = function htmlElement(obj) { + if ('undefined' === typeofhtmlele) { + return undefined; + } else { + return null != obj && obj instanceof HTMLElement; + } + }; + var elementOrCollection = function elementOrCollection(obj) { + return element(obj) || collection(obj); + }; + var element = function element(obj) { + return instanceStr(obj) === 'collection' && obj._private.single; + }; + var collection = function collection(obj) { + return instanceStr(obj) === 'collection' && !obj._private.single; + }; + var core = function core(obj) { + return instanceStr(obj) === 'core'; + }; + var stylesheet = function stylesheet(obj) { + return instanceStr(obj) === 'stylesheet'; + }; + var event = function event(obj) { + return instanceStr(obj) === 'event'; + }; + var emptyString = function emptyString(obj) { + if (obj === undefined || obj === null) { + // null is empty + return true; + } else if (obj === '' || obj.match(/^\s+$/)) { + return true; // empty string is empty + } + + return false; // otherwise, we don't know what we've got + }; + var domElement = function domElement(obj) { + if (typeof HTMLElement === 'undefined') { + return false; // we're not in a browser so it doesn't matter + } else { + return obj instanceof HTMLElement; + } + }; + var boundingBox = function boundingBox(obj) { + return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2); + }; + var promise = function promise(obj) { + return object(obj) && fn$6(obj.then); + }; + var ms = function ms() { + return navigator && navigator.userAgent.match(/msie|trident|edge/i); + }; // probably a better way to detect this... + + var memoize$1 = function memoize(fn, keyFn) { + if (!keyFn) { + keyFn = function keyFn() { + if (arguments.length === 1) { + return arguments[0]; + } else if (arguments.length === 0) { + return 'undefined'; + } + + var args = []; + + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + return args.join('$'); + }; + } + + var memoizedFn = function memoizedFn() { + var self = this; + var args = arguments; + var ret; + var k = keyFn.apply(self, args); + var cache = memoizedFn.cache; + + if (!(ret = cache[k])) { + ret = cache[k] = fn.apply(self, args); + } + + return ret; + }; + + memoizedFn.cache = {}; + return memoizedFn; + }; + + var camel2dash = memoize$1(function (str) { + return str.replace(/([A-Z])/g, function (v) { + return '-' + v.toLowerCase(); + }); + }); + var dash2camel = memoize$1(function (str) { + return str.replace(/(-\w)/g, function (v) { + return v[1].toUpperCase(); + }); + }); + var prependCamel = memoize$1(function (prefix, str) { + return prefix + str[0].toUpperCase() + str.substring(1); + }, function (prefix, str) { + return prefix + '$' + str; + }); + var capitalize = function capitalize(str) { + if (emptyString(str)) { + return str; + } + + return str.charAt(0).toUpperCase() + str.substring(1); + }; + + var number = '(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))'; + var rgba = 'rgb[a]?\\((' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)(?:\\s*,\\s*(' + number + '))?\\)'; + var rgbaNoBackRefs = 'rgb[a]?\\((?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)(?:\\s*,\\s*(?:' + number + '))?\\)'; + var hsla = 'hsl[a]?\\((' + number + ')\\s*,\\s*(' + number + '[%])\\s*,\\s*(' + number + '[%])(?:\\s*,\\s*(' + number + '))?\\)'; + var hslaNoBackRefs = 'hsl[a]?\\((?:' + number + ')\\s*,\\s*(?:' + number + '[%])\\s*,\\s*(?:' + number + '[%])(?:\\s*,\\s*(?:' + number + '))?\\)'; + var hex3 = '\\#[0-9a-fA-F]{3}'; + var hex6 = '\\#[0-9a-fA-F]{6}'; + + var ascending = function ascending(a, b) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + }; + var descending = function descending(a, b) { + return -1 * ascending(a, b); + }; + + var extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { + var args = arguments; + + for (var i = 1; i < args.length; i++) { + var obj = args[i]; + + if (obj == null) { + continue; + } + + var keys = Object.keys(obj); + + for (var j = 0; j < keys.length; j++) { + var k = keys[j]; + tgt[k] = obj[k]; + } + } + + return tgt; + }; + + var hex2tuple = function hex2tuple(hex) { + if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') { + return; + } + + var shortHex = hex.length === 4; + var r, g, b; + var base = 16; + + if (shortHex) { + r = parseInt(hex[1] + hex[1], base); + g = parseInt(hex[2] + hex[2], base); + b = parseInt(hex[3] + hex[3], base); + } else { + r = parseInt(hex[1] + hex[2], base); + g = parseInt(hex[3] + hex[4], base); + b = parseInt(hex[5] + hex[6], base); + } + + return [r, g, b]; + }; // get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0) + + var hsl2tuple = function hsl2tuple(hsl) { + var ret; + var h, s, l, a, r, g, b; + + function hue2rgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; + } + + var m = new RegExp('^' + hsla + '$').exec(hsl); + + if (m) { + // get hue + h = parseInt(m[1]); + + if (h < 0) { + h = (360 - -1 * h % 360) % 360; + } else if (h > 360) { + h = h % 360; + } + + h /= 360; // normalise on [0, 1] + + s = parseFloat(m[2]); + + if (s < 0 || s > 100) { + return; + } // saturation is [0, 100] + + + s = s / 100; // normalise on [0, 1] + + l = parseFloat(m[3]); + + if (l < 0 || l > 100) { + return; + } // lightness is [0, 100] + + + l = l / 100; // normalise on [0, 1] + + a = m[4]; + + if (a !== undefined) { + a = parseFloat(a); + + if (a < 0 || a > 1) { + return; + } // alpha is [0, 1] + + } // now, convert to rgb + // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript + + + if (s === 0) { + r = g = b = Math.round(l * 255); // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = Math.round(255 * hue2rgb(p, q, h + 1 / 3)); + g = Math.round(255 * hue2rgb(p, q, h)); + b = Math.round(255 * hue2rgb(p, q, h - 1 / 3)); + } + + ret = [r, g, b, a]; + } + + return ret; + }; // get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0) + + var rgb2tuple = function rgb2tuple(rgb) { + var ret; + var m = new RegExp('^' + rgba + '$').exec(rgb); + + if (m) { + ret = []; + var isPct = []; + + for (var i = 1; i <= 3; i++) { + var channel = m[i]; + + if (channel[channel.length - 1] === '%') { + isPct[i] = true; + } + + channel = parseFloat(channel); + + if (isPct[i]) { + channel = channel / 100 * 255; // normalise to [0, 255] + } + + if (channel < 0 || channel > 255) { + return; + } // invalid channel value + + + ret.push(Math.floor(channel)); + } + + var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; + var allArePct = isPct[1] && isPct[2] && isPct[3]; + + if (atLeastOneIsPct && !allArePct) { + return; + } // must all be percent values if one is + + + var alpha = m[4]; + + if (alpha !== undefined) { + alpha = parseFloat(alpha); + + if (alpha < 0 || alpha > 1) { + return; + } // invalid alpha value + + + ret.push(alpha); + } + } + + return ret; + }; + var colorname2tuple = function colorname2tuple(color) { + return colors[color.toLowerCase()]; + }; + var color2tuple = function color2tuple(color) { + return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color); + }; + var colors = { + // special colour names + transparent: [0, 0, 0, 0], + // NB alpha === 0 + // regular colours + 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] + }; + + var setMap = function setMap(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + + for (var i = 0; i < l; i++) { + var key = keys[i]; + + if (plainObject(key)) { + throw Error('Tried to set map with object key'); + } + + if (i < keys.length - 1) { + // extend the map if necessary + if (obj[key] == null) { + obj[key] = {}; + } + + obj = obj[key]; + } else { + // set the value + obj[key] = options.value; + } + } + }; // gets the value in a map even if it's not built in places + + var getMap = function getMap(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + + for (var i = 0; i < l; i++) { + var key = keys[i]; + + if (plainObject(key)) { + throw Error('Tried to get map with object key'); + } + + obj = obj[key]; + + if (obj == null) { + return obj; + } + } + + return obj; + }; // deletes the entry in the map + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + var isObject_1 = isObject; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + var _freeGlobal = freeGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = _freeGlobal || freeSelf || Function('return this')(); + + var _root = root; + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = function() { + return _root.Date.now(); + }; + + var now_1 = now; + + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } + + var _trimmedEndIndex = trimmedEndIndex; + + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; + + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } + + var _baseTrim = baseTrim; + + /** Built-in value references. */ + var Symbol$1 = _root.Symbol; + + var _Symbol = Symbol$1; + + /** Used for built-in method references. */ + var objectProto$5 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$4 = objectProto$5.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString$1 = objectProto$5.toString; + + /** Built-in value references. */ + var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString$1.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; + } + + var _getRawTag = getRawTag; + + /** Used for built-in method references. */ + var objectProto$4 = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto$4.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + var _objectToString = objectToString; + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? _getRawTag(value) + : _objectToString(value); + } + + var _baseGetTag = baseGetTag; + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + var isObjectLike_1 = isObjectLike; + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike_1(value) && _baseGetTag(value) == symbolTag); + } + + var isSymbol_1 = isSymbol; + + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol_1(value)) { + return NAN; + } + if (isObject_1(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject_1(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + var toNumber_1 = toNumber; + + /** Error message constants. */ + var FUNC_ERROR_TEXT$1 = 'Expected a function'; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max, + nativeMin = Math.min; + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT$1); + } + wait = toNumber_1(wait) || 0; + if (isObject_1(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now_1(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now_1()); + } + + function debounced() { + var time = now_1(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + var debounce_1 = debounce; + + var performance = window$1 ? window$1.performance : null; + var pnow = performance && performance.now ? function () { + return performance.now(); + } : function () { + return Date.now(); + }; + + var raf = function () { + if (window$1) { + if (window$1.requestAnimationFrame) { + return function (fn) { + window$1.requestAnimationFrame(fn); + }; + } else if (window$1.mozRequestAnimationFrame) { + return function (fn) { + window$1.mozRequestAnimationFrame(fn); + }; + } else if (window$1.webkitRequestAnimationFrame) { + return function (fn) { + window$1.webkitRequestAnimationFrame(fn); + }; + } else if (window$1.msRequestAnimationFrame) { + return function (fn) { + window$1.msRequestAnimationFrame(fn); + }; + } + } + + return function (fn) { + if (fn) { + setTimeout(function () { + fn(pnow()); + }, 1000 / 60); + } + }; + }(); + + var requestAnimationFrame = function requestAnimationFrame(fn) { + return raf(fn); + }; + var performanceNow = pnow; + + var DEFAULT_HASH_SEED = 9261; + var K = 65599; // 37 also works pretty well + + var DEFAULT_HASH_SEED_ALT = 5381; + var hashIterableInts = function hashIterableInts(iterator) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; + // sdbm/string-hash + var hash = seed; + var entry; + + for (;;) { + entry = iterator.next(); + + if (entry.done) { + break; + } + + hash = hash * K + entry.value | 0; + } + + return hash; + }; + var hashInt = function hashInt(num) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; + // sdbm/string-hash + return seed * K + num | 0; + }; + var hashIntAlt = function hashIntAlt(num) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT; + // djb2/string-hash + return (seed << 5) + seed + num | 0; + }; + var combineHashes = function combineHashes(hash1, hash2) { + return hash1 * 0x200000 + hash2; + }; + var combineHashesArray = function combineHashesArray(hashes) { + return hashes[0] * 0x200000 + hashes[1]; + }; + var hashArrays = function hashArrays(hashes1, hashes2) { + return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; + }; + var hashIntsArray = function hashIntsArray(ints, seed) { + var entry = { + value: 0, + done: false + }; + var i = 0; + var length = ints.length; + var iterator = { + next: function next() { + if (i < length) { + entry.value = ints[i++]; + } else { + entry.done = true; + } + + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashString = function hashString(str, seed) { + var entry = { + value: 0, + done: false + }; + var i = 0; + var length = str.length; + var iterator = { + next: function next() { + if (i < length) { + entry.value = str.charCodeAt(i++); + } else { + entry.done = true; + } + + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashStrings = function hashStrings() { + return hashStringsArray(arguments); + }; + var hashStringsArray = function hashStringsArray(strs) { + var hash; + + for (var i = 0; i < strs.length; i++) { + var str = strs[i]; + + if (i === 0) { + hash = hashString(str); + } else { + hash = hashString(str, hash); + } + } + + return hash; + }; + + /*global console */ + var warningsEnabled = true; + var warnSupported = console.warn != null; // eslint-disable-line no-console + + var traceSupported = console.trace != null; // eslint-disable-line no-console + + var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; + var trueify = function trueify() { + return true; + }; + var falsify = function falsify() { + return false; + }; + var zeroify = function zeroify() { + return 0; + }; + var noop$1 = function noop() {}; + var error = function error(msg) { + throw new Error(msg); + }; + var warnings = function warnings(enabled) { + if (enabled !== undefined) { + warningsEnabled = !!enabled; + } else { + return warningsEnabled; + } + }; + var warn = function warn(msg) { + /* eslint-disable no-console */ + if (!warnings()) { + return; + } + + if (warnSupported) { + console.warn(msg); + } else { + console.log(msg); + + if (traceSupported) { + console.trace(); + } + } + }; + /* eslint-enable */ + + var clone = function clone(obj) { + return extend({}, obj); + }; // gets a shallow copy of the argument + + var copy = function copy(obj) { + if (obj == null) { + return obj; + } + + if (array(obj)) { + return obj.slice(); + } else if (plainObject(obj)) { + return clone(obj); + } else { + return obj; + } + }; + var copyArray$1 = function copyArray(arr) { + return arr.slice(); + }; + var uuid = function uuid(a, b + /* placeholders */ + ) { + for ( // loop :) + b = a = ''; // b - result , a - numeric letiable + a++ < 36; // + b += a * 51 & 52 // if "a" is not 9 or 14 or 19 or 24 + ? // return a random number or 4 + (a ^ 15 // if "a" is not 15 + ? // generate a random number from 0 to 15 + 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless "a" is 20, in which case a random number from 8 to 11 + : 4 // otherwise 4 + ).toString(16) : '-' // in other cases (if "a" is 9,14,19,24) insert "-" + ) { + } + + return b; + }; + var _staticEmptyObject = {}; + var staticEmptyObject = function staticEmptyObject() { + return _staticEmptyObject; + }; + var defaults$g = function defaults(_defaults) { + var keys = Object.keys(_defaults); + return function (opts) { + var filledOpts = {}; + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var optVal = opts == null ? undefined : opts[key]; + filledOpts[key] = optVal === undefined ? _defaults[key] : optVal; + } + + return filledOpts; + }; + }; + var removeFromArray = function removeFromArray(arr, ele, oneCopy) { + for (var i = arr.length - 1; i >= 0; i--) { + if (arr[i] === ele) { + arr.splice(i, 1); + + if (oneCopy) { + break; + } + } + } + }; + var clearArray = function clearArray(arr) { + arr.splice(0, arr.length); + }; + var push = function push(arr, otherArr) { + for (var i = 0; i < otherArr.length; i++) { + var el = otherArr[i]; + arr.push(el); + } + }; + var getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) { + if (prefix) { + propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth + } + + return obj[propName]; + }; + var setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) { + if (prefix) { + propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth + } + + obj[propName] = value; + }; + + /* global Map */ + var ObjectMap = /*#__PURE__*/function () { + function ObjectMap() { + _classCallCheck(this, ObjectMap); + + this._obj = {}; + } + + _createClass(ObjectMap, [{ + key: "set", + value: function set(key, val) { + this._obj[key] = val; + return this; + } + }, { + key: "delete", + value: function _delete(key) { + this._obj[key] = undefined; + return this; + } + }, { + key: "clear", + value: function clear() { + this._obj = {}; + } + }, { + key: "has", + value: function has(key) { + return this._obj[key] !== undefined; + } + }, { + key: "get", + value: function get(key) { + return this._obj[key]; + } + }]); + + return ObjectMap; + }(); + + var Map$2 = typeof Map !== 'undefined' ? Map : ObjectMap; + + /* global Set */ + var undef = "undefined" ; + + var ObjectSet = /*#__PURE__*/function () { + function ObjectSet(arrayOrObjectSet) { + _classCallCheck(this, ObjectSet); + + this._obj = Object.create(null); + this.size = 0; + + if (arrayOrObjectSet != null) { + var arr; + + if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { + arr = arrayOrObjectSet.toArray(); + } else { + arr = arrayOrObjectSet; + } + + for (var i = 0; i < arr.length; i++) { + this.add(arr[i]); + } + } + } + + _createClass(ObjectSet, [{ + key: "instanceString", + value: function instanceString() { + return 'set'; + } + }, { + key: "add", + value: function add(val) { + var o = this._obj; + + if (o[val] !== 1) { + o[val] = 1; + this.size++; + } + } + }, { + key: "delete", + value: function _delete(val) { + var o = this._obj; + + if (o[val] === 1) { + o[val] = 0; + this.size--; + } + } + }, { + key: "clear", + value: function clear() { + this._obj = Object.create(null); + } + }, { + key: "has", + value: function has(val) { + return this._obj[val] === 1; + } + }, { + key: "toArray", + value: function toArray() { + var _this = this; + + return Object.keys(this._obj).filter(function (key) { + return _this.has(key); + }); + } + }, { + key: "forEach", + value: function forEach(callback, thisArg) { + return this.toArray().forEach(callback, thisArg); + } + }]); + + return ObjectSet; + }(); + + var Set$1 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; + + var Element = function Element(cy, params) { + var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + if (cy === undefined || params === undefined || !core(cy)) { + error('An element must have a core reference and parameters set'); + return; + } + + var group = params.group; // try to automatically infer the group if unspecified + + if (group == null) { + if (params.data && params.data.source != null && params.data.target != null) { + group = 'edges'; + } else { + group = 'nodes'; + } + } // validate group + + + if (group !== 'nodes' && group !== 'edges') { + error('An element must be of type `nodes` or `edges`; you specified `' + group + '`'); + return; + } // make the element array-like, just like a collection + + + this.length = 1; + this[0] = this; // NOTE: when something is added here, add also to ele.json() + + var _p = this._private = { + cy: cy, + single: true, + // indicates this is an element + data: params.data || {}, + // data object + position: params.position || { + x: 0, + y: 0 + }, + // (x, y) position pair + autoWidth: undefined, + // width and height of nodes calculated by the renderer when set to special 'auto' value + autoHeight: undefined, + autoPadding: undefined, + compoundBoundsClean: false, + // whether the compound dimensions need to be recalculated the next time dimensions are read + listeners: [], + // array of bound listeners + group: group, + // string; 'nodes' or 'edges' + style: {}, + // properties as set by the style + rstyle: {}, + // properties for style sent from the renderer to the core + styleCxts: [], + // applied style contexts from the styler + styleKeys: {}, + // per-group keys of style property values + removed: true, + // whether it's inside the vis; true if removed (set true here since we call restore) + selected: params.selected ? true : false, + // whether it's selected + selectable: params.selectable === undefined ? true : params.selectable ? true : false, + // whether it's selectable + locked: params.locked ? true : false, + // whether the element is locked (cannot be moved) + grabbed: false, + // whether the element is grabbed by the mouse; renderer sets this privately + grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false, + // whether the element can be grabbed + pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false, + // whether the element has passthrough panning enabled + active: false, + // whether the element is active from user interaction + classes: new Set$1(), + // map ( className => true ) + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + rscratch: {}, + // object in which the renderer can store information + scratch: params.scratch || {}, + // scratch objects + edges: [], + // array of connected edges + children: [], + // array of children + parent: params.parent && params.parent.isNode() ? params.parent : null, + // parent ref + traversalCache: {}, + // cache of output of traversal functions + backgrounding: false, + // whether background images are loading + bbCache: null, + // cache of the current bounding box + bbCacheShift: { + x: 0, + y: 0 + }, + // shift applied to cached bb to be applied on next get + bodyBounds: null, + // bounds cache of element body, w/o overlay + overlayBounds: null, + // bounds cache of element body, including overlay + labelBounds: { + // bounds cache of labels + all: null, + source: null, + target: null, + main: null + }, + arrowBounds: { + // bounds cache of edge arrows + source: null, + target: null, + 'mid-source': null, + 'mid-target': null + } + }; + + if (_p.position.x == null) { + _p.position.x = 0; + } + + if (_p.position.y == null) { + _p.position.y = 0; + } // renderedPosition overrides if specified + + + if (params.renderedPosition) { + var rpos = params.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + _p.position = { + x: (rpos.x - pan.x) / zoom, + y: (rpos.y - pan.y) / zoom + }; + } + + var classes = []; + + if (array(params.classes)) { + classes = params.classes; + } else if (string(params.classes)) { + classes = params.classes.split(/\s+/); + } + + for (var i = 0, l = classes.length; i < l; i++) { + var cls = classes[i]; + + if (!cls || cls === '') { + continue; + } + + _p.classes.add(cls); + } + + this.createEmitter(); + var bypass = params.style || params.css; + + if (bypass) { + warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.'); + this.style(bypass); + } + + if (restore === undefined || restore) { + this.restore(); + } + }; + + var defineSearch = function defineSearch(params) { + params = { + bfs: params.bfs || !params.dfs, + dfs: params.dfs || !params.bfs + }; // from pseudocode on wikipedia + + return function searchFn(roots, fn, directed) { + var options; + + if (plainObject(roots) && !elementOrCollection(roots)) { + options = roots; + roots = options.roots || options.root; + fn = options.visit; + directed = options.directed; + } + + directed = arguments.length === 2 && !fn$6(fn) ? fn : directed; + fn = fn$6(fn) ? fn : function () {}; + var cy = this._private.cy; + var v = roots = string(roots) ? this.filter(roots) : roots; + var Q = []; + var connectedNodes = []; + var connectedBy = {}; + var id2depth = {}; + var V = {}; + var j = 0; + var found; + + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; // enqueue v + + + for (var i = 0; i < v.length; i++) { + var vi = v[i]; + var viId = vi.id(); + + if (vi.isNode()) { + Q.unshift(vi); + + if (params.bfs) { + V[viId] = true; + connectedNodes.push(vi); + } + + id2depth[viId] = 0; + } + } + + var _loop = function _loop() { + var v = params.bfs ? Q.shift() : Q.pop(); + var vId = v.id(); + + if (params.dfs) { + if (V[vId]) { + return "continue"; + } + + V[vId] = true; + connectedNodes.push(v); + } + + var depth = id2depth[vId]; + var prevEdge = connectedBy[vId]; + var src = prevEdge != null ? prevEdge.source() : null; + var tgt = prevEdge != null ? prevEdge.target() : null; + var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0]; + var ret = void 0; + ret = fn(v, prevEdge, prevNode, j++, depth); + + if (ret === true) { + found = v; + return "break"; + } + + if (ret === false) { + return "break"; + } + + var vwEdges = v.connectedEdges().filter(function (e) { + return (!directed || e.source().same(v)) && edges.has(e); + }); + + for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { + var e = vwEdges[_i2]; + var w = e.connectedNodes().filter(function (n) { + return !n.same(v) && nodes.has(n); + }); + var wId = w.id(); + + if (w.length !== 0 && !V[wId]) { + w = w[0]; + Q.push(w); + + if (params.bfs) { + V[wId] = true; + connectedNodes.push(w); + } + + connectedBy[wId] = e; + id2depth[wId] = id2depth[vId] + 1; + } + } + }; + + while (Q.length !== 0) { + var _ret = _loop(); + + if (_ret === "continue") continue; + if (_ret === "break") break; + } + + var connectedEles = cy.collection(); + + for (var _i = 0; _i < connectedNodes.length; _i++) { + var node = connectedNodes[_i]; + var edge = connectedBy[node.id()]; + + if (edge != null) { + connectedEles.push(edge); + } + + connectedEles.push(node); + } + + return { + path: cy.collection(connectedEles), + found: cy.collection(found) + }; + }; + }; // search, spanning trees, etc + + + var elesfn$v = { + breadthFirstSearch: defineSearch({ + bfs: true + }), + depthFirstSearch: defineSearch({ + dfs: true + }) + }; // nice, short mathematical alias + + elesfn$v.bfs = elesfn$v.breadthFirstSearch; + elesfn$v.dfs = elesfn$v.depthFirstSearch; + + var heap$1 = createCommonjsModule(function (module, exports) { + // Generated by CoffeeScript 1.8.0 + (function() { + var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup; + + floor = Math.floor, min = Math.min; + + + /* + Default comparison function to be used + */ + + defaultCmp = function(x, y) { + if (x < y) { + return -1; + } + if (x > y) { + return 1; + } + return 0; + }; + + + /* + Insert item x in list a, and keep it sorted assuming a is sorted. + + If x is already in a, insert it to the right of the rightmost x. + + Optional args lo (default 0) and hi (default a.length) bound the slice + of a to be searched. + */ + + insort = function(a, x, lo, hi, cmp) { + var mid; + if (lo == null) { + lo = 0; + } + if (cmp == null) { + cmp = defaultCmp; + } + if (lo < 0) { + throw new Error('lo must be non-negative'); + } + if (hi == null) { + hi = a.length; + } + while (lo < hi) { + mid = floor((lo + hi) / 2); + if (cmp(x, a[mid]) < 0) { + hi = mid; + } else { + lo = mid + 1; + } + } + return ([].splice.apply(a, [lo, lo - lo].concat(x)), x); + }; + + + /* + Push item onto heap, maintaining the heap invariant. + */ + + heappush = function(array, item, cmp) { + if (cmp == null) { + cmp = defaultCmp; + } + array.push(item); + return _siftdown(array, 0, array.length - 1, cmp); + }; + + + /* + Pop the smallest item off the heap, maintaining the heap invariant. + */ + + heappop = function(array, cmp) { + var lastelt, returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + lastelt = array.pop(); + if (array.length) { + returnitem = array[0]; + array[0] = lastelt; + _siftup(array, 0, cmp); + } else { + returnitem = lastelt; + } + return returnitem; + }; + + + /* + Pop and return the current smallest value, and add the new item. + + This is more efficient than heappop() followed by heappush(), and can be + more appropriate when using a fixed size heap. Note that the value + returned may be larger than item! That constrains reasonable use of + this routine unless written as part of a conditional replacement: + if item > array[0] + item = heapreplace(array, item) + */ + + heapreplace = function(array, item, cmp) { + var returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + returnitem = array[0]; + array[0] = item; + _siftup(array, 0, cmp); + return returnitem; + }; + + + /* + Fast version of a heappush followed by a heappop. + */ + + heappushpop = function(array, item, cmp) { + var _ref; + if (cmp == null) { + cmp = defaultCmp; + } + if (array.length && cmp(array[0], item) < 0) { + _ref = [array[0], item], item = _ref[0], array[0] = _ref[1]; + _siftup(array, 0, cmp); + } + return item; + }; + + + /* + Transform list into a heap, in-place, in O(array.length) time. + */ + + heapify = function(array, cmp) { + var i, _i, _len, _ref1, _results, _results1; + if (cmp == null) { + cmp = defaultCmp; + } + _ref1 = (function() { + _results1 = []; + for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); } + return _results1; + }).apply(this).reverse(); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + i = _ref1[_i]; + _results.push(_siftup(array, i, cmp)); + } + return _results; + }; + + + /* + Update the position of the given item in the heap. + This function should be called every time the item is being modified. + */ + + updateItem = function(array, item, cmp) { + var pos; + if (cmp == null) { + cmp = defaultCmp; + } + pos = array.indexOf(item); + if (pos === -1) { + return; + } + _siftdown(array, 0, pos, cmp); + return _siftup(array, pos, cmp); + }; + + + /* + Find the n largest elements in a dataset. + */ + + nlargest = function(array, n, cmp) { + var elem, result, _i, _len, _ref; + if (cmp == null) { + cmp = defaultCmp; + } + result = array.slice(0, n); + if (!result.length) { + return result; + } + heapify(result, cmp); + _ref = array.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + heappushpop(result, elem, cmp); + } + return result.sort(cmp).reverse(); + }; + + + /* + Find the n smallest elements in a dataset. + */ + + nsmallest = function(array, n, cmp) { + var elem, los, result, _i, _j, _len, _ref, _ref1, _results; + if (cmp == null) { + cmp = defaultCmp; + } + if (n * 10 <= array.length) { + result = array.slice(0, n).sort(cmp); + if (!result.length) { + return result; + } + los = result[result.length - 1]; + _ref = array.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + if (cmp(elem, los) < 0) { + insort(result, elem, 0, null, cmp); + result.pop(); + los = result[result.length - 1]; + } + } + return result; + } + heapify(array, cmp); + _results = []; + for (_j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) { + _results.push(heappop(array, cmp)); + } + return _results; + }; + + _siftdown = function(array, startpos, pos, cmp) { + var newitem, parent, parentpos; + if (cmp == null) { + cmp = defaultCmp; + } + newitem = array[pos]; + while (pos > startpos) { + parentpos = (pos - 1) >> 1; + parent = array[parentpos]; + if (cmp(newitem, parent) < 0) { + array[pos] = parent; + pos = parentpos; + continue; + } + break; + } + return array[pos] = newitem; + }; + + _siftup = function(array, pos, cmp) { + var childpos, endpos, newitem, rightpos, startpos; + if (cmp == null) { + cmp = defaultCmp; + } + endpos = array.length; + startpos = pos; + newitem = array[pos]; + childpos = 2 * pos + 1; + while (childpos < endpos) { + rightpos = childpos + 1; + if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) { + childpos = rightpos; + } + array[pos] = array[childpos]; + pos = childpos; + childpos = 2 * pos + 1; + } + array[pos] = newitem; + return _siftdown(array, startpos, pos, cmp); + }; + + Heap = (function() { + Heap.push = heappush; + + Heap.pop = heappop; + + Heap.replace = heapreplace; + + Heap.pushpop = heappushpop; + + Heap.heapify = heapify; + + Heap.updateItem = updateItem; + + Heap.nlargest = nlargest; + + Heap.nsmallest = nsmallest; + + function Heap(cmp) { + this.cmp = cmp != null ? cmp : defaultCmp; + this.nodes = []; + } + + Heap.prototype.push = function(x) { + return heappush(this.nodes, x, this.cmp); + }; + + Heap.prototype.pop = function() { + return heappop(this.nodes, this.cmp); + }; + + Heap.prototype.peek = function() { + return this.nodes[0]; + }; + + Heap.prototype.contains = function(x) { + return this.nodes.indexOf(x) !== -1; + }; + + Heap.prototype.replace = function(x) { + return heapreplace(this.nodes, x, this.cmp); + }; + + Heap.prototype.pushpop = function(x) { + return heappushpop(this.nodes, x, this.cmp); + }; + + Heap.prototype.heapify = function() { + return heapify(this.nodes, this.cmp); + }; + + Heap.prototype.updateItem = function(x) { + return updateItem(this.nodes, x, this.cmp); + }; + + Heap.prototype.clear = function() { + return this.nodes = []; + }; + + Heap.prototype.empty = function() { + return this.nodes.length === 0; + }; + + Heap.prototype.size = function() { + return this.nodes.length; + }; + + Heap.prototype.clone = function() { + var heap; + heap = new Heap(); + heap.nodes = this.nodes.slice(0); + return heap; + }; + + Heap.prototype.toArray = function() { + return this.nodes.slice(0); + }; + + Heap.prototype.insert = Heap.prototype.push; + + Heap.prototype.top = Heap.prototype.peek; + + Heap.prototype.front = Heap.prototype.peek; + + Heap.prototype.has = Heap.prototype.contains; + + Heap.prototype.copy = Heap.prototype.clone; + + return Heap; + + })(); + + (function(root, factory) { + { + return module.exports = factory(); + } + })(this, function() { + return Heap; + }); + + }).call(commonjsGlobal); + }); + + var heap = heap$1; + + var dijkstraDefaults = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$u = { + dijkstra: function dijkstra(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + weight: args[1], + directed: args[2] + }; + } + + var _dijkstraDefaults = dijkstraDefaults(options), + root = _dijkstraDefaults.root, + weight = _dijkstraDefaults.weight, + directed = _dijkstraDefaults.directed; + + var eles = this; + var weightFn = weight; + var source = string(root) ? this.filter(root)[0] : root[0]; + var dist = {}; + var prev = {}; + var knownDist = {}; + + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + edges.unmergeBy(function (ele) { + return ele.isLoop(); + }); + + var getDist = function getDist(node) { + return dist[node.id()]; + }; + + var setDist = function setDist(node, d) { + dist[node.id()] = d; + Q.updateItem(node); + }; + + var Q = new heap(function (a, b) { + return getDist(a) - getDist(b); + }); + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + dist[node.id()] = node.same(source) ? 0 : Infinity; + Q.push(node); + } + + var distBetween = function distBetween(u, v) { + var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges); + var smallestDistance = Infinity; + var smallestEdge; + + for (var _i = 0; _i < uvs.length; _i++) { + var edge = uvs[_i]; + + var _weight = weightFn(edge); + + if (_weight < smallestDistance || !smallestEdge) { + smallestDistance = _weight; + smallestEdge = edge; + } + } + + return { + edge: smallestEdge, + dist: smallestDistance + }; + }; + + while (Q.size() > 0) { + var u = Q.pop(); + var smalletsDist = getDist(u); + var uid = u.id(); + knownDist[uid] = smalletsDist; + + if (smalletsDist === Infinity) { + continue; + } + + var neighbors = u.neighborhood().intersect(nodes); + + for (var _i2 = 0; _i2 < neighbors.length; _i2++) { + var v = neighbors[_i2]; + var vid = v.id(); + var vDist = distBetween(u, v); + var alt = smalletsDist + vDist.dist; + + if (alt < getDist(v)) { + setDist(v, alt); + prev[vid] = { + node: u, + edge: vDist.edge + }; + } + } // for + + } // while + + + return { + distanceTo: function distanceTo(node) { + var target = string(node) ? nodes.filter(node)[0] : node[0]; + return knownDist[target.id()]; + }, + pathTo: function pathTo(node) { + var target = string(node) ? nodes.filter(node)[0] : node[0]; + var S = []; + var u = target; + var uid = u.id(); + + if (target.length > 0) { + S.unshift(target); + + while (prev[uid]) { + var p = prev[uid]; + S.unshift(p.edge); + S.unshift(p.node); + u = p.node; + uid = u.id(); + } + } + + return eles.spawn(S); + } + }; + } + }; + + var elesfn$t = { + // kruskal's algorithm (finds min spanning tree, assuming undirected graph) + // implemented from pseudocode from wikipedia + kruskal: function kruskal(weightFn) { + weightFn = weightFn || function (edge) { + return 1; + }; + + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + var numNodes = nodes.length; + var forest = new Array(numNodes); + var A = nodes; // assumes byGroup() creates new collections that can be safely mutated + + var findSetIndex = function findSetIndex(ele) { + for (var i = 0; i < forest.length; i++) { + var eles = forest[i]; + + if (eles.has(ele)) { + return i; + } + } + }; // start with one forest per node + + + for (var i = 0; i < numNodes; i++) { + forest[i] = this.spawn(nodes[i]); + } + + var S = edges.sort(function (a, b) { + return weightFn(a) - weightFn(b); + }); + + for (var _i = 0; _i < S.length; _i++) { + var edge = S[_i]; + var u = edge.source()[0]; + var v = edge.target()[0]; + var setUIndex = findSetIndex(u); + var setVIndex = findSetIndex(v); + var setU = forest[setUIndex]; + var setV = forest[setVIndex]; + + if (setUIndex !== setVIndex) { + A.merge(edge); // combine forests for u and v + + setU.merge(setV); + forest.splice(setVIndex, 1); + } + } + + return A; + } + }; + + var aStarDefaults = defaults$g({ + root: null, + goal: null, + weight: function weight(edge) { + return 1; + }, + heuristic: function heuristic(edge) { + return 0; + }, + directed: false + }); + var elesfn$s = { + // Implemented from pseudocode from wikipedia + aStar: function aStar(options) { + var cy = this.cy(); + + var _aStarDefaults = aStarDefaults(options), + root = _aStarDefaults.root, + goal = _aStarDefaults.goal, + heuristic = _aStarDefaults.heuristic, + directed = _aStarDefaults.directed, + weight = _aStarDefaults.weight; + + root = cy.collection(root)[0]; + goal = cy.collection(goal)[0]; + var sid = root.id(); + var tid = goal.id(); + var gScore = {}; + var fScore = {}; + var closedSetIds = {}; + var openSet = new heap(function (a, b) { + return fScore[a.id()] - fScore[b.id()]; + }); + var openSetIds = new Set$1(); + var cameFrom = {}; + var cameFromEdge = {}; + + var addToOpenSet = function addToOpenSet(ele, id) { + openSet.push(ele); + openSetIds.add(id); + }; + + var cMin, cMinId; + + var popFromOpenSet = function popFromOpenSet() { + cMin = openSet.pop(); + cMinId = cMin.id(); + openSetIds["delete"](cMinId); + }; + + var isInOpenSet = function isInOpenSet(id) { + return openSetIds.has(id); + }; + + addToOpenSet(root, sid); + gScore[sid] = 0; + fScore[sid] = heuristic(root); // Counter + + var steps = 0; // Main loop + + while (openSet.size() > 0) { + popFromOpenSet(); + steps++; // If we've found our goal, then we are done + + if (cMinId === tid) { + var path = []; + var pathNode = goal; + var pathNodeId = tid; + var pathEdge = cameFromEdge[pathNodeId]; + + for (;;) { + path.unshift(pathNode); + + if (pathEdge != null) { + path.unshift(pathEdge); + } + + pathNode = cameFrom[pathNodeId]; + + if (pathNode == null) { + break; + } + + pathNodeId = pathNode.id(); + pathEdge = cameFromEdge[pathNodeId]; + } + + return { + found: true, + distance: gScore[cMinId], + path: this.spawn(path), + steps: steps + }; + } // Add cMin to processed nodes + + + closedSetIds[cMinId] = true; // Update scores for neighbors of cMin + // Take into account if graph is directed or not + + var vwEdges = cMin._private.edges; + + for (var i = 0; i < vwEdges.length; i++) { + var e = vwEdges[i]; // edge must be in set of calling eles + + if (!this.hasElementWithId(e.id())) { + continue; + } // cMin must be the source of edge if directed + + + if (directed && e.data('source') !== cMinId) { + continue; + } + + var wSrc = e.source(); + var wTgt = e.target(); + var w = wSrc.id() !== cMinId ? wSrc : wTgt; + var wid = w.id(); // node must be in set of calling eles + + if (!this.hasElementWithId(wid)) { + continue; + } // if node is in closedSet, ignore it + + + if (closedSetIds[wid]) { + continue; + } // New tentative score for node w + + + var tempScore = gScore[cMinId] + weight(e); // Update gScore for node w if: + // w not present in openSet + // OR + // tentative gScore is less than previous value + // w not in openSet + + if (!isInOpenSet(wid)) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + addToOpenSet(w, wid); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + continue; + } // w already in openSet, but with greater gScore + + + if (tempScore < gScore[wid]) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + } + } // End of neighbors update + + } // End of main loop + // If we've reached here, then we've not reached our goal + + + return { + found: false, + distance: undefined, + path: undefined, + steps: steps + }; + } + }; // elesfn + + var floydWarshallDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$r = { + // Implemented from pseudocode from wikipedia + floydWarshall: function floydWarshall(options) { + var cy = this.cy(); + + var _floydWarshallDefault = floydWarshallDefaults(options), + weight = _floydWarshallDefault.weight, + directed = _floydWarshallDefault.directed; + + var weightFn = weight; + + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + var N = nodes.length; + var Nsq = N * N; + + var indexOf = function indexOf(node) { + return nodes.indexOf(node); + }; + + var atIndex = function atIndex(i) { + return nodes[i]; + }; // Initialize distance matrix + + + var dist = new Array(Nsq); + + for (var n = 0; n < Nsq; n++) { + var j = n % N; + var i = (n - j) / N; + + if (i === j) { + dist[n] = 0; + } else { + dist[n] = Infinity; + } + } // Initialize matrix used for path reconstruction + // Initialize distance matrix + + + var next = new Array(Nsq); + var edgeNext = new Array(Nsq); // Process edges + + for (var _i = 0; _i < edges.length; _i++) { + var edge = edges[_i]; + var src = edge.source()[0]; + var tgt = edge.target()[0]; + + if (src === tgt) { + continue; + } // exclude loops + + + var s = indexOf(src); + var t = indexOf(tgt); + var st = s * N + t; // source to target index + + var _weight = weightFn(edge); // Check if already process another edge between same 2 nodes + + + if (dist[st] > _weight) { + dist[st] = _weight; + next[st] = t; + edgeNext[st] = edge; + } // If undirected graph, process 'reversed' edge + + + if (!directed) { + var ts = t * N + s; // target to source index + + if (!directed && dist[ts] > _weight) { + dist[ts] = _weight; + next[ts] = s; + edgeNext[ts] = edge; + } + } + } // Main loop + + + for (var k = 0; k < N; k++) { + for (var _i2 = 0; _i2 < N; _i2++) { + var ik = _i2 * N + k; + + for (var _j = 0; _j < N; _j++) { + var ij = _i2 * N + _j; + var kj = k * N + _j; + + if (dist[ik] + dist[kj] < dist[ij]) { + dist[ij] = dist[ik] + dist[kj]; + next[ij] = next[ik]; + } + } + } + } + + var getArgEle = function getArgEle(ele) { + return (string(ele) ? cy.filter(ele) : ele)[0]; + }; + + var indexOfArgEle = function indexOfArgEle(ele) { + return indexOf(getArgEle(ele)); + }; + + var res = { + distance: function distance(from, to) { + var i = indexOfArgEle(from); + var j = indexOfArgEle(to); + return dist[i * N + j]; + }, + path: function path(from, to) { + var i = indexOfArgEle(from); + var j = indexOfArgEle(to); + var fromNode = atIndex(i); + + if (i === j) { + return fromNode.collection(); + } + + if (next[i * N + j] == null) { + return cy.collection(); + } + + var path = cy.collection(); + var prev = i; + var edge; + path.merge(fromNode); + + while (i !== j) { + prev = i; + i = next[i * N + j]; + edge = edgeNext[prev * N + i]; + path.merge(edge); + path.merge(atIndex(i)); + } + + return path; + } + }; + return res; + } // floydWarshall + + }; // elesfn + + var bellmanFordDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false, + root: null + }); + var elesfn$q = { + // Implemented from pseudocode from wikipedia + bellmanFord: function bellmanFord(options) { + var _this = this; + + var _bellmanFordDefaults = bellmanFordDefaults(options), + weight = _bellmanFordDefaults.weight, + directed = _bellmanFordDefaults.directed, + root = _bellmanFordDefaults.root; + + var weightFn = weight; + var eles = this; + var cy = this.cy(); + + var _this$byGroup = this.byGroup(), + edges = _this$byGroup.edges, + nodes = _this$byGroup.nodes; + + var numNodes = nodes.length; + var infoMap = new Map$2(); + var hasNegativeWeightCycle = false; + var negativeWeightCycles = []; + root = cy.collection(root)[0]; // in case selector passed + + edges.unmergeBy(function (edge) { + return edge.isLoop(); + }); + var numEdges = edges.length; + + var getInfo = function getInfo(node) { + var obj = infoMap.get(node.id()); + + if (!obj) { + obj = {}; + infoMap.set(node.id(), obj); + } + + return obj; + }; + + var getNodeFromTo = function getNodeFromTo(to) { + return (string(to) ? cy.$(to) : to)[0]; + }; + + var distanceTo = function distanceTo(to) { + return getInfo(getNodeFromTo(to)).dist; + }; + + var pathTo = function pathTo(to) { + var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root; + var end = getNodeFromTo(to); + var path = []; + var node = end; + + for (;;) { + if (node == null) { + return _this.spawn(); + } + + var _getInfo = getInfo(node), + edge = _getInfo.edge, + pred = _getInfo.pred; + + path.unshift(node[0]); + + if (node.same(thisStart) && path.length > 0) { + break; + } + + if (edge != null) { + path.unshift(edge); + } + + node = pred; + } + + return eles.spawn(path); + }; // Initializations { dist, pred, edge } + + + for (var i = 0; i < numNodes; i++) { + var node = nodes[i]; + var info = getInfo(node); + + if (node.same(root)) { + info.dist = 0; + } else { + info.dist = Infinity; + } + + info.pred = null; + info.edge = null; + } // Edges relaxation + + + var replacedEdge = false; + + var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) { + var dist = info1.dist + weight; + + if (dist < info2.dist && !edge.same(info1.edge)) { + info2.dist = dist; + info2.pred = node1; + info2.edge = edge; + replacedEdge = true; + } + }; + + for (var _i = 1; _i < numNodes; _i++) { + replacedEdge = false; + + for (var e = 0; e < numEdges; e++) { + var edge = edges[e]; + var src = edge.source(); + var tgt = edge.target(); + + var _weight = weightFn(edge); + + var srcInfo = getInfo(src); + var tgtInfo = getInfo(tgt); + checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); // If undirected graph, we need to take into account the 'reverse' edge + + if (!directed) { + checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); + } + } + + if (!replacedEdge) { + break; + } + } + + if (replacedEdge) { + // Check for negative weight cycles + var negativeWeightCycleIds = []; + + for (var _e = 0; _e < numEdges; _e++) { + var _edge = edges[_e]; + + var _src = _edge.source(); + + var _tgt = _edge.target(); + + var _weight2 = weightFn(_edge); + + var srcDist = getInfo(_src).dist; + var tgtDist = getInfo(_tgt).dist; + + if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { + if (!hasNegativeWeightCycle) { + warn('Graph contains a negative weight cycle for Bellman-Ford'); + hasNegativeWeightCycle = true; + } + + if (options.findNegativeWeightCycles !== false) { + var negativeNodes = []; + + if (srcDist + _weight2 < tgtDist) { + negativeNodes.push(_src); + } + + if (!directed && tgtDist + _weight2 < srcDist) { + negativeNodes.push(_tgt); + } + + var numNegativeNodes = negativeNodes.length; + + for (var n = 0; n < numNegativeNodes; n++) { + var start = negativeNodes[n]; + var cycle = [start]; + cycle.push(getInfo(start).edge); + var _node = getInfo(start).pred; + + while (cycle.indexOf(_node) === -1) { + cycle.push(_node); + cycle.push(getInfo(_node).edge); + _node = getInfo(_node).pred; + } + + cycle = cycle.slice(cycle.indexOf(_node)); + var smallestId = cycle[0].id(); + var smallestIndex = 0; + + for (var c = 2; c < cycle.length; c += 2) { + if (cycle[c].id() < smallestId) { + smallestId = cycle[c].id(); + smallestIndex = c; + } + } + + cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); + cycle.push(cycle[0]); + var cycleId = cycle.map(function (el) { + return el.id(); + }).join(","); + + if (negativeWeightCycleIds.indexOf(cycleId) === -1) { + negativeWeightCycles.push(eles.spawn(cycle)); + negativeWeightCycleIds.push(cycleId); + } + } + } else { + break; + } + } + } + } + + return { + distanceTo: distanceTo, + pathTo: pathTo, + hasNegativeWeightCycle: hasNegativeWeightCycle, + negativeWeightCycles: negativeWeightCycles + }; + } // bellmanFord + + }; // elesfn + + var sqrt2 = Math.sqrt(2); // Function which colapses 2 (meta) nodes into one + // Updates the remaining edge lists + // Receives as a paramater the edge which causes the collapse + + var collapse = function collapse(edgeIndex, nodeMap, remainingEdges) { + if (remainingEdges.length === 0) { + error("Karger-Stein must be run on a connected (sub)graph"); + } + + var edgeInfo = remainingEdges[edgeIndex]; + var sourceIn = edgeInfo[1]; + var targetIn = edgeInfo[2]; + var partition1 = nodeMap[sourceIn]; + var partition2 = nodeMap[targetIn]; + var newEdges = remainingEdges; // re-use array + // Delete all edges between partition1 and partition2 + + for (var i = newEdges.length - 1; i >= 0; i--) { + var edge = newEdges[i]; + var src = edge[1]; + var tgt = edge[2]; + + if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { + newEdges.splice(i, 1); + } + } // All edges pointing to partition2 should now point to partition1 + + + for (var _i = 0; _i < newEdges.length; _i++) { + var _edge = newEdges[_i]; + + if (_edge[1] === partition2) { + // Check source + newEdges[_i] = _edge.slice(); // copy + + newEdges[_i][1] = partition1; + } else if (_edge[2] === partition2) { + // Check target + newEdges[_i] = _edge.slice(); // copy + + newEdges[_i][2] = partition1; + } + } // Move all nodes from partition2 to partition1 + + + for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { + if (nodeMap[_i2] === partition2) { + nodeMap[_i2] = partition1; + } + } + + return newEdges; + }; // Contracts a graph until we reach a certain number of meta nodes + + + var contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) { + while (size > sizeLimit) { + // Choose an edge randomly + var edgeIndex = Math.floor(Math.random() * remainingEdges.length); // Collapse graph based on edge + + remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); + size--; + } + + return remainingEdges; + }; + + var elesfn$p = { + // Computes the minimum cut of an undirected graph + // Returns the correct answer with high probability + kargerStein: function kargerStein() { + var _this = this; + + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + edges.unmergeBy(function (edge) { + return edge.isLoop(); + }); + var numNodes = nodes.length; + var numEdges = edges.length; + var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); + var stopSize = Math.floor(numNodes / sqrt2); + + if (numNodes < 2) { + error('At least 2 nodes are required for Karger-Stein algorithm'); + return undefined; + } // Now store edge destination as indexes + // Format for each edge (edge index, source node index, target node index) + + + var edgeIndexes = []; + + for (var i = 0; i < numEdges; i++) { + var e = edges[i]; + edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]); + } // We will store the best cut found here + + + var minCutSize = Infinity; + var minCutEdgeIndexes = []; + var minCutNodeMap = new Array(numNodes); // Initial meta node partition + + var metaNodeMap = new Array(numNodes); + var metaNodeMap2 = new Array(numNodes); + + var copyNodesMap = function copyNodesMap(from, to) { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + to[_i3] = from[_i3]; + } + }; // Main loop + + + for (var iter = 0; iter <= numIter; iter++) { + // Reset meta node partition + for (var _i4 = 0; _i4 < numNodes; _i4++) { + metaNodeMap[_i4] = _i4; + } // Contract until stop point (stopSize nodes) + + + var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); + var edgesState2 = edgesState.slice(); // copy + // Create a copy of the colapsed nodes state + + copyNodesMap(metaNodeMap, metaNodeMap2); // Run 2 iterations starting in the stop state + + var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); + var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); // Is any of the 2 results the best cut so far? + + if (res1.length <= res2.length && res1.length < minCutSize) { + minCutSize = res1.length; + minCutEdgeIndexes = res1; + copyNodesMap(metaNodeMap, minCutNodeMap); + } else if (res2.length <= res1.length && res2.length < minCutSize) { + minCutSize = res2.length; + minCutEdgeIndexes = res2; + copyNodesMap(metaNodeMap2, minCutNodeMap); + } + } // end of main loop + // Construct result + + + var cut = this.spawn(minCutEdgeIndexes.map(function (e) { + return edges[e[0]]; + })); + var partition1 = this.spawn(); + var partition2 = this.spawn(); // traverse metaNodeMap for best cut + + var witnessNodePartition = minCutNodeMap[0]; + + for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { + var partitionId = minCutNodeMap[_i5]; + var node = nodes[_i5]; + + if (partitionId === witnessNodePartition) { + partition1.merge(node); + } else { + partition2.merge(node); + } + } // construct components corresponding to each disjoint subset of nodes + + + var constructComponent = function constructComponent(subset) { + var component = _this.spawn(); + + subset.forEach(function (node) { + component.merge(node); + node.connectedEdges().forEach(function (edge) { + // ensure edge is within calling collection and edge is not in cut + if (_this.contains(edge) && !cut.contains(edge)) { + component.merge(edge); + } + }); + }); + return component; + }; + + var components = [constructComponent(partition1), constructComponent(partition2)]; + var ret = { + cut: cut, + components: components, + // n.b. partitions are included to be compatible with the old api spec + // (could be removed in a future major version) + partition1: partition1, + partition2: partition2 + }; + return ret; + } + }; // elesfn + + var copyPosition = function copyPosition(p) { + return { + x: p.x, + y: p.y + }; + }; + var modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) { + return { + x: p.x * zoom + pan.x, + y: p.y * zoom + pan.y + }; + }; + var renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) { + return { + x: (p.x - pan.x) / zoom, + y: (p.y - pan.y) / zoom + }; + }; + var array2point = function array2point(arr) { + return { + x: arr[0], + y: arr[1] + }; + }; + var min = function min(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var min = Infinity; + + for (var i = begin; i < end; i++) { + var val = arr[i]; + + if (isFinite(val)) { + min = Math.min(val, min); + } + } + + return min; + }; + var max = function max(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var max = -Infinity; + + for (var i = begin; i < end; i++) { + var val = arr[i]; + + if (isFinite(val)) { + max = Math.max(val, max); + } + } + + return max; + }; + var mean = function mean(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var total = 0; + var n = 0; + + for (var i = begin; i < end; i++) { + var val = arr[i]; + + if (isFinite(val)) { + total += val; + n++; + } + } + + return total / n; + }; + var median = function median(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + + if (copy) { + arr = arr.slice(begin, end); + } else { + if (end < arr.length) { + arr.splice(end, arr.length - end); + } + + if (begin > 0) { + arr.splice(0, begin); + } + } // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start + + + var off = 0; // offset from non-finite values + + for (var i = arr.length - 1; i >= 0; i--) { + var v = arr[i]; + + if (includeHoles) { + if (!isFinite(v)) { + arr[i] = -Infinity; + off++; + } + } else { + // just remove it if we don't want to consider holes + arr.splice(i, 1); + } + } + + if (sort) { + arr.sort(function (a, b) { + return a - b; + }); // requires copy = true if you don't want to change the orig + } + + var len = arr.length; + var mid = Math.floor(len / 2); + + if (len % 2 !== 0) { + return arr[mid + 1 + off]; + } else { + return (arr[mid - 1 + off] + arr[mid + off]) / 2; + } + }; + var deg2rad = function deg2rad(deg) { + return Math.PI * deg / 180; + }; + var getAngleFromDisp = function getAngleFromDisp(dispX, dispY) { + return Math.atan2(dispY, dispX) - Math.PI / 2; + }; + var log2 = Math.log2 || function (n) { + return Math.log(n) / Math.log(2); + }; + var signum = function signum(x) { + if (x > 0) { + return 1; + } else if (x < 0) { + return -1; + } else { + return 0; + } + }; + var dist = function dist(p1, p2) { + return Math.sqrt(sqdist(p1, p2)); + }; + var sqdist = function sqdist(p1, p2) { + var dx = p2.x - p1.x; + var dy = p2.y - p1.y; + return dx * dx + dy * dy; + }; + var inPlaceSumNormalize = function inPlaceSumNormalize(v) { + var length = v.length; // First, get sum of all elements + + var total = 0; + + for (var i = 0; i < length; i++) { + total += v[i]; + } // Now, divide each by the sum of all elements + + + for (var _i = 0; _i < length; _i++) { + v[_i] = v[_i] / total; + } + + return v; + }; + + var qbezierAt = function qbezierAt(p0, p1, p2, t) { + return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; + }; + var qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) { + return { + x: qbezierAt(p0.x, p1.x, p2.x, t), + y: qbezierAt(p0.y, p1.y, p2.y, t) + }; + }; + var lineAt = function lineAt(p0, p1, t, d) { + var vec = { + x: p1.x - p0.x, + y: p1.y - p0.y + }; + var vecDist = dist(p0, p1); + var normVec = { + x: vec.x / vecDist, + y: vec.y / vecDist + }; + t = t == null ? 0 : t; + d = d != null ? d : t * vecDist; + return { + x: p0.x + normVec.x * d, + y: p0.y + normVec.y * d + }; + }; + var bound = function bound(min, val, max) { + return Math.max(min, Math.min(max, val)); + }; // makes a full bb (x1, y1, x2, y2, w, h) from implicit params + + var makeBoundingBox = function makeBoundingBox(bb) { + if (bb == null) { + return { + x1: Infinity, + y1: Infinity, + x2: -Infinity, + y2: -Infinity, + w: 0, + h: 0 + }; + } else if (bb.x1 != null && bb.y1 != null) { + if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x2, + y2: bb.y2, + w: bb.x2 - bb.x1, + h: bb.y2 - bb.y1 + }; + } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x1 + bb.w, + y2: bb.y1 + bb.h, + w: bb.w, + h: bb.h + }; + } + } + }; + var copyBoundingBox = function copyBoundingBox(bb) { + return { + x1: bb.x1, + x2: bb.x2, + w: bb.w, + y1: bb.y1, + y2: bb.y2, + h: bb.h + }; + }; + var clearBoundingBox = function clearBoundingBox(bb) { + bb.x1 = Infinity; + bb.y1 = Infinity; + bb.x2 = -Infinity; + bb.y2 = -Infinity; + bb.w = 0; + bb.h = 0; + }; + var updateBoundingBox = function updateBoundingBox(bb1, bb2) { + // update bb1 with bb2 bounds + bb1.x1 = Math.min(bb1.x1, bb2.x1); + bb1.x2 = Math.max(bb1.x2, bb2.x2); + bb1.w = bb1.x2 - bb1.x1; + bb1.y1 = Math.min(bb1.y1, bb2.y1); + bb1.y2 = Math.max(bb1.y2, bb2.y2); + bb1.h = bb1.y2 - bb1.y1; + }; + var expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) { + bb.x1 = Math.min(bb.x1, x); + bb.x2 = Math.max(bb.x2, x); + bb.w = bb.x2 - bb.x1; + bb.y1 = Math.min(bb.y1, y); + bb.y2 = Math.max(bb.y2, y); + bb.h = bb.y2 - bb.y1; + }; + var expandBoundingBox = function expandBoundingBox(bb) { + var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + bb.x1 -= padding; + bb.x2 += padding; + bb.y1 -= padding; + bb.y2 += padding; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + var expandBoundingBoxSides = function expandBoundingBoxSides(bb) { + var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0]; + var top, right, bottom, left; + + if (padding.length === 1) { + top = right = bottom = left = padding[0]; + } else if (padding.length === 2) { + top = bottom = padding[0]; + left = right = padding[1]; + } else if (padding.length === 4) { + var _padding = _slicedToArray(padding, 4); + + top = _padding[0]; + right = _padding[1]; + bottom = _padding[2]; + left = _padding[3]; + } + + bb.x1 -= left; + bb.x2 += right; + bb.y1 -= top; + bb.y2 += bottom; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + + var assignBoundingBox = function assignBoundingBox(bb1, bb2) { + bb1.x1 = bb2.x1; + bb1.y1 = bb2.y1; + bb1.x2 = bb2.x2; + bb1.y2 = bb2.y2; + bb1.w = bb1.x2 - bb1.x1; + bb1.h = bb1.y2 - bb1.y1; + }; + var boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) { + // case: one bb to right of other + if (bb1.x1 > bb2.x2) { + return false; + } + + if (bb2.x1 > bb1.x2) { + return false; + } // case: one bb to left of other + + + if (bb1.x2 < bb2.x1) { + return false; + } + + if (bb2.x2 < bb1.x1) { + return false; + } // case: one bb above other + + + if (bb1.y2 < bb2.y1) { + return false; + } + + if (bb2.y2 < bb1.y1) { + return false; + } // case: one bb below other + + + if (bb1.y1 > bb2.y2) { + return false; + } + + if (bb2.y1 > bb1.y2) { + return false; + } // otherwise, must have some overlap + + + return true; + }; + var inBoundingBox = function inBoundingBox(bb, x, y) { + return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2; + }; + var pointInBoundingBox = function pointInBoundingBox(bb, pt) { + return inBoundingBox(bb, pt.x, pt.y); + }; + var boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) { + return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); + }; + var roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) { + var cornerRadius = getRoundRectangleRadius(width, height); + var halfWidth = width / 2; + var halfHeight = height / 2; // Check intersections with straight line segments + + var straightLineIntersections; // Top segment, left to right + + { + var topStartX = nodeX - halfWidth + cornerRadius - padding; + var topStartY = nodeY - halfHeight - padding; + var topEndX = nodeX + halfWidth - cornerRadius + padding; + var topEndY = topStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } // Right segment, top to bottom + + { + var rightStartX = nodeX + halfWidth + padding; + var rightStartY = nodeY - halfHeight + cornerRadius - padding; + var rightEndX = rightStartX; + var rightEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); + + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } // Bottom segment, left to right + + { + var bottomStartX = nodeX - halfWidth + cornerRadius - padding; + var bottomStartY = nodeY + halfHeight + padding; + var bottomEndX = nodeX + halfWidth - cornerRadius + padding; + var bottomEndY = bottomStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); + + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } // Left segment, top to bottom + + { + var leftStartX = nodeX - halfWidth - padding; + var leftStartY = nodeY - halfHeight + cornerRadius - padding; + var leftEndX = leftStartX; + var leftEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); + + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } // Check intersections with arc segments + + var arcIntersections; // Top Left + + { + var topLeftCenterX = nodeX - halfWidth + cornerRadius; + var topLeftCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle + + if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } // Top Right + + { + var topRightCenterX = nodeX + halfWidth - cornerRadius; + var topRightCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle + + if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } // Bottom Right + + { + var bottomRightCenterX = nodeX + halfWidth - cornerRadius; + var bottomRightCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle + + if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } // Bottom Left + + { + var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; + var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle + + if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + return []; // if nothing + }; + var inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) { + var t = tolerance; + var x1 = Math.min(lx1, lx2); + var x2 = Math.max(lx1, lx2); + var y1 = Math.min(ly1, ly2); + var y2 = Math.max(ly1, ly2); + return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t; + }; + var inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) { + var bb = { + x1: Math.min(x1, x3, x2) - tolerance, + x2: Math.max(x1, x3, x2) + tolerance, + y1: Math.min(y1, y3, y2) - tolerance, + y2: Math.max(y1, y3, y2) + tolerance + }; // if outside the rough bounding box for the bezier, then it can't be a hit + + if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) { + // console.log('bezier out of rough bb') + return false; + } else { + // console.log('do more expensive check'); + return true; + } + }; + var solveQuadratic = function solveQuadratic(a, b, c, val) { + c -= val; + var r = b * b - 4 * a * c; + + if (r < 0) { + return []; + } + + var sqrtR = Math.sqrt(r); + var denom = 2 * a; + var root1 = (-b + sqrtR) / denom; + var root2 = (-b - sqrtR) / denom; + return [root1, root2]; + }; + var solveCubic = function solveCubic(a, b, c, d, result) { + // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where + // r is the real component, i is the imaginary component + // An implementation of the Cardano method from the year 1545 + // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots + var epsilon = 0.00001; // avoid division by zero while keeping the overall expression close in value + + if (a === 0) { + a = epsilon; + } + + b /= a; + c /= a; + d /= a; + var discriminant, q, r, dum1, s, t, term1, r13; + q = (3.0 * c - b * b) / 9.0; + r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b)); + r /= 54.0; + discriminant = q * q * q + r * r; + result[1] = 0; + term1 = b / 3.0; + + if (discriminant > 0) { + s = r + Math.sqrt(discriminant); + s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0); + t = r - Math.sqrt(discriminant); + t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0); + result[0] = -term1 + s + t; + term1 += (s + t) / 2.0; + result[4] = result[2] = -term1; + term1 = Math.sqrt(3.0) * (-t + s) / 2; + result[3] = term1; + result[5] = -term1; + return; + } + + result[5] = result[3] = 0; + + if (discriminant === 0) { + r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0); + result[0] = -term1 + 2.0 * r13; + result[4] = result[2] = -(r13 + term1); + return; + } + + q = -q; + dum1 = q * q * q; + dum1 = Math.acos(r / Math.sqrt(dum1)); + r13 = 2.0 * Math.sqrt(q); + result[0] = -term1 + r13 * Math.cos(dum1 / 3.0); + result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0); + result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0); + return; + }; + var sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) { + // Find minimum distance by using the minimum of the distance + // function between the given point and the curve + // This gives the coefficients of the resulting cubic equation + // whose roots tell us where a possible minimum is + // (Coefficients are divided by 4) + var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3; + var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3; + var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y; + var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y; // debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a); + + var roots = []; // Use the cubic solving algorithm + + solveCubic(a, b, c, d, roots); + var zeroThreshold = 0.0000001; + var params = []; + + for (var index = 0; index < 6; index += 2) { + if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) { + params.push(roots[index]); + } + } + + params.push(1.0); + params.push(0.0); + var minDistanceSquared = -1; + var curX, curY, distSquared; + + for (var i = 0; i < params.length; i++) { + curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3; + curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3; + distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2); // debug('distance for param ' + params[i] + ": " + Math.sqrt(distSquared)); + + if (minDistanceSquared >= 0) { + if (distSquared < minDistanceSquared) { + minDistanceSquared = distSquared; + } + } else { + minDistanceSquared = distSquared; + } + } + + return minDistanceSquared; + }; + var sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) { + var offset = [x - x1, y - y1]; + var line = [x2 - x1, y2 - y1]; + var lineSq = line[0] * line[0] + line[1] * line[1]; + var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; + var dotProduct = offset[0] * line[0] + offset[1] * line[1]; + var adjSq = dotProduct * dotProduct / lineSq; + + if (dotProduct < 0) { + return hypSq; + } + + if (adjSq > lineSq) { + return (x - x2) * (x - x2) + (y - y2) * (y - y2); + } + + return hypSq - adjSq; + }; + var pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) { + var x1, y1, x2, y2; + var y3; // Intersect with vertical line through (x, y) + + var up = 0; // let down = 0; + + for (var i = 0; i < points.length / 2; i++) { + x1 = points[i * 2]; + y1 = points[i * 2 + 1]; + + if (i + 1 < points.length / 2) { + x2 = points[(i + 1) * 2]; + y2 = points[(i + 1) * 2 + 1]; + } else { + x2 = points[(i + 1 - points.length / 2) * 2]; + y2 = points[(i + 1 - points.length / 2) * 2 + 1]; + } + + if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) { + y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1; + + if (y3 > y) { + up++; + } // if( y3 < y ){ + // down++; + // } + + } else { + continue; + } + } + + if (up % 2 === 0) { + return false; + } else { + return true; + } + }; + var pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) { + var transformedPoints = new Array(basePoints.length); // Gives negative angle + + var angle; + + if (direction[0] != null) { + angle = Math.atan(direction[1] / direction[0]); + + if (direction[0] < 0) { + angle = angle + Math.PI / 2; + } else { + angle = -angle - Math.PI / 2; + } + } else { + angle = direction; + } + + var cos = Math.cos(-angle); + var sin = Math.sin(-angle); // console.log("base: " + basePoints); + + for (var i = 0; i < transformedPoints.length / 2; i++) { + transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin); + transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin); + transformedPoints[i * 2] += centerX; + transformedPoints[i * 2 + 1] += centerY; + } + + var points; + + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + + return pointInsidePolygonPoints(x, y, points); + }; + var pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height) { + var cutPolygonPoints = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + var squaredCornerRadius = cornerRadius * cornerRadius; + + for (var i = 0; i < basePoints.length / 4; i++) { + var sourceUv = void 0, + destUv = void 0; + + if (i === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i * 4 - 2; + } + + destUv = i * 4 + 2; + var px = centerX + halfW * basePoints[i * 4]; + var py = centerY + halfH * basePoints[i * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + cutPolygonPoints[i * 4] = cp0x; + cutPolygonPoints[i * 4 + 1] = cp0y; + cutPolygonPoints[i * 4 + 2] = cp1x; + cutPolygonPoints[i * 4 + 3] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + var squaredDistance = Math.pow(cx - x, 2) + Math.pow(cy - y, 2); + + if (squaredDistance <= squaredCornerRadius) { + return true; + } + } + + return pointInsidePolygonPoints(x, y, cutPolygonPoints); + }; + var joinLines = function joinLines(lineSet) { + var vertices = new Array(lineSet.length / 2); + var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; + var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; + + for (var i = 0; i < lineSet.length / 4; i++) { + currentLineStartX = lineSet[i * 4]; + currentLineStartY = lineSet[i * 4 + 1]; + currentLineEndX = lineSet[i * 4 + 2]; + currentLineEndY = lineSet[i * 4 + 3]; + + if (i < lineSet.length / 4 - 1) { + nextLineStartX = lineSet[(i + 1) * 4]; + nextLineStartY = lineSet[(i + 1) * 4 + 1]; + nextLineEndX = lineSet[(i + 1) * 4 + 2]; + nextLineEndY = lineSet[(i + 1) * 4 + 3]; + } else { + nextLineStartX = lineSet[0]; + nextLineStartY = lineSet[1]; + nextLineEndX = lineSet[2]; + nextLineEndY = lineSet[3]; + } + + var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); + vertices[i * 2] = intersection[0]; + vertices[i * 2 + 1] = intersection[1]; + } + + return vertices; + }; + var expandPolygon = function expandPolygon(points, pad) { + var expandedLineSet = new Array(points.length * 2); + var currentPointX, currentPointY, nextPointX, nextPointY; + + for (var i = 0; i < points.length / 2; i++) { + currentPointX = points[i * 2]; + currentPointY = points[i * 2 + 1]; + + if (i < points.length / 2 - 1) { + nextPointX = points[(i + 1) * 2]; + nextPointY = points[(i + 1) * 2 + 1]; + } else { + nextPointX = points[0]; + nextPointY = points[1]; + } // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY] + // Assume CCW polygon winding + + + var offsetX = nextPointY - currentPointY; + var offsetY = -(nextPointX - currentPointX); // Normalize + + var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); + var normalizedOffsetX = offsetX / offsetLength; + var normalizedOffsetY = offsetY / offsetLength; + expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad; + expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad; + expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad; + expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad; + } + + return expandedLineSet; + }; + var intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) { + var dispX = centerX - x; + var dispY = centerY - y; + dispX /= ellipseWradius; + dispY /= ellipseHradius; + var len = Math.sqrt(dispX * dispX + dispY * dispY); + var newLength = len - 1; + + if (newLength < 0) { + return []; + } + + var lenProportion = newLength / len; + return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y]; + }; + var checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) { + x -= centerX; + y -= centerY; + x /= width / 2 + padding; + y /= height / 2 + padding; + return x * x + y * y <= 1; + }; // Returns intersections of increasing distance from line's start point + + var intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) { + // Calculate d, direction vector of line + var d = [x2 - x1, y2 - y1]; // Direction vector of line + + var f = [x1 - centerX, y1 - centerY]; + var a = d[0] * d[0] + d[1] * d[1]; + var b = 2 * (f[0] * d[0] + f[1] * d[1]); + var c = f[0] * f[0] + f[1] * f[1] - radius * radius; + var discriminant = b * b - 4 * a * c; + + if (discriminant < 0) { + return []; + } + + var t1 = (-b + Math.sqrt(discriminant)) / (2 * a); + var t2 = (-b - Math.sqrt(discriminant)) / (2 * a); + var tMin = Math.min(t1, t2); + var tMax = Math.max(t1, t2); + var inRangeParams = []; + + if (tMin >= 0 && tMin <= 1) { + inRangeParams.push(tMin); + } + + if (tMax >= 0 && tMax <= 1) { + inRangeParams.push(tMax); + } + + if (inRangeParams.length === 0) { + return []; + } + + var nearIntersectionX = inRangeParams[0] * d[0] + x1; + var nearIntersectionY = inRangeParams[0] * d[1] + y1; + + if (inRangeParams.length > 1) { + if (inRangeParams[0] == inRangeParams[1]) { + return [nearIntersectionX, nearIntersectionY]; + } else { + var farIntersectionX = inRangeParams[1] * d[0] + x1; + var farIntersectionY = inRangeParams[1] * d[1] + y1; + return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; + } + } else { + return [nearIntersectionX, nearIntersectionY]; + } + }; + var midOfThree = function midOfThree(a, b, c) { + if (b <= a && a <= c || c <= a && a <= b) { + return a; + } else if (a <= b && b <= c || c <= b && b <= a) { + return b; + } else { + return c; + } + }; // (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4) + + var finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { + var dx13 = x1 - x3; + var dx21 = x2 - x1; + var dx43 = x4 - x3; + var dy13 = y1 - y3; + var dy21 = y2 - y1; + var dy43 = y4 - y3; + var ua_t = dx43 * dy13 - dy43 * dx13; + var ub_t = dx21 * dy13 - dy21 * dx13; + var u_b = dy43 * dx21 - dx43 * dy21; + + if (u_b !== 0) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + var flptThreshold = 0.001; + + var _min = 0 - flptThreshold; + + var _max = 1 + flptThreshold; + + if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { + return [x1 + ua * dx21, y1 + ua * dy21]; + } else { + if (!infiniteLines) { + return []; + } else { + return [x1 + ua * dx21, y1 + ua * dy21]; + } + } + } else { + if (ua_t === 0 || ub_t === 0) { + // Parallel, coincident lines. Check if overlap + // Check endpoint of second line + if (midOfThree(x1, x2, x4) === x4) { + return [x4, y4]; + } // Check start point of second line + + + if (midOfThree(x1, x2, x3) === x3) { + return [x3, y3]; + } // Endpoint of first line + + + if (midOfThree(x3, x4, x2) === x2) { + return [x2, y2]; + } + + return []; + } else { + // Parallel, non-coincident + return []; + } + } + }; // math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding ) + // intersect a node polygon (pts transformed) + // + // math.polygonIntersectLine( x, y, basePoints, centerX, centerY ) + // intersect the points (no transform) + + var polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var transformedPoints = new Array(basePoints.length); + var doTransform = true; + + if (width == null) { + doTransform = false; + } + + var points; + + if (doTransform) { + for (var i = 0; i < transformedPoints.length / 2; i++) { + transformedPoints[i * 2] = basePoints[i * 2] * width + centerX; + transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY; + } + + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + } else { + points = basePoints; + } + + var currentX, currentY, nextX, nextY; + + for (var _i2 = 0; _i2 < points.length / 2; _i2++) { + currentX = points[_i2 * 2]; + currentY = points[_i2 * 2 + 1]; + + if (_i2 < points.length / 2 - 1) { + nextX = points[(_i2 + 1) * 2]; + nextY = points[(_i2 + 1) * 2 + 1]; + } else { + nextX = points[0]; + nextY = points[1]; + } + + intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY); + + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + + return intersections; + }; + var roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var lines = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + + for (var i = 0; i < basePoints.length / 4; i++) { + var sourceUv = void 0, + destUv = void 0; + + if (i === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i * 4 - 2; + } + + destUv = i * 4 + 2; + var px = centerX + halfW * basePoints[i * 4]; + var py = centerY + halfH * basePoints[i * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + + if (i === 0) { + lines[basePoints.length - 2] = cp0x; + lines[basePoints.length - 1] = cp0y; + } else { + lines[i * 4 - 2] = cp0x; + lines[i * 4 - 1] = cp0y; + } + + lines[i * 4] = cp1x; + lines[i * 4 + 1] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + intersection = intersectLineCircle(x, y, centerX, centerY, cx, cy, cornerRadius); + + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + + for (var _i3 = 0; _i3 < lines.length / 4; _i3++) { + intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[_i3 * 4], lines[_i3 * 4 + 1], lines[_i3 * 4 + 2], lines[_i3 * 4 + 3], false); + + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + + if (intersections.length > 2) { + var lowestIntersection = [intersections[0], intersections[1]]; + var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2); + + for (var _i4 = 1; _i4 < intersections.length / 2; _i4++) { + var squaredDistance = Math.pow(intersections[_i4 * 2] - x, 2) + Math.pow(intersections[_i4 * 2 + 1] - y, 2); + + if (squaredDistance <= lowestSquaredDistance) { + lowestIntersection[0] = intersections[_i4 * 2]; + lowestIntersection[1] = intersections[_i4 * 2 + 1]; + lowestSquaredDistance = squaredDistance; + } + } + + return lowestIntersection; + } + + return intersections; + }; + var shortenIntersection = function shortenIntersection(intersection, offset, amount) { + var disp = [intersection[0] - offset[0], intersection[1] - offset[1]]; + var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); + var lenRatio = (length - amount) / length; + + if (lenRatio < 0) { + lenRatio = 0.00001; + } + + return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; + }; + var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) { + var points = generateUnitNgonPoints(sides, rotationRadians); + points = fitPolygonToSquare(points); + return points; + }; + var fitPolygonToSquare = function fitPolygonToSquare(points) { + var x, y; + var sides = points.length / 2; + var minX = Infinity, + minY = Infinity, + maxX = -Infinity, + maxY = -Infinity; + + for (var i = 0; i < sides; i++) { + x = points[2 * i]; + y = points[2 * i + 1]; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } // stretch factors + + + var sx = 2 / (maxX - minX); + var sy = 2 / (maxY - minY); + + for (var _i5 = 0; _i5 < sides; _i5++) { + x = points[2 * _i5] = points[2 * _i5] * sx; + y = points[2 * _i5 + 1] = points[2 * _i5 + 1] * sy; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + + if (minY < -1) { + for (var _i6 = 0; _i6 < sides; _i6++) { + y = points[2 * _i6 + 1] = points[2 * _i6 + 1] + (-1 - minY); + } + } + + return points; + }; + var generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) { + var increment = 1.0 / sides * 2 * Math.PI; + var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0; + startAngle += rotationRadians; + var points = new Array(sides * 2); + var currentAngle; + + for (var i = 0; i < sides; i++) { + currentAngle = i * increment + startAngle; + points[2 * i] = Math.cos(currentAngle); // x + + points[2 * i + 1] = Math.sin(-currentAngle); // y + } + + return points; + }; // Set the default radius, unless half of width or height is smaller than default + + var getRoundRectangleRadius = function getRoundRectangleRadius(width, height) { + return Math.min(width / 4, height / 4, 8); + }; // Set the default radius + + var getRoundPolygonRadius = function getRoundPolygonRadius(width, height) { + return Math.min(width / 10, height / 10, 8); + }; + var getCutRectangleCornerLength = function getCutRectangleCornerLength() { + return 8; + }; + var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) { + return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; + }; // get curve width, height, and control point position offsets as a percentage of node height / width + + var getBarrelCurveConstants = function getBarrelCurveConstants(width, height) { + return { + heightOffset: Math.min(15, 0.05 * height), + widthOffset: Math.min(100, 0.25 * width), + ctrlPtOffsetPct: 0.05 + }; + }; + + var pageRankDefaults = defaults$g({ + dampingFactor: 0.8, + precision: 0.000001, + iterations: 200, + weight: function weight(edge) { + return 1; + } + }); + var elesfn$o = { + pageRank: function pageRank(options) { + var _pageRankDefaults = pageRankDefaults(options), + dampingFactor = _pageRankDefaults.dampingFactor, + precision = _pageRankDefaults.precision, + iterations = _pageRankDefaults.iterations, + weight = _pageRankDefaults.weight; + + var cy = this._private.cy; + + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + var numNodes = nodes.length; + var numNodesSqd = numNodes * numNodes; + var numEdges = edges.length; // Construct transposed adjacency matrix + // First lets have a zeroed matrix of the right size + // We'll also keep track of the sum of each column + + var matrix = new Array(numNodesSqd); + var columnSum = new Array(numNodes); + var additionalProb = (1 - dampingFactor) / numNodes; // Create null matrix + + for (var i = 0; i < numNodes; i++) { + for (var j = 0; j < numNodes; j++) { + var n = i * numNodes + j; + matrix[n] = 0; + } + + columnSum[i] = 0; + } // Now, process edges + + + for (var _i = 0; _i < numEdges; _i++) { + var edge = edges[_i]; + var srcId = edge.data('source'); + var tgtId = edge.data('target'); // Don't include loops in the matrix + + if (srcId === tgtId) { + continue; + } + + var s = nodes.indexOfId(srcId); + var t = nodes.indexOfId(tgtId); + var w = weight(edge); + + var _n = t * numNodes + s; // Update matrix + + + matrix[_n] += w; // Update column sum + + columnSum[s] += w; + } // Add additional probability based on damping factor + // Also, take into account columns that have sum = 0 + + + var p = 1.0 / numNodes + additionalProb; // Shorthand + // Traverse matrix, column by column + + for (var _j = 0; _j < numNodes; _j++) { + if (columnSum[_j] === 0) { + // No 'links' out from node jth, assume equal probability for each possible node + for (var _i2 = 0; _i2 < numNodes; _i2++) { + var _n2 = _i2 * numNodes + _j; + + matrix[_n2] = p; + } + } else { + // Node jth has outgoing link, compute normalized probabilities + for (var _i3 = 0; _i3 < numNodes; _i3++) { + var _n3 = _i3 * numNodes + _j; + + matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; + } + } + } // Compute dominant eigenvector using power method + + + var eigenvector = new Array(numNodes); + var temp = new Array(numNodes); + var previous; // Start with a vector of all 1's + // Also, initialize a null vector which will be used as shorthand + + for (var _i4 = 0; _i4 < numNodes; _i4++) { + eigenvector[_i4] = 1; + } + + for (var iter = 0; iter < iterations; iter++) { + // Temp array with all 0's + for (var _i5 = 0; _i5 < numNodes; _i5++) { + temp[_i5] = 0; + } // Multiply matrix with previous result + + + for (var _i6 = 0; _i6 < numNodes; _i6++) { + for (var _j2 = 0; _j2 < numNodes; _j2++) { + var _n4 = _i6 * numNodes + _j2; + + temp[_i6] += matrix[_n4] * eigenvector[_j2]; + } + } + + inPlaceSumNormalize(temp); + previous = eigenvector; + eigenvector = temp; + temp = previous; + var diff = 0; // Compute difference (squared module) of both vectors + + for (var _i7 = 0; _i7 < numNodes; _i7++) { + var delta = previous[_i7] - eigenvector[_i7]; + diff += delta * delta; + } // If difference is less than the desired threshold, stop iterating + + + if (diff < precision) { + break; + } + } // Construct result + + + var res = { + rank: function rank(node) { + node = cy.collection(node)[0]; + return eigenvector[nodes.indexOf(node)]; + } + }; + return res; + } // pageRank + + }; // elesfn + + var defaults$f = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false, + alpha: 0 + }); + var elesfn$n = { + degreeCentralityNormalized: function degreeCentralityNormalized(options) { + options = defaults$f(options); + var cy = this.cy(); + var nodes = this.nodes(); + var numNodes = nodes.length; + + if (!options.directed) { + var degrees = {}; + var maxDegree = 0; + + for (var i = 0; i < numNodes; i++) { + var node = nodes[i]; // add current node to the current options object and call degreeCentrality + + options.root = node; + var currDegree = this.degreeCentrality(options); + + if (maxDegree < currDegree.degree) { + maxDegree = currDegree.degree; + } + + degrees[node.id()] = currDegree.degree; + } + + return { + degree: function degree(node) { + if (maxDegree === 0) { + return 0; + } + + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + + return degrees[node.id()] / maxDegree; + } + }; + } else { + var indegrees = {}; + var outdegrees = {}; + var maxIndegree = 0; + var maxOutdegree = 0; + + for (var _i = 0; _i < numNodes; _i++) { + var _node = nodes[_i]; + + var id = _node.id(); // add current node to the current options object and call degreeCentrality + + + options.root = _node; + + var _currDegree = this.degreeCentrality(options); + + if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree; + if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree; + indegrees[id] = _currDegree.indegree; + outdegrees[id] = _currDegree.outdegree; + } + + return { + indegree: function indegree(node) { + if (maxIndegree == 0) { + return 0; + } + + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + + return indegrees[node.id()] / maxIndegree; + }, + outdegree: function outdegree(node) { + if (maxOutdegree === 0) { + return 0; + } + + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + + return outdegrees[node.id()] / maxOutdegree; + } + }; + } + }, + // degreeCentralityNormalized + // Implemented from the algorithm in Opsahl's paper + // "Node centrality in weighted networks: Generalizing degree and shortest paths" + // check the heading 2 "Degree" + degreeCentrality: function degreeCentrality(options) { + options = defaults$f(options); + var cy = this.cy(); + var callingEles = this; + var _options = options, + root = _options.root, + weight = _options.weight, + directed = _options.directed, + alpha = _options.alpha; + root = cy.collection(root)[0]; + + if (!directed) { + var connEdges = root.connectedEdges().intersection(callingEles); + var k = connEdges.length; + var s = 0; // Now, sum edge weights + + for (var i = 0; i < connEdges.length; i++) { + s += weight(connEdges[i]); + } + + return { + degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) + }; + } else { + var edges = root.connectedEdges(); + var incoming = edges.filter(function (edge) { + return edge.target().same(root) && callingEles.has(edge); + }); + var outgoing = edges.filter(function (edge) { + return edge.source().same(root) && callingEles.has(edge); + }); + var k_in = incoming.length; + var k_out = outgoing.length; + var s_in = 0; + var s_out = 0; // Now, sum incoming edge weights + + for (var _i2 = 0; _i2 < incoming.length; _i2++) { + s_in += weight(incoming[_i2]); + } // Now, sum outgoing edge weights + + + for (var _i3 = 0; _i3 < outgoing.length; _i3++) { + s_out += weight(outgoing[_i3]); + } + + return { + indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), + outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) + }; + } + } // degreeCentrality + + }; // elesfn + // nice, short mathematical alias + + elesfn$n.dc = elesfn$n.degreeCentrality; + elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; + + var defaults$e = defaults$g({ + harmonic: true, + weight: function weight() { + return 1; + }, + directed: false, + root: null + }); + var elesfn$m = { + closenessCentralityNormalized: function closenessCentralityNormalized(options) { + var _defaults = defaults$e(options), + harmonic = _defaults.harmonic, + weight = _defaults.weight, + directed = _defaults.directed; + + var cy = this.cy(); + var closenesses = {}; + var maxCloseness = 0; + var nodes = this.nodes(); + var fw = this.floydWarshall({ + weight: weight, + directed: directed + }); // Compute closeness for every node and find the maximum closeness + + for (var i = 0; i < nodes.length; i++) { + var currCloseness = 0; + var node_i = nodes[i]; + + for (var j = 0; j < nodes.length; j++) { + if (i !== j) { + var d = fw.distance(node_i, nodes[j]); + + if (harmonic) { + currCloseness += 1 / d; + } else { + currCloseness += d; + } + } + } + + if (!harmonic) { + currCloseness = 1 / currCloseness; + } + + if (maxCloseness < currCloseness) { + maxCloseness = currCloseness; + } + + closenesses[node_i.id()] = currCloseness; + } + + return { + closeness: function closeness(node) { + if (maxCloseness == 0) { + return 0; + } + + if (string(node)) { + // from is a selector string + node = cy.filter(node)[0].id(); + } else { + // from is a node + node = node.id(); + } + + return closenesses[node] / maxCloseness; + } + }; + }, + // Implemented from pseudocode from wikipedia + closenessCentrality: function closenessCentrality(options) { + var _defaults2 = defaults$e(options), + root = _defaults2.root, + weight = _defaults2.weight, + directed = _defaults2.directed, + harmonic = _defaults2.harmonic; + + root = this.filter(root)[0]; // we need distance from this node to every other node + + var dijkstra = this.dijkstra({ + root: root, + weight: weight, + directed: directed + }); + var totalDistance = 0; + var nodes = this.nodes(); + + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + + if (!n.same(root)) { + var d = dijkstra.distanceTo(n); + + if (harmonic) { + totalDistance += 1 / d; + } else { + totalDistance += d; + } + } + } + + return harmonic ? totalDistance : 1 / totalDistance; + } // closenessCentrality + + }; // elesfn + // nice, short mathematical alias + + elesfn$m.cc = elesfn$m.closenessCentrality; + elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; + + var defaults$d = defaults$g({ + weight: null, + directed: false + }); + var elesfn$l = { + // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes + betweennessCentrality: function betweennessCentrality(options) { + var _defaults = defaults$d(options), + directed = _defaults.directed, + weight = _defaults.weight; + + var weighted = weight != null; + var cy = this.cy(); // starting + + var V = this.nodes(); + var A = {}; + var _C = {}; + var max = 0; + var C = { + set: function set(key, val) { + _C[key] = val; + + if (val > max) { + max = val; + } + }, + get: function get(key) { + return _C[key]; + } + }; // A contains the neighborhoods of every node + + for (var i = 0; i < V.length; i++) { + var v = V[i]; + var vid = v.id(); + + if (directed) { + A[vid] = v.outgoers().nodes(); // get outgoers of every node + } else { + A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node + } + + C.set(vid, 0); + } + + var _loop = function _loop(s) { + var sid = V[s].id(); + var S = []; // stack + + var P = {}; + var g = {}; + var d = {}; + var Q = new heap(function (a, b) { + return d[a] - d[b]; + }); // queue + // init dictionaries + + for (var _i = 0; _i < V.length; _i++) { + var _vid = V[_i].id(); + + P[_vid] = []; + g[_vid] = 0; + d[_vid] = Infinity; + } + + g[sid] = 1; // sigma + + d[sid] = 0; // distance to s + + Q.push(sid); + + while (!Q.empty()) { + var _v = Q.pop(); + + S.push(_v); + + if (weighted) { + for (var j = 0; j < A[_v].length; j++) { + var w = A[_v][j]; + var vEle = cy.getElementById(_v); + var edge = void 0; + + if (vEle.edgesTo(w).length > 0) { + edge = vEle.edgesTo(w)[0]; + } else { + edge = w.edgesTo(vEle)[0]; + } + + var edgeWeight = weight(edge); + w = w.id(); + + if (d[w] > d[_v] + edgeWeight) { + d[w] = d[_v] + edgeWeight; + + if (Q.nodes.indexOf(w) < 0) { + //if w is not in Q + Q.push(w); + } else { + // update position if w is in Q + Q.updateItem(w); + } + + g[w] = 0; + P[w] = []; + } + + if (d[w] == d[_v] + edgeWeight) { + g[w] = g[w] + g[_v]; + P[w].push(_v); + } + } + } else { + for (var _j = 0; _j < A[_v].length; _j++) { + var _w = A[_v][_j].id(); + + if (d[_w] == Infinity) { + Q.push(_w); + d[_w] = d[_v] + 1; + } + + if (d[_w] == d[_v] + 1) { + g[_w] = g[_w] + g[_v]; + + P[_w].push(_v); + } + } + } + } + + var e = {}; + + for (var _i2 = 0; _i2 < V.length; _i2++) { + e[V[_i2].id()] = 0; + } + + while (S.length > 0) { + var _w2 = S.pop(); + + for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { + var _v2 = P[_w2][_j2]; + e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); + } + + if (_w2 != V[s].id()) { + C.set(_w2, C.get(_w2) + e[_w2]); + } + } + }; + + for (var s = 0; s < V.length; s++) { + _loop(s); + } + + var ret = { + betweenness: function betweenness(node) { + var id = cy.collection(node).id(); + return C.get(id); + }, + betweennessNormalized: function betweennessNormalized(node) { + if (max == 0) { + return 0; + } + + var id = cy.collection(node).id(); + return C.get(id) / max; + } + }; // alias + + ret.betweennessNormalised = ret.betweennessNormalized; + return ret; + } // betweennessCentrality + + }; // elesfn + // nice, short mathematical alias + + elesfn$l.bc = elesfn$l.betweennessCentrality; + + // Implemented by Zoe Xi @zoexi for GSOC 2016 + /* eslint-disable no-unused-vars */ + + var defaults$c = defaults$g({ + expandFactor: 2, + // affects time of computation and cluster granularity to some extent: M * M + inflateFactor: 2, + // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) + multFactor: 1, + // optional self loops for each node. Use a neutral value to improve cluster computations. + maxIterations: 20, + // maximum number of iterations of the MCL algorithm in a single run + attributes: [// attributes/features used to group nodes, ie. similarity values between nodes + function (edge) { + return 1; + }] + }); + /* eslint-enable */ + + var setOptions$3 = function setOptions(options) { + return defaults$c(options); + }; + /* eslint-enable */ + + + var getSimilarity$1 = function getSimilarity(edge, attributes) { + var total = 0; + + for (var i = 0; i < attributes.length; i++) { + total += attributes[i](edge); + } + + return total; + }; + + var addLoops = function addLoops(M, n, val) { + for (var i = 0; i < n; i++) { + M[i * n + i] = val; + } + }; + + var normalize = function normalize(M, n) { + var sum; + + for (var col = 0; col < n; col++) { + sum = 0; + + for (var row = 0; row < n; row++) { + sum += M[row * n + col]; + } + + for (var _row = 0; _row < n; _row++) { + M[_row * n + col] = M[_row * n + col] / sum; + } + } + }; // TODO: blocked matrix multiplication? + + + var mmult = function mmult(A, B, n) { + var C = new Array(n * n); + + for (var i = 0; i < n; i++) { + for (var j = 0; j < n; j++) { + C[i * n + j] = 0; + } + + for (var k = 0; k < n; k++) { + for (var _j = 0; _j < n; _j++) { + C[i * n + _j] += A[i * n + k] * B[k * n + _j]; + } + } + } + + return C; + }; + + var expand = function expand(M, n, expandFactor + /** power **/ + ) { + var _M = M.slice(0); + + for (var p = 1; p < expandFactor; p++) { + M = mmult(M, _M, n); + } + + return M; + }; + + var inflate = function inflate(M, n, inflateFactor + /** r **/ + ) { + var _M = new Array(n * n); // M(i,j) ^ inflatePower + + + for (var i = 0; i < n * n; i++) { + _M[i] = Math.pow(M[i], inflateFactor); + } + + normalize(_M, n); + return _M; + }; + + var hasConverged = function hasConverged(M, _M, n2, roundFactor) { + // Check that both matrices have the same elements (i,j) + for (var i = 0; i < n2; i++) { + var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places + + var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + + if (v1 !== v2) { + return false; + } + } + + return true; + }; + + var assign$2 = function assign(M, n, nodes, cy) { + var clusters = []; + + for (var i = 0; i < n; i++) { + var cluster = []; + + for (var j = 0; j < n; j++) { + // Row-wise attractors and elements that they attract belong in same cluster + if (Math.round(M[i * n + j] * 1000) / 1000 > 0) { + cluster.push(nodes[j]); + } + } + + if (cluster.length !== 0) { + clusters.push(cy.collection(cluster)); + } + } + + return clusters; + }; + + var isDuplicate = function isDuplicate(c1, c2) { + for (var i = 0; i < c1.length; i++) { + if (!c2[i] || c1[i].id() !== c2[i].id()) { + return false; + } + } + + return true; + }; + + var removeDuplicates = function removeDuplicates(clusters) { + for (var i = 0; i < clusters.length; i++) { + for (var j = 0; j < clusters.length; j++) { + if (i != j && isDuplicate(clusters[i], clusters[j])) { + clusters.splice(j, 1); + } + } + } + + return clusters; + }; + + var markovClustering = function markovClustering(options) { + var nodes = this.nodes(); + var edges = this.edges(); + var cy = this.cy(); // Set parameters of algorithm: + + var opts = setOptions$3(options); // Map each node to its position in node array + + var id2position = {}; + + for (var i = 0; i < nodes.length; i++) { + id2position[nodes[i].id()] = i; + } // Generate stochastic matrix M from input graph G (should be symmetric/undirected) + + + var n = nodes.length, + n2 = n * n; + + var M = new Array(n2), + _M; + + for (var _i = 0; _i < n2; _i++) { + M[_i] = 0; + } + + for (var e = 0; e < edges.length; e++) { + var edge = edges[e]; + var _i2 = id2position[edge.source().id()]; + var j = id2position[edge.target().id()]; + var sim = getSimilarity$1(edge, opts.attributes); + M[_i2 * n + j] += sim; // G should be symmetric and undirected + + M[j * n + _i2] += sim; + } // Begin Markov cluster algorithm + // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal + + + addLoops(M, n, opts.multFactor); // Step 2: M = normalize( M ); + + normalize(M, n); + var isStillMoving = true; + var iterations = 0; + + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; // Step 3: + + _M = expand(M, n, opts.expandFactor); // Step 4: + + M = inflate(_M, n, opts.inflateFactor); // Step 5: check to see if ~steady state has been reached + + if (!hasConverged(M, _M, n2, 4)) { + isStillMoving = true; + } + + iterations++; + } // Build clusters from matrix + + + var clusters = assign$2(M, n, nodes, cy); // Remove duplicate clusters due to symmetry of graph and M matrix + + clusters = removeDuplicates(clusters); + return clusters; + }; + + var markovClustering$1 = { + markovClustering: markovClustering, + mcl: markovClustering + }; + + // Common distance metrics for clustering algorithms + + var identity = function identity(x) { + return x; + }; + + var absDiff = function absDiff(p, q) { + return Math.abs(q - p); + }; + + var addAbsDiff = function addAbsDiff(total, p, q) { + return total + absDiff(p, q); + }; + + var addSquaredDiff = function addSquaredDiff(total, p, q) { + return total + Math.pow(q - p, 2); + }; + + var sqrt = function sqrt(x) { + return Math.sqrt(x); + }; + + var maxAbsDiff = function maxAbsDiff(currentMax, p, q) { + return Math.max(currentMax, absDiff(p, q)); + }; + + var getDistance = function getDistance(length, getP, getQ, init, visit) { + var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity; + var ret = init; + var p, q; + + for (var dim = 0; dim < length; dim++) { + p = getP(dim); + q = getQ(dim); + ret = visit(ret, p, q); + } + + return post(ret); + }; + + var distances = { + euclidean: function euclidean(length, getP, getQ) { + if (length >= 2) { + return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt); + } else { + // for single attr case, more efficient to avoid sqrt + return getDistance(length, getP, getQ, 0, addAbsDiff); + } + }, + squaredEuclidean: function squaredEuclidean(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addSquaredDiff); + }, + manhattan: function manhattan(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addAbsDiff); + }, + max: function max(length, getP, getQ) { + return getDistance(length, getP, getQ, -Infinity, maxAbsDiff); + } + }; // in case the user accidentally doesn't use camel case + + distances['squared-euclidean'] = distances['squaredEuclidean']; + distances['squaredeuclidean'] = distances['squaredEuclidean']; + function clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) { + var impl; + + if (fn$6(method)) { + impl = method; + } else { + impl = distances[method] || distances.euclidean; + } + + if (length === 0 && fn$6(method)) { + return impl(nodeP, nodeQ); + } else { + return impl(length, getP, getQ, nodeP, nodeQ); + } + } + + var defaults$b = defaults$g({ + k: 2, + m: 2, + sensitivityThreshold: 0.0001, + distance: 'euclidean', + maxIterations: 10, + attributes: [], + testMode: false, + testCentroids: null + }); + + var setOptions$2 = function setOptions(options) { + return defaults$b(options); + }; + /* eslint-enable */ + + + var getDist = function getDist(type, node, centroid, attributes, mode) { + var noNodeP = mode !== 'kMedoids'; + var getP = noNodeP ? function (i) { + return centroid[i]; + } : function (i) { + return attributes[i](centroid); + }; + + var getQ = function getQ(i) { + return attributes[i](node); + }; + + var nodeP = centroid; + var nodeQ = node; + return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ); + }; + + var randomCentroids = function randomCentroids(nodes, k, attributes) { + var ndim = attributes.length; + var min = new Array(ndim); + var max = new Array(ndim); + var centroids = new Array(k); + var centroid = null; // Find min, max values for each attribute dimension + + for (var i = 0; i < ndim; i++) { + min[i] = nodes.min(attributes[i]).value; + max[i] = nodes.max(attributes[i]).value; + } // Build k centroids, each represented as an n-dim feature vector + + + for (var c = 0; c < k; c++) { + centroid = []; + + for (var _i = 0; _i < ndim; _i++) { + centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value + } + + centroids[c] = centroid; + } + + return centroids; + }; + + var classify = function classify(node, centroids, distance, attributes, type) { + var min = Infinity; + var index = 0; + + for (var i = 0; i < centroids.length; i++) { + var dist = getDist(distance, node, centroids[i], attributes, type); + + if (dist < min) { + min = dist; + index = i; + } + } + + return index; + }; + + var buildCluster = function buildCluster(centroid, nodes, assignment) { + var cluster = []; + var node = null; + + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + + if (assignment[node.id()] === centroid) { + //console.log("Node " + node.id() + " is associated with medoid #: " + m); + cluster.push(node); + } + } + + return cluster; + }; + + var haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) { + return Math.abs(v2 - v1) <= sensitivityThreshold; + }; + + var haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) { + for (var i = 0; i < v1.length; i++) { + for (var j = 0; j < v1[i].length; j++) { + var diff = Math.abs(v1[i][j] - v2[i][j]); + + if (diff > sensitivityThreshold) { + return false; + } + } + } + + return true; + }; + + var seenBefore = function seenBefore(node, medoids, n) { + for (var i = 0; i < n; i++) { + if (node === medoids[i]) return true; + } + + return false; + }; + + var randomMedoids = function randomMedoids(nodes, k) { + var medoids = new Array(k); // For small data sets, the probability of medoid conflict is greater, + // so we need to check to see if we've already seen or chose this node before. + + if (nodes.length < 50) { + // Randomly select k medoids from the n nodes + for (var i = 0; i < k; i++) { + var node = nodes[Math.floor(Math.random() * nodes.length)]; // If we've already chosen this node to be a medoid, don't choose it again (for small data sets). + // Instead choose a different random node. + + while (seenBefore(node, medoids, i)) { + node = nodes[Math.floor(Math.random() * nodes.length)]; + } + + medoids[i] = node; + } + } else { + // Relatively large data set, so pretty safe to not check and just select random nodes + for (var _i2 = 0; _i2 < k; _i2++) { + medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)]; + } + } + + return medoids; + }; + + var findCost = function findCost(potentialNewMedoid, cluster, attributes) { + var cost = 0; + + for (var n = 0; n < cluster.length; n++) { + cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids'); + } + + return cost; + }; + + var kMeans = function kMeans(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var node = null; // Set parameters of algorithm: # of clusters, distance metric, etc. + + var opts = setOptions$2(options); // Begin k-means algorithm + + var clusters = new Array(opts.k); + var assignment = {}; + var centroids; // Step 1: Initialize centroid positions + + if (opts.testMode) { + if (typeof opts.testCentroids === 'number') { + // TODO: implement a seeded random number generator. + opts.testCentroids; + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } else if (_typeof(opts.testCentroids) === 'object') { + centroids = opts.testCentroids; + } else { + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } + } else { + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } + + var isStillMoving = true; + var iterations = 0; + + while (isStillMoving && iterations < opts.maxIterations) { + // Step 2: Assign nodes to the nearest centroid + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; // Determine which cluster this node belongs to: node id => cluster # + + assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans'); + } // Step 3: For each of the k clusters, update its centroid + + + isStillMoving = false; + + for (var c = 0; c < opts.k; c++) { + // Get all nodes that belong to this cluster + var cluster = buildCluster(c, nodes, assignment); + + if (cluster.length === 0) { + // If cluster is empty, break out early & move to next cluster + continue; + } // Update centroids by calculating avg of all nodes within the cluster. + + + var ndim = opts.attributes.length; + var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ] + + var newCentroid = new Array(ndim); + var sum = new Array(ndim); + + for (var d = 0; d < ndim; d++) { + sum[d] = 0.0; + + for (var i = 0; i < cluster.length; i++) { + node = cluster[i]; + sum[d] += opts.attributes[d](node); + } + + newCentroid[d] = sum[d] / cluster.length; // Check to see if algorithm has converged, i.e. when centroids no longer change + + if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { + isStillMoving = true; + } + } + + centroids[c] = newCentroid; + clusters[c] = cy.collection(cluster); + } + + iterations++; + } + + return clusters; + }; + + var kMedoids = function kMedoids(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var node = null; + var opts = setOptions$2(options); // Begin k-medoids algorithm + + var clusters = new Array(opts.k); + var medoids; + var assignment = {}; + var curCost; + var minCosts = new Array(opts.k); // minimum cost configuration for each cluster + // Step 1: Initialize k medoids + + if (opts.testMode) { + if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') { + medoids = opts.testCentroids; + } else { + medoids = randomMedoids(nodes, opts.k); + } + } else { + medoids = randomMedoids(nodes, opts.k); + } + + var isStillMoving = true; + var iterations = 0; + + while (isStillMoving && iterations < opts.maxIterations) { + // Step 2: Assign nodes to the nearest medoid + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; // Determine which cluster this node belongs to: node id => cluster # + + assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids'); + } + + isStillMoving = false; // Step 3: For each medoid m, and for each node assciated with mediod m, + // select the node with the lowest configuration cost as new medoid. + + for (var m = 0; m < medoids.length; m++) { + // Get all nodes that belong to this medoid + var cluster = buildCluster(m, nodes, assignment); + + if (cluster.length === 0) { + // If cluster is empty, break out early & move to next cluster + continue; + } + + minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost + // Select different medoid if its configuration has the lowest cost + + for (var _n = 0; _n < cluster.length; _n++) { + curCost = findCost(cluster[_n], cluster, opts.attributes); + + if (curCost < minCosts[m]) { + minCosts[m] = curCost; + medoids[m] = cluster[_n]; + isStillMoving = true; + } + } + + clusters[m] = cy.collection(cluster); + } + + iterations++; + } + + return clusters; + }; + + var updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) { + var numerator, denominator; + + for (var n = 0; n < nodes.length; n++) { + for (var c = 0; c < centroids.length; c++) { + weight[n][c] = Math.pow(U[n][c], opts.m); + } + } + + for (var _c = 0; _c < centroids.length; _c++) { + for (var dim = 0; dim < opts.attributes.length; dim++) { + numerator = 0; + denominator = 0; + + for (var _n2 = 0; _n2 < nodes.length; _n2++) { + numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]); + denominator += weight[_n2][_c]; + } + + centroids[_c][dim] = numerator / denominator; + } + } + }; + + var updateMembership = function updateMembership(U, _U, centroids, nodes, opts) { + // Save previous step + for (var i = 0; i < U.length; i++) { + _U[i] = U[i].slice(); + } + + var sum, numerator, denominator; + var pow = 2 / (opts.m - 1); + + for (var c = 0; c < centroids.length; c++) { + for (var n = 0; n < nodes.length; n++) { + sum = 0; + + for (var k = 0; k < centroids.length; k++) { + // against all other centroids + numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans'); + denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans'); + sum += Math.pow(numerator / denominator, pow); + } + + U[n][c] = 1 / sum; + } + } + }; + + var assign$1 = function assign(nodes, U, opts, cy) { + var clusters = new Array(opts.k); + + for (var c = 0; c < clusters.length; c++) { + clusters[c] = []; + } + + var max; + var index; + + for (var n = 0; n < U.length; n++) { + // for each node (U is N x C matrix) + max = -Infinity; + index = -1; // Determine which cluster the node is most likely to belong in + + for (var _c2 = 0; _c2 < U[0].length; _c2++) { + if (U[n][_c2] > max) { + max = U[n][_c2]; + index = _c2; + } + } + + clusters[index].push(nodes[n]); + } // Turn every array into a collection of nodes + + + for (var _c3 = 0; _c3 < clusters.length; _c3++) { + clusters[_c3] = cy.collection(clusters[_c3]); + } + + return clusters; + }; + + var fuzzyCMeans = function fuzzyCMeans(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var opts = setOptions$2(options); // Begin fuzzy c-means algorithm + + var clusters; + var centroids; + var U; + + var _U; + + var weight; // Step 1: Initialize letiables. + + _U = new Array(nodes.length); + + for (var i = 0; i < nodes.length; i++) { + // N x C matrix + _U[i] = new Array(opts.k); + } + + U = new Array(nodes.length); + + for (var _i3 = 0; _i3 < nodes.length; _i3++) { + // N x C matrix + U[_i3] = new Array(opts.k); + } + + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + var total = 0; + + for (var j = 0; j < opts.k; j++) { + U[_i4][j] = Math.random(); + total += U[_i4][j]; + } + + for (var _j = 0; _j < opts.k; _j++) { + U[_i4][_j] = U[_i4][_j] / total; + } + } + + centroids = new Array(opts.k); + + for (var _i5 = 0; _i5 < opts.k; _i5++) { + centroids[_i5] = new Array(opts.attributes.length); + } + + weight = new Array(nodes.length); + + for (var _i6 = 0; _i6 < nodes.length; _i6++) { + // N x C matrix + weight[_i6] = new Array(opts.k); + } // end init FCM + + + var isStillMoving = true; + var iterations = 0; + + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; // Step 2: Calculate the centroids for each step. + + updateCentroids(centroids, nodes, U, weight, opts); // Step 3: Update the partition matrix U. + + updateMembership(U, _U, centroids, nodes, opts); // Step 4: Check for convergence. + + if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { + isStillMoving = true; + } + + iterations++; + } // Assign nodes to clusters with highest probability. + + + clusters = assign$1(nodes, U, opts, cy); + return { + clusters: clusters, + degreeOfMembership: U + }; + }; + + var kClustering = { + kMeans: kMeans, + kMedoids: kMedoids, + fuzzyCMeans: fuzzyCMeans, + fcm: fuzzyCMeans + }; + + // Implemented by Zoe Xi @zoexi for GSOC 2016 + var defaults$a = defaults$g({ + distance: 'euclidean', + // distance metric to compare nodes + linkage: 'min', + // linkage criterion : how to determine the distance between clusters of nodes + mode: 'threshold', + // mode:'threshold' => clusters must be threshold distance apart + threshold: Infinity, + // the distance threshold + // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters + addDendrogram: false, + // whether to add the dendrogram to the graph for viz + dendrogramDepth: 0, + // depth at which dendrogram branches are merged into the returned clusters + attributes: [] // array of attr functions + + }); + var linkageAliases = { + 'single': 'min', + 'complete': 'max' + }; + + var setOptions$1 = function setOptions(options) { + var opts = defaults$a(options); + var preferredAlias = linkageAliases[opts.linkage]; + + if (preferredAlias != null) { + opts.linkage = preferredAlias; + } + + return opts; + }; + + var mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) { + // Find two closest clusters from cached mins + var minKey = 0; + var min = Infinity; + var dist; + var attrs = opts.attributes; + + var getDist = function getDist(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function (i) { + return attrs[i](n1); + }, function (i) { + return attrs[i](n2); + }, n1, n2); + }; + + for (var i = 0; i < clusters.length; i++) { + var key = clusters[i].key; + var _dist = dists[key][mins[key]]; + + if (_dist < min) { + minKey = key; + min = _dist; + } + } + + if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) { + return false; + } + + var c1 = index[minKey]; + var c2 = index[mins[minKey]]; + var merged; // Merge two closest clusters + + if (opts.mode === 'dendrogram') { + merged = { + left: c1, + right: c2, + key: c1.key + }; + } else { + merged = { + value: c1.value.concat(c2.value), + key: c1.key + }; + } + + clusters[c1.index] = merged; + clusters.splice(c2.index, 1); + index[c1.key] = merged; // Update distances with new merged cluster + + for (var _i = 0; _i < clusters.length; _i++) { + var cur = clusters[_i]; + + if (c1.key === cur.key) { + dist = Infinity; + } else if (opts.linkage === 'min') { + dist = dists[c1.key][cur.key]; + + if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { + dist = dists[c2.key][cur.key]; + } + } else if (opts.linkage === 'max') { + dist = dists[c1.key][cur.key]; + + if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { + dist = dists[c2.key][cur.key]; + } + } else if (opts.linkage === 'mean') { + dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); + } else { + if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]); + } + + dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric + } // Update cached mins + + + for (var _i2 = 0; _i2 < clusters.length; _i2++) { + var key1 = clusters[_i2].key; + + if (mins[key1] === c1.key || mins[key1] === c2.key) { + var _min = key1; + + for (var j = 0; j < clusters.length; j++) { + var key2 = clusters[j].key; + + if (dists[key1][key2] < dists[key1][_min]) { + _min = key2; + } + } + + mins[key1] = _min; + } + + clusters[_i2].index = _i2; + } // Clean up meta data used for clustering + + + c1.key = c2.key = c1.index = c2.index = null; + return true; + }; + + var getAllChildren = function getAllChildren(root, arr, cy) { + if (!root) return; + + if (root.value) { + arr.push(root.value); + } else { + if (root.left) getAllChildren(root.left, arr); + if (root.right) getAllChildren(root.right, arr); + } + }; + + var buildDendrogram = function buildDendrogram(root, cy) { + if (!root) return ''; + + if (root.left && root.right) { + var leftStr = buildDendrogram(root.left, cy); + var rightStr = buildDendrogram(root.right, cy); + var node = cy.add({ + group: 'nodes', + data: { + id: leftStr + ',' + rightStr + } + }); + cy.add({ + group: 'edges', + data: { + source: leftStr, + target: node.id() + } + }); + cy.add({ + group: 'edges', + data: { + source: rightStr, + target: node.id() + } + }); + return node.id(); + } else if (root.value) { + return root.value.id(); + } + }; + + var buildClustersFromTree = function buildClustersFromTree(root, k, cy) { + if (!root) return []; + var left = [], + right = [], + leaves = []; + + if (k === 0) { + // don't cut tree, simply return all nodes as 1 single cluster + if (root.left) getAllChildren(root.left, left); + if (root.right) getAllChildren(root.right, right); + leaves = left.concat(right); + return [cy.collection(leaves)]; + } else if (k === 1) { + // cut at root + if (root.value) { + // leaf node + return [cy.collection(root.value)]; + } else { + if (root.left) getAllChildren(root.left, left); + if (root.right) getAllChildren(root.right, right); + return [cy.collection(left), cy.collection(right)]; + } + } else { + if (root.value) { + return [cy.collection(root.value)]; + } else { + if (root.left) left = buildClustersFromTree(root.left, k - 1, cy); + if (root.right) right = buildClustersFromTree(root.right, k - 1, cy); + return left.concat(right); + } + } + }; + /* eslint-enable */ + + + var hierarchicalClustering = function hierarchicalClustering(options) { + var cy = this.cy(); + var nodes = this.nodes(); // Set parameters of algorithm: linkage type, distance metric, etc. + + var opts = setOptions$1(options); + var attrs = opts.attributes; + + var getDist = function getDist(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function (i) { + return attrs[i](n1); + }, function (i) { + return attrs[i](n2); + }, n1, n2); + }; // Begin hierarchical algorithm + + + var clusters = []; + var dists = []; // distances between each pair of clusters + + var mins = []; // closest cluster for each cluster + + var index = []; // hash of all clusters by key + // In agglomerative (bottom-up) clustering, each node starts as its own cluster + + for (var n = 0; n < nodes.length; n++) { + var cluster = { + value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]], + key: n, + index: n + }; + clusters[n] = cluster; + index[n] = cluster; + dists[n] = []; + mins[n] = 0; + } // Calculate the distance between each pair of clusters + + + for (var i = 0; i < clusters.length; i++) { + for (var j = 0; j <= i; j++) { + var dist = void 0; + + if (opts.mode === 'dendrogram') { + // modes store cluster values differently + dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value); + } else { + dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]); + } + + dists[i][j] = dist; + dists[j][i] = dist; + + if (dist < dists[i][mins[i]]) { + mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j + } + } + } // Find the closest pair of clusters and merge them into a single cluster. + // Update distances between new cluster and each of the old clusters, and loop until threshold reached. + + + var merged = mergeClosest(clusters, index, dists, mins, opts); + + while (merged) { + merged = mergeClosest(clusters, index, dists, mins, opts); + } + + var retClusters; // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges + // in addition to returning the clusters. + + if (opts.mode === 'dendrogram') { + retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); + if (opts.addDendrogram) buildDendrogram(clusters[0], cy); + } else { + // Regular mode simply returns the clusters + retClusters = new Array(clusters.length); + clusters.forEach(function (cluster, i) { + // Clean up meta data used for clustering + cluster.key = cluster.index = null; + retClusters[i] = cy.collection(cluster.value); + }); + } + + return retClusters; + }; + + var hierarchicalClustering$1 = { + hierarchicalClustering: hierarchicalClustering, + hca: hierarchicalClustering + }; + + // Implemented by Zoe Xi @zoexi for GSOC 2016 + var defaults$9 = defaults$g({ + distance: 'euclidean', + // distance metric to compare attributes between two nodes + preference: 'median', + // suitability of a data point to serve as an exemplar + damping: 0.8, + // damping factor between [0.5, 1) + maxIterations: 1000, + // max number of iterations to run + minIterations: 100, + // min number of iterations to run in order for clustering to stop + attributes: [// functions to quantify the similarity between any two points + // e.g. node => node.data('weight') + ] + }); + + var setOptions = function setOptions(options) { + var dmp = options.damping; + var pref = options.preference; + + if (!(0.5 <= dmp && dmp < 1)) { + error("Damping must range on [0.5, 1). Got: ".concat(dmp)); + } + + var validPrefs = ['median', 'mean', 'min', 'max']; + + if (!(validPrefs.some(function (v) { + return v === pref; + }) || number$1(pref))) { + error("Preference must be one of [".concat(validPrefs.map(function (p) { + return "'".concat(p, "'"); + }).join(', '), "] or a number. Got: ").concat(pref)); + } + + return defaults$9(options); + }; + /* eslint-enable */ + + + var getSimilarity = function getSimilarity(type, n1, n2, attributes) { + var attr = function attr(n, i) { + return attributes[i](n); + }; // nb negative because similarity should have an inverse relationship to distance + + + return -clusteringDistance(type, attributes.length, function (i) { + return attr(n1, i); + }, function (i) { + return attr(n2, i); + }, n1, n2); + }; + + var getPreference = function getPreference(S, preference) { + // larger preference = greater # of clusters + var p = null; + + if (preference === 'median') { + p = median(S); + } else if (preference === 'mean') { + p = mean(S); + } else if (preference === 'min') { + p = min(S); + } else if (preference === 'max') { + p = max(S); + } else { + // Custom preference number, as set by user + p = preference; + } + + return p; + }; + + var findExemplars = function findExemplars(n, R, A) { + var indices = []; + + for (var i = 0; i < n; i++) { + if (R[i * n + i] + A[i * n + i] > 0) { + indices.push(i); + } + } + + return indices; + }; + + var assignClusters = function assignClusters(n, S, exemplars) { + var clusters = []; + + for (var i = 0; i < n; i++) { + var index = -1; + var max = -Infinity; + + for (var ei = 0; ei < exemplars.length; ei++) { + var e = exemplars[ei]; + + if (S[i * n + e] > max) { + index = e; + max = S[i * n + e]; + } + } + + if (index > 0) { + clusters.push(index); + } + } + + for (var _ei = 0; _ei < exemplars.length; _ei++) { + clusters[exemplars[_ei]] = exemplars[_ei]; + } + + return clusters; + }; + + var assign = function assign(n, S, exemplars) { + var clusters = assignClusters(n, S, exemplars); + + for (var ei = 0; ei < exemplars.length; ei++) { + var ii = []; + + for (var c = 0; c < clusters.length; c++) { + if (clusters[c] === exemplars[ei]) { + ii.push(c); + } + } + + var maxI = -1; + var maxSum = -Infinity; + + for (var i = 0; i < ii.length; i++) { + var sum = 0; + + for (var j = 0; j < ii.length; j++) { + sum += S[ii[j] * n + ii[i]]; + } + + if (sum > maxSum) { + maxI = i; + maxSum = sum; + } + } + + exemplars[ei] = ii[maxI]; + } + + clusters = assignClusters(n, S, exemplars); + return clusters; + }; + + var affinityPropagation = function affinityPropagation(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var opts = setOptions(options); // Map each node to its position in node array + + var id2position = {}; + + for (var i = 0; i < nodes.length; i++) { + id2position[nodes[i].id()] = i; + } // Begin affinity propagation algorithm + + + var n; // number of data points + + var n2; // size of matrices + + var S; // similarity matrix (1D array) + + var p; // preference/suitability of a data point to serve as an exemplar + + var R; // responsibility matrix (1D array) + + var A; // availability matrix (1D array) + + n = nodes.length; + n2 = n * n; // Initialize and build S similarity matrix + + S = new Array(n2); + + for (var _i = 0; _i < n2; _i++) { + S[_i] = -Infinity; // for cases where two data points shouldn't be linked together + } + + for (var _i2 = 0; _i2 < n; _i2++) { + for (var j = 0; j < n; j++) { + if (_i2 !== j) { + S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes); + } + } + } // Place preferences on the diagonal of S + + + p = getPreference(S, opts.preference); + + for (var _i3 = 0; _i3 < n; _i3++) { + S[_i3 * n + _i3] = p; + } // Initialize R responsibility matrix + + + R = new Array(n2); + + for (var _i4 = 0; _i4 < n2; _i4++) { + R[_i4] = 0.0; + } // Initialize A availability matrix + + + A = new Array(n2); + + for (var _i5 = 0; _i5 < n2; _i5++) { + A[_i5] = 0.0; + } + + var old = new Array(n); + var Rp = new Array(n); + var se = new Array(n); + + for (var _i6 = 0; _i6 < n; _i6++) { + old[_i6] = 0.0; + Rp[_i6] = 0.0; + se[_i6] = 0; + } + + var e = new Array(n * opts.minIterations); + + for (var _i7 = 0; _i7 < e.length; _i7++) { + e[_i7] = 0; + } + + var iter; + + for (iter = 0; iter < opts.maxIterations; iter++) { + // main algorithmic loop + // Update R responsibility matrix + for (var _i8 = 0; _i8 < n; _i8++) { + var max = -Infinity, + max2 = -Infinity, + maxI = -1, + AS = 0.0; + + for (var _j = 0; _j < n; _j++) { + old[_j] = R[_i8 * n + _j]; + AS = A[_i8 * n + _j] + S[_i8 * n + _j]; + + if (AS >= max) { + max2 = max; + max = AS; + maxI = _j; + } else if (AS > max2) { + max2 = AS; + } + } + + for (var _j2 = 0; _j2 < n; _j2++) { + R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2]; + } + + R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI]; + } // Update A availability matrix + + + for (var _i9 = 0; _i9 < n; _i9++) { + var sum = 0; + + for (var _j3 = 0; _j3 < n; _j3++) { + old[_j3] = A[_j3 * n + _i9]; + Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); + sum += Rp[_j3]; + } + + sum -= Rp[_i9]; + Rp[_i9] = R[_i9 * n + _i9]; + sum += Rp[_i9]; + + for (var _j4 = 0; _j4 < n; _j4++) { + A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4]; + } + + A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9]; + } // Check for convergence + + + var K = 0; + + for (var _i10 = 0; _i10 < n; _i10++) { + var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; + e[iter % opts.minIterations * n + _i10] = E; + K += E; + } + + if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { + var _sum = 0; + + for (var _i11 = 0; _i11 < n; _i11++) { + se[_i11] = 0; + + for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { + se[_i11] += e[_j5 * n + _i11]; + } + + if (se[_i11] === 0 || se[_i11] === opts.minIterations) { + _sum++; + } + } + + if (_sum === n) { + // then we have convergence + break; + } + } + } // Identify exemplars (cluster centers) + + + var exemplarsIndices = findExemplars(n, R, A); // Assign nodes to clusters + + var clusterIndices = assign(n, S, exemplarsIndices); + var clusters = {}; + + for (var c = 0; c < exemplarsIndices.length; c++) { + clusters[exemplarsIndices[c]] = []; + } + + for (var _i12 = 0; _i12 < nodes.length; _i12++) { + var pos = id2position[nodes[_i12].id()]; + + var clusterIndex = clusterIndices[pos]; + + if (clusterIndex != null) { + // the node may have not been assigned a cluster if no valid attributes were specified + clusters[clusterIndex].push(nodes[_i12]); + } + } + + var retClusters = new Array(exemplarsIndices.length); + + for (var _c = 0; _c < exemplarsIndices.length; _c++) { + retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); + } + + return retClusters; + }; + + var affinityPropagation$1 = { + affinityPropagation: affinityPropagation, + ap: affinityPropagation + }; + + var hierholzerDefaults = defaults$g({ + root: undefined, + directed: false + }); + var elesfn$k = { + hierholzer: function hierholzer(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + directed: args[1] + }; + } + + var _hierholzerDefaults = hierholzerDefaults(options), + root = _hierholzerDefaults.root, + directed = _hierholzerDefaults.directed; + + var eles = this; + var dflag = false; + var oddIn; + var oddOut; + var startVertex; + if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id(); + var nodes = {}; + var edges = {}; + + if (directed) { + eles.forEach(function (ele) { + var id = ele.id(); + + if (ele.isNode()) { + var ind = ele.indegree(true); + var outd = ele.outdegree(true); + var d1 = ind - outd; + var d2 = outd - ind; + + if (d1 == 1) { + if (oddIn) dflag = true;else oddIn = id; + } else if (d2 == 1) { + if (oddOut) dflag = true;else oddOut = id; + } else if (d2 > 1 || d1 > 1) { + dflag = true; + } + + nodes[id] = []; + ele.outgoers().forEach(function (e) { + if (e.isEdge()) nodes[id].push(e.id()); + }); + } else { + edges[id] = [undefined, ele.target().id()]; + } + }); + } else { + eles.forEach(function (ele) { + var id = ele.id(); + + if (ele.isNode()) { + var d = ele.degree(true); + + if (d % 2) { + if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true; + } + + nodes[id] = []; + ele.connectedEdges().forEach(function (e) { + return nodes[id].push(e.id()); + }); + } else { + edges[id] = [ele.source().id(), ele.target().id()]; + } + }); + } + + var result = { + found: false, + trail: undefined + }; + if (dflag) return result;else if (oddOut && oddIn) { + if (directed) { + if (startVertex && oddOut != startVertex) { + return result; + } + + startVertex = oddOut; + } else { + if (startVertex && oddOut != startVertex && oddIn != startVertex) { + return result; + } else if (!startVertex) { + startVertex = oddOut; + } + } + } else { + if (!startVertex) startVertex = eles[0].id(); + } + + var walk = function walk(v) { + var currentNode = v; + var subtour = [v]; + var adj, adjTail, adjHead; + + while (nodes[currentNode].length) { + adj = nodes[currentNode].shift(); + adjTail = edges[adj][0]; + adjHead = edges[adj][1]; + + if (currentNode != adjHead) { + nodes[adjHead] = nodes[adjHead].filter(function (e) { + return e != adj; + }); + currentNode = adjHead; + } else if (!directed && currentNode != adjTail) { + nodes[adjTail] = nodes[adjTail].filter(function (e) { + return e != adj; + }); + currentNode = adjTail; + } + + subtour.unshift(adj); + subtour.unshift(currentNode); + } + + return subtour; + }; + + var trail = []; + var subtour = []; + subtour = walk(startVertex); + + while (subtour.length != 1) { + if (nodes[subtour[0]].length == 0) { + trail.unshift(eles.getElementById(subtour.shift())); + trail.unshift(eles.getElementById(subtour.shift())); + } else { + subtour = walk(subtour.shift()).concat(subtour); + } + } + + trail.unshift(eles.getElementById(subtour.shift())); // final node + + for (var d in nodes) { + if (nodes[d].length) { + return result; + } + } + + result.found = true; + result.trail = this.spawn(trail, true); + return result; + } + }; + + var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() { + var eles = this; + var nodes = {}; + var id = 0; + var edgeCount = 0; + var components = []; + var stack = []; + var visitedEdges = {}; + + var buildComponent = function buildComponent(x, y) { + var i = stack.length - 1; + var cutset = []; + var component = eles.spawn(); + + while (stack[i].x != x || stack[i].y != y) { + cutset.push(stack.pop().edge); + i--; + } + + cutset.push(stack.pop().edge); + cutset.forEach(function (edge) { + var connectedNodes = edge.connectedNodes().intersection(eles); + component.merge(edge); + connectedNodes.forEach(function (node) { + var nodeId = node.id(); + var connectedEdges = node.connectedEdges().intersection(eles); + component.merge(node); + + if (!nodes[nodeId].cutVertex) { + component.merge(connectedEdges); + } else { + component.merge(connectedEdges.filter(function (edge) { + return edge.isLoop(); + })); + } + }); + }); + components.push(component); + }; + + var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) { + if (root === parent) edgeCount += 1; + nodes[currentNode] = { + id: id, + low: id++, + cutVertex: false + }; + var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles); + + if (edges.size() === 0) { + components.push(eles.spawn(eles.getElementById(currentNode))); + } else { + var sourceId, targetId, otherNodeId, edgeId; + edges.forEach(function (edge) { + sourceId = edge.source().id(); + targetId = edge.target().id(); + otherNodeId = sourceId === currentNode ? targetId : sourceId; + + if (otherNodeId !== parent) { + edgeId = edge.id(); + + if (!visitedEdges[edgeId]) { + visitedEdges[edgeId] = true; + stack.push({ + x: currentNode, + y: otherNodeId, + edge: edge + }); + } + + if (!(otherNodeId in nodes)) { + biconnectedSearch(root, otherNodeId, currentNode); + nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low); + + if (nodes[currentNode].id <= nodes[otherNodeId].low) { + nodes[currentNode].cutVertex = true; + buildComponent(currentNode, otherNodeId); + } + } else { + nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id); + } + } + }); + } + }; + + eles.forEach(function (ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + + if (!(nodeId in nodes)) { + edgeCount = 0; + biconnectedSearch(nodeId, nodeId); + nodes[nodeId].cutVertex = edgeCount > 1; + } + } + }); + var cutVertices = Object.keys(nodes).filter(function (id) { + return nodes[id].cutVertex; + }).map(function (id) { + return eles.getElementById(id); + }); + return { + cut: eles.spawn(cutVertices), + components: components + }; + }; + + var hopcroftTarjanBiconnected$1 = { + hopcroftTarjanBiconnected: hopcroftTarjanBiconnected, + htbc: hopcroftTarjanBiconnected, + htb: hopcroftTarjanBiconnected, + hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected + }; + + var tarjanStronglyConnected = function tarjanStronglyConnected() { + var eles = this; + var nodes = {}; + var index = 0; + var components = []; + var stack = []; + var cut = eles.spawn(eles); + + var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) { + stack.push(sourceNodeId); + nodes[sourceNodeId] = { + index: index, + low: index++, + explored: false + }; + var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); + connectedEdges.forEach(function (edge) { + var targetNodeId = edge.target().id(); + + if (targetNodeId !== sourceNodeId) { + if (!(targetNodeId in nodes)) { + stronglyConnectedSearch(targetNodeId); + } + + if (!nodes[targetNodeId].explored) { + nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low); + } + } + }); + + if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) { + var componentNodes = eles.spawn(); + + for (;;) { + var nodeId = stack.pop(); + componentNodes.merge(eles.getElementById(nodeId)); + nodes[nodeId].low = nodes[sourceNodeId].index; + nodes[nodeId].explored = true; + + if (nodeId === sourceNodeId) { + break; + } + } + + var componentEdges = componentNodes.edgesWith(componentNodes); + var component = componentNodes.merge(componentEdges); + components.push(component); + cut = cut.difference(component); + } + }; + + eles.forEach(function (ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + + if (!(nodeId in nodes)) { + stronglyConnectedSearch(nodeId); + } + } + }); + return { + cut: cut, + components: components + }; + }; + + var tarjanStronglyConnected$1 = { + tarjanStronglyConnected: tarjanStronglyConnected, + tsc: tarjanStronglyConnected, + tscc: tarjanStronglyConnected, + tarjanStronglyConnectedComponents: tarjanStronglyConnected + }; + + var elesfn$j = {}; + [elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) { + extend(elesfn$j, props); + }); + + /*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + + /* promise states [Promises/A+ 2.1] */ + var STATE_PENDING = 0; + /* [Promises/A+ 2.1.1] */ + + var STATE_FULFILLED = 1; + /* [Promises/A+ 2.1.2] */ + + var STATE_REJECTED = 2; + /* [Promises/A+ 2.1.3] */ + + /* promise object constructor */ + + var api = function api(executor) { + /* optionally support non-constructor/plain-function call */ + if (!(this instanceof api)) return new api(executor); + /* initialize object */ + + this.id = 'Thenable/1.0.7'; + this.state = STATE_PENDING; + /* initial state */ + + this.fulfillValue = undefined; + /* initial value */ + + /* [Promises/A+ 1.3, 2.1.2.2] */ + + this.rejectReason = undefined; + /* initial reason */ + + /* [Promises/A+ 1.5, 2.1.3.2] */ + + this.onFulfilled = []; + /* initial handlers */ + + this.onRejected = []; + /* initial handlers */ + + /* provide optional information-hiding proxy */ + + this.proxy = { + then: this.then.bind(this) + }; + /* support optional executor function */ + + if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); + }; + /* promise API methods */ + + + api.prototype = { + /* promise resolving methods */ + fulfill: function fulfill(value) { + return deliver(this, STATE_FULFILLED, 'fulfillValue', value); + }, + reject: function reject(value) { + return deliver(this, STATE_REJECTED, 'rejectReason', value); + }, + + /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ + then: function then(onFulfilled, onRejected) { + var curr = this; + var next = new api(); + /* [Promises/A+ 2.2.7] */ + + curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); + /* [Promises/A+ 2.2.2/2.2.6] */ + + curr.onRejected.push(resolver(onRejected, next, 'reject')); + /* [Promises/A+ 2.2.3/2.2.6] */ + + execute(curr); + return next.proxy; + /* [Promises/A+ 2.2.7, 3.3] */ + } + }; + /* deliver an action */ + + var deliver = function deliver(curr, state, name, value) { + if (curr.state === STATE_PENDING) { + curr.state = state; + /* [Promises/A+ 2.1.2.1, 2.1.3.1] */ + + curr[name] = value; + /* [Promises/A+ 2.1.2.2, 2.1.3.2] */ + + execute(curr); + } + + return curr; + }; + /* execute all handlers */ + + + var execute = function execute(curr) { + if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason); + }; + /* execute particular set of handlers */ + + + var execute_handlers = function execute_handlers(curr, name, value) { + /* global setImmediate: true */ + + /* global setTimeout: true */ + + /* short-circuit processing */ + if (curr[name].length === 0) return; + /* iterate over all handlers, exactly once */ + + var handlers = curr[name]; + curr[name] = []; + /* [Promises/A+ 2.2.2.3, 2.2.3.3] */ + + var func = function func() { + for (var i = 0; i < handlers.length; i++) { + handlers[i](value); + } + /* [Promises/A+ 2.2.5] */ + + }; + /* execute procedure asynchronously */ + + /* [Promises/A+ 2.2.4, 3.1] */ + + + if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0); + }; + /* generate a resolver function */ + + + var resolver = function resolver(cb, next, method) { + return function (value) { + if (typeof cb !== 'function') + /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */ + next[method].call(next, value); + /* [Promises/A+ 2.2.7.3, 2.2.7.4] */ + else { + var result; + + try { + result = cb(value); + } + /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ + catch (e) { + next.reject(e); + /* [Promises/A+ 2.2.7.2] */ + + return; + } + + resolve(next, result); + /* [Promises/A+ 2.2.7.1] */ + } + }; + }; + /* "Promise Resolution Procedure" */ + + /* [Promises/A+ 2.3] */ + + + var resolve = function resolve(promise, x) { + /* sanity check arguments */ + + /* [Promises/A+ 2.3.1] */ + if (promise === x || promise.proxy === x) { + promise.reject(new TypeError('cannot resolve promise with itself')); + return; + } + /* surgically check for a "then" method + (mainly to just call the "getter" of "then" only once) */ + + + var then; + + if (_typeof(x) === 'object' && x !== null || typeof x === 'function') { + try { + then = x.then; + } + /* [Promises/A+ 2.3.3.1, 3.5] */ + catch (e) { + promise.reject(e); + /* [Promises/A+ 2.3.3.2] */ + + return; + } + } + /* handle own Thenables [Promises/A+ 2.3.2] + and similar "thenables" [Promises/A+ 2.3.3] */ + + + if (typeof then === 'function') { + var resolved = false; + + try { + /* call retrieved "then" method */ + + /* [Promises/A+ 2.3.3.3] */ + then.call(x, + /* resolvePromise */ + + /* [Promises/A+ 2.3.3.3.1] */ + function (y) { + if (resolved) return; + resolved = true; + /* [Promises/A+ 2.3.3.3.3] */ + + if (y === x) + /* [Promises/A+ 3.6] */ + promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y); + }, + /* rejectPromise */ + + /* [Promises/A+ 2.3.3.3.2] */ + function (r) { + if (resolved) return; + resolved = true; + /* [Promises/A+ 2.3.3.3.3] */ + + promise.reject(r); + }); + } catch (e) { + if (!resolved) + /* [Promises/A+ 2.3.3.3.3] */ + promise.reject(e); + /* [Promises/A+ 2.3.3.3.4] */ + } + + return; + } + /* handle other values */ + + + promise.fulfill(x); + /* [Promises/A+ 2.3.4, 2.3.3.4] */ + }; // so we always have Promise.all() + + + api.all = function (ps) { + return new api(function (resolveAll, rejectAll) { + var vals = new Array(ps.length); + var doneCount = 0; + + var fulfill = function fulfill(i, val) { + vals[i] = val; + doneCount++; + + if (doneCount === ps.length) { + resolveAll(vals); + } + }; + + for (var i = 0; i < ps.length; i++) { + (function (i) { + var p = ps[i]; + var isPromise = p != null && p.then != null; + + if (isPromise) { + p.then(function (val) { + fulfill(i, val); + }, function (err) { + rejectAll(err); + }); + } else { + var val = p; + fulfill(i, val); + } + })(i); + } + }); + }; + + api.resolve = function (val) { + return new api(function (resolve, reject) { + resolve(val); + }); + }; + + api.reject = function (val) { + return new api(function (resolve, reject) { + reject(val); + }); + }; + + var Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef + + var Animation = function Animation(target, opts, opts2) { + var isCore = core(target); + var isEle = !isCore; + + var _p = this._private = extend({ + duration: 1000 + }, opts, opts2); + + _p.target = target; + _p.style = _p.style || _p.css; + _p.started = false; + _p.playing = false; + _p.hooked = false; + _p.applying = false; + _p.progress = 0; + _p.completes = []; + _p.frames = []; + + if (_p.complete && fn$6(_p.complete)) { + _p.completes.push(_p.complete); + } + + if (isEle) { + var pos = target.position(); + _p.startPosition = _p.startPosition || { + x: pos.x, + y: pos.y + }; + _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); + } + + if (isCore) { + var pan = target.pan(); + _p.startPan = { + x: pan.x, + y: pan.y + }; + _p.startZoom = target.zoom(); + } // for future timeline/animations impl + + + this.length = 1; + this[0] = this; + }; + + var anifn = Animation.prototype; + extend(anifn, { + instanceString: function instanceString() { + return 'animation'; + }, + hook: function hook() { + var _p = this._private; + + if (!_p.hooked) { + // add to target's animation queue + var q; + var tAni = _p.target._private.animation; + + if (_p.queue) { + q = tAni.queue; + } else { + q = tAni.current; + } + + q.push(this); // add to the animation loop pool + + if (elementOrCollection(_p.target)) { + _p.target.cy().addToAnimationPool(_p.target); + } + + _p.hooked = true; + } + + return this; + }, + play: function play() { + var _p = this._private; // autorewind + + if (_p.progress === 1) { + _p.progress = 0; + } + + _p.playing = true; + _p.started = false; // needs to be started by animation loop + + _p.stopped = false; + this.hook(); // the animation loop will start the animation... + + return this; + }, + playing: function playing() { + return this._private.playing; + }, + apply: function apply() { + var _p = this._private; + _p.applying = true; + _p.started = false; // needs to be started by animation loop + + _p.stopped = false; + this.hook(); // the animation loop will apply the animation at this progress + + return this; + }, + applying: function applying() { + return this._private.applying; + }, + pause: function pause() { + var _p = this._private; + _p.playing = false; + _p.started = false; + return this; + }, + stop: function stop() { + var _p = this._private; + _p.playing = false; + _p.started = false; + _p.stopped = true; // to be removed from animation queues + + return this; + }, + rewind: function rewind() { + return this.progress(0); + }, + fastforward: function fastforward() { + return this.progress(1); + }, + time: function time(t) { + var _p = this._private; + + if (t === undefined) { + return _p.progress * _p.duration; + } else { + return this.progress(t / _p.duration); + } + }, + progress: function progress(p) { + var _p = this._private; + var wasPlaying = _p.playing; + + if (p === undefined) { + return _p.progress; + } else { + if (wasPlaying) { + this.pause(); + } + + _p.progress = p; + _p.started = false; + + if (wasPlaying) { + this.play(); + } + } + + return this; + }, + completed: function completed() { + return this._private.progress === 1; + }, + reverse: function reverse() { + var _p = this._private; + var wasPlaying = _p.playing; + + if (wasPlaying) { + this.pause(); + } + + _p.progress = 1 - _p.progress; + _p.started = false; + + var swap = function swap(a, b) { + var _pa = _p[a]; + + if (_pa == null) { + return; + } + + _p[a] = _p[b]; + _p[b] = _pa; + }; + + swap('zoom', 'startZoom'); + swap('pan', 'startPan'); + swap('position', 'startPosition'); // swap styles + + if (_p.style) { + for (var i = 0; i < _p.style.length; i++) { + var prop = _p.style[i]; + var name = prop.name; + var startStyleProp = _p.startStyle[name]; + _p.startStyle[name] = prop; + _p.style[i] = startStyleProp; + } + } + + if (wasPlaying) { + this.play(); + } + + return this; + }, + promise: function promise(type) { + var _p = this._private; + var arr; + + switch (type) { + case 'frame': + arr = _p.frames; + break; + + default: + case 'complete': + case 'completed': + arr = _p.completes; + } + + return new Promise$1(function (resolve, reject) { + arr.push(function () { + resolve(); + }); + }); + } + }); + anifn.complete = anifn.completed; + anifn.run = anifn.play; + anifn.running = anifn.playing; + + var define$3 = { + animated: function animated() { + return function animatedImpl() { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + var cy = this._private.cy || this; + + if (!cy.styleEnabled()) { + return false; + } + + var ele = all[0]; + + if (ele) { + return ele._private.animation.current.length > 0; + } + }; + }, + // animated + clearQueue: function clearQueue() { + return function clearQueueImpl() { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + var cy = this._private.cy || this; + + if (!cy.styleEnabled()) { + return this; + } + + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + ele._private.animation.queue = []; + } + + return this; + }; + }, + // clearQueue + delay: function delay() { + return function delayImpl(time, complete) { + var cy = this._private.cy || this; + + if (!cy.styleEnabled()) { + return this; + } + + return this.animate({ + delay: time, + duration: time, + complete: complete + }); + }; + }, + // delay + delayAnimation: function delayAnimation() { + return function delayAnimationImpl(time, complete) { + var cy = this._private.cy || this; + + if (!cy.styleEnabled()) { + return this; + } + + return this.animation({ + delay: time, + duration: time, + complete: complete + }); + }; + }, + // delay + animation: function animation() { + return function animationImpl(properties, params) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + var cy = this._private.cy || this; + var isCore = !selfIsArrayLike; + var isEles = !isCore; + + if (!cy.styleEnabled()) { + return this; + } + + var style = cy.style(); + properties = extend({}, properties, params); + var propertiesEmpty = Object.keys(properties).length === 0; + + if (propertiesEmpty) { + return new Animation(all[0], properties); // nothing to animate + } + + if (properties.duration === undefined) { + properties.duration = 400; + } + + switch (properties.duration) { + case 'slow': + properties.duration = 600; + break; + + case 'fast': + properties.duration = 200; + break; + } + + if (isEles) { + properties.style = style.getPropsList(properties.style || properties.css); + properties.css = undefined; + } + + if (isEles && properties.renderedPosition != null) { + var rpos = properties.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + properties.position = renderedToModelPosition(rpos, zoom, pan); + } // override pan w/ panBy if set + + + if (isCore && properties.panBy != null) { + var panBy = properties.panBy; + var cyPan = cy.pan(); + properties.pan = { + x: cyPan.x + panBy.x, + y: cyPan.y + panBy.y + }; + } // override pan w/ center if set + + + var center = properties.center || properties.centre; + + if (isCore && center != null) { + var centerPan = cy.getCenterPan(center.eles, properties.zoom); + + if (centerPan != null) { + properties.pan = centerPan; + } + } // override pan & zoom w/ fit if set + + + if (isCore && properties.fit != null) { + var fit = properties.fit; + var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); + + if (fitVp != null) { + properties.pan = fitVp.pan; + properties.zoom = fitVp.zoom; + } + } // override zoom (& potentially pan) w/ zoom obj if set + + + if (isCore && plainObject(properties.zoom)) { + var vp = cy.getZoomedViewport(properties.zoom); + + if (vp != null) { + if (vp.zoomed) { + properties.zoom = vp.zoom; + } + + if (vp.panned) { + properties.pan = vp.pan; + } + } else { + properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed + } + } + + return new Animation(all[0], properties); + }; + }, + // animate + animate: function animate() { + return function animateImpl(properties, params) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + var cy = this._private.cy || this; + + if (!cy.styleEnabled()) { + return this; + } + + if (params) { + properties = extend({}, properties, params); + } // manually hook and run the animation + + + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + var queue = ele.animated() && (properties.queue === undefined || properties.queue); + var ani = ele.animation(properties, queue ? { + queue: true + } : undefined); + ani.play(); + } + + return this; // chaining + }; + }, + // animate + stop: function stop() { + return function stopImpl(clearQueue, jumpToEnd) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + var cy = this._private.cy || this; + + if (!cy.styleEnabled()) { + return this; + } + + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + var _p = ele._private; + var anis = _p.animation.current; + + for (var j = 0; j < anis.length; j++) { + var ani = anis[j]; + var ani_p = ani._private; + + if (jumpToEnd) { + // next iteration of the animation loop, the animation + // will go straight to the end and be removed + ani_p.duration = 0; + } + } // clear the queue of future animations + + + if (clearQueue) { + _p.animation.queue = []; + } + + if (!jumpToEnd) { + _p.animation.current = []; + } + } // we have to notify (the animation loop doesn't do it for us on `stop`) + + + cy.notify('draw'); + return this; + }; + } // stop + + }; // define + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + var isArray_1 = isArray; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray_1(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol_1(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + var _isKey = isKey; + + /** `Object#toString` result references. */ + var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject_1(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = _baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + var isFunction_1 = isFunction; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = _root['__core-js_shared__']; + + var _coreJsData = coreJsData; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + var _isMasked = isMasked; + + /** Used for built-in method references. */ + var funcProto$1 = Function.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString$1 = funcProto$1.toString; + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString$1.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + var _toSource = toSource; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto$3 = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty$3 = objectProto$3.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject_1(value) || _isMasked(value)) { + return false; + } + var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; + return pattern.test(_toSource(value)); + } + + var _baseIsNative = baseIsNative; + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue$1(object, key) { + return object == null ? undefined : object[key]; + } + + var _getValue = getValue$1; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = _getValue(object, key); + return _baseIsNative(value) ? value : undefined; + } + + var _getNative = getNative; + + /* Built-in method references that are verified to be native. */ + var nativeCreate = _getNative(Object, 'create'); + + var _nativeCreate = nativeCreate; + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; + } + + var _hashClear = hashClear; + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + var _hashDelete = hashDelete; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; + + /** Used for built-in method references. */ + var objectProto$2 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$2 = objectProto$2.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (_nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED$1 ? undefined : result; + } + return hasOwnProperty$2.call(data, key) ? data[key] : undefined; + } + + var _hashGet = hashGet; + + /** Used for built-in method references. */ + var objectProto$1 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$1 = objectProto$1.hasOwnProperty; + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key); + } + + var _hashHas = hashHas; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + var _hashSet = hashSet; + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `Hash`. + Hash.prototype.clear = _hashClear; + Hash.prototype['delete'] = _hashDelete; + Hash.prototype.get = _hashGet; + Hash.prototype.has = _hashHas; + Hash.prototype.set = _hashSet; + + var _Hash = Hash; + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + var _listCacheClear = listCacheClear; + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + var eq_1 = eq; + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq_1(array[length][0], key)) { + return length; + } + } + return -1; + } + + var _assocIndexOf = assocIndexOf; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype; + + /** Built-in value references. */ + var splice = arrayProto.splice; + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + var _listCacheDelete = listCacheDelete; + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + var _listCacheGet = listCacheGet; + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return _assocIndexOf(this.__data__, key) > -1; + } + + var _listCacheHas = listCacheHas; + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + var _listCacheSet = listCacheSet; + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = _listCacheClear; + ListCache.prototype['delete'] = _listCacheDelete; + ListCache.prototype.get = _listCacheGet; + ListCache.prototype.has = _listCacheHas; + ListCache.prototype.set = _listCacheSet; + + var _ListCache = ListCache; + + /* Built-in method references that are verified to be native. */ + var Map$1 = _getNative(_root, 'Map'); + + var _Map = Map$1; + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new _Hash, + 'map': new (_Map || _ListCache), + 'string': new _Hash + }; + } + + var _mapCacheClear = mapCacheClear; + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + var _isKeyable = isKeyable; + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return _isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + var _getMapData = getMapData; + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = _getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + var _mapCacheDelete = mapCacheDelete; + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return _getMapData(this, key).get(key); + } + + var _mapCacheGet = mapCacheGet; + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return _getMapData(this, key).has(key); + } + + var _mapCacheHas = mapCacheHas; + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = _getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + var _mapCacheSet = mapCacheSet; + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = _mapCacheClear; + MapCache.prototype['delete'] = _mapCacheDelete; + MapCache.prototype.get = _mapCacheGet; + MapCache.prototype.has = _mapCacheHas; + MapCache.prototype.set = _mapCacheSet; + + var _MapCache = MapCache; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || _MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = _MapCache; + + var memoize_1 = memoize; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize_1(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + var _memoizeCapped = memoizeCapped; + + /** Used to match property names within property paths. */ + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + var _stringToPath = stringToPath; + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + var _arrayMap = arrayMap; + + /** Used as references for various `Number` constants. */ + var INFINITY$1 = 1 / 0; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = _Symbol ? _Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray_1(value)) { + // Recursively convert values (susceptible to call stack limits). + return _arrayMap(value, baseToString) + ''; + } + if (isSymbol_1(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result; + } + + var _baseToString = baseToString; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString$1(value) { + return value == null ? '' : _baseToString(value); + } + + var toString_1 = toString$1; + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray_1(value)) { + return value; + } + return _isKey(value, object) ? [value] : _stringToPath(toString_1(value)); + } + + var _castPath = castPath; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol_1(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + var _toKey = toKey; + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = _castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[_toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + var _baseGet = baseGet; + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : _baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + var get_1 = get; + + var defineProperty = (function() { + try { + var func = _getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + var _defineProperty = defineProperty; + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && _defineProperty) { + _defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + var _baseAssignValue = baseAssignValue; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq_1(objValue, value)) || + (value === undefined && !(key in object))) { + _baseAssignValue(object, key, value); + } + } + + var _assignValue = assignValue; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + var _isIndex = isIndex; + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject_1(object)) { + return object; + } + path = _castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = _toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject_1(objValue) + ? objValue + : (_isIndex(path[index + 1]) ? [] : {}); + } + } + _assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + var _baseSet = baseSet; + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : _baseSet(object, path, value); + } + + var set_1 = set; + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + var _copyArray = copyArray; + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray_1(value)) { + return _arrayMap(value, _toKey); + } + return isSymbol_1(value) ? [value] : _copyArray(_stringToPath(toString_1(value))); + } + + var toPath_1 = toPath; + + var define$2 = { + // access data field + data: function data(params) { + var defaults = { + field: 'data', + bindingEvent: 'data', + allowBinding: false, + allowSetting: false, + allowGetting: false, + settingEvent: 'data', + settingTriggersEvent: false, + triggerFnName: 'trigger', + immutableKeys: {}, + // key => true if immutable + updateStyle: false, + beforeGet: function beforeGet(self) {}, + beforeSet: function beforeSet(self, obj) {}, + onSet: function onSet(self) {}, + canSet: function canSet(self) { + return true; + } + }; + params = extend({}, defaults, params); + return function dataImpl(name, value) { + var p = params; + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + var single = selfIsArrayLike ? self[0] : self; // .data('foo', ...) + + if (string(name)) { + // set or get property + var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot + + var path = isPathLike && toPath_1(name); // .data('foo') + + if (p.allowGetting && value === undefined) { + // get + var ret; + + if (single) { + p.beforeGet(single); // check if it's path and a field with the same name doesn't exist + + if (path && single._private[p.field][name] === undefined) { + ret = get_1(single._private[p.field], path); + } else { + ret = single._private[p.field][name]; + } + } + + return ret; // .data('foo', 'bar') + } else if (p.allowSetting && value !== undefined) { + // set + var valid = !p.immutableKeys[name]; + + if (valid) { + var change = _defineProperty$1({}, name, value); + + p.beforeSet(self, change); + + for (var i = 0, l = all.length; i < l; i++) { + var ele = all[i]; + + if (p.canSet(ele)) { + if (path && single._private[p.field][name] === undefined) { + set_1(ele._private[p.field], path, value); + } else { + ele._private[p.field][name] = value; + } + } + } // update mappers if asked + + + if (p.updateStyle) { + self.updateStyle(); + } // call onSet callback + + + p.onSet(self); + + if (p.settingTriggersEvent) { + self[p.triggerFnName](p.settingEvent); + } + } + } // .data({ 'foo': 'bar' }) + + } else if (p.allowSetting && plainObject(name)) { + // extend + var obj = name; + var k, v; + var keys = Object.keys(obj); + p.beforeSet(self, obj); + + for (var _i = 0; _i < keys.length; _i++) { + k = keys[_i]; + v = obj[k]; + + var _valid = !p.immutableKeys[k]; + + if (_valid) { + for (var j = 0; j < all.length; j++) { + var _ele = all[j]; + + if (p.canSet(_ele)) { + _ele._private[p.field][k] = v; + } + } + } + } // update mappers if asked + + + if (p.updateStyle) { + self.updateStyle(); + } // call onSet callback + + + p.onSet(self); + + if (p.settingTriggersEvent) { + self[p.triggerFnName](p.settingEvent); + } // .data(function(){ ... }) + + } else if (p.allowBinding && fn$6(name)) { + // bind to event + var fn = name; + self.on(p.bindingEvent, fn); // .data() + } else if (p.allowGetting && name === undefined) { + // get whole object + var _ret; + + if (single) { + p.beforeGet(single); + _ret = single._private[p.field]; + } + + return _ret; + } + + return self; // maintain chainability + }; // function + }, + // data + // remove data field + removeData: function removeData(params) { + var defaults = { + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: false, + immutableKeys: {} // key => true if immutable + + }; + params = extend({}, defaults, params); + return function removeDataImpl(names) { + var p = params; + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + // .removeData('foo bar') + + if (string(names)) { + // then get the list of keys, and delete them + var keys = names.split(/\s+/); + var l = keys.length; + + for (var i = 0; i < l; i++) { + // delete each non-empty key + var key = keys[i]; + + if (emptyString(key)) { + continue; + } + + var valid = !p.immutableKeys[key]; // not valid if immutable + + if (valid) { + for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) { + all[i_a]._private[p.field][key] = undefined; + } + } + } + + if (p.triggerEvent) { + self[p.triggerFnName](p.event); + } // .removeData() + + } else if (names === undefined) { + // then delete all keys + for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) { + var _privateFields = all[_i_a]._private[p.field]; + + var _keys = Object.keys(_privateFields); + + for (var _i2 = 0; _i2 < _keys.length; _i2++) { + var _key = _keys[_i2]; + var validKeyToDelete = !p.immutableKeys[_key]; + + if (validKeyToDelete) { + _privateFields[_key] = undefined; + } + } + } + + if (p.triggerEvent) { + self[p.triggerFnName](p.event); + } + } + + return self; // maintain chaining + }; // function + } // removeData + + }; // define + + var define$1 = { + eventAliasesOn: function eventAliasesOn(proto) { + var p = proto; + p.addListener = p.listen = p.bind = p.on; + p.unlisten = p.unbind = p.off = p.removeListener; + p.trigger = p.emit; // this is just a wrapper alias of .on() + + p.pon = p.promiseOn = function (events, selector) { + var self = this; + var args = Array.prototype.slice.call(arguments, 0); + return new Promise$1(function (resolve, reject) { + var callback = function callback(e) { + self.off.apply(self, offArgs); + resolve(e); + }; + + var onArgs = args.concat([callback]); + var offArgs = onArgs.concat([]); + self.on.apply(self, onArgs); + }); + }; + } + }; // define + + // use this module to cherry pick functions into your prototype + var define = {}; + [define$3, define$2, define$1].forEach(function (m) { + extend(define, m); + }); + + var elesfn$i = { + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop() + }; + + var elesfn$h = { + classes: function classes(_classes) { + var self = this; + + if (_classes === undefined) { + var ret = []; + + self[0]._private.classes.forEach(function (cls) { + return ret.push(cls); + }); + + return ret; + } else if (!array(_classes)) { + // extract classes from string + _classes = (_classes || '').match(/\S+/g) || []; + } + + var changed = []; + var classesSet = new Set$1(_classes); // check and update each ele + + for (var j = 0; j < self.length; j++) { + var ele = self[j]; + var _p = ele._private; + var eleClasses = _p.classes; + var changedEle = false; // check if ele has all of the passed classes + + for (var i = 0; i < _classes.length; i++) { + var cls = _classes[i]; + var eleHasClass = eleClasses.has(cls); + + if (!eleHasClass) { + changedEle = true; + break; + } + } // check if ele has classes outside of those passed + + + if (!changedEle) { + changedEle = eleClasses.size !== _classes.length; + } + + if (changedEle) { + _p.classes = classesSet; + changed.push(ele); + } + } // trigger update style on those eles that had class changes + + + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit('class'); + } + + return self; + }, + addClass: function addClass(classes) { + return this.toggleClass(classes, true); + }, + hasClass: function hasClass(className) { + var ele = this[0]; + return ele != null && ele._private.classes.has(className); + }, + toggleClass: function toggleClass(classes, toggle) { + if (!array(classes)) { + // extract classes from string + classes = classes.match(/\S+/g) || []; + } + + var self = this; + var toggleUndefd = toggle === undefined; + var changed = []; // eles who had classes changed + + for (var i = 0, il = self.length; i < il; i++) { + var ele = self[i]; + var eleClasses = ele._private.classes; + var changedEle = false; + + for (var j = 0; j < classes.length; j++) { + var cls = classes[j]; + var hasClass = eleClasses.has(cls); + var changedNow = false; + + if (toggle || toggleUndefd && !hasClass) { + eleClasses.add(cls); + changedNow = true; + } else if (!toggle || toggleUndefd && hasClass) { + eleClasses["delete"](cls); + changedNow = true; + } + + if (!changedEle && changedNow) { + changed.push(ele); + changedEle = true; + } + } // for j classes + + } // for i eles + // trigger update style on those eles that had class changes + + + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit('class'); + } + + return self; + }, + removeClass: function removeClass(classes) { + return this.toggleClass(classes, false); + }, + flashClass: function flashClass(classes, duration) { + var self = this; + + if (duration == null) { + duration = 250; + } else if (duration === 0) { + return self; // nothing to do really + } + + self.addClass(classes); + setTimeout(function () { + self.removeClass(classes); + }, duration); + return self; + } + }; + elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; + + var tokens = { + metaChar: '[\\!\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', + // chars we need to escape in let names, etc + comparatorOp: '=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=', + // binary comparison op (used in data selectors) + boolOp: '\\?|\\!|\\^', + // boolean (unary) operators (used in data selectors) + string: '"(?:\\\\"|[^"])*"' + '|' + "'(?:\\\\'|[^'])*'", + // string literals (used in data selectors) -- doublequotes | singlequotes + number: number, + // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 + meta: 'degree|indegree|outdegree', + // allowed metadata fields (i.e. allowed functions to use from Collection) + separator: '\\s*,\\s*', + // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass + descendant: '\\s+', + child: '\\s+>\\s+', + subject: '\\$', + group: 'node|edge|\\*', + directedEdge: '\\s+->\\s+', + undirectedEdge: '\\s+<->\\s+' + }; + tokens.variable = '(?:[\\w-.]|(?:\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods + + tokens.className = '(?:[\\w-]|(?:\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name + + tokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number + + tokens.id = tokens.variable; // an element id (follows variable conventions) + + (function () { + var ops, op, i; // add @ variants to comparatorOp + + ops = tokens.comparatorOp.split('|'); + + for (i = 0; i < ops.length; i++) { + op = ops[i]; + tokens.comparatorOp += '|@' + op; + } // add ! variants to comparatorOp + + + ops = tokens.comparatorOp.split('|'); + + for (i = 0; i < ops.length; i++) { + op = ops[i]; + + if (op.indexOf('!') >= 0) { + continue; + } // skip ops that explicitly contain ! + + + if (op === '=') { + continue; + } // skip = b/c != is explicitly defined + + + tokens.comparatorOp += '|\\!' + op; + } + })(); + + /** + * Make a new query object + * + * @prop type {Type} The type enum (int) of the query + * @prop checks List of checks to make against an ele to test for a match + */ + var newQuery = function newQuery() { + return { + checks: [] + }; + }; + + /** + * A check type enum-like object. Uses integer values for fast match() lookup. + * The ordering does not matter as long as the ints are unique. + */ + var Type = { + /** E.g. node */ + GROUP: 0, + + /** A collection of elements */ + COLLECTION: 1, + + /** A filter(ele) function */ + FILTER: 2, + + /** E.g. [foo > 1] */ + DATA_COMPARE: 3, + + /** E.g. [foo] */ + DATA_EXIST: 4, + + /** E.g. [?foo] */ + DATA_BOOL: 5, + + /** E.g. [[degree > 2]] */ + META_COMPARE: 6, + + /** E.g. :selected */ + STATE: 7, + + /** E.g. #foo */ + ID: 8, + + /** E.g. .foo */ + CLASS: 9, + + /** E.g. #foo <-> #bar */ + UNDIRECTED_EDGE: 10, + + /** E.g. #foo -> #bar */ + DIRECTED_EDGE: 11, + + /** E.g. $#foo -> #bar */ + NODE_SOURCE: 12, + + /** E.g. #foo -> $#bar */ + NODE_TARGET: 13, + + /** E.g. $#foo <-> #bar */ + NODE_NEIGHBOR: 14, + + /** E.g. #foo > #bar */ + CHILD: 15, + + /** E.g. #foo #bar */ + DESCENDANT: 16, + + /** E.g. $#foo > #bar */ + PARENT: 17, + + /** E.g. $#foo #bar */ + ANCESTOR: 18, + + /** E.g. #foo > $bar > #baz */ + COMPOUND_SPLIT: 19, + + /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ + TRUE: 20 + }; + + var stateSelectors = [{ + selector: ':selected', + matches: function matches(ele) { + return ele.selected(); + } + }, { + selector: ':unselected', + matches: function matches(ele) { + return !ele.selected(); + } + }, { + selector: ':selectable', + matches: function matches(ele) { + return ele.selectable(); + } + }, { + selector: ':unselectable', + matches: function matches(ele) { + return !ele.selectable(); + } + }, { + selector: ':locked', + matches: function matches(ele) { + return ele.locked(); + } + }, { + selector: ':unlocked', + matches: function matches(ele) { + return !ele.locked(); + } + }, { + selector: ':visible', + matches: function matches(ele) { + return ele.visible(); + } + }, { + selector: ':hidden', + matches: function matches(ele) { + return !ele.visible(); + } + }, { + selector: ':transparent', + matches: function matches(ele) { + return ele.transparent(); + } + }, { + selector: ':grabbed', + matches: function matches(ele) { + return ele.grabbed(); + } + }, { + selector: ':free', + matches: function matches(ele) { + return !ele.grabbed(); + } + }, { + selector: ':removed', + matches: function matches(ele) { + return ele.removed(); + } + }, { + selector: ':inside', + matches: function matches(ele) { + return !ele.removed(); + } + }, { + selector: ':grabbable', + matches: function matches(ele) { + return ele.grabbable(); + } + }, { + selector: ':ungrabbable', + matches: function matches(ele) { + return !ele.grabbable(); + } + }, { + selector: ':animated', + matches: function matches(ele) { + return ele.animated(); + } + }, { + selector: ':unanimated', + matches: function matches(ele) { + return !ele.animated(); + } + }, { + selector: ':parent', + matches: function matches(ele) { + return ele.isParent(); + } + }, { + selector: ':childless', + matches: function matches(ele) { + return ele.isChildless(); + } + }, { + selector: ':child', + matches: function matches(ele) { + return ele.isChild(); + } + }, { + selector: ':orphan', + matches: function matches(ele) { + return ele.isOrphan(); + } + }, { + selector: ':nonorphan', + matches: function matches(ele) { + return ele.isChild(); + } + }, { + selector: ':compound', + matches: function matches(ele) { + if (ele.isNode()) { + return ele.isParent(); + } else { + return ele.source().isParent() || ele.target().isParent(); + } + } + }, { + selector: ':loop', + matches: function matches(ele) { + return ele.isLoop(); + } + }, { + selector: ':simple', + matches: function matches(ele) { + return ele.isSimple(); + } + }, { + selector: ':active', + matches: function matches(ele) { + return ele.active(); + } + }, { + selector: ':inactive', + matches: function matches(ele) { + return !ele.active(); + } + }, { + selector: ':backgrounding', + matches: function matches(ele) { + return ele.backgrounding(); + } + }, { + selector: ':nonbackgrounding', + matches: function matches(ele) { + return !ele.backgrounding(); + } + }].sort(function (a, b) { + // n.b. selectors that are starting substrings of others must have the longer ones first + return descending(a.selector, b.selector); + }); + + var lookup = function () { + var selToFn = {}; + var s; + + for (var i = 0; i < stateSelectors.length; i++) { + s = stateSelectors[i]; + selToFn[s.selector] = s.matches; + } + + return selToFn; + }(); + + var stateSelectorMatches = function stateSelectorMatches(sel, ele) { + return lookup[sel](ele); + }; + var stateSelectorRegex = '(' + stateSelectors.map(function (s) { + return s.selector; + }).join('|') + ')'; + + // so that values get compared properly in Selector.filter() + + var cleanMetaChars = function cleanMetaChars(str) { + return str.replace(new RegExp('\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) { + return $1; + }); + }; + + var replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) { + selector[selector.length - 1] = replacementQuery; + }; // NOTE: add new expression syntax here to have it recognised by the parser; + // - a query contains all adjacent (i.e. no separator in between) expressions; + // - the current query is stored in selector[i] + // - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward + + + var exprs = [{ + name: 'group', + // just used for identifying when debugging + query: true, + regex: '(' + tokens.group + ')', + populate: function populate(selector, query, _ref) { + var _ref2 = _slicedToArray(_ref, 1), + group = _ref2[0]; + + query.checks.push({ + type: Type.GROUP, + value: group === '*' ? group : group + 's' + }); + } + }, { + name: 'state', + query: true, + regex: stateSelectorRegex, + populate: function populate(selector, query, _ref3) { + var _ref4 = _slicedToArray(_ref3, 1), + state = _ref4[0]; + + query.checks.push({ + type: Type.STATE, + value: state + }); + } + }, { + name: 'id', + query: true, + regex: '\\#(' + tokens.id + ')', + populate: function populate(selector, query, _ref5) { + var _ref6 = _slicedToArray(_ref5, 1), + id = _ref6[0]; + + query.checks.push({ + type: Type.ID, + value: cleanMetaChars(id) + }); + } + }, { + name: 'className', + query: true, + regex: '\\.(' + tokens.className + ')', + populate: function populate(selector, query, _ref7) { + var _ref8 = _slicedToArray(_ref7, 1), + className = _ref8[0]; + + query.checks.push({ + type: Type.CLASS, + value: cleanMetaChars(className) + }); + } + }, { + name: 'dataExists', + query: true, + regex: '\\[\\s*(' + tokens.variable + ')\\s*\\]', + populate: function populate(selector, query, _ref9) { + var _ref10 = _slicedToArray(_ref9, 1), + variable = _ref10[0]; + + query.checks.push({ + type: Type.DATA_EXIST, + field: cleanMetaChars(variable) + }); + } + }, { + name: 'dataCompare', + query: true, + regex: '\\[\\s*(' + tokens.variable + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.value + ')\\s*\\]', + populate: function populate(selector, query, _ref11) { + var _ref12 = _slicedToArray(_ref11, 3), + variable = _ref12[0], + comparatorOp = _ref12[1], + value = _ref12[2]; + + var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null; + + if (valueIsString) { + value = value.substring(1, value.length - 1); + } else { + value = parseFloat(value); + } + + query.checks.push({ + type: Type.DATA_COMPARE, + field: cleanMetaChars(variable), + operator: comparatorOp, + value: value + }); + } + }, { + name: 'dataBool', + query: true, + regex: '\\[\\s*(' + tokens.boolOp + ')\\s*(' + tokens.variable + ')\\s*\\]', + populate: function populate(selector, query, _ref13) { + var _ref14 = _slicedToArray(_ref13, 2), + boolOp = _ref14[0], + variable = _ref14[1]; + + query.checks.push({ + type: Type.DATA_BOOL, + field: cleanMetaChars(variable), + operator: boolOp + }); + } + }, { + name: 'metaCompare', + query: true, + regex: '\\[\\[\\s*(' + tokens.meta + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.number + ')\\s*\\]\\]', + populate: function populate(selector, query, _ref15) { + var _ref16 = _slicedToArray(_ref15, 3), + meta = _ref16[0], + comparatorOp = _ref16[1], + number = _ref16[2]; + + query.checks.push({ + type: Type.META_COMPARE, + field: cleanMetaChars(meta), + operator: comparatorOp, + value: parseFloat(number) + }); + } + }, { + name: 'nextQuery', + separator: true, + regex: tokens.separator, + populate: function populate(selector, query) { + var currentSubject = selector.currentSubject; + var edgeCount = selector.edgeCount; + var compoundCount = selector.compoundCount; + var lastQ = selector[selector.length - 1]; + + if (currentSubject != null) { + lastQ.subject = currentSubject; + selector.currentSubject = null; + } + + lastQ.edgeCount = edgeCount; + lastQ.compoundCount = compoundCount; + selector.edgeCount = 0; + selector.compoundCount = 0; // go on to next query + + var nextQuery = selector[selector.length++] = newQuery(); + return nextQuery; // this is the new query to be filled by the following exprs + } + }, { + name: 'directedEdge', + separator: true, + regex: tokens.directedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // undirected edge + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.DIRECTED_EDGE, + source: source, + target: target + }); // the query in the selector should be the edge rather than the source + + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; // we're now populating the target query with expressions that follow + + return target; + } else { + // source/target + var srcTgtQ = newQuery(); + var _source = query; + + var _target = newQuery(); + + srcTgtQ.checks.push({ + type: Type.NODE_SOURCE, + source: _source, + target: _target + }); // the query in the selector should be the neighbourhood rather than the node + + replaceLastQuery(selector, query, srcTgtQ); + selector.edgeCount++; + return _target; // now populating the target with the following expressions + } + } + }, { + name: 'undirectedEdge', + separator: true, + regex: tokens.undirectedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // undirected edge + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.UNDIRECTED_EDGE, + nodes: [source, target] + }); // the query in the selector should be the edge rather than the source + + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; // we're now populating the target query with expressions that follow + + return target; + } else { + // neighbourhood + var nhoodQ = newQuery(); + var node = query; + var neighbor = newQuery(); + nhoodQ.checks.push({ + type: Type.NODE_NEIGHBOR, + node: node, + neighbor: neighbor + }); // the query in the selector should be the neighbourhood rather than the node + + replaceLastQuery(selector, query, nhoodQ); + return neighbor; // now populating the neighbor with following expressions + } + } + }, { + name: 'child', + separator: true, + regex: tokens.child, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // default: child query + var parentChildQuery = newQuery(); + var child = newQuery(); + var parent = selector[selector.length - 1]; + parentChildQuery.checks.push({ + type: Type.CHILD, + parent: parent, + child: child + }); // the query in the selector should be the '>' itself + + replaceLastQuery(selector, query, parentChildQuery); + selector.compoundCount++; // we're now populating the child query with expressions that follow + + return child; + } else if (selector.currentSubject === query) { + // compound split query + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + + var _child = newQuery(); + + var _parent = newQuery(); // set up the root compound q + + + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left: left, + right: right, + subject: subject + }); // populate the subject and replace the q at the old spot (within left) with TRUE + + subject.checks = query.checks; // take the checks from the left + + query.checks = [{ + type: Type.TRUE + }]; // checks under left refs the subject implicitly + // set up the right q + + _parent.checks.push({ + type: Type.TRUE + }); // parent implicitly refs the subject + + + right.checks.push({ + type: Type.PARENT, + // type is swapped on right side queries + parent: _parent, + child: _child // empty for now + + }); + replaceLastQuery(selector, left, compound); // update the ref since we moved things around for `query` + + selector.currentSubject = subject; + selector.compoundCount++; + return _child; // now populating the right side's child + } else { + // parent query + // info for parent query + var _parent2 = newQuery(); + + var _child2 = newQuery(); + + var pcQChecks = [{ + type: Type.PARENT, + parent: _parent2, + child: _child2 + }]; // the parent-child query takes the place of the query previously being populated + + _parent2.checks = query.checks; // the previous query contains the checks for the parent + + query.checks = pcQChecks; // pc query takes over + + selector.compoundCount++; + return _child2; // we're now populating the child + } + } + }, { + name: 'descendant', + separator: true, + regex: tokens.descendant, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // default: descendant query + var ancChQuery = newQuery(); + var descendant = newQuery(); + var ancestor = selector[selector.length - 1]; + ancChQuery.checks.push({ + type: Type.DESCENDANT, + ancestor: ancestor, + descendant: descendant + }); // the query in the selector should be the '>' itself + + replaceLastQuery(selector, query, ancChQuery); + selector.compoundCount++; // we're now populating the descendant query with expressions that follow + + return descendant; + } else if (selector.currentSubject === query) { + // compound split query + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + + var _descendant = newQuery(); + + var _ancestor = newQuery(); // set up the root compound q + + + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left: left, + right: right, + subject: subject + }); // populate the subject and replace the q at the old spot (within left) with TRUE + + subject.checks = query.checks; // take the checks from the left + + query.checks = [{ + type: Type.TRUE + }]; // checks under left refs the subject implicitly + // set up the right q + + _ancestor.checks.push({ + type: Type.TRUE + }); // ancestor implicitly refs the subject + + + right.checks.push({ + type: Type.ANCESTOR, + // type is swapped on right side queries + ancestor: _ancestor, + descendant: _descendant // empty for now + + }); + replaceLastQuery(selector, left, compound); // update the ref since we moved things around for `query` + + selector.currentSubject = subject; + selector.compoundCount++; + return _descendant; // now populating the right side's descendant + } else { + // ancestor query + // info for parent query + var _ancestor2 = newQuery(); + + var _descendant2 = newQuery(); + + var adQChecks = [{ + type: Type.ANCESTOR, + ancestor: _ancestor2, + descendant: _descendant2 + }]; // the parent-child query takes the place of the query previously being populated + + _ancestor2.checks = query.checks; // the previous query contains the checks for the parent + + query.checks = adQChecks; // pc query takes over + + selector.compoundCount++; + return _descendant2; // we're now populating the child + } + } + }, { + name: 'subject', + modifier: true, + regex: tokens.subject, + populate: function populate(selector, query) { + if (selector.currentSubject != null && selector.currentSubject !== query) { + warn('Redefinition of subject in selector `' + selector.toString() + '`'); + return false; + } + + selector.currentSubject = query; + var topQ = selector[selector.length - 1]; + var topChk = topQ.checks[0]; + var topType = topChk == null ? null : topChk.type; + + if (topType === Type.DIRECTED_EDGE) { + // directed edge with subject on the target + // change to target node check + topChk.type = Type.NODE_TARGET; + } else if (topType === Type.UNDIRECTED_EDGE) { + // undirected edge with subject on the second node + // change to neighbor check + topChk.type = Type.NODE_NEIGHBOR; + topChk.node = topChk.nodes[1]; // second node is subject + + topChk.neighbor = topChk.nodes[0]; // clean up unused fields for new type + + topChk.nodes = null; + } + } + }]; + exprs.forEach(function (e) { + return e.regexObj = new RegExp('^' + e.regex); + }); + + /** + * Of all the expressions, find the first match in the remaining text. + * @param {string} remaining The remaining text to parse + * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }` + */ + + var consumeExpr = function consumeExpr(remaining) { + var expr; + var match; + var name; + + for (var j = 0; j < exprs.length; j++) { + var e = exprs[j]; + var n = e.name; + var m = remaining.match(e.regexObj); + + if (m != null) { + match = m; + expr = e; + name = n; + var consumed = m[0]; + remaining = remaining.substring(consumed.length); + break; // we've consumed one expr, so we can return now + } + } + + return { + expr: expr, + match: match, + name: name, + remaining: remaining + }; + }; + /** + * Consume all the leading whitespace + * @param {string} remaining The text to consume + * @returns The text with the leading whitespace removed + */ + + + var consumeWhitespace = function consumeWhitespace(remaining) { + var match = remaining.match(/^\s+/); + + if (match) { + var consumed = match[0]; + remaining = remaining.substring(consumed.length); + } + + return remaining; + }; + /** + * Parse the string and store the parsed representation in the Selector. + * @param {string} selector The selector string + * @returns `true` if the selector was successfully parsed, `false` otherwise + */ + + + var parse = function parse(selector) { + var self = this; + var remaining = self.inputText = selector; + var currentQuery = self[0] = newQuery(); + self.length = 1; + remaining = consumeWhitespace(remaining); // get rid of leading whitespace + + for (;;) { + var exprInfo = consumeExpr(remaining); + + if (exprInfo.expr == null) { + warn('The selector `' + selector + '`is invalid'); + return false; + } else { + var args = exprInfo.match.slice(1); // let the token populate the selector object in currentQuery + + var ret = exprInfo.expr.populate(self, currentQuery, args); + + if (ret === false) { + return false; // exit if population failed + } else if (ret != null) { + currentQuery = ret; // change the current query to be filled if the expr specifies + } + } + + remaining = exprInfo.remaining; // we're done when there's nothing left to parse + + if (remaining.match(/^\s*$/)) { + break; + } + } + + var lastQ = self[self.length - 1]; + + if (self.currentSubject != null) { + lastQ.subject = self.currentSubject; + } + + lastQ.edgeCount = self.edgeCount; + lastQ.compoundCount = self.compoundCount; + + for (var i = 0; i < self.length; i++) { + var q = self[i]; // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations + + if (q.compoundCount > 0 && q.edgeCount > 0) { + warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector'); + return false; + } + + if (q.edgeCount > 1) { + warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors'); + return false; + } else if (q.edgeCount === 1) { + warn('The selector `' + selector + '` 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 true; // success + }; + /** + * Get the selector represented as a string. This value uses default formatting, + * so things like spacing may differ from the input text passed to the constructor. + * @returns {string} The selector string + */ + + + var toString = function toString() { + if (this.toStringCache != null) { + return this.toStringCache; + } + + var clean = function clean(obj) { + if (obj == null) { + return ''; + } else { + return obj; + } + }; + + var cleanVal = function cleanVal(val) { + if (string(val)) { + return '"' + val + '"'; + } else { + return clean(val); + } + }; + + var space = function space(val) { + return ' ' + val + ' '; + }; + + var checkToString = function checkToString(check, subject) { + var type = check.type, + value = check.value; + + switch (type) { + case Type.GROUP: + { + var group = clean(value); + return group.substring(0, group.length - 1); + } + + case Type.DATA_COMPARE: + { + var field = check.field, + operator = check.operator; + return '[' + field + space(clean(operator)) + cleanVal(value) + ']'; + } + + case Type.DATA_BOOL: + { + var _operator = check.operator, + _field = check.field; + return '[' + clean(_operator) + _field + ']'; + } + + case Type.DATA_EXIST: + { + var _field2 = check.field; + return '[' + _field2 + ']'; + } + + case Type.META_COMPARE: + { + var _operator2 = check.operator, + _field3 = check.field; + return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]'; + } + + case Type.STATE: + { + return value; + } + + case Type.ID: + { + return '#' + value; + } + + case Type.CLASS: + { + return '.' + value; + } + + case Type.PARENT: + case Type.CHILD: + { + return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject); + } + + case Type.ANCESTOR: + case Type.DESCENDANT: + { + return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject); + } + + case Type.COMPOUND_SPLIT: + { + var lhs = queryToString(check.left, subject); + var sub = queryToString(check.subject, subject); + var rhs = queryToString(check.right, subject); + return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs; + } + + case Type.TRUE: + { + return ''; + } + } + }; + + var queryToString = function queryToString(query, subject) { + return query.checks.reduce(function (str, chk, i) { + return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject); + }, ''); + }; + + var str = ''; + + for (var i = 0; i < this.length; i++) { + var query = this[i]; + str += queryToString(query, query.subject); + + if (this.length > 1 && i < this.length - 1) { + str += ', '; + } + } + + this.toStringCache = str; + return str; + }; + var parse$1 = { + parse: parse, + toString: toString + }; + + var valCmp = function valCmp(fieldVal, operator, value) { + var matches; + var isFieldStr = string(fieldVal); + var isFieldNum = number$1(fieldVal); + var isValStr = string(value); + var fieldStr, valStr; + var caseInsensitive = false; + var notExpr = false; + var isIneqCmp = false; + + if (operator.indexOf('!') >= 0) { + operator = operator.replace('!', ''); + notExpr = true; + } + + if (operator.indexOf('@') >= 0) { + operator = operator.replace('@', ''); + caseInsensitive = true; + } + + if (isFieldStr || isValStr || caseInsensitive) { + fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal; + valStr = '' + value; + } // if we're doing a case insensitive comparison, then we're using a STRING comparison + // even if we're comparing numbers + + + if (caseInsensitive) { + fieldVal = fieldStr = fieldStr.toLowerCase(); + value = valStr = valStr.toLowerCase(); + } + + switch (operator) { + case '*=': + matches = fieldStr.indexOf(valStr) >= 0; + break; + + case '$=': + matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; + break; + + case '^=': + matches = fieldStr.indexOf(valStr) === 0; + break; + + case '=': + matches = fieldVal === value; + break; + + case '>': + isIneqCmp = true; + matches = fieldVal > value; + break; + + case '>=': + isIneqCmp = true; + matches = fieldVal >= value; + break; + + case '<': + isIneqCmp = true; + matches = fieldVal < value; + break; + + case '<=': + isIneqCmp = true; + matches = fieldVal <= value; + break; + + default: + matches = false; + break; + } // apply the not op, but null vals for inequalities should always stay non-matching + + + if (notExpr && (fieldVal != null || !isIneqCmp)) { + matches = !matches; + } + + return matches; + }; + var boolCmp = function boolCmp(fieldVal, operator) { + switch (operator) { + case '?': + return fieldVal ? true : false; + + case '!': + return fieldVal ? false : true; + + case '^': + return fieldVal === undefined; + } + }; + var existCmp = function existCmp(fieldVal) { + return fieldVal !== undefined; + }; + var data$1 = function data(ele, field) { + return ele.data(field); + }; + var meta = function meta(ele, field) { + return ele[field](); + }; + + /** A lookup of `match(check, ele)` functions by `Type` int */ + + var match = []; + /** + * Returns whether the query matches for the element + * @param query The `{ type, value, ... }` query object + * @param ele The element to compare against + */ + + var matches$1 = function matches(query, ele) { + return query.checks.every(function (chk) { + return match[chk.type](chk, ele); + }); + }; + + match[Type.GROUP] = function (check, ele) { + var group = check.value; + return group === '*' || group === ele.group(); + }; + + match[Type.STATE] = function (check, ele) { + var stateSelector = check.value; + return stateSelectorMatches(stateSelector, ele); + }; + + match[Type.ID] = function (check, ele) { + var id = check.value; + return ele.id() === id; + }; + + match[Type.CLASS] = function (check, ele) { + var cls = check.value; + return ele.hasClass(cls); + }; + + match[Type.META_COMPARE] = function (check, ele) { + var field = check.field, + operator = check.operator, + value = check.value; + return valCmp(meta(ele, field), operator, value); + }; + + match[Type.DATA_COMPARE] = function (check, ele) { + var field = check.field, + operator = check.operator, + value = check.value; + return valCmp(data$1(ele, field), operator, value); + }; + + match[Type.DATA_BOOL] = function (check, ele) { + var field = check.field, + operator = check.operator; + return boolCmp(data$1(ele, field), operator); + }; + + match[Type.DATA_EXIST] = function (check, ele) { + var field = check.field; + check.operator; + return existCmp(data$1(ele, field)); + }; + + match[Type.UNDIRECTED_EDGE] = function (check, ele) { + var qA = check.nodes[0]; + var qB = check.nodes[1]; + var src = ele.source(); + var tgt = ele.target(); + return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); + }; + + match[Type.NODE_NEIGHBOR] = function (check, ele) { + return matches$1(check.node, ele) && ele.neighborhood().some(function (n) { + return n.isNode() && matches$1(check.neighbor, n); + }); + }; + + match[Type.DIRECTED_EDGE] = function (check, ele) { + return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); + }; + + match[Type.NODE_SOURCE] = function (check, ele) { + return matches$1(check.source, ele) && ele.outgoers().some(function (n) { + return n.isNode() && matches$1(check.target, n); + }); + }; + + match[Type.NODE_TARGET] = function (check, ele) { + return matches$1(check.target, ele) && ele.incomers().some(function (n) { + return n.isNode() && matches$1(check.source, n); + }); + }; + + match[Type.CHILD] = function (check, ele) { + return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); + }; + + match[Type.PARENT] = function (check, ele) { + return matches$1(check.parent, ele) && ele.children().some(function (c) { + return matches$1(check.child, c); + }); + }; + + match[Type.DESCENDANT] = function (check, ele) { + return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) { + return matches$1(check.ancestor, a); + }); + }; + + match[Type.ANCESTOR] = function (check, ele) { + return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) { + return matches$1(check.descendant, d); + }); + }; + + match[Type.COMPOUND_SPLIT] = function (check, ele) { + return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); + }; + + match[Type.TRUE] = function () { + return true; + }; + + match[Type.COLLECTION] = function (check, ele) { + var collection = check.value; + return collection.has(ele); + }; + + match[Type.FILTER] = function (check, ele) { + var filter = check.value; + return filter(ele); + }; + + var filter = function filter(collection) { + var self = this; // for 1 id #foo queries, just get the element + + if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) { + return collection.getElementById(self[0].checks[0].value).collection(); + } + + var selectorFunction = function selectorFunction(element) { + for (var j = 0; j < self.length; j++) { + var query = self[j]; + + if (matches$1(query, element)) { + return true; + } + } + + return false; + }; + + if (self.text() == null) { + selectorFunction = function selectorFunction() { + return true; + }; + } + + return collection.filter(selectorFunction); + }; // filter + // does selector match a single element? + + + var matches = function matches(ele) { + var self = this; + + for (var j = 0; j < self.length; j++) { + var query = self[j]; + + if (matches$1(query, ele)) { + return true; + } + } + + return false; + }; // matches + + + var matching = { + matches: matches, + filter: filter + }; + + var Selector = function Selector(selector) { + this.inputText = selector; + this.currentSubject = null; + this.compoundCount = 0; + this.edgeCount = 0; + this.length = 0; + + if (selector == null || string(selector) && selector.match(/^\s*$/)) ; else if (elementOrCollection(selector)) { + this.addQuery({ + checks: [{ + type: Type.COLLECTION, + value: selector.collection() + }] + }); + } else if (fn$6(selector)) { + this.addQuery({ + checks: [{ + type: Type.FILTER, + value: selector + }] + }); + } else if (string(selector)) { + if (!this.parse(selector)) { + this.invalid = true; + } + } else { + error('A selector must be created from a string; found '); + } + }; + + var selfn = Selector.prototype; + [parse$1, matching].forEach(function (p) { + return extend(selfn, p); + }); + + selfn.text = function () { + return this.inputText; + }; + + selfn.size = function () { + return this.length; + }; + + selfn.eq = function (i) { + return this[i]; + }; + + selfn.sameText = function (otherSel) { + return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); + }; + + selfn.addQuery = function (q) { + this[this.length++] = q; + }; + + selfn.selector = selfn.toString; + + var elesfn$g = { + allAre: function allAre(selector) { + var selObj = new Selector(selector); + return this.every(function (ele) { + return selObj.matches(ele); + }); + }, + is: function is(selector) { + var selObj = new Selector(selector); + return this.some(function (ele) { + return selObj.matches(ele); + }); + }, + some: function some(fn, thisArg) { + for (var i = 0; i < this.length; i++) { + var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); + + if (ret) { + return true; + } + } + + return false; + }, + every: function every(fn, thisArg) { + for (var i = 0; i < this.length; i++) { + var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); + + if (!ret) { + return false; + } + } + + return true; + }, + same: function same(collection) { + // cheap collection ref check + if (this === collection) { + return true; + } + + collection = this.cy().collection(collection); + var thisLength = this.length; + var collectionLength = collection.length; // cheap length check + + if (thisLength !== collectionLength) { + return false; + } // cheap element ref check + + + if (thisLength === 1) { + return this[0] === collection[0]; + } + + return this.every(function (ele) { + return collection.hasElementWithId(ele.id()); + }); + }, + anySame: function anySame(collection) { + collection = this.cy().collection(collection); + return this.some(function (ele) { + return collection.hasElementWithId(ele.id()); + }); + }, + allAreNeighbors: function allAreNeighbors(collection) { + collection = this.cy().collection(collection); + var nhood = this.neighborhood(); + return collection.every(function (ele) { + return nhood.hasElementWithId(ele.id()); + }); + }, + contains: function contains(collection) { + collection = this.cy().collection(collection); + var self = this; + return collection.every(function (ele) { + return self.hasElementWithId(ele.id()); + }); + } + }; + elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; + elesfn$g.has = elesfn$g.contains; + elesfn$g.equal = elesfn$g.equals = elesfn$g.same; + + var cache = function cache(fn, name) { + return function traversalCache(arg1, arg2, arg3, arg4) { + var selectorOrEles = arg1; + var eles = this; + var key; + + if (selectorOrEles == null) { + key = ''; + } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { + key = selectorOrEles.id(); + } + + if (eles.length === 1 && key) { + var _p = eles[0]._private; + var tch = _p.traversalCache = _p.traversalCache || {}; + var ch = tch[name] = tch[name] || []; + var hash = hashString(key); + var cacheHit = ch[hash]; + + if (cacheHit) { + return cacheHit; + } else { + return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4); + } + } else { + return fn.call(eles, arg1, arg2, arg3, arg4); + } + }; + }; + + var elesfn$f = { + parent: function parent(selector) { + var parents = []; // optimisation for single ele call + + if (this.length === 1) { + var parent = this[0]._private.parent; + + if (parent) { + return parent; + } + } + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _parent = ele._private.parent; + + if (_parent) { + parents.push(_parent); + } + } + + return this.spawn(parents, true).filter(selector); + }, + parents: function parents(selector) { + var parents = []; + var eles = this.parent(); + + while (eles.nonempty()) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + parents.push(ele); + } + + eles = eles.parent(); + } + + return this.spawn(parents, true).filter(selector); + }, + commonAncestors: function commonAncestors(selector) { + var ancestors; + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var parents = ele.parents(); + ancestors = ancestors || parents; + ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set + } + + return ancestors.filter(selector); + }, + orphans: function orphans(selector) { + return this.stdFilter(function (ele) { + return ele.isOrphan(); + }).filter(selector); + }, + nonorphans: function nonorphans(selector) { + return this.stdFilter(function (ele) { + return ele.isChild(); + }).filter(selector); + }, + children: cache(function (selector) { + var children = []; + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var eleChildren = ele._private.children; + + for (var j = 0; j < eleChildren.length; j++) { + children.push(eleChildren[j]); + } + } + + return this.spawn(children, true).filter(selector); + }, 'children'), + siblings: function siblings(selector) { + return this.parent().children().not(this).filter(selector); + }, + isParent: function isParent() { + var ele = this[0]; + + if (ele) { + return ele.isNode() && ele._private.children.length !== 0; + } + }, + isChildless: function isChildless() { + var ele = this[0]; + + if (ele) { + return ele.isNode() && ele._private.children.length === 0; + } + }, + isChild: function isChild() { + var ele = this[0]; + + if (ele) { + return ele.isNode() && ele._private.parent != null; + } + }, + isOrphan: function isOrphan() { + var ele = this[0]; + + if (ele) { + return ele.isNode() && ele._private.parent == null; + } + }, + descendants: function descendants(selector) { + var elements = []; + + function add(eles) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + elements.push(ele); + + if (ele.children().nonempty()) { + add(ele.children()); + } + } + } + + add(this.children()); + return this.spawn(elements, true).filter(selector); + } + }; + + function forEachCompound(eles, fn, includeSelf, recursiveStep) { + var q = []; + var did = new Set$1(); + var cy = eles.cy(); + var hasCompounds = cy.hasCompoundNodes(); + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + + if (includeSelf) { + q.push(ele); + } else if (hasCompounds) { + recursiveStep(q, did, ele); + } + } + + while (q.length > 0) { + var _ele = q.shift(); + + fn(_ele); + did.add(_ele.id()); + + if (hasCompounds) { + recursiveStep(q, did, _ele); + } + } + + return eles; + } + + function addChildren(q, did, ele) { + if (ele.isParent()) { + var children = ele._private.children; + + for (var i = 0; i < children.length; i++) { + var child = children[i]; + + if (!did.has(child.id())) { + q.push(child); + } + } + } + } // very efficient version of eles.add( eles.descendants() ).forEach() + // for internal use + + + elesfn$f.forEachDown = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addChildren); + }; + + function addParent(q, did, ele) { + if (ele.isChild()) { + var parent = ele._private.parent; + + if (!did.has(parent.id())) { + q.push(parent); + } + } + } + + elesfn$f.forEachUp = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addParent); + }; + + function addParentAndChildren(q, did, ele) { + addParent(q, did, ele); + addChildren(q, did, ele); + } + + elesfn$f.forEachUpAndDown = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addParentAndChildren); + }; // aliases + + + elesfn$f.ancestors = elesfn$f.parents; + + var fn$5, elesfn$e; + fn$5 = elesfn$e = { + data: define.data({ + field: 'data', + bindingEvent: 'data', + allowBinding: true, + allowSetting: true, + settingEvent: 'data', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + immutableKeys: { + 'id': true, + 'source': true, + 'target': true, + 'parent': true + }, + updateStyle: true + }), + removeData: define.removeData({ + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: true, + immutableKeys: { + 'id': true, + 'source': true, + 'target': true, + 'parent': true + }, + updateStyle: true + }), + scratch: define.data({ + field: 'scratch', + bindingEvent: 'scratch', + allowBinding: true, + allowSetting: true, + settingEvent: 'scratch', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: 'scratch', + event: 'scratch', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }), + rscratch: define.data({ + field: 'rscratch', + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: true + }), + removeRscratch: define.removeData({ + field: 'rscratch', + triggerEvent: false + }), + id: function id() { + var ele = this[0]; + + if (ele) { + return ele._private.data.id; + } + } + }; // aliases + + fn$5.attr = fn$5.data; + fn$5.removeAttr = fn$5.removeData; + var data = elesfn$e; + + var elesfn$d = {}; + + function defineDegreeFunction(callback) { + return function (includeLoops) { + var self = this; + + if (includeLoops === undefined) { + includeLoops = true; + } + + if (self.length === 0) { + return; + } + + if (self.isNode() && !self.removed()) { + var degree = 0; + var node = self[0]; + var connectedEdges = node._private.edges; + + for (var i = 0; i < connectedEdges.length; i++) { + var edge = connectedEdges[i]; + + if (!includeLoops && edge.isLoop()) { + continue; + } + + degree += callback(node, edge); + } + + return degree; + } else { + return; + } + }; + } + + extend(elesfn$d, { + degree: defineDegreeFunction(function (node, edge) { + if (edge.source().same(edge.target())) { + return 2; + } else { + return 1; + } + }), + indegree: defineDegreeFunction(function (node, edge) { + if (edge.target().same(node)) { + return 1; + } else { + return 0; + } + }), + outdegree: defineDegreeFunction(function (node, edge) { + if (edge.source().same(node)) { + return 1; + } else { + return 0; + } + }) + }); + + function defineDegreeBoundsFunction(degreeFn, callback) { + return function (includeLoops) { + var ret; + var nodes = this.nodes(); + + for (var i = 0; i < nodes.length; i++) { + var ele = nodes[i]; + var degree = ele[degreeFn](includeLoops); + + if (degree !== undefined && (ret === undefined || callback(degree, ret))) { + ret = degree; + } + } + + return ret; + }; + } + + extend(elesfn$d, { + minDegree: defineDegreeBoundsFunction('degree', function (degree, min) { + return degree < min; + }), + maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) { + return degree > max; + }), + minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) { + return degree < min; + }), + maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) { + return degree > max; + }), + minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) { + return degree < min; + }), + maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) { + return degree > max; + }) + }); + extend(elesfn$d, { + totalDegree: function totalDegree(includeLoops) { + var total = 0; + var nodes = this.nodes(); + + for (var i = 0; i < nodes.length; i++) { + total += nodes[i].degree(includeLoops); + } + + return total; + } + }); + + var fn$4, elesfn$c; + + var beforePositionSet = function beforePositionSet(eles, newPos, silent) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + + if (!ele.locked()) { + var oldPos = ele._private.position; + var delta = { + x: newPos.x != null ? newPos.x - oldPos.x : 0, + y: newPos.y != null ? newPos.y - oldPos.y : 0 + }; + + if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { + ele.children().shift(delta, silent); + } + + ele.dirtyBoundingBoxCache(); + } + } + }; + + var positionDef = { + field: 'position', + bindingEvent: 'position', + allowBinding: true, + allowSetting: true, + settingEvent: 'position', + settingTriggersEvent: true, + triggerFnName: 'emitAndNotify', + allowGetting: true, + validKeys: ['x', 'y'], + beforeGet: function beforeGet(ele) { + ele.updateCompoundBounds(); + }, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, false); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + }, + canSet: function canSet(ele) { + return !ele.locked(); + } + }; + fn$4 = elesfn$c = { + position: define.data(positionDef), + // position but no notification to renderer + silentPosition: define.data(extend({}, positionDef, { + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: false, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, true); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + } + })), + positions: function positions(pos, silent) { + if (plainObject(pos)) { + if (silent) { + this.silentPosition(pos); + } else { + this.position(pos); + } + } else if (fn$6(pos)) { + var _fn = pos; + var cy = this.cy(); + cy.startBatch(); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + + var _pos = void 0; + + if (_pos = _fn(ele, i)) { + if (silent) { + ele.silentPosition(_pos); + } else { + ele.position(_pos); + } + } + } + + cy.endBatch(); + } + + return this; // chaining + }, + silentPositions: function silentPositions(pos) { + return this.positions(pos, true); + }, + shift: function shift(dim, val, silent) { + var delta; + + if (plainObject(dim)) { + delta = { + x: number$1(dim.x) ? dim.x : 0, + y: number$1(dim.y) ? dim.y : 0 + }; + silent = val; + } else if (string(dim) && number$1(val)) { + delta = { + x: 0, + y: 0 + }; + delta[dim] = val; + } + + if (delta != null) { + var cy = this.cy(); + cy.startBatch(); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; // exclude any node that is a descendant of the calling collection + + if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { + continue; + } + + var pos = ele.position(); + var newPos = { + x: pos.x + delta.x, + y: pos.y + delta.y + }; + + if (silent) { + ele.silentPosition(newPos); + } else { + ele.position(newPos); + } + } + + cy.endBatch(); + } + + return this; + }, + silentShift: function silentShift(dim, val) { + if (plainObject(dim)) { + this.shift(dim, true); + } else if (string(dim) && number$1(val)) { + this.shift(dim, val, true); + } + + return this; + }, + // get/set the rendered (i.e. on screen) positon of the element + renderedPosition: function renderedPosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var rpos = plainObject(dim) ? dim : undefined; + var setting = rpos !== undefined || val !== undefined && string(dim); + + if (ele && ele.isNode()) { + // must have an element and must be a node to return position + if (setting) { + for (var i = 0; i < this.length; i++) { + var _ele = this[i]; + + if (val !== undefined) { + // set one dimension + _ele.position(dim, (val - pan[dim]) / zoom); + } else if (rpos !== undefined) { + // set whole position + _ele.position(renderedToModelPosition(rpos, zoom, pan)); + } + } + } else { + // getting + var pos = ele.position(); + rpos = modelToRenderedPosition(pos, zoom, pan); + + if (dim === undefined) { + // then return the whole rendered position + return rpos; + } else { + // then return the specified dimension + return rpos[dim]; + } + } + } else if (!setting) { + return undefined; // for empty collection case + } + + return this; // chaining + }, + // get/set the position relative to the parent + relativePosition: function relativePosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var ppos = plainObject(dim) ? dim : undefined; + var setting = ppos !== undefined || val !== undefined && string(dim); + var hasCompoundNodes = cy.hasCompoundNodes(); + + if (ele && ele.isNode()) { + // must have an element and must be a node to return position + if (setting) { + for (var i = 0; i < this.length; i++) { + var _ele2 = this[i]; + var parent = hasCompoundNodes ? _ele2.parent() : null; + var hasParent = parent && parent.length > 0; + var relativeToParent = hasParent; + + if (hasParent) { + parent = parent[0]; + } + + var origin = relativeToParent ? parent.position() : { + x: 0, + y: 0 + }; + + if (val !== undefined) { + // set one dimension + _ele2.position(dim, val + origin[dim]); + } else if (ppos !== undefined) { + // set whole position + _ele2.position({ + x: ppos.x + origin.x, + y: ppos.y + origin.y + }); + } + } + } else { + // getting + var pos = ele.position(); + + var _parent = hasCompoundNodes ? ele.parent() : null; + + var _hasParent = _parent && _parent.length > 0; + + var _relativeToParent = _hasParent; + + if (_hasParent) { + _parent = _parent[0]; + } + + var _origin = _relativeToParent ? _parent.position() : { + x: 0, + y: 0 + }; + + ppos = { + x: pos.x - _origin.x, + y: pos.y - _origin.y + }; + + if (dim === undefined) { + // then return the whole rendered position + return ppos; + } else { + // then return the specified dimension + return ppos[dim]; + } + } + } else if (!setting) { + return undefined; // for empty collection case + } + + return this; // chaining + } + }; // aliases + + fn$4.modelPosition = fn$4.point = fn$4.position; + fn$4.modelPositions = fn$4.points = fn$4.positions; + fn$4.renderedPoint = fn$4.renderedPosition; + fn$4.relativePoint = fn$4.relativePosition; + var position = elesfn$c; + + var fn$3, elesfn$b; + fn$3 = elesfn$b = {}; + + elesfn$b.renderedBoundingBox = function (options) { + var bb = this.boundingBox(options); + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var x1 = bb.x1 * zoom + pan.x; + var x2 = bb.x2 * zoom + pan.x; + var y1 = bb.y1 * zoom + pan.y; + var y2 = bb.y2 * zoom + pan.y; + return { + x1: x1, + x2: x2, + y1: y1, + y2: y2, + w: x2 - x1, + h: y2 - y1 + }; + }; + + elesfn$b.dirtyCompoundBoundsCache = function () { + var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cy = this.cy(); + + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + + this.forEachUp(function (ele) { + if (ele.isParent()) { + var _p = ele._private; + _p.compoundBoundsClean = false; + _p.bbCache = null; + + if (!silent) { + ele.emitAndNotify('bounds'); + } + } + }); + return this; + }; + + elesfn$b.updateCompoundBounds = function () { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cy = this.cy(); // not possible to do on non-compound graphs or with the style disabled + + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } // save cycles when batching -- but bounds will be stale (or not exist yet) + + + if (!force && cy.batching()) { + return this; + } + + function update(parent) { + if (!parent.isParent()) { + return; + } + + var _p = parent._private; + var children = parent.children(); + var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include'; + var min = { + width: { + val: parent.pstyle('min-width').pfValue, + left: parent.pstyle('min-width-bias-left'), + right: parent.pstyle('min-width-bias-right') + }, + height: { + val: parent.pstyle('min-height').pfValue, + top: parent.pstyle('min-height-bias-top'), + bottom: parent.pstyle('min-height-bias-bottom') + } + }; + var bb = children.boundingBox({ + includeLabels: includeLabels, + includeOverlays: false, + // updating the compound bounds happens outside of the regular + // cache cycle (i.e. before fired events) + useCache: false + }); + var pos = _p.position; // if children take up zero area then keep position and fall back on stylesheet w/h + + if (bb.w === 0 || bb.h === 0) { + bb = { + w: parent.pstyle('width').pfValue, + h: parent.pstyle('height').pfValue + }; + bb.x1 = pos.x - bb.w / 2; + bb.x2 = pos.x + bb.w / 2; + bb.y1 = pos.y - bb.h / 2; + bb.y2 = pos.y + bb.h / 2; + } + + function computeBiasValues(propDiff, propBias, propBiasComplement) { + var biasDiff = 0; + var biasComplementDiff = 0; + var biasTotal = propBias + propBiasComplement; + + if (propDiff > 0 && biasTotal > 0) { + biasDiff = propBias / biasTotal * propDiff; + biasComplementDiff = propBiasComplement / biasTotal * propDiff; + } + + return { + biasDiff: biasDiff, + biasComplementDiff: biasComplementDiff + }; + } + + function computePaddingValues(width, height, paddingObject, relativeTo) { + // Assuming percentage is number from 0 to 1 + if (paddingObject.units === '%') { + switch (relativeTo) { + case 'width': + return width > 0 ? paddingObject.pfValue * width : 0; + + case 'height': + return height > 0 ? paddingObject.pfValue * height : 0; + + case 'average': + return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0; + + case 'min': + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0; + + case 'max': + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0; + + default: + return 0; + } + } else if (paddingObject.units === 'px') { + return paddingObject.pfValue; + } else { + return 0; + } + } + + var leftVal = min.width.left.value; + + if (min.width.left.units === 'px' && min.width.val > 0) { + leftVal = leftVal * 100 / min.width.val; + } + + var rightVal = min.width.right.value; + + if (min.width.right.units === 'px' && min.width.val > 0) { + rightVal = rightVal * 100 / min.width.val; + } + + var topVal = min.height.top.value; + + if (min.height.top.units === 'px' && min.height.val > 0) { + topVal = topVal * 100 / min.height.val; + } + + var bottomVal = min.height.bottom.value; + + if (min.height.bottom.units === 'px' && min.height.val > 0) { + bottomVal = bottomVal * 100 / min.height.val; + } + + var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal); + var diffLeft = widthBiasDiffs.biasDiff; + var diffRight = widthBiasDiffs.biasComplementDiff; + var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal); + var diffTop = heightBiasDiffs.biasDiff; + var diffBottom = heightBiasDiffs.biasComplementDiff; + _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value); + _p.autoWidth = Math.max(bb.w, min.width.val); + pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; + _p.autoHeight = Math.max(bb.h, min.height.val); + pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; + } + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _p = ele._private; + + if (!_p.compoundBoundsClean || force) { + update(ele); + + if (!cy.batching()) { + _p.compoundBoundsClean = true; + } + } + } + + return this; + }; + + var noninf = function noninf(x) { + if (x === Infinity || x === -Infinity) { + return 0; + } + + return x; + }; + + var updateBounds = function updateBounds(b, x1, y1, x2, y2) { + // don't update with zero area boxes + if (x2 - x1 === 0 || y2 - y1 === 0) { + return; + } // don't update with null dim + + + if (x1 == null || y1 == null || x2 == null || y2 == null) { + return; + } + + b.x1 = x1 < b.x1 ? x1 : b.x1; + b.x2 = x2 > b.x2 ? x2 : b.x2; + b.y1 = y1 < b.y1 ? y1 : b.y1; + b.y2 = y2 > b.y2 ? y2 : b.y2; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + }; + + var updateBoundsFromBox = function updateBoundsFromBox(b, b2) { + if (b2 == null) { + return b; + } + + return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); + }; + + var prefixedProperty = function prefixedProperty(obj, field, prefix) { + return getPrefixedProperty(obj, field, prefix); + }; + + var updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) { + if (ele.cy().headless()) { + return; + } + + var _p = ele._private; + var rstyle = _p.rstyle; + var halfArW = rstyle.arrowWidth / 2; + var arrowType = ele.pstyle(prefix + '-arrow-shape').value; + var x; + var y; + + if (arrowType !== 'none') { + if (prefix === 'source') { + x = rstyle.srcX; + y = rstyle.srcY; + } else if (prefix === 'target') { + x = rstyle.tgtX; + y = rstyle.tgtY; + } else { + x = rstyle.midX; + y = rstyle.midY; + } // always store the individual arrow bounds + + + var bbs = _p.arrowBounds = _p.arrowBounds || {}; + var bb = bbs[prefix] = bbs[prefix] || {}; + bb.x1 = x - halfArW; + bb.y1 = y - halfArW; + bb.x2 = x + halfArW; + bb.y2 = y + halfArW; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + expandBoundingBox(bb, 1); + updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2); + } + }; + + var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) { + if (ele.cy().headless()) { + return; + } + + var prefixDash; + + if (prefix) { + prefixDash = prefix + '-'; + } else { + prefixDash = ''; + } + + var _p = ele._private; + var rstyle = _p.rstyle; + var label = ele.pstyle(prefixDash + 'label').strValue; + + if (label) { + var halign = ele.pstyle('text-halign'); + var valign = ele.pstyle('text-valign'); + var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix); + var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix); + var labelX = prefixedProperty(rstyle, 'labelX', prefix); + var labelY = prefixedProperty(rstyle, 'labelY', prefix); + var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue; + var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue; + var isEdge = ele.isEdge(); + var rotation = ele.pstyle(prefixDash + 'text-rotation'); + var outlineWidth = ele.pstyle('text-outline-width').pfValue; + var borderWidth = ele.pstyle('text-border-width').pfValue; + var halfBorderWidth = borderWidth / 2; + var padding = ele.pstyle('text-background-padding').pfValue; + var marginOfError = 2; // expand to work around browser dimension inaccuracies + + var lh = labelHeight; + var lw = labelWidth; + var lw_2 = lw / 2; + var lh_2 = lh / 2; + var lx1, lx2, ly1, ly2; + + if (isEdge) { + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + } else { + switch (halign.value) { + case 'left': + lx1 = labelX - lw; + lx2 = labelX; + break; + + case 'center': + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + break; + + case 'right': + lx1 = labelX; + lx2 = labelX + lw; + break; + } + + switch (valign.value) { + case 'top': + ly1 = labelY - lh; + ly2 = labelY; + break; + + case 'center': + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + break; + + case 'bottom': + ly1 = labelY; + ly2 = labelY + lh; + break; + } + } // shift by margin and expand by outline and border + + + lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; // always store the unrotated label bounds separately + + var bbPrefix = prefix || 'main'; + var bbs = _p.labelBounds; + var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; + bb.x1 = lx1; + bb.y1 = ly1; + bb.x2 = lx2; + bb.y2 = ly2; + bb.w = lx2 - lx1; + bb.h = ly2 - ly1; + var isAutorotate = isEdge && rotation.strValue === 'autorotate'; + var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; + + if (isAutorotate || isPfValue) { + var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue; + var cos = Math.cos(theta); + var sin = Math.sin(theta); // rotation point (default value for center-center) + + var xo = (lx1 + lx2) / 2; + var yo = (ly1 + ly2) / 2; + + if (!isEdge) { + switch (halign.value) { + case 'left': + xo = lx2; + break; + + case 'right': + xo = lx1; + break; + } + + switch (valign.value) { + case 'top': + yo = ly2; + break; + + case 'bottom': + yo = ly1; + break; + } + } + + var rotate = function rotate(x, y) { + x = x - xo; + y = y - yo; + return { + x: x * cos - y * sin + xo, + y: x * sin + y * cos + yo + }; + }; + + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + } + + var bbPrefixRot = bbPrefix + 'Rot'; + var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; + bbRot.x1 = lx1; + bbRot.y1 = ly1; + bbRot.x2 = lx2; + bbRot.y2 = ly2; + bbRot.w = lx2 - lx1; + bbRot.h = ly2 - ly1; + updateBounds(bounds, lx1, ly1, lx2, ly2); + updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); + } + + return bounds; + }; // get the bounding box of the elements (in raw model position) + + + var boundingBoxImpl = function boundingBoxImpl(ele, options) { + var cy = ele._private.cy; + var styleEnabled = cy.styleEnabled(); + var headless = cy.headless(); + var bounds = makeBoundingBox(); + var _p = ele._private; + var isNode = ele.isNode(); + var isEdge = ele.isEdge(); + var ex1, ex2, ey1, ey2; // extrema of body / lines + + var x, y; // node pos + + var rstyle = _p.rstyle; + var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0]; // must use `display` prop only, as reading `compound.width()` causes recursion + // (other factors like width values will be considered later in this function anyway) + + var isDisplayed = function isDisplayed(ele) { + return ele.pstyle('display').value !== 'none'; + }; + + var displayed = !styleEnabled || isDisplayed(ele) // must take into account connected nodes b/c of implicit edge hiding on display:none node + && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); + + if (displayed) { + // displayed suffices, since we will find zero area eles anyway + var overlayOpacity = 0; + var overlayPadding = 0; + + if (styleEnabled && options.includeOverlays) { + overlayOpacity = ele.pstyle('overlay-opacity').value; + + if (overlayOpacity !== 0) { + overlayPadding = ele.pstyle('overlay-padding').value; + } + } + + var underlayOpacity = 0; + var underlayPadding = 0; + + if (styleEnabled && options.includeUnderlays) { + underlayOpacity = ele.pstyle('underlay-opacity').value; + + if (underlayOpacity !== 0) { + underlayPadding = ele.pstyle('underlay-padding').value; + } + } + + var padding = Math.max(overlayPadding, underlayPadding); + var w = 0; + var wHalf = 0; + + if (styleEnabled) { + w = ele.pstyle('width').pfValue; + wHalf = w / 2; + } + + if (isNode && options.includeNodes) { + var pos = ele.position(); + x = pos.x; + y = pos.y; + + var _w = ele.outerWidth(); + + var halfW = _w / 2; + var h = ele.outerHeight(); + var halfH = h / 2; // handle node dimensions + ///////////////////////// + + ex1 = x - halfW; + ex2 = x + halfW; + ey1 = y - halfH; + ey2 = y + halfH; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } else if (isEdge && options.includeEdges) { + if (styleEnabled && !headless) { + var curveStyle = ele.pstyle('curve-style').strValue; // handle edge dimensions (rough box estimate) + ////////////////////////////////////////////// + + ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); // take into account edge width + + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); // precise edges + //////////////// + + if (curveStyle === 'haystack') { + var hpts = rstyle.haystackPts; + + if (hpts && hpts.length === 2) { + ex1 = hpts[0].x; + ey1 = hpts[0].y; + ex2 = hpts[1].x; + ey2 = hpts[1].y; + + if (ex1 > ex2) { + var temp = ex1; + ex1 = ex2; + ex2 = temp; + } + + if (ey1 > ey2) { + var _temp = ey1; + ey1 = ey2; + ey2 = _temp; + } + + updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); + } + } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'taxi') { + var pts; + + switch (curveStyle) { + case 'bezier': + case 'unbundled-bezier': + pts = rstyle.bezierPts; + break; + + case 'segments': + case 'taxi': + pts = rstyle.linePts; + break; + } + + if (pts != null) { + for (var j = 0; j < pts.length; j++) { + var pt = pts[j]; + ex1 = pt.x - wHalf; + ex2 = pt.x + wHalf; + ey1 = pt.y - wHalf; + ey2 = pt.y + wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } + } + } // bezier-like or segment-like edge + + } else { + // headless or style disabled + // fallback on source and target positions + ////////////////////////////////////////// + var n1 = ele.source(); + var n1pos = n1.position(); + var n2 = ele.target(); + var n2pos = n2.position(); + ex1 = n1pos.x; + ex2 = n2pos.x; + ey1 = n1pos.y; + ey2 = n2pos.y; + + if (ex1 > ex2) { + var _temp2 = ex1; + ex1 = ex2; + ex2 = _temp2; + } + + if (ey1 > ey2) { + var _temp3 = ey1; + ey1 = ey2; + ey2 = _temp3; + } // take into account edge width + + + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } // headless or style disabled + + } // edges + // handle edge arrow size + ///////////////////////// + + + if (styleEnabled && options.includeEdges && isEdge) { + updateBoundsFromArrow(bounds, ele, 'mid-source'); + updateBoundsFromArrow(bounds, ele, 'mid-target'); + updateBoundsFromArrow(bounds, ele, 'source'); + updateBoundsFromArrow(bounds, ele, 'target'); + } // ghost + //////// + + + if (styleEnabled) { + var ghost = ele.pstyle('ghost').value === 'yes'; + + if (ghost) { + var gx = ele.pstyle('ghost-offset-x').pfValue; + var gy = ele.pstyle('ghost-offset-y').pfValue; + updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy); + } + } // always store the body bounds separately from the labels + + + var bbBody = _p.bodyBounds = _p.bodyBounds || {}; + assignBoundingBox(bbBody, bounds); + expandBoundingBoxSides(bbBody, manualExpansion); + expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies + // overlay + ////////// + + if (styleEnabled) { + ex1 = bounds.x1; + ex2 = bounds.x2; + ey1 = bounds.y1; + ey2 = bounds.y2; + updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding); + } // always store the body bounds separately from the labels + + + var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; + assignBoundingBox(bbOverlay, bounds); + expandBoundingBoxSides(bbOverlay, manualExpansion); + expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies + // handle label dimensions + ////////////////////////// + + var bbLabels = _p.labelBounds = _p.labelBounds || {}; + + if (bbLabels.all != null) { + clearBoundingBox(bbLabels.all); + } else { + bbLabels.all = makeBoundingBox(); + } + + if (styleEnabled && options.includeLabels) { + if (options.includeMainLabels) { + updateBoundsFromLabel(bounds, ele, null); + } + + if (isEdge) { + if (options.includeSourceLabels) { + updateBoundsFromLabel(bounds, ele, 'source'); + } + + if (options.includeTargetLabels) { + updateBoundsFromLabel(bounds, ele, 'target'); + } + } + } // style enabled for labels + + } // if displayed + + + bounds.x1 = noninf(bounds.x1); + bounds.y1 = noninf(bounds.y1); + bounds.x2 = noninf(bounds.x2); + bounds.y2 = noninf(bounds.y2); + bounds.w = noninf(bounds.x2 - bounds.x1); + bounds.h = noninf(bounds.y2 - bounds.y1); + + if (bounds.w > 0 && bounds.h > 0 && displayed) { + expandBoundingBoxSides(bounds, manualExpansion); // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides + + expandBoundingBox(bounds, 1); + } + + return bounds; + }; + + var getKey = function getKey(opts) { + var i = 0; + + var tf = function tf(val) { + return (val ? 1 : 0) << i++; + }; + + var key = 0; + key += tf(opts.incudeNodes); + key += tf(opts.includeEdges); + key += tf(opts.includeLabels); + key += tf(opts.includeMainLabels); + key += tf(opts.includeSourceLabels); + key += tf(opts.includeTargetLabels); + key += tf(opts.includeOverlays); + return key; + }; + + var getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) { + if (ele.isEdge()) { + var p1 = ele.source().position(); + var p2 = ele.target().position(); + + var r = function r(x) { + return Math.round(x); + }; + + return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); + } else { + return 0; + } + }; + + var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) { + var _p = ele._private; + var bb; + var isEdge = ele.isEdge(); + var key = opts == null ? defBbOptsKey : getKey(opts); + var usingDefOpts = key === defBbOptsKey; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame; + + var isDirty = function isDirty(ele) { + return ele._private.bbCache == null || ele._private.styleDirty; + }; + + var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); + + if (needRecalc) { + if (!isPosKeySame) { + ele.recalculateRenderedStyle(useCache); + } + + bb = boundingBoxImpl(ele, defBbOpts); + _p.bbCache = bb; + _p.bbCachePosKey = currPosKey; + } else { + bb = _p.bbCache; + } // not using def opts => need to build up bb from combination of sub bbs + + + if (!usingDefOpts) { + var isNode = ele.isNode(); + bb = makeBoundingBox(); + + if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { + if (opts.includeOverlays) { + updateBoundsFromBox(bb, _p.overlayBounds); + } else { + updateBoundsFromBox(bb, _p.bodyBounds); + } + } + + if (opts.includeLabels) { + if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { + updateBoundsFromBox(bb, _p.labelBounds.all); + } else { + if (opts.includeMainLabels) { + updateBoundsFromBox(bb, _p.labelBounds.mainRot); + } + + if (opts.includeSourceLabels) { + updateBoundsFromBox(bb, _p.labelBounds.sourceRot); + } + + if (opts.includeTargetLabels) { + updateBoundsFromBox(bb, _p.labelBounds.targetRot); + } + } + } + + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } + + return bb; + }; + + var defBbOpts = { + includeNodes: true, + includeEdges: true, + includeLabels: true, + includeMainLabels: true, + includeSourceLabels: true, + includeTargetLabels: true, + includeOverlays: true, + includeUnderlays: true, + useCache: true + }; + var defBbOptsKey = getKey(defBbOpts); + var filledBbOpts = defaults$g(defBbOpts); + + elesfn$b.boundingBox = function (options) { + var bounds; // the main usecase is ele.boundingBox() for a single element with no/def options + // specified s.t. the cache is used, so check for this case to make it faster by + // avoiding the overhead of the rest of the function + + if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) { + if (options === undefined) { + options = defBbOpts; + } else { + options = filledBbOpts(options); + } + + bounds = cachedBoundingBoxImpl(this[0], options); + } else { + bounds = makeBoundingBox(); + options = options || defBbOpts; + var opts = filledBbOpts(options); + var eles = this; + var cy = eles.cy(); + var styleEnabled = cy.styleEnabled(); + + if (styleEnabled) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; + ele.recalculateRenderedStyle(useCache); + } + } + + this.updateCompoundBounds(!options.useCache); + + for (var _i = 0; _i < eles.length; _i++) { + var _ele = eles[_i]; + updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts)); + } + } + + bounds.x1 = noninf(bounds.x1); + bounds.y1 = noninf(bounds.y1); + bounds.x2 = noninf(bounds.x2); + bounds.y2 = noninf(bounds.y2); + bounds.w = noninf(bounds.x2 - bounds.x1); + bounds.h = noninf(bounds.y2 - bounds.y1); + return bounds; + }; + + elesfn$b.dirtyBoundingBoxCache = function () { + for (var i = 0; i < this.length; i++) { + var _p = this[i]._private; + _p.bbCache = null; + _p.bbCachePosKey = null; + _p.bodyBounds = null; + _p.overlayBounds = null; + _p.labelBounds.all = null; + _p.labelBounds.source = null; + _p.labelBounds.target = null; + _p.labelBounds.main = null; + _p.labelBounds.sourceRot = null; + _p.labelBounds.targetRot = null; + _p.labelBounds.mainRot = null; + _p.arrowBounds.source = null; + _p.arrowBounds.target = null; + _p.arrowBounds['mid-source'] = null; + _p.arrowBounds['mid-target'] = null; + } + + this.emitAndNotify('bounds'); + return this; + }; // private helper to get bounding box for custom node positions + // - good for perf in certain cases but currently requires dirtying the rendered style + // - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer... + // - try to use for only things like discrete layouts where the node position would change anyway + + + elesfn$b.boundingBoxAt = function (fn) { + var nodes = this.nodes(); + var cy = this.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + var parents = cy.collection(); + + if (hasCompoundNodes) { + parents = nodes.filter(function (node) { + return node.isParent(); + }); + nodes = nodes.not(parents); + } + + if (plainObject(fn)) { + var obj = fn; + + fn = function fn() { + return obj; + }; + } + + var storeOldPos = function storeOldPos(node, i) { + return node._private.bbAtOldPos = fn(node, i); + }; + + var getOldPos = function getOldPos(node) { + return node._private.bbAtOldPos; + }; + + cy.startBatch(); + nodes.forEach(storeOldPos).silentPositions(fn); + + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle + } + + var bb = copyBoundingBox(this.boundingBox({ + useCache: false + })); + nodes.silentPositions(getOldPos); + + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle + } + + cy.endBatch(); + return bb; + }; + + fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; + fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; + var bounds = elesfn$b; + + var fn$2, elesfn$a; + fn$2 = elesfn$a = {}; + + var defineDimFns = function defineDimFns(opts) { + opts.uppercaseName = capitalize(opts.name); + opts.autoName = 'auto' + opts.uppercaseName; + opts.labelName = 'label' + opts.uppercaseName; + opts.outerName = 'outer' + opts.uppercaseName; + opts.uppercaseOuterName = capitalize(opts.outerName); + + fn$2[opts.name] = function dimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + + if (ele) { + if (styleEnabled) { + if (ele.isParent()) { + ele.updateCompoundBounds(); + return _p[opts.autoName] || 0; + } + + var d = ele.pstyle(opts.name); + + switch (d.strValue) { + case 'label': + ele.recalculateRenderedStyle(); + return _p.rstyle[opts.labelName] || 0; + + default: + return d.pfValue; + } + } else { + return 1; + } + } + }; + + fn$2['outer' + opts.uppercaseName] = function outerDimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + + if (ele) { + if (styleEnabled) { + var dim = ele[opts.name](); + var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side + + var padding = 2 * ele.padding(); + return dim + border + padding; + } else { + return 1; + } + } + }; + + fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() { + var ele = this[0]; + + if (ele) { + var d = ele[opts.name](); + return d * this.cy().zoom(); + } + }; + + fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() { + var ele = this[0]; + + if (ele) { + var od = ele[opts.outerName](); + return od * this.cy().zoom(); + } + }; + }; + + defineDimFns({ + name: 'width' + }); + defineDimFns({ + name: 'height' + }); + + elesfn$a.padding = function () { + var ele = this[0]; + var _p = ele._private; + + if (ele.isParent()) { + ele.updateCompoundBounds(); + + if (_p.autoPadding !== undefined) { + return _p.autoPadding; + } else { + return ele.pstyle('padding').pfValue; + } + } else { + return ele.pstyle('padding').pfValue; + } + }; + + elesfn$a.paddedHeight = function () { + var ele = this[0]; + return ele.height() + 2 * ele.padding(); + }; + + elesfn$a.paddedWidth = function () { + var ele = this[0]; + return ele.width() + 2 * ele.padding(); + }; + + var widthHeight = elesfn$a; + + var ifEdge = function ifEdge(ele, getValue) { + if (ele.isEdge()) { + return getValue(ele); + } + }; + + var ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) { + if (ele.isEdge()) { + var cy = ele.cy(); + return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); + } + }; + + var ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) { + if (ele.isEdge()) { + var cy = ele.cy(); + var pan = cy.pan(); + var zoom = cy.zoom(); + return getPoints(ele).map(function (p) { + return modelToRenderedPosition(p, zoom, pan); + }); + } + }; + + var controlPoints = function controlPoints(ele) { + return ele.renderer().getControlPoints(ele); + }; + + var segmentPoints = function segmentPoints(ele) { + return ele.renderer().getSegmentPoints(ele); + }; + + var sourceEndpoint = function sourceEndpoint(ele) { + return ele.renderer().getSourceEndpoint(ele); + }; + + var targetEndpoint = function targetEndpoint(ele) { + return ele.renderer().getTargetEndpoint(ele); + }; + + var midpoint = function midpoint(ele) { + return ele.renderer().getEdgeMidpoint(ele); + }; + + var pts = { + controlPoints: { + get: controlPoints, + mult: true + }, + segmentPoints: { + get: segmentPoints, + mult: true + }, + sourceEndpoint: { + get: sourceEndpoint + }, + targetEndpoint: { + get: targetEndpoint + }, + midpoint: { + get: midpoint + } + }; + + var renderedName = function renderedName(name) { + return 'rendered' + name[0].toUpperCase() + name.substr(1); + }; + + var edgePoints = Object.keys(pts).reduce(function (obj, name) { + var spec = pts[name]; + var rName = renderedName(name); + + obj[name] = function () { + return ifEdge(this, spec.get); + }; + + if (spec.mult) { + obj[rName] = function () { + return ifEdgeRenderedPositions(this, spec.get); + }; + } else { + obj[rName] = function () { + return ifEdgeRenderedPosition(this, spec.get); + }; + } + + return obj; + }, {}); + + var dimensions = extend({}, position, bounds, widthHeight, edgePoints); + + /*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + */ + var Event = function Event(src, props) { + this.recycle(src, props); + }; + + function returnFalse() { + return false; + } + + function returnTrue() { + return true; + } // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html + + + Event.prototype = { + instanceString: function instanceString() { + return 'event'; + }, + recycle: function recycle(src, props) { + this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; + + if (src != null && src.preventDefault) { + // Browser Event object + this.type = src.type; // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + + this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; + } else if (src != null && src.type) { + // Plain object containing all event details + props = src; + } else { + // Event string + this.type = src; + } // Put explicitly provided properties onto the event object + + + if (props != null) { + // more efficient to manually copy fields we use + this.originalEvent = props.originalEvent; + this.type = props.type != null ? props.type : this.type; + this.cy = props.cy; + this.target = props.target; + this.position = props.position; + this.renderedPosition = props.renderedPosition; + this.namespace = props.namespace; + this.layout = props.layout; + } + + if (this.cy != null && this.position != null && this.renderedPosition == null) { + // create a rendered position based on the passed position + var pos = this.position; + var zoom = this.cy.zoom(); + var pan = this.cy.pan(); + this.renderedPosition = { + x: pos.x * zoom + pan.x, + y: pos.y * zoom + pan.y + }; + } // Create a timestamp if incoming event doesn't have one + + + this.timeStamp = src && src.timeStamp || Date.now(); + }, + preventDefault: function preventDefault() { + this.isDefaultPrevented = returnTrue; + var e = this.originalEvent; + + if (!e) { + return; + } // if preventDefault exists run it on the original event + + + if (e.preventDefault) { + e.preventDefault(); + } + }, + stopPropagation: function stopPropagation() { + this.isPropagationStopped = returnTrue; + var e = this.originalEvent; + + if (!e) { + return; + } // if stopPropagation exists run it on the original event + + + if (e.stopPropagation) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function stopImmediatePropagation() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse + }; + + var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; // regex for matching event strings (e.g. "click.namespace") + + var universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally + + var defaults$8 = { + qualifierCompare: function qualifierCompare(q1, q2) { + return q1 === q2; + }, + eventMatches: function + /*context, listener, eventObj*/ + eventMatches() { + return true; + }, + addEventFields: function + /*context, evt*/ + addEventFields() {}, + callbackContext: function callbackContext(context + /*, listener, eventObj*/ + ) { + return context; + }, + beforeEmit: function + /* context, listener, eventObj */ + beforeEmit() {}, + afterEmit: function + /* context, listener, eventObj */ + afterEmit() {}, + bubble: function + /*context*/ + bubble() { + return false; + }, + parent: function + /*context*/ + parent() { + return null; + }, + context: null + }; + var defaultsKeys = Object.keys(defaults$8); + var emptyOpts = {}; + + function Emitter() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts; + var context = arguments.length > 1 ? arguments[1] : undefined; + + // micro-optimisation vs Object.assign() -- reduces Element instantiation time + for (var i = 0; i < defaultsKeys.length; i++) { + var key = defaultsKeys[i]; + this[key] = opts[key] || defaults$8[key]; + } + + this.context = context || this.context; + this.listeners = []; + this.emitting = 0; + } + + var p = Emitter.prototype; + + var forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) { + if (fn$6(qualifier)) { + callback = qualifier; + qualifier = null; + } + + if (confOverrides) { + if (conf == null) { + conf = confOverrides; + } else { + conf = extend({}, conf, confOverrides); + } + } + + var eventList = array(events) ? events : events.split(/\s+/); + + for (var i = 0; i < eventList.length; i++) { + var evt = eventList[i]; + + if (emptyString(evt)) { + continue; + } + + var match = evt.match(eventRegex); // type[.namespace] + + if (match) { + var type = match[1]; + var namespace = match[2] ? match[2] : null; + var ret = handler(self, evt, type, namespace, qualifier, callback, conf); + + if (ret === false) { + break; + } // allow exiting early + + } + } + }; + + var makeEventObj = function makeEventObj(self, obj) { + self.addEventFields(self.context, obj); + return new Event(obj.type, obj); + }; + + var forEachEventObj = function forEachEventObj(self, handler, events) { + if (event(events)) { + handler(self, events); + return; + } else if (plainObject(events)) { + handler(self, makeEventObj(self, events)); + return; + } + + var eventList = array(events) ? events : events.split(/\s+/); + + for (var i = 0; i < eventList.length; i++) { + var evt = eventList[i]; + + if (emptyString(evt)) { + continue; + } + + var match = evt.match(eventRegex); // type[.namespace] + + if (match) { + var type = match[1]; + var namespace = match[2] ? match[2] : null; + var eventObj = makeEventObj(self, { + type: type, + namespace: namespace, + target: self.context + }); + handler(self, eventObj); + } + } + }; + + p.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) { + forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) { + if (fn$6(callback)) { + self.listeners.push({ + event: event, + // full event string + callback: callback, + // callback to run + type: type, + // the event type (e.g. 'click') + namespace: namespace, + // the event namespace (e.g. ".foo") + qualifier: qualifier, + // a restriction on whether to match this emitter + conf: conf // additional configuration + + }); + } + }, events, qualifier, callback, conf, confOverrides); + return this; + }; + + p.one = function (events, qualifier, callback, conf) { + return this.on(events, qualifier, callback, conf, { + one: true + }); + }; + + p.removeListener = p.off = function (events, qualifier, callback, conf) { + var _this = this; + + if (this.emitting !== 0) { + this.listeners = copyArray$1(this.listeners); + } + + var listeners = this.listeners; + + var _loop = function _loop(i) { + var listener = listeners[i]; + forEachEvent(_this, function (self, event, type, namespace, qualifier, callback + /*, conf*/ + ) { + if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) { + listeners.splice(i, 1); + return false; + } + }, events, qualifier, callback, conf); + }; + + for (var i = listeners.length - 1; i >= 0; i--) { + _loop(i); + } + + return this; + }; + + p.removeAllListeners = function () { + return this.removeListener('*'); + }; + + p.emit = p.trigger = function (events, extraParams, manualCallback) { + var listeners = this.listeners; + var numListenersBeforeEmit = listeners.length; + this.emitting++; + + if (!array(extraParams)) { + extraParams = [extraParams]; + } + + forEachEventObj(this, function (self, eventObj) { + if (manualCallback != null) { + listeners = [{ + event: eventObj.event, + type: eventObj.type, + namespace: eventObj.namespace, + callback: manualCallback + }]; + numListenersBeforeEmit = listeners.length; + } + + var _loop2 = function _loop2(i) { + var listener = listeners[i]; + + if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) { + var args = [eventObj]; + + if (extraParams != null) { + push(args, extraParams); + } + + self.beforeEmit(self.context, listener, eventObj); + + if (listener.conf && listener.conf.one) { + self.listeners = self.listeners.filter(function (l) { + return l !== listener; + }); + } + + var context = self.callbackContext(self.context, listener, eventObj); + var ret = listener.callback.apply(context, args); + self.afterEmit(self.context, listener, eventObj); + + if (ret === false) { + eventObj.stopPropagation(); + eventObj.preventDefault(); + } + } // if listener matches + + }; + + for (var i = 0; i < numListenersBeforeEmit; i++) { + _loop2(i); + } // for listener + + + if (self.bubble(self.context) && !eventObj.isPropagationStopped()) { + self.parent(self.context).emit(eventObj, extraParams); + } + }, events); + this.emitting--; + return this; + }; + + var emitterOptions$1 = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(ele, listener, eventObj) { + var selector = listener.qualifier; + + if (selector != null) { + return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + + return true; + }, + addEventFields: function addEventFields(ele, evt) { + evt.cy = ele.cy(); + evt.target = ele; + }, + callbackContext: function callbackContext(ele, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : ele; + }, + beforeEmit: function beforeEmit(context, listener + /*, eventObj*/ + ) { + if (listener.conf && listener.conf.once) { + listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); + } + }, + bubble: function bubble() { + return true; + }, + parent: function parent(ele) { + return ele.isChild() ? ele.parent() : ele.cy(); + } + }; + + var argSelector$1 = function argSelector(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + + var elesfn$9 = { + createEmitter: function createEmitter() { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _p = ele._private; + + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions$1, ele); + } + } + + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + var argSel = argSelector$1(selector); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().on(events, argSel, callback); + } + + return this; + }, + removeListener: function removeListener(events, selector, callback) { + var argSel = argSelector$1(selector); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().removeListener(events, argSel, callback); + } + + return this; + }, + removeAllListeners: function removeAllListeners() { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().removeAllListeners(); + } + + return this; + }, + one: function one(events, selector, callback) { + var argSel = argSelector$1(selector); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().one(events, argSel, callback); + } + + return this; + }, + once: function once(events, selector, callback) { + var argSel = argSelector$1(selector); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().on(events, argSel, callback, { + once: true, + onceCollection: this + }); + } + }, + emit: function emit(events, extraParams) { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().emit(events, extraParams); + } + + return this; + }, + emitAndNotify: function emitAndNotify(event, extraParams) { + // for internal use only + if (this.length === 0) { + return; + } // empty collections don't need to notify anything + // notify renderer + + + this.cy().notify(event, this); + this.emit(event, extraParams); + return this; + } + }; + define.eventAliasesOn(elesfn$9); + + var elesfn$8 = { + nodes: function nodes(selector) { + return this.filter(function (ele) { + return ele.isNode(); + }).filter(selector); + }, + edges: function edges(selector) { + return this.filter(function (ele) { + return ele.isEdge(); + }).filter(selector); + }, + // internal helper to get nodes and edges as separate collections with single iteration over elements + byGroup: function byGroup() { + var nodes = this.spawn(); + var edges = this.spawn(); + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + + if (ele.isNode()) { + nodes.push(ele); + } else { + edges.push(ele); + } + } + + return { + nodes: nodes, + edges: edges + }; + }, + filter: function filter(_filter, thisArg) { + if (_filter === undefined) { + // check this first b/c it's the most common/performant case + return this; + } else if (string(_filter) || elementOrCollection(_filter)) { + return new Selector(_filter).filter(this); + } else if (fn$6(_filter)) { + var filterEles = this.spawn(); + var eles = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles); + + if (include) { + filterEles.push(ele); + } + } + + return filterEles; + } + + return this.spawn(); // if not handled by above, give 'em an empty collection + }, + not: function not(toRemove) { + if (!toRemove) { + return this; + } else { + if (string(toRemove)) { + toRemove = this.filter(toRemove); + } + + var elements = this.spawn(); + + for (var i = 0; i < this.length; i++) { + var element = this[i]; + var remove = toRemove.has(element); + + if (!remove) { + elements.push(element); + } + } + + return elements; + } + }, + absoluteComplement: function absoluteComplement() { + var cy = this.cy(); + return cy.mutableElements().not(this); + }, + intersect: function intersect(other) { + // if a selector is specified, then filter by it instead + if (string(other)) { + var selector = other; + return this.filter(selector); + } + + var elements = this.spawn(); + var col1 = this; + var col2 = other; + var col1Smaller = this.length < other.length; + var colS = col1Smaller ? col1 : col2; + var colL = col1Smaller ? col2 : col1; + + for (var i = 0; i < colS.length; i++) { + var ele = colS[i]; + + if (colL.has(ele)) { + elements.push(ele); + } + } + + return elements; + }, + xor: function xor(other) { + var cy = this._private.cy; + + if (string(other)) { + other = cy.$(other); + } + + var elements = this.spawn(); + var col1 = this; + var col2 = other; + + var add = function add(col, other) { + for (var i = 0; i < col.length; i++) { + var ele = col[i]; + var id = ele._private.data.id; + var inOther = other.hasElementWithId(id); + + if (!inOther) { + elements.push(ele); + } + } + }; + + add(col1, col2); + add(col2, col1); + return elements; + }, + diff: function diff(other) { + var cy = this._private.cy; + + if (string(other)) { + other = cy.$(other); + } + + var left = this.spawn(); + var right = this.spawn(); + var both = this.spawn(); + var col1 = this; + var col2 = other; + + var add = function add(col, other, retEles) { + for (var i = 0; i < col.length; i++) { + var ele = col[i]; + var id = ele._private.data.id; + var inOther = other.hasElementWithId(id); + + if (inOther) { + both.merge(ele); + } else { + retEles.push(ele); + } + } + }; + + add(col1, col2, left); + add(col2, col1, right); + return { + left: left, + right: right, + both: both + }; + }, + add: function add(toAdd) { + var cy = this._private.cy; + + if (!toAdd) { + return this; + } + + if (string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + + var elements = this.spawnSelf(); + + for (var i = 0; i < toAdd.length; i++) { + var ele = toAdd[i]; + var add = !this.has(ele); + + if (add) { + elements.push(ele); + } + } + + return elements; + }, + // in place merge on calling collection + merge: function merge(toAdd) { + var _p = this._private; + var cy = _p.cy; + + if (!toAdd) { + return this; + } + + if (toAdd && string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + + var map = _p.map; + + for (var i = 0; i < toAdd.length; i++) { + var toAddEle = toAdd[i]; + var id = toAddEle._private.data.id; + var add = !map.has(id); + + if (add) { + var index = this.length++; + this[index] = toAddEle; + map.set(id, { + ele: toAddEle, + index: index + }); + } + } + + return this; // chaining + }, + unmergeAt: function unmergeAt(i) { + var ele = this[i]; + var id = ele.id(); + var _p = this._private; + var map = _p.map; // remove ele + + this[i] = undefined; + map["delete"](id); + var unmergedLastEle = i === this.length - 1; // replace empty spot with last ele in collection + + if (this.length > 1 && !unmergedLastEle) { + var lastEleI = this.length - 1; + var lastEle = this[lastEleI]; + var lastEleId = lastEle._private.data.id; + this[lastEleI] = undefined; + this[i] = lastEle; + map.set(lastEleId, { + ele: lastEle, + index: i + }); + } // the collection is now 1 ele smaller + + + this.length--; + return this; + }, + // remove single ele in place in calling collection + unmergeOne: function unmergeOne(ele) { + ele = ele[0]; + var _p = this._private; + var id = ele._private.data.id; + var map = _p.map; + var entry = map.get(id); + + if (!entry) { + return this; // no need to remove + } + + var i = entry.index; + this.unmergeAt(i); + return this; + }, + // remove eles in place on calling collection + unmerge: function unmerge(toRemove) { + var cy = this._private.cy; + + if (!toRemove) { + return this; + } + + if (toRemove && string(toRemove)) { + var selector = toRemove; + toRemove = cy.mutableElements().filter(selector); + } + + for (var i = 0; i < toRemove.length; i++) { + this.unmergeOne(toRemove[i]); + } + + return this; // chaining + }, + unmergeBy: function unmergeBy(toRmFn) { + for (var i = this.length - 1; i >= 0; i--) { + var ele = this[i]; + + if (toRmFn(ele)) { + this.unmergeAt(i); + } + } + + return this; + }, + map: function map(mapFn, thisArg) { + var arr = []; + var eles = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles); + arr.push(ret); + } + + return arr; + }, + reduce: function reduce(fn, initialValue) { + var val = initialValue; + var eles = this; + + for (var i = 0; i < eles.length; i++) { + val = fn(val, eles[i], i, eles); + } + + return val; + }, + max: function max(valFn, thisArg) { + var max = -Infinity; + var maxEle; + var eles = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); + + if (val > max) { + max = val; + maxEle = ele; + } + } + + return { + value: max, + ele: maxEle + }; + }, + min: function min(valFn, thisArg) { + var min = Infinity; + var minEle; + var eles = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); + + if (val < min) { + min = val; + minEle = ele; + } + } + + return { + value: min, + ele: minEle + }; + } + }; // aliases + + var fn$1 = elesfn$8; + fn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add; + fn$1['\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; + fn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect; + fn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; + fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; + fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; + + var elesfn$7 = { + isNode: function isNode() { + return this.group() === 'nodes'; + }, + isEdge: function isEdge() { + return this.group() === 'edges'; + }, + isLoop: function isLoop() { + return this.isEdge() && this.source()[0] === this.target()[0]; + }, + isSimple: function isSimple() { + return this.isEdge() && this.source()[0] !== this.target()[0]; + }, + group: function group() { + var ele = this[0]; + + if (ele) { + return ele._private.group; + } + } + }; + + /** + * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), + * and z-index (low to high). These styles affect how this applies: + * + * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the + * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from + * root to leaves of the compound graph. The last drawn is `top`. + * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. + * `manual` ignores this convention and draws based on the `z-index` value setting. + * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher + * `z-index` will be drawn on top of an element with a lower `z-index`. + */ + + var zIndexSort = function zIndexSort(a, b) { + var cy = a.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + + function getDepth(ele) { + var style = ele.pstyle('z-compound-depth'); + + if (style.value === 'auto') { + return hasCompoundNodes ? ele.zDepth() : 0; + } else if (style.value === 'bottom') { + return -1; + } else if (style.value === 'top') { + return MAX_INT$1; + } // 'orphan' + + + return 0; + } + + var depthDiff = getDepth(a) - getDepth(b); + + if (depthDiff !== 0) { + return depthDiff; + } + + function getEleDepth(ele) { + var style = ele.pstyle('z-index-compare'); + + if (style.value === 'auto') { + return ele.isNode() ? 1 : 0; + } // 'manual' + + + return 0; + } + + var eleDiff = getEleDepth(a) - getEleDepth(b); + + if (eleDiff !== 0) { + return eleDiff; + } + + var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value; + + if (zDiff !== 0) { + return zDiff; + } // compare indices in the core (order added to graph w/ last on top) + + + return a.poolIndex() - b.poolIndex(); + }; + + var elesfn$6 = { + forEach: function forEach(fn, thisArg) { + if (fn$6(fn)) { + var N = this.length; + + for (var i = 0; i < N; i++) { + var ele = this[i]; + var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this); + + if (ret === false) { + break; + } // exit each early on return false + + } + } + + return this; + }, + toArray: function toArray() { + var array = []; + + for (var i = 0; i < this.length; i++) { + array.push(this[i]); + } + + return array; + }, + slice: function slice(start, end) { + var array = []; + var thisSize = this.length; + + if (end == null) { + end = thisSize; + } + + if (start == null) { + start = 0; + } + + if (start < 0) { + start = thisSize + start; + } + + if (end < 0) { + end = thisSize + end; + } + + for (var i = start; i >= 0 && i < end && i < thisSize; i++) { + array.push(this[i]); + } + + return this.spawn(array); + }, + size: function size() { + return this.length; + }, + eq: function eq(i) { + return this[i] || this.spawn(); + }, + first: function first() { + return this[0] || this.spawn(); + }, + last: function last() { + return this[this.length - 1] || this.spawn(); + }, + empty: function empty() { + return this.length === 0; + }, + nonempty: function nonempty() { + return !this.empty(); + }, + sort: function sort(sortFn) { + if (!fn$6(sortFn)) { + return this; + } + + var sorted = this.toArray().sort(sortFn); + return this.spawn(sorted); + }, + sortByZIndex: function sortByZIndex() { + return this.sort(zIndexSort); + }, + zDepth: function zDepth() { + var ele = this[0]; + + if (!ele) { + return undefined; + } // let cy = ele.cy(); + + + var _p = ele._private; + var group = _p.group; + + if (group === 'nodes') { + var depth = _p.data.parent ? ele.parents().size() : 0; + + if (!ele.isParent()) { + return MAX_INT$1 - 1; // childless nodes always on top + } + + return depth; + } else { + var src = _p.source; + var tgt = _p.target; + var srcDepth = src.zDepth(); + var tgtDepth = tgt.zDepth(); + return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent + } + } + }; + elesfn$6.each = elesfn$6.forEach; + + var defineSymbolIterator = function defineSymbolIterator() { + var typeofUndef = "undefined" ; + var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef + + if (isIteratorSupported) { + elesfn$6[Symbol.iterator] = function () { + var _this = this; + + // eslint-disable-line no-undef + var entry = { + value: undefined, + done: false + }; + var i = 0; + var length = this.length; + return _defineProperty$1({ + next: function next() { + if (i < length) { + entry.value = _this[i++]; + } else { + entry.value = undefined; + entry.done = true; + } + + return entry; + } + }, Symbol.iterator, function () { + // eslint-disable-line no-undef + return this; + }); + }; + } + }; + + defineSymbolIterator(); + + var getLayoutDimensionOptions = defaults$g({ + nodeDimensionsIncludeLabels: false + }); + var elesfn$5 = { + // Calculates and returns node dimensions { x, y } based on options given + layoutDimensions: function layoutDimensions(options) { + options = getLayoutDimensionOptions(options); + var dims; + + if (!this.takesUpSpace()) { + dims = { + w: 0, + h: 0 + }; + } else if (options.nodeDimensionsIncludeLabels) { + var bbDim = this.boundingBox(); + dims = { + w: bbDim.w, + h: bbDim.h + }; + } else { + dims = { + w: this.outerWidth(), + h: this.outerHeight() + }; + } // sanitise the dimensions for external layouts (avoid division by zero) + + + if (dims.w === 0 || dims.h === 0) { + dims.w = dims.h = 1; + } + + return dims; + }, + // using standard layout options, apply position function (w/ or w/o animation) + layoutPositions: function layoutPositions(layout, options, fn) { + var nodes = this.nodes().filter(function (n) { + return !n.isParent(); + }); + var cy = this.cy(); + var layoutEles = options.eles; // nodes & edges + + var getMemoizeKey = function getMemoizeKey(node) { + return node.id(); + }; + + var fnMem = memoize$1(fn, getMemoizeKey); // memoized version of position function + + layout.emit({ + type: 'layoutstart', + layout: layout + }); + layout.animations = []; + + var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) { + var center = { + x: nodesBb.x1 + nodesBb.w / 2, + y: nodesBb.y1 + nodesBb.h / 2 + }; + var spacingVector = { + // scale from center of bounding box (not necessarily 0,0) + x: (pos.x - center.x) * spacing, + y: (pos.y - center.y) * spacing + }; + return { + x: center.x + spacingVector.x, + y: center.y + spacingVector.y + }; + }; + + var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1; + + var spacingBb = function spacingBb() { + if (!useSpacingFactor) { + return null; + } + + var bb = makeBoundingBox(); + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var pos = fnMem(node, i); + expandBoundingBoxByPoint(bb, pos.x, pos.y); + } + + return bb; + }; + + var bb = spacingBb(); + var getFinalPos = memoize$1(function (node, i) { + var newPos = fnMem(node, i); + + if (useSpacingFactor) { + var spacing = Math.abs(options.spacingFactor); + newPos = calculateSpacing(spacing, bb, newPos); + } + + if (options.transform != null) { + newPos = options.transform(node, newPos); + } + + return newPos; + }, getMemoizeKey); + + if (options.animate) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var newPos = getFinalPos(node, i); + var animateNode = options.animateFilter == null || options.animateFilter(node, i); + + if (animateNode) { + var ani = node.animation({ + position: newPos, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(ani); + } else { + node.position(newPos); + } + } + + if (options.fit) { + var fitAni = cy.animation({ + fit: { + boundingBox: layoutEles.boundingBoxAt(getFinalPos), + padding: options.padding + }, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(fitAni); + } else if (options.zoom !== undefined && options.pan !== undefined) { + var zoomPanAni = cy.animation({ + zoom: options.zoom, + pan: options.pan, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(zoomPanAni); + } + + layout.animations.forEach(function (ani) { + return ani.play(); + }); + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: layout + }); + Promise$1.all(layout.animations.map(function (ani) { + return ani.promise(); + })).then(function () { + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + }); + } else { + nodes.positions(getFinalPos); + + if (options.fit) { + cy.fit(options.eles, options.padding); + } + + if (options.zoom != null) { + cy.zoom(options.zoom); + } + + if (options.pan) { + cy.pan(options.pan); + } + + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: layout + }); + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + } + + return this; // chaining + }, + layout: function layout(options) { + var cy = this.cy(); + return cy.makeLayout(extend({}, options, { + eles: this + })); + } + }; // aliases: + + elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; + + function styleCache(key, fn, ele) { + var _p = ele._private; + var cache = _p.styleCache = _p.styleCache || []; + var val; + + if ((val = cache[key]) != null) { + return val; + } else { + val = cache[key] = fn(ele); + return val; + } + } + + function cacheStyleFunction(key, fn) { + key = hashString(key); + return function cachedStyleFunction(ele) { + return styleCache(key, fn, ele); + }; + } + + function cachePrototypeStyleFunction(key, fn) { + key = hashString(key); + + var selfFn = function selfFn(ele) { + return fn.call(ele); + }; + + return function cachedPrototypeStyleFunction() { + var ele = this[0]; + + if (ele) { + return styleCache(key, selfFn, ele); + } + }; + } + + var elesfn$4 = { + recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { + var cy = this.cy(); + var renderer = cy.renderer(); + var styleEnabled = cy.styleEnabled(); + + if (renderer && styleEnabled) { + renderer.recalculateRenderedStyle(this, useCache); + } + + return this; + }, + dirtyStyleCache: function dirtyStyleCache() { + var cy = this.cy(); + + var dirty = function dirty(ele) { + return ele._private.styleCache = null; + }; + + if (cy.hasCompoundNodes()) { + var eles; + eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + eles.merge(eles.connectedEdges()); + eles.forEach(dirty); + } else { + this.forEach(function (ele) { + dirty(ele); + ele.connectedEdges().forEach(dirty); + }); + } + + return this; + }, + // fully updates (recalculates) the style for the elements + updateStyle: function updateStyle(notifyRenderer) { + var cy = this._private.cy; + + if (!cy.styleEnabled()) { + return this; + } + + if (cy.batching()) { + var bEles = cy._private.batchStyleEles; + bEles.merge(this); + return this; // chaining and exit early when batching + } + + var hasCompounds = cy.hasCompoundNodes(); + var updatedEles = this; + notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false; + + if (hasCompounds) { + // then add everything up and down for compound selector checks + updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + } // let changedEles = style.apply( updatedEles ); + + + var changedEles = updatedEles; + + if (notifyRenderer) { + changedEles.emitAndNotify('style'); // let renderer know we changed style + } else { + changedEles.emit('style'); // just fire the event + } + + updatedEles.forEach(function (ele) { + return ele._private.styleDirty = true; + }); + return this; // chaining + }, + // private: clears dirty flag and recalculates style + cleanStyle: function cleanStyle() { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return; + } + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + + if (ele._private.styleDirty) { + // n.b. this flag should be set before apply() to avoid potential infinite recursion + ele._private.styleDirty = false; + cy.style().apply(ele); + } + } + }, + // get the internal parsed style object for the specified property + parsedStyle: function parsedStyle(property) { + var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var ele = this[0]; + var cy = ele.cy(); + + if (!cy.styleEnabled()) { + return; + } + + if (ele) { + this.cleanStyle(); + var overriddenStyle = ele._private.style[property]; + + if (overriddenStyle != null) { + return overriddenStyle; + } else if (includeNonDefault) { + return cy.style().getDefaultProperty(property); + } else { + return null; + } + } + }, + numericStyle: function numericStyle(property) { + var ele = this[0]; + + if (!ele.cy().styleEnabled()) { + return; + } + + if (ele) { + var pstyle = ele.pstyle(property); + return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value; + } + }, + numericStyleUnits: function numericStyleUnits(property) { + var ele = this[0]; + + if (!ele.cy().styleEnabled()) { + return; + } + + if (ele) { + return ele.pstyle(property).units; + } + }, + // get the specified css property as a rendered value (i.e. on-screen value) + // or get the whole rendered style if no property specified (NB doesn't allow setting) + renderedStyle: function renderedStyle(property) { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return this; + } + + var ele = this[0]; + + if (ele) { + return cy.style().getRenderedStyle(ele, property); + } + }, + // read the calculated css style of the element or override the style (via a bypass) + style: function style(name, value) { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return this; + } + + var updateTransitions = false; + var style = cy.style(); + + if (plainObject(name)) { + // then extend the bypass + var props = name; + style.applyBypass(this, props, updateTransitions); + this.emitAndNotify('style'); // let the renderer know we've updated style + } else if (string(name)) { + if (value === undefined) { + // then get the property from the style + var ele = this[0]; + + if (ele) { + return style.getStylePropertyValue(ele, name); + } else { + // empty collection => can't get any value + return; + } + } else { + // then set the bypass with the property value + style.applyBypass(this, name, value, updateTransitions); + this.emitAndNotify('style'); // let the renderer know we've updated style + } + } else if (name === undefined) { + var _ele = this[0]; + + if (_ele) { + return style.getRawStyle(_ele); + } else { + // empty collection => can't get any value + return; + } + } + + return this; // chaining + }, + removeStyle: function removeStyle(names) { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return this; + } + + var updateTransitions = false; + var style = cy.style(); + var eles = this; + + if (names === undefined) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + style.removeAllBypasses(ele, updateTransitions); + } + } else { + names = names.split(/\s+/); + + for (var _i = 0; _i < eles.length; _i++) { + var _ele2 = eles[_i]; + style.removeBypasses(_ele2, names, updateTransitions); + } + } + + this.emitAndNotify('style'); // let the renderer know we've updated style + + return this; // chaining + }, + show: function show() { + this.css('display', 'element'); + return this; // chaining + }, + hide: function hide() { + this.css('display', 'none'); + return this; // chaining + }, + effectiveOpacity: function effectiveOpacity() { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return 1; + } + + var hasCompoundNodes = cy.hasCompoundNodes(); + var ele = this[0]; + + if (ele) { + var _p = ele._private; + var parentOpacity = ele.pstyle('opacity').value; + + if (!hasCompoundNodes) { + return parentOpacity; + } + + var parents = !_p.data.parent ? null : ele.parents(); + + if (parents) { + for (var i = 0; i < parents.length; i++) { + var parent = parents[i]; + var opacity = parent.pstyle('opacity').value; + parentOpacity = opacity * parentOpacity; + } + } + + return parentOpacity; + } + }, + transparent: function transparent() { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return false; + } + + var ele = this[0]; + var hasCompoundNodes = ele.cy().hasCompoundNodes(); + + if (ele) { + if (!hasCompoundNodes) { + return ele.pstyle('opacity').value === 0; + } else { + return ele.effectiveOpacity() === 0; + } + } + }, + backgrounding: function backgrounding() { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return false; + } + + var ele = this[0]; + return ele._private.backgrounding ? true : false; + } + }; + + function checkCompound(ele, parentOk) { + var _p = ele._private; + var parents = _p.data.parent ? ele.parents() : null; + + if (parents) { + for (var i = 0; i < parents.length; i++) { + var parent = parents[i]; + + if (!parentOk(parent)) { + return false; + } + } + } + + return true; + } + + function defineDerivedStateFunction(specs) { + var ok = specs.ok; + var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; + var parentOk = specs.parentOk || specs.ok; + return function () { + var cy = this.cy(); + + if (!cy.styleEnabled()) { + return true; + } + + var ele = this[0]; + var hasCompoundNodes = cy.hasCompoundNodes(); + + if (ele) { + var _p = ele._private; + + if (!ok(ele)) { + return false; + } + + if (ele.isNode()) { + return !hasCompoundNodes || checkCompound(ele, parentOk); + } else { + var src = _p.source; + var tgt = _p.target; + return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); + } + } + }; + } + + var eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) { + return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); + }); + elesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({ + ok: eleTakesUpSpace + })); + var eleInteractive = cacheStyleFunction('eleInteractive', function (ele) { + return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele); + }); + var parentInteractive = cacheStyleFunction('parentInteractive', function (parent) { + return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent); + }); + elesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({ + ok: eleInteractive, + parentOk: parentInteractive, + edgeOkViaNode: eleTakesUpSpace + })); + + elesfn$4.noninteractive = function () { + var ele = this[0]; + + if (ele) { + return !ele.interactive(); + } + }; + + var eleVisible = cacheStyleFunction('eleVisible', function (ele) { + return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele); + }); + var edgeVisibleViaNode = eleTakesUpSpace; + elesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({ + ok: eleVisible, + edgeOkViaNode: edgeVisibleViaNode + })); + + elesfn$4.hidden = function () { + var ele = this[0]; + + if (ele) { + return !ele.visible(); + } + }; + + elesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () { + if (!this.cy().styleEnabled()) { + return false; + } + + return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace(); + }); + elesfn$4.bypass = elesfn$4.css = elesfn$4.style; + elesfn$4.renderedCss = elesfn$4.renderedStyle; + elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; + elesfn$4.pstyle = elesfn$4.parsedStyle; + + var elesfn$3 = {}; + + function defineSwitchFunction(params) { + return function () { + var args = arguments; + var changedEles = []; // e.g. cy.nodes().select( data, handler ) + + if (args.length === 2) { + var data = args[0]; + var handler = args[1]; + this.on(params.event, data, handler); + } // e.g. cy.nodes().select( handler ) + else if (args.length === 1 && fn$6(args[0])) { + var _handler = args[0]; + this.on(params.event, _handler); + } // e.g. cy.nodes().select() + // e.g. (private) cy.nodes().select(['tapselect']) + else if (args.length === 0 || args.length === 1 && array(args[0])) { + var addlEvents = args.length === 1 ? args[0] : null; + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var able = !params.ableField || ele._private[params.ableField]; + var changed = ele._private[params.field] != params.value; + + if (params.overrideAble) { + var overrideAble = params.overrideAble(ele); + + if (overrideAble !== undefined) { + able = overrideAble; + + if (!overrideAble) { + return this; + } // to save cycles assume not able for all on override + + } + } + + if (able) { + ele._private[params.field] = params.value; + + if (changed) { + changedEles.push(ele); + } + } + } + + var changedColl = this.spawn(changedEles); + changedColl.updateStyle(); // change of state => possible change of style + + changedColl.emit(params.event); + + if (addlEvents) { + changedColl.emit(addlEvents); + } + } + + return this; + }; + } + + function defineSwitchSet(params) { + elesfn$3[params.field] = function () { + var ele = this[0]; + + if (ele) { + if (params.overrideField) { + var val = params.overrideField(ele); + + if (val !== undefined) { + return val; + } + } + + return ele._private[params.field]; + } + }; + + elesfn$3[params.on] = defineSwitchFunction({ + event: params.on, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: true + }); + elesfn$3[params.off] = defineSwitchFunction({ + event: params.off, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: false + }); + } + + defineSwitchSet({ + field: 'locked', + overrideField: function overrideField(ele) { + return ele.cy().autolock() ? true : undefined; + }, + on: 'lock', + off: 'unlock' + }); + defineSwitchSet({ + field: 'grabbable', + overrideField: function overrideField(ele) { + return ele.cy().autoungrabify() || ele.pannable() ? false : undefined; + }, + on: 'grabify', + off: 'ungrabify' + }); + defineSwitchSet({ + field: 'selected', + ableField: 'selectable', + overrideAble: function overrideAble(ele) { + return ele.cy().autounselectify() ? false : undefined; + }, + on: 'select', + off: 'unselect' + }); + defineSwitchSet({ + field: 'selectable', + overrideField: function overrideField(ele) { + return ele.cy().autounselectify() ? false : undefined; + }, + on: 'selectify', + off: 'unselectify' + }); + elesfn$3.deselect = elesfn$3.unselect; + + elesfn$3.grabbed = function () { + var ele = this[0]; + + if (ele) { + return ele._private.grabbed; + } + }; + + defineSwitchSet({ + field: 'active', + on: 'activate', + off: 'unactivate' + }); + defineSwitchSet({ + field: 'pannable', + on: 'panify', + off: 'unpanify' + }); + + elesfn$3.inactive = function () { + var ele = this[0]; + + if (ele) { + return !ele._private.active; + } + }; + + var elesfn$2 = {}; // DAG functions + //////////////// + + var defineDagExtremity = function defineDagExtremity(params) { + return function dagExtremityImpl(selector) { + var eles = this; + var ret = []; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + + if (!ele.isNode()) { + continue; + } + + var disqualified = false; + var edges = ele.connectedEdges(); + + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + + if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { + disqualified = true; + break; + } + } + + if (!disqualified) { + ret.push(ele); + } + } + + return this.spawn(ret, true).filter(selector); + }; + }; + + var defineDagOneHop = function defineDagOneHop(params) { + return function (selector) { + var eles = this; + var oEles = []; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + + if (!ele.isNode()) { + continue; + } + + var edges = ele.connectedEdges(); + + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + + if (params.outgoing && src === ele) { + oEles.push(edge); + oEles.push(tgt); + } else if (params.incoming && tgt === ele) { + oEles.push(edge); + oEles.push(src); + } + } + } + + return this.spawn(oEles, true).filter(selector); + }; + }; + + var defineDagAllHops = function defineDagAllHops(params) { + return function (selector) { + var eles = this; + var sEles = []; + var sElesIds = {}; + + for (;;) { + var next = params.outgoing ? eles.outgoers() : eles.incomers(); + + if (next.length === 0) { + break; + } // done if none left + + + var newNext = false; + + for (var i = 0; i < next.length; i++) { + var n = next[i]; + var nid = n.id(); + + if (!sElesIds[nid]) { + sElesIds[nid] = true; + sEles.push(n); + newNext = true; + } + } + + if (!newNext) { + break; + } // done if touched all outgoers already + + + eles = next; + } + + return this.spawn(sEles, true).filter(selector); + }; + }; + + elesfn$2.clearTraversalCache = function () { + for (var i = 0; i < this.length; i++) { + this[i]._private.traversalCache = null; + } + }; + + extend(elesfn$2, { + // get the root nodes in the DAG + roots: defineDagExtremity({ + noIncomingEdges: true + }), + // get the leaf nodes in the DAG + leaves: defineDagExtremity({ + noOutgoingEdges: true + }), + // normally called children in graph theory + // these nodes =edges=> outgoing nodes + outgoers: cache(defineDagOneHop({ + outgoing: true + }), 'outgoers'), + // aka DAG descendants + successors: defineDagAllHops({ + outgoing: true + }), + // normally called parents in graph theory + // these nodes <=edges= incoming nodes + incomers: cache(defineDagOneHop({ + incoming: true + }), 'incomers'), + // aka DAG ancestors + predecessors: defineDagAllHops({ + incoming: true + }) + }); // Neighbourhood functions + ////////////////////////// + + extend(elesfn$2, { + neighborhood: cache(function (selector) { + var elements = []; + var nodes = this.nodes(); + + for (var i = 0; i < nodes.length; i++) { + // for all nodes + var node = nodes[i]; + var connectedEdges = node.connectedEdges(); // for each connected edge, add the edge and the other node + + for (var j = 0; j < connectedEdges.length; j++) { + var edge = connectedEdges[j]; + var src = edge.source(); + var tgt = edge.target(); + var otherNode = node === src ? tgt : src; // need check in case of loop + + if (otherNode.length > 0) { + elements.push(otherNode[0]); // add node 1 hop away + } // add connected edge + + + elements.push(edge[0]); + } + } + + return this.spawn(elements, true).filter(selector); + }, 'neighborhood'), + closedNeighborhood: function closedNeighborhood(selector) { + return this.neighborhood().add(this).filter(selector); + }, + openNeighborhood: function openNeighborhood(selector) { + return this.neighborhood(selector); + } + }); // aliases + + elesfn$2.neighbourhood = elesfn$2.neighborhood; + elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; + elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; // Edge functions + ///////////////// + + extend(elesfn$2, { + source: cache(function sourceImpl(selector) { + var ele = this[0]; + var src; + + if (ele) { + src = ele._private.source || ele.cy().collection(); + } + + return src && selector ? src.filter(selector) : src; + }, 'source'), + target: cache(function targetImpl(selector) { + var ele = this[0]; + var tgt; + + if (ele) { + tgt = ele._private.target || ele.cy().collection(); + } + + return tgt && selector ? tgt.filter(selector) : tgt; + }, 'target'), + sources: defineSourceFunction({ + attr: 'source' + }), + targets: defineSourceFunction({ + attr: 'target' + }) + }); + + function defineSourceFunction(params) { + return function sourceImpl(selector) { + var sources = []; + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var src = ele._private[params.attr]; + + if (src) { + sources.push(src); + } + } + + return this.spawn(sources, true).filter(selector); + }; + } + + extend(elesfn$2, { + edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'), + edgesTo: cache(defineEdgesWithFunction({ + thisIsSrc: true + }), 'edgesTo') + }); + + function defineEdgesWithFunction(params) { + return function edgesWithImpl(otherNodes) { + var elements = []; + var cy = this._private.cy; + var p = params || {}; // get elements if a selector is specified + + if (string(otherNodes)) { + otherNodes = cy.$(otherNodes); + } + + for (var h = 0; h < otherNodes.length; h++) { + var edges = otherNodes[h]._private.edges; + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var edgeData = edge._private.data; + var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); + var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); + var edgeConnectsThisAndOther = thisToOther || otherToThis; + + if (!edgeConnectsThisAndOther) { + continue; + } + + if (p.thisIsSrc || p.thisIsTgt) { + if (p.thisIsSrc && !thisToOther) { + continue; + } + + if (p.thisIsTgt && !otherToThis) { + continue; + } + } + + elements.push(edge); + } + } + + return this.spawn(elements, true); + }; + } + + extend(elesfn$2, { + connectedEdges: cache(function (selector) { + var retEles = []; + var eles = this; + + for (var i = 0; i < eles.length; i++) { + var node = eles[i]; + + if (!node.isNode()) { + continue; + } + + var edges = node._private.edges; + + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + retEles.push(edge); + } + } + + return this.spawn(retEles, true).filter(selector); + }, 'connectedEdges'), + connectedNodes: cache(function (selector) { + var retEles = []; + var eles = this; + + for (var i = 0; i < eles.length; i++) { + var edge = eles[i]; + + if (!edge.isEdge()) { + continue; + } + + retEles.push(edge.source()[0]); + retEles.push(edge.target()[0]); + } + + return this.spawn(retEles, true).filter(selector); + }, 'connectedNodes'), + parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'), + codirectedEdges: cache(defineParallelEdgesFunction({ + codirected: true + }), 'codirectedEdges') + }); + + function defineParallelEdgesFunction(params) { + var defaults = { + codirected: false + }; + params = extend({}, defaults, params); + return function parallelEdgesImpl(selector) { + // micro-optimised for renderer + var elements = []; + var edges = this.edges(); + var p = params; // look at all the edges in the collection + + for (var i = 0; i < edges.length; i++) { + var edge1 = edges[i]; + var edge1_p = edge1._private; + var src1 = edge1_p.source; + var srcid1 = src1._private.data.id; + var tgtid1 = edge1_p.data.target; + var srcEdges1 = src1._private.edges; // look at edges connected to the src node of this edge + + for (var j = 0; j < srcEdges1.length; j++) { + var edge2 = srcEdges1[j]; + var edge2data = edge2._private.data; + var tgtid2 = edge2data.target; + var srcid2 = edge2data.source; + var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; + var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; + + if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) { + elements.push(edge2); + } + } + } + + return this.spawn(elements, true).filter(selector); + }; + } // Misc functions + ///////////////// + + + extend(elesfn$2, { + components: function components(root) { + var self = this; + var cy = self.cy(); + var visited = cy.collection(); + var unvisited = root == null ? self.nodes() : root.nodes(); + var components = []; + + if (root != null && unvisited.empty()) { + // root may contain only edges + unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides + } + + var visitInComponent = function visitInComponent(node, component) { + visited.merge(node); + unvisited.unmerge(node); + component.merge(node); + }; + + if (unvisited.empty()) { + return self.spawn(); + } + + var _loop = function _loop() { + // each iteration yields a component + var cmpt = cy.collection(); + components.push(cmpt); + var root = unvisited[0]; + visitInComponent(root, cmpt); + self.bfs({ + directed: false, + roots: root, + visit: function visit(v) { + return visitInComponent(v, cmpt); + } + }); + cmpt.forEach(function (node) { + node.connectedEdges().forEach(function (e) { + // connectedEdges() usually cached + if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { + // has() is cheap + cmpt.merge(e); // forEach() only considers nodes -- sets N at call time + } + }); + }); + }; + + do { + _loop(); + } while (unvisited.length > 0); + + return components; + }, + component: function component() { + var ele = this[0]; + return ele.cy().mutableElements().components(ele)[0]; + } + }); + elesfn$2.componentsOf = elesfn$2.components; + + var Collection = function Collection(cy, elements) { + var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (cy === undefined) { + error('A collection must have a reference to the core'); + return; + } + + var map = new Map$2(); + var createdElements = false; + + if (!elements) { + elements = []; + } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) { + createdElements = true; // make elements from json and restore all at once later + + var eles = []; + var elesIds = new Set$1(); + + for (var i = 0, l = elements.length; i < l; i++) { + var json = elements[i]; + + if (json.data == null) { + json.data = {}; + } + + var _data = json.data; // make sure newly created elements have valid ids + + if (_data.id == null) { + _data.id = uuid(); + } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { + continue; // can't create element if prior id already exists + } + + var ele = new Element(cy, json, false); + eles.push(ele); + elesIds.add(_data.id); + } + + elements = eles; + } + + this.length = 0; + + for (var _i = 0, _l = elements.length; _i < _l; _i++) { + var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements + + if (element$1 == null) { + continue; + } + + var id = element$1._private.data.id; + + if (!unique || !map.has(id)) { + if (unique) { + map.set(id, { + index: this.length, + ele: element$1 + }); + } + + this[this.length] = element$1; + this.length++; + } + } + + this._private = { + eles: this, + cy: cy, + + get map() { + if (this.lazyMap == null) { + this.rebuildMap(); + } + + return this.lazyMap; + }, + + set map(m) { + this.lazyMap = m; + }, + + rebuildMap: function rebuildMap() { + var m = this.lazyMap = new Map$2(); + var eles = this.eles; + + for (var _i2 = 0; _i2 < eles.length; _i2++) { + var _ele = eles[_i2]; + m.set(_ele.id(), { + index: _i2, + ele: _ele + }); + } + } + }; + + if (unique) { + this._private.map = map; + } // restore the elements if we created them from json + + + if (createdElements && !removed) { + this.restore(); + } + }; // Functions + //////////////////////////////////////////////////////////////////////////////////////////////////// + // keep the prototypes in sync (an element has the same functions as a collection) + // and use elefn and elesfn as shorthands to the prototypes + + + var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); + + elesfn$1.instanceString = function () { + return 'collection'; + }; + + elesfn$1.spawn = function (eles, unique) { + return new Collection(this.cy(), eles, unique); + }; + + elesfn$1.spawnSelf = function () { + return this.spawn(this); + }; + + elesfn$1.cy = function () { + return this._private.cy; + }; + + elesfn$1.renderer = function () { + return this._private.cy.renderer(); + }; + + elesfn$1.element = function () { + return this[0]; + }; + + elesfn$1.collection = function () { + if (collection(this)) { + return this; + } else { + // an element + return new Collection(this._private.cy, [this]); + } + }; + + elesfn$1.unique = function () { + return new Collection(this._private.cy, this, true); + }; + + elesfn$1.hasElementWithId = function (id) { + id = '' + id; // id must be string + + return this._private.map.has(id); + }; + + elesfn$1.getElementById = function (id) { + id = '' + id; // id must be string + + var cy = this._private.cy; + + var entry = this._private.map.get(id); + + return entry ? entry.ele : new Collection(cy); // get ele or empty collection + }; + + elesfn$1.$id = elesfn$1.getElementById; + + elesfn$1.poolIndex = function () { + var cy = this._private.cy; + var eles = cy._private.elements; + var id = this[0]._private.data.id; + return eles._private.map.get(id).index; + }; + + elesfn$1.indexOf = function (ele) { + var id = ele[0]._private.data.id; + return this._private.map.get(id).index; + }; + + elesfn$1.indexOfId = function (id) { + id = '' + id; // id must be string + + return this._private.map.get(id).index; + }; + + elesfn$1.json = function (obj) { + var ele = this.element(); + var cy = this.cy(); + + if (ele == null && obj) { + return this; + } // can't set to no eles + + + if (ele == null) { + return undefined; + } // can't get from no eles + + + var p = ele._private; + + if (plainObject(obj)) { + // set + cy.startBatch(); + + if (obj.data) { + ele.data(obj.data); + var _data2 = p.data; + + if (ele.isEdge()) { + // source and target are immutable via data() + var move = false; + var spec = {}; + var src = obj.data.source; + var tgt = obj.data.target; + + if (src != null && src != _data2.source) { + spec.source = '' + src; // id must be string + + move = true; + } + + if (tgt != null && tgt != _data2.target) { + spec.target = '' + tgt; // id must be string + + move = true; + } + + if (move) { + ele = ele.move(spec); + } + } else { + // parent is immutable via data() + var newParentValSpecd = ('parent' in obj.data); + var parent = obj.data.parent; + + if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { + if (parent === undefined) { + // can't set undefined imperatively, so use null + parent = null; + } + + if (parent != null) { + parent = '' + parent; // id must be string + } + + ele = ele.move({ + parent: parent + }); + } + } + } + + if (obj.position) { + ele.position(obj.position); + } // ignore group -- immutable + + + var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) { + var obj_k = obj[k]; + + if (obj_k != null && obj_k !== p[k]) { + if (obj_k) { + ele[trueFnName](); + } else { + ele[falseFnName](); + } + } + }; + + checkSwitch('removed', 'remove', 'restore'); + checkSwitch('selected', 'select', 'unselect'); + checkSwitch('selectable', 'selectify', 'unselectify'); + checkSwitch('locked', 'lock', 'unlock'); + checkSwitch('grabbable', 'grabify', 'ungrabify'); + checkSwitch('pannable', 'panify', 'unpanify'); + + if (obj.classes != null) { + ele.classes(obj.classes); + } + + cy.endBatch(); + return this; + } else if (obj === undefined) { + // get + var json = { + data: copy(p.data), + position: copy(p.position), + group: p.group, + removed: p.removed, + selected: p.selected, + selectable: p.selectable, + locked: p.locked, + grabbable: p.grabbable, + pannable: p.pannable, + classes: null + }; + json.classes = ''; + var i = 0; + p.classes.forEach(function (cls) { + return json.classes += i++ === 0 ? cls : ' ' + cls; + }); + return json; + } + }; + + elesfn$1.jsons = function () { + var jsons = []; + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var json = ele.json(); + jsons.push(json); + } + + return jsons; + }; + + elesfn$1.clone = function () { + var cy = this.cy(); + var elesArr = []; + + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var json = ele.json(); + var clone = new Element(cy, json, false); // NB no restore + + elesArr.push(clone); + } + + return new Collection(cy, elesArr); + }; + + elesfn$1.copy = elesfn$1.clone; + + elesfn$1.restore = function () { + var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var self = this; + var cy = self.cy(); + var cy_p = cy._private; // create arrays of nodes and edges, since we need to + // restore the nodes first + + var nodes = []; + var edges = []; + var elements; + + for (var _i3 = 0, l = self.length; _i3 < l; _i3++) { + var ele = self[_i3]; + + if (addToPool && !ele.removed()) { + // don't need to handle this ele + continue; + } // keep nodes first in the array and edges after + + + if (ele.isNode()) { + // put to front of array if node + nodes.push(ele); + } else { + // put to end of array if edge + edges.push(ele); + } + } + + elements = nodes.concat(edges); + var i; + + var removeFromElements = function removeFromElements() { + elements.splice(i, 1); + i--; + }; // now, restore each element + + + for (i = 0; i < elements.length; i++) { + var _ele2 = elements[i]; + var _private = _ele2._private; + var _data3 = _private.data; // the traversal cache should start fresh when ele is added + + _ele2.clearTraversalCache(); // set id and validate + + + if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) { + _data3.id = uuid(); + } else if (number$1(_data3.id)) { + _data3.id = '' + _data3.id; // now it's a string + } else if (emptyString(_data3.id) || !string(_data3.id)) { + error('Can not create element with invalid string ID `' + _data3.id + '`'); // can't create element if it has empty string as id or non-string id + + removeFromElements(); + continue; + } else if (cy.hasElementWithId(_data3.id)) { + error('Can not create second element with ID `' + _data3.id + '`'); // can't create element if one already has that id + + removeFromElements(); + continue; + } + + var id = _data3.id; // id is finalised, now let's keep a ref + + if (_ele2.isNode()) { + // extra checks for nodes + var pos = _private.position; // make sure the nodes have a defined position + + if (pos.x == null) { + pos.x = 0; + } + + if (pos.y == null) { + pos.y = 0; + } + } + + if (_ele2.isEdge()) { + // extra checks for edges + var edge = _ele2; + var fields = ['source', 'target']; + var fieldsLength = fields.length; + var badSourceOrTarget = false; + + for (var j = 0; j < fieldsLength; j++) { + var field = fields[j]; + var val = _data3[field]; + + if (number$1(val)) { + val = _data3[field] = '' + _data3[field]; // now string + } + + if (val == null || val === '') { + // can't create if source or target is not defined properly + error('Can not create edge `' + id + '` with unspecified ' + field); + badSourceOrTarget = true; + } else if (!cy.hasElementWithId(val)) { + // can't create edge if one of its nodes doesn't exist + error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`'); + badSourceOrTarget = true; + } + } + + if (badSourceOrTarget) { + removeFromElements(); + continue; + } // can't create this + + + var src = cy.getElementById(_data3.source); + var tgt = cy.getElementById(_data3.target); // only one edge in node if loop + + if (src.same(tgt)) { + src._private.edges.push(edge); + } else { + src._private.edges.push(edge); + + tgt._private.edges.push(edge); + } + + edge._private.source = src; + edge._private.target = tgt; + } // if is edge + // create mock ids / indexes maps for element so it can be used like collections + + + _private.map = new Map$2(); + + _private.map.set(id, { + ele: _ele2, + index: 0 + }); + + _private.removed = false; + + if (addToPool) { + cy.addToPool(_ele2); + } + } // for each element + // do compound node sanity checks + + + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + // each node + var node = nodes[_i4]; + var _data4 = node._private.data; + + if (number$1(_data4.parent)) { + // then automake string + _data4.parent = '' + _data4.parent; + } + + var parentId = _data4.parent; + var specifiedParent = parentId != null; + + if (specifiedParent || node._private.parent) { + var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId); + + if (parent.empty()) { + // non-existant parent; just remove it + _data4.parent = undefined; + } else if (parent[0].removed()) { + warn('Node added with missing parent, reference to parent removed'); + _data4.parent = undefined; + node._private.parent = null; + } else { + var selfAsParent = false; + var ancestor = parent; + + while (!ancestor.empty()) { + if (node.same(ancestor)) { + // mark self as parent and remove from data + selfAsParent = true; + _data4.parent = undefined; // remove parent reference + // exit or we loop forever + + break; + } + + ancestor = ancestor.parent(); + } + + if (!selfAsParent) { + // connect with children + parent[0]._private.children.push(node); + + node._private.parent = parent[0]; // let the core know we have a compound graph + + cy_p.hasCompoundNodes = true; + } + } // else + + } // if specified parent + + } // for each node + + + if (elements.length > 0) { + var restored = elements.length === self.length ? self : new Collection(cy, elements); + + for (var _i5 = 0; _i5 < restored.length; _i5++) { + var _ele3 = restored[_i5]; + + if (_ele3.isNode()) { + continue; + } // adding an edge invalidates the traversal caches for the parallel edges + + + _ele3.parallelEdges().clearTraversalCache(); // adding an edge invalidates the traversal cache for the connected nodes + + + _ele3.source().clearTraversalCache(); + + _ele3.target().clearTraversalCache(); + } + + var toUpdateStyle; + + if (cy_p.hasCompoundNodes) { + toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); + } else { + toUpdateStyle = restored; + } + + toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); + + if (notifyRenderer) { + restored.emitAndNotify('add'); + } else if (addToPool) { + restored.emit('add'); + } + } + + return self; // chainability + }; + + elesfn$1.removed = function () { + var ele = this[0]; + return ele && ele._private.removed; + }; + + elesfn$1.inside = function () { + var ele = this[0]; + return ele && !ele._private.removed; + }; + + elesfn$1.remove = function () { + var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var self = this; + var elesToRemove = []; + var elesToRemoveIds = {}; + var cy = self._private.cy; // add connected edges + + function addConnectedEdges(node) { + var edges = node._private.edges; + + for (var i = 0; i < edges.length; i++) { + add(edges[i]); + } + } // add descendant nodes + + + function addChildren(node) { + var children = node._private.children; + + for (var i = 0; i < children.length; i++) { + add(children[i]); + } + } + + function add(ele) { + var alreadyAdded = elesToRemoveIds[ele.id()]; + + if (removeFromPool && ele.removed() || alreadyAdded) { + return; + } else { + elesToRemoveIds[ele.id()] = true; + } + + if (ele.isNode()) { + elesToRemove.push(ele); // nodes are removed last + + addConnectedEdges(ele); + addChildren(ele); + } else { + elesToRemove.unshift(ele); // edges are removed first + } + } // make the list of elements to remove + // (may be removing more than specified due to connected edges etc) + + + for (var i = 0, l = self.length; i < l; i++) { + var ele = self[i]; + add(ele); + } + + function removeEdgeRef(node, edge) { + var connectedEdges = node._private.edges; + removeFromArray(connectedEdges, edge); // removing an edges invalidates the traversal cache for its nodes + + node.clearTraversalCache(); + } + + function removeParallelRef(pllEdge) { + // removing an edge invalidates the traversal caches for the parallel edges + pllEdge.clearTraversalCache(); + } + + var alteredParents = []; + alteredParents.ids = {}; + + function removeChildRef(parent, ele) { + ele = ele[0]; + parent = parent[0]; + var children = parent._private.children; + var pid = parent.id(); + removeFromArray(children, ele); // remove parent => child ref + + ele._private.parent = null; // remove child => parent ref + + if (!alteredParents.ids[pid]) { + alteredParents.ids[pid] = true; + alteredParents.push(parent); + } + } + + self.dirtyCompoundBoundsCache(); + + if (removeFromPool) { + cy.removeFromPool(elesToRemove); // remove from core pool + } + + for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { + var _ele4 = elesToRemove[_i6]; + + if (_ele4.isEdge()) { + // remove references to this edge in its connected nodes + var src = _ele4.source()[0]; + + var tgt = _ele4.target()[0]; + + removeEdgeRef(src, _ele4); + removeEdgeRef(tgt, _ele4); + + var pllEdges = _ele4.parallelEdges(); + + for (var j = 0; j < pllEdges.length; j++) { + var pllEdge = pllEdges[j]; + removeParallelRef(pllEdge); + + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + } + } else { + // remove reference to parent + var parent = _ele4.parent(); + + if (parent.length !== 0) { + removeChildRef(parent, _ele4); + } + } + + if (removeFromPool) { + // mark as removed + _ele4._private.removed = true; + } + } // check to see if we have a compound graph or not + + + var elesStillInside = cy._private.elements; + cy._private.hasCompoundNodes = false; + + for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { + var _ele5 = elesStillInside[_i7]; + + if (_ele5.isParent()) { + cy._private.hasCompoundNodes = true; + break; + } + } + + var removedElements = new Collection(this.cy(), elesToRemove); + + if (removedElements.size() > 0) { + // must manually notify since trigger won't do this automatically once removed + if (notifyRenderer) { + removedElements.emitAndNotify('remove'); + } else if (removeFromPool) { + removedElements.emit('remove'); + } + } // the parents who were modified by the removal need their style updated + + + for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { + var _ele6 = alteredParents[_i8]; + + if (!removeFromPool || !_ele6.removed()) { + _ele6.updateStyle(); + } + } + + return removedElements; + }; + + elesfn$1.move = function (struct) { + var cy = this._private.cy; + var eles = this; // just clean up refs, caches, etc. in the same way as when removing and then restoring + // (our calls to remove/restore do not remove from the graph or make events) + + var notifyRenderer = false; + var modifyPool = false; + + var toString = function toString(id) { + return id == null ? id : '' + id; + }; // id must be string + + + if (struct.source !== undefined || struct.target !== undefined) { + var srcId = toString(struct.source); + var tgtId = toString(struct.target); + var srcExists = srcId != null && cy.hasElementWithId(srcId); + var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); + + if (srcExists || tgtExists) { + cy.batch(function () { + // avoid duplicate style updates + eles.remove(notifyRenderer, modifyPool); // clean up refs etc. + + eles.emitAndNotify('moveout'); + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _data5 = ele._private.data; + + if (ele.isEdge()) { + if (srcExists) { + _data5.source = srcId; + } + + if (tgtExists) { + _data5.target = tgtId; + } + } + } + + eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc. + }); + eles.emitAndNotify('move'); + } + } else if (struct.parent !== undefined) { + // move node to new parent + var parentId = toString(struct.parent); + var parentExists = parentId === null || cy.hasElementWithId(parentId); + + if (parentExists) { + var pidToAssign = parentId === null ? undefined : parentId; + cy.batch(function () { + // avoid duplicate style updates + var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc. + + updated.emitAndNotify('moveout'); + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _data6 = ele._private.data; + + if (ele.isNode()) { + _data6.parent = pidToAssign; + } + } + + updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc. + }); + eles.emitAndNotify('move'); + } + } + + return this; + }; + + [elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) { + extend(elesfn$1, props); + }); + + var corefn$9 = { + add: function add(opts) { + var elements; + var cy = this; // add the elements + + if (elementOrCollection(opts)) { + var eles = opts; + + if (eles._private.cy === cy) { + // same instance => just restore + elements = eles.restore(); + } else { + // otherwise, copy from json + var jsons = []; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + jsons.push(ele.json()); + } + + elements = new Collection(cy, jsons); + } + } // specify an array of options + else if (array(opts)) { + var _jsons = opts; + elements = new Collection(cy, _jsons); + } // specify via opts.nodes and opts.edges + else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) { + var elesByGroup = opts; + var _jsons2 = []; + var grs = ['nodes', 'edges']; + + for (var _i = 0, il = grs.length; _i < il; _i++) { + var group = grs[_i]; + var elesArray = elesByGroup[group]; + + if (array(elesArray)) { + for (var j = 0, jl = elesArray.length; j < jl; j++) { + var json = extend({ + group: group + }, elesArray[j]); + + _jsons2.push(json); + } + } + } + + elements = new Collection(cy, _jsons2); + } // specify options for one element + else { + var _json = opts; + elements = new Element(cy, _json).collection(); + } + + return elements; + }, + remove: function remove(collection) { + if (elementOrCollection(collection)) ; else if (string(collection)) { + var selector = collection; + collection = this.$(selector); + } + + return collection.remove(); + } + }; + + /* global Float32Array */ + + /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + function generateCubicBezier(mX1, mY1, mX2, mY2) { + var NEWTON_ITERATIONS = 4, + NEWTON_MIN_SLOPE = 0.001, + SUBDIVISION_PRECISION = 0.0000001, + SUBDIVISION_MAX_ITERATIONS = 10, + kSplineTableSize = 11, + kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), + float32ArraySupported = typeof Float32Array !== 'undefined'; + /* Must contain four arguments. */ + + if (arguments.length !== 4) { + return false; + } + /* Arguments must be numbers. */ + + + for (var i = 0; i < 4; ++i) { + if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { + return false; + } + } + /* X values must be in the [0, 1] range. */ + + + mX1 = Math.min(mX1, 1); + mX2 = Math.min(mX2, 1); + mX1 = Math.max(mX1, 0); + mX2 = Math.max(mX2, 0); + var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + + function A(aA1, aA2) { + return 1.0 - 3.0 * aA2 + 3.0 * aA1; + } + + function B(aA1, aA2) { + return 3.0 * aA2 - 6.0 * aA1; + } + + function C(aA1) { + return 3.0 * aA1; + } + + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + + function getSlope(aT, aA1, aA2) { + return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); + } + + function newtonRaphsonIterate(aX, aGuessT) { + for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + + if (currentSlope === 0.0) { + return aGuessT; + } + + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + + return aGuessT; + } + + function calcSampleValues() { + for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { + mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); + } + } + + function binarySubdivide(aX, aA, aB) { + var currentX, + currentT, + i = 0; + + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + + if (currentX > 0.0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); + + return currentT; + } + + function getTForX(aX) { + var intervalStart = 0.0, + currentSample = 1, + lastSample = kSplineTableSize - 1; + + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + + --currentSample; + var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), + guessForT = intervalStart + dist * kSampleStepSize, + initialSlope = getSlope(guessForT, mX1, mX2); + + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT); + } else if (initialSlope === 0.0) { + return guessForT; + } else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); + } + } + + var _precomputed = false; + + function precompute() { + _precomputed = true; + + if (mX1 !== mY1 || mX2 !== mY2) { + calcSampleValues(); + } + } + + var f = function f(aX) { + if (!_precomputed) { + precompute(); + } + + if (mX1 === mY1 && mX2 === mY2) { + return aX; + } + + if (aX === 0) { + return 0; + } + + if (aX === 1) { + return 1; + } + + return calcBezier(getTForX(aX), mY1, mY2); + }; + + f.getControlPoints = function () { + return [{ + x: mX1, + y: mY1 + }, { + x: mX2, + y: mY2 + }]; + }; + + var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; + + f.toString = function () { + return str; + }; + + return f; + } + + /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + + /* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass + then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */ + var generateSpringRK4 = function () { + function springAccelerationForState(state) { + return -state.tension * state.x - state.friction * state.v; + } + + function springEvaluateStateWithDerivative(initialState, dt, derivative) { + var state = { + x: initialState.x + derivative.dx * dt, + v: initialState.v + derivative.dv * dt, + tension: initialState.tension, + friction: initialState.friction + }; + return { + dx: state.v, + dv: springAccelerationForState(state) + }; + } + + function springIntegrateState(state, dt) { + var a = { + dx: state.v, + dv: springAccelerationForState(state) + }, + b = springEvaluateStateWithDerivative(state, dt * 0.5, a), + c = springEvaluateStateWithDerivative(state, dt * 0.5, b), + d = springEvaluateStateWithDerivative(state, dt, c), + dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), + dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); + state.x = state.x + dxdt * dt; + state.v = state.v + dvdt * dt; + return state; + } + + return function springRK4Factory(tension, friction, duration) { + var initState = { + x: -1, + v: 0, + tension: null, + friction: null + }, + path = [0], + time_lapsed = 0, + tolerance = 1 / 10000, + DT = 16 / 1000, + have_duration, + dt, + last_state; + tension = parseFloat(tension) || 500; + friction = parseFloat(friction) || 20; + duration = duration || null; + initState.tension = tension; + initState.friction = friction; + have_duration = duration !== null; + /* Calculate the actual time it takes for this animation to complete with the provided conditions. */ + + if (have_duration) { + /* Run the simulation without a duration. */ + time_lapsed = springRK4Factory(tension, friction); + /* Compute the adjusted time delta. */ + + dt = time_lapsed / duration * DT; + } else { + dt = DT; + } + + for (;;) { + /* Next/step function .*/ + last_state = springIntegrateState(last_state || initState, dt); + /* Store the position. */ + + path.push(1 + last_state.x); + time_lapsed += 16; + /* If the change threshold is reached, break. */ + + if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { + break; + } + } + /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the + computed path and returns a snapshot of the position according to a given percentComplete. */ + + + return !have_duration ? time_lapsed : function (percentComplete) { + return path[percentComplete * (path.length - 1) | 0]; + }; + }; + }(); + + var cubicBezier = function cubicBezier(t1, p1, t2, p2) { + var bezier = generateCubicBezier(t1, p1, t2, p2); + return function (start, end, percent) { + return start + (end - start) * bezier(percent); + }; + }; + + var easings = { + 'linear': function linear(start, end, percent) { + return start + (end - start) * percent; + }, + // default easings + 'ease': cubicBezier(0.25, 0.1, 0.25, 1), + 'ease-in': cubicBezier(0.42, 0, 1, 1), + 'ease-out': cubicBezier(0, 0, 0.58, 1), + 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), + // sine + 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715), + 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1), + 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95), + // quad + 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53), + 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94), + 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955), + // cubic + 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19), + 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1), + 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1), + // quart + 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22), + 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1), + 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1), + // quint + 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06), + 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1), + 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1), + // expo + 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035), + 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1), + 'ease-in-out-expo': cubicBezier(1, 0, 0, 1), + // circ + 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335), + 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1), + 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86), + // user param easings... + 'spring': function spring(tension, friction, duration) { + if (duration === 0) { + // can't get a spring w/ duration 0 + return easings.linear; // duration 0 => jump to end so impl doesn't matter + } + + var spring = generateSpringRK4(tension, friction, duration); + return function (start, end, percent) { + return start + (end - start) * spring(percent); + }; + }, + 'cubic-bezier': cubicBezier + }; + + function getEasedValue(type, start, end, percent, easingFn) { + if (percent === 1) { + return end; + } + + if (start === end) { + return end; + } + + var val = easingFn(start, end, percent); + + if (type == null) { + return val; + } + + if (type.roundValue || type.color) { + val = Math.round(val); + } + + if (type.min !== undefined) { + val = Math.max(val, type.min); + } + + if (type.max !== undefined) { + val = Math.min(val, type.max); + } + + return val; + } + + function getValue(prop, spec) { + if (prop.pfValue != null || prop.value != null) { + if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) { + return prop.pfValue; + } else { + return prop.value; + } + } else { + return prop; + } + } + + function ease(startProp, endProp, percent, easingFn, propSpec) { + var type = propSpec != null ? propSpec.type : null; + + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + + var start = getValue(startProp, propSpec); + var end = getValue(endProp, propSpec); + + if (number$1(start) && number$1(end)) { + return getEasedValue(type, start, end, percent, easingFn); + } else if (array(start) && array(end)) { + var easedArr = []; + + for (var i = 0; i < end.length; i++) { + var si = start[i]; + var ei = end[i]; + + if (si != null && ei != null) { + var val = getEasedValue(type, si, ei, percent, easingFn); + easedArr.push(val); + } else { + easedArr.push(ei); + } + } + + return easedArr; + } + + return undefined; + } + + function step$1(self, ani, now, isCore) { + var isEles = !isCore; + var _p = self._private; + var ani_p = ani._private; + var pEasing = ani_p.easing; + var startTime = ani_p.startTime; + var cy = isCore ? self : self.cy(); + var style = cy.style(); + + if (!ani_p.easingImpl) { + if (pEasing == null) { + // use default + ani_p.easingImpl = easings['linear']; + } else { + // then define w/ name + var easingVals; + + if (string(pEasing)) { + var easingProp = style.parse('transition-timing-function', pEasing); + easingVals = easingProp.value; + } else { + // then assume preparsed array + easingVals = pEasing; + } + + var name, args; + + if (string(easingVals)) { + name = easingVals; + args = []; + } else { + name = easingVals[1]; + args = easingVals.slice(2).map(function (n) { + return +n; + }); + } + + if (args.length > 0) { + // create with args + if (name === 'spring') { + args.push(ani_p.duration); // need duration to generate spring + } + + ani_p.easingImpl = easings[name].apply(null, args); + } else { + // static impl by name + ani_p.easingImpl = easings[name]; + } + } + } + + var easing = ani_p.easingImpl; + var percent; + + if (ani_p.duration === 0) { + percent = 1; + } else { + percent = (now - startTime) / ani_p.duration; + } + + if (ani_p.applying) { + percent = ani_p.progress; + } + + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + + if (ani_p.delay == null) { + // then update + var startPos = ani_p.startPosition; + var endPos = ani_p.position; + + if (endPos && isEles && !self.locked()) { + var newPos = {}; + + if (valid(startPos.x, endPos.x)) { + newPos.x = ease(startPos.x, endPos.x, percent, easing); + } + + if (valid(startPos.y, endPos.y)) { + newPos.y = ease(startPos.y, endPos.y, percent, easing); + } + + self.position(newPos); + } + + var startPan = ani_p.startPan; + var endPan = ani_p.pan; + var pan = _p.pan; + var animatingPan = endPan != null && isCore; + + if (animatingPan) { + if (valid(startPan.x, endPan.x)) { + pan.x = ease(startPan.x, endPan.x, percent, easing); + } + + if (valid(startPan.y, endPan.y)) { + pan.y = ease(startPan.y, endPan.y, percent, easing); + } + + self.emit('pan'); + } + + var startZoom = ani_p.startZoom; + var endZoom = ani_p.zoom; + var animatingZoom = endZoom != null && isCore; + + if (animatingZoom) { + if (valid(startZoom, endZoom)) { + _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); + } + + self.emit('zoom'); + } + + if (animatingPan || animatingZoom) { + self.emit('viewport'); + } + + var props = ani_p.style; + + if (props && props.length > 0 && isEles) { + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + var _name = prop.name; + var end = prop; + var start = ani_p.startStyle[_name]; + var propSpec = style.properties[start.name]; + var easedVal = ease(start, end, percent, easing, propSpec); + style.overrideBypass(self, _name, easedVal); + } // for props + + + self.emit('style'); + } // if + + } + + ani_p.progress = percent; + return percent; + } + + function valid(start, end) { + if (start == null || end == null) { + return false; + } + + if (number$1(start) && number$1(end)) { + return true; + } else if (start && end) { + return true; + } + + return false; + } + + function startAnimation(self, ani, now, isCore) { + var ani_p = ani._private; + ani_p.started = true; + ani_p.startTime = now - ani_p.progress * ani_p.duration; + } + + function stepAll(now, cy) { + var eles = cy._private.aniEles; + var doneEles = []; + + function stepOne(ele, isCore) { + var _p = ele._private; + var current = _p.animation.current; + var queue = _p.animation.queue; + var ranAnis = false; // if nothing currently animating, get something from the queue + + if (current.length === 0) { + var next = queue.shift(); + + if (next) { + current.push(next); + } + } + + var callbacks = function callbacks(_callbacks) { + for (var j = _callbacks.length - 1; j >= 0; j--) { + var cb = _callbacks[j]; + cb(); + } + + _callbacks.splice(0, _callbacks.length); + }; // step and remove if done + + + for (var i = current.length - 1; i >= 0; i--) { + var ani = current[i]; + var ani_p = ani._private; + + if (ani_p.stopped) { + current.splice(i, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.frames); + continue; + } + + if (!ani_p.playing && !ani_p.applying) { + continue; + } // an apply() while playing shouldn't do anything + + + if (ani_p.playing && ani_p.applying) { + ani_p.applying = false; + } + + if (!ani_p.started) { + startAnimation(ele, ani, now); + } + + step$1(ele, ani, now, isCore); + + if (ani_p.applying) { + ani_p.applying = false; + } + + callbacks(ani_p.frames); + + if (ani_p.step != null) { + ani_p.step(now); + } + + if (ani.completed()) { + current.splice(i, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.completes); + } + + ranAnis = true; + } + + if (!isCore && current.length === 0 && queue.length === 0) { + doneEles.push(ele); + } + + return ranAnis; + } // stepElement + // handle all eles + + + var ranEleAni = false; + + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + var handledThisEle = stepOne(ele); + ranEleAni = ranEleAni || handledThisEle; + } // each element + + + var ranCoreAni = stepOne(cy, true); // notify renderer + + if (ranEleAni || ranCoreAni) { + if (eles.length > 0) { + cy.notify('draw', eles); + } else { + cy.notify('draw'); + } + } // remove elements from list of currently animating if its queues are empty + + + eles.unmerge(doneEles); + cy.emit('step'); + } // stepAll + + var corefn$8 = { + // pull in animation functions + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop(), + addToAnimationPool: function addToAnimationPool(eles) { + var cy = this; + + if (!cy.styleEnabled()) { + return; + } // save cycles when no style used + + + cy._private.aniEles.merge(eles); + }, + stopAnimationLoop: function stopAnimationLoop() { + this._private.animationsRunning = false; + }, + startAnimationLoop: function startAnimationLoop() { + var cy = this; + cy._private.animationsRunning = true; + + if (!cy.styleEnabled()) { + return; + } // save cycles when no style used + // NB the animation loop will exec in headless environments if style enabled + // and explicit cy.destroy() is necessary to stop the loop + + + function headlessStep() { + if (!cy._private.animationsRunning) { + return; + } + + requestAnimationFrame(function animationStep(now) { + stepAll(now, cy); + headlessStep(); + }); + } + + var renderer = cy.renderer(); + + if (renderer && renderer.beforeRender) { + // let the renderer schedule animations + renderer.beforeRender(function rendererAnimationStep(willDraw, now) { + stepAll(now, cy); + }, renderer.beforeRenderPriorities.animations); + } else { + // manage the animation loop ourselves + headlessStep(); // first call + } + } + }; + + var emitterOptions = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(cy, listener, eventObj) { + var selector = listener.qualifier; + + if (selector != null) { + return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + + return true; + }, + addEventFields: function addEventFields(cy, evt) { + evt.cy = cy; + evt.target = cy; + }, + callbackContext: function callbackContext(cy, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : cy; + } + }; + + var argSelector = function argSelector(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + + var elesfn = { + createEmitter: function createEmitter() { + var _p = this._private; + + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions, this); + } + + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + this.emitter().on(events, argSelector(selector), callback); + return this; + }, + removeListener: function removeListener(events, selector, callback) { + this.emitter().removeListener(events, argSelector(selector), callback); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + one: function one(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + once: function once(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + emit: function emit(events, extraParams) { + this.emitter().emit(events, extraParams); + return this; + }, + emitAndNotify: function emitAndNotify(event, eles) { + this.emit(event); + this.notify(event, eles); + return this; + } + }; + define.eventAliasesOn(elesfn); + + var corefn$7 = { + png: function png(options) { + var renderer = this._private.renderer; + options = options || {}; + return renderer.png(options); + }, + jpg: function jpg(options) { + var renderer = this._private.renderer; + options = options || {}; + options.bg = options.bg || '#fff'; + return renderer.jpg(options); + } + }; + corefn$7.jpeg = corefn$7.jpg; + + var corefn$6 = { + layout: function layout(options) { + var cy = this; + + if (options == null) { + error('Layout options must be specified to make a layout'); + return; + } + + if (options.name == null) { + error('A `name` must be specified to make a layout'); + return; + } + + var name = options.name; + var Layout = cy.extension('layout', name); + + if (Layout == null) { + error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?'); + return; + } + + var eles; + + if (string(options.eles)) { + eles = cy.$(options.eles); + } else { + eles = options.eles != null ? options.eles : cy.$(); + } + + var layout = new Layout(extend({}, options, { + cy: cy, + eles: eles + })); + return layout; + } + }; + corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; + + var corefn$5 = { + notify: function notify(eventName, eventEles) { + var _p = this._private; + + if (this.batching()) { + _p.batchNotifications = _p.batchNotifications || {}; + var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); + + if (eventEles != null) { + eles.merge(eventEles); + } + + return; // notifications are disabled during batching + } + + if (!_p.notificationsEnabled) { + return; + } // exit on disabled + + + var renderer = this.renderer(); // exit if destroy() called on core or renderer in between frames #1499 #1528 + + if (this.destroyed() || !renderer) { + return; + } + + renderer.notify(eventName, eventEles); + }, + notifications: function notifications(bool) { + var p = this._private; + + if (bool === undefined) { + return p.notificationsEnabled; + } else { + p.notificationsEnabled = bool ? true : false; + } + + return this; + }, + noNotifications: function noNotifications(callback) { + this.notifications(false); + callback(); + this.notifications(true); + }, + batching: function batching() { + return this._private.batchCount > 0; + }, + startBatch: function startBatch() { + var _p = this._private; + + if (_p.batchCount == null) { + _p.batchCount = 0; + } + + if (_p.batchCount === 0) { + _p.batchStyleEles = this.collection(); + _p.batchNotifications = {}; + } + + _p.batchCount++; + return this; + }, + endBatch: function endBatch() { + var _p = this._private; + + if (_p.batchCount === 0) { + return this; + } + + _p.batchCount--; + + if (_p.batchCount === 0) { + // update style for dirty eles + _p.batchStyleEles.updateStyle(); + + var renderer = this.renderer(); // notify the renderer of queued eles and event types + + Object.keys(_p.batchNotifications).forEach(function (eventName) { + var eles = _p.batchNotifications[eventName]; + + if (eles.empty()) { + renderer.notify(eventName); + } else { + renderer.notify(eventName, eles); + } + }); + } + + return this; + }, + batch: function batch(callback) { + this.startBatch(); + callback(); + this.endBatch(); + return this; + }, + // for backwards compatibility + batchData: function batchData(map) { + var cy = this; + return this.batch(function () { + var ids = Object.keys(map); + + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var data = map[id]; + var ele = cy.getElementById(id); + ele.data(data); + } + }); + } + }; + + var rendererDefaults = defaults$g({ + hideEdgesOnViewport: false, + textureOnViewport: false, + motionBlur: false, + motionBlurOpacity: 0.05, + pixelRatio: undefined, + desktopTapThreshold: 4, + touchTapThreshold: 8, + wheelSensitivity: 1, + debug: false, + showFps: false + }); + var corefn$4 = { + renderTo: function renderTo(context, zoom, pan, pxRatio) { + var r = this._private.renderer; + r.renderTo(context, zoom, pan, pxRatio); + return this; + }, + renderer: function renderer() { + return this._private.renderer; + }, + forceRender: function forceRender() { + this.notify('draw'); + return this; + }, + resize: function resize() { + this.invalidateSize(); + this.emitAndNotify('resize'); + return this; + }, + initRenderer: function initRenderer(options) { + var cy = this; + var RendererProto = cy.extension('renderer', options.name); + + if (RendererProto == null) { + error("Can not initialise: No such renderer `".concat(options.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); + return; + } + + if (options.wheelSensitivity !== undefined) { + warn("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."); + } + + var rOpts = rendererDefaults(options); + rOpts.cy = cy; + cy._private.renderer = new RendererProto(rOpts); + this.notify('init'); + }, + destroyRenderer: function destroyRenderer() { + var cy = this; + cy.notify('destroy'); // destroy the renderer + + var domEle = cy.container(); + + if (domEle) { + domEle._cyreg = null; + + while (domEle.childNodes.length > 0) { + domEle.removeChild(domEle.childNodes[0]); + } + } + + cy._private.renderer = null; // to be extra safe, remove the ref + + cy.mutableElements().forEach(function (ele) { + var _p = ele._private; + _p.rscratch = {}; + _p.rstyle = {}; + _p.animation.current = []; + _p.animation.queue = []; + }); + }, + onRender: function onRender(fn) { + return this.on('render', fn); + }, + offRender: function offRender(fn) { + return this.off('render', fn); + } + }; + corefn$4.invalidateDimensions = corefn$4.resize; + + var corefn$3 = { + // get a collection + // - empty collection on no args + // - collection of elements in the graph on selector arg + // - guarantee a returned collection when elements or collection specified + collection: function collection(eles, opts) { + if (string(eles)) { + return this.$(eles); + } else if (elementOrCollection(eles)) { + return eles.collection(); + } else if (array(eles)) { + if (!opts) { + opts = {}; + } + + return new Collection(this, eles, opts.unique, opts.removed); + } + + return new Collection(this); + }, + nodes: function nodes(selector) { + var nodes = this.$(function (ele) { + return ele.isNode(); + }); + + if (selector) { + return nodes.filter(selector); + } + + return nodes; + }, + edges: function edges(selector) { + var edges = this.$(function (ele) { + return ele.isEdge(); + }); + + if (selector) { + return edges.filter(selector); + } + + return edges; + }, + // search the graph like jQuery + $: function $(selector) { + var eles = this._private.elements; + + if (selector) { + return eles.filter(selector); + } else { + return eles.spawnSelf(); + } + }, + mutableElements: function mutableElements() { + return this._private.elements; + } + }; // aliases + + corefn$3.elements = corefn$3.filter = corefn$3.$; + + var styfn$8 = {}; // keys for style blocks, e.g. ttfftt + + var TRUE = 't'; + var FALSE = 'f'; // (potentially expensive calculation) + // apply the style to the element based on + // - its bypass + // - what selectors match it + + styfn$8.apply = function (eles) { + var self = this; + var _p = self._private; + var cy = _p.cy; + var updatedEles = cy.collection(); + + for (var ie = 0; ie < eles.length; ie++) { + var ele = eles[ie]; + var cxtMeta = self.getContextMeta(ele); + + if (cxtMeta.empty) { + continue; + } + + var cxtStyle = self.getContextStyle(cxtMeta); + var app = self.applyContextStyle(cxtMeta, cxtStyle, ele); + + if (ele._private.appliedInitStyle) { + self.updateTransitions(ele, app.diffProps); + } else { + ele._private.appliedInitStyle = true; + } + + var hintsDiff = self.updateStyleHints(ele); + + if (hintsDiff) { + updatedEles.push(ele); + } + } // for elements + + + return updatedEles; + }; + + styfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) { + var self = this; + var cache = self._private.propDiffs = self._private.propDiffs || {}; + var dualCxtKey = oldCxtKey + '-' + newCxtKey; + var cachedVal = cache[dualCxtKey]; + + if (cachedVal) { + return cachedVal; + } + + var diffProps = []; + var addedProp = {}; + + for (var i = 0; i < self.length; i++) { + var cxt = self[i]; + var oldHasCxt = oldCxtKey[i] === TRUE; + var newHasCxt = newCxtKey[i] === TRUE; + var cxtHasDiffed = oldHasCxt !== newHasCxt; + var cxtHasMappedProps = cxt.mappedProperties.length > 0; + + if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { + var props = void 0; + + if (cxtHasDiffed && cxtHasMappedProps) { + props = cxt.properties; // suffices b/c mappedProperties is a subset of properties + } else if (cxtHasDiffed) { + props = cxt.properties; // need to check them all + } else if (cxtHasMappedProps) { + props = cxt.mappedProperties; // only need to check mapped + } + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + var name = prop.name; // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter + // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result + // is cached) + + var laterCxtOverrides = false; + + for (var k = i + 1; k < self.length; k++) { + var laterCxt = self[k]; + var hasLaterCxt = newCxtKey[k] === TRUE; + + if (!hasLaterCxt) { + continue; + } // can't override unless the context is active + + + laterCxtOverrides = laterCxt.properties[prop.name] != null; + + if (laterCxtOverrides) { + break; + } // exit early as long as one later context overrides + + } + + if (!addedProp[name] && !laterCxtOverrides) { + addedProp[name] = true; + diffProps.push(name); + } + } // for props + + } // if + + } // for contexts + + + cache[dualCxtKey] = diffProps; + return diffProps; + }; + + styfn$8.getContextMeta = function (ele) { + var self = this; + var cxtKey = ''; + var diffProps; + var prevKey = ele._private.styleCxtKey || ''; // get the cxt key + + for (var i = 0; i < self.length; i++) { + var context = self[i]; + var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core' + + if (contextSelectorMatches) { + cxtKey += TRUE; + } else { + cxtKey += FALSE; + } + } // for context + + + diffProps = self.getPropertiesDiff(prevKey, cxtKey); + ele._private.styleCxtKey = cxtKey; + return { + key: cxtKey, + diffPropNames: diffProps, + empty: diffProps.length === 0 + }; + }; // gets a computed ele style object based on matched contexts + + + styfn$8.getContextStyle = function (cxtMeta) { + var cxtKey = cxtMeta.key; + var self = this; + var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; // if already computed style, returned cached copy + + if (cxtStyles[cxtKey]) { + return cxtStyles[cxtKey]; + } + + var style = { + _private: { + key: cxtKey + } + }; + + for (var i = 0; i < self.length; i++) { + var cxt = self[i]; + var hasCxt = cxtKey[i] === TRUE; + + if (!hasCxt) { + continue; + } + + for (var j = 0; j < cxt.properties.length; j++) { + var prop = cxt.properties[j]; + style[prop.name] = prop; + } + } + + cxtStyles[cxtKey] = style; + return style; + }; + + styfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) { + var self = this; + var diffProps = cxtMeta.diffPropNames; + var retDiffProps = {}; + var types = self.types; + + for (var i = 0; i < diffProps.length; i++) { + var diffPropName = diffProps[i]; + var cxtProp = cxtStyle[diffPropName]; + var eleProp = ele.pstyle(diffPropName); + + if (!cxtProp) { + // no context prop means delete + if (!eleProp) { + continue; // no existing prop means nothing needs to be removed + // nb affects initial application on mapped values like control-point-distances + } else if (eleProp.bypass) { + cxtProp = { + name: diffPropName, + deleteBypassed: true + }; + } else { + cxtProp = { + name: diffPropName, + "delete": true + }; + } + } // save cycles when the context prop doesn't need to be applied + + + if (eleProp === cxtProp) { + continue; + } // save cycles when a mapped context prop doesn't need to be applied + + + if (cxtProp.mapped === types.fn // context prop is function mapper + && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one) + && eleProp.mapping != null // ele prop is a concrete value from from a mapper + && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper + ) { + // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet) + var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy + + var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss + + if (fnValue === mapping.prevFnValue) { + continue; + } + } + + var retDiffProp = retDiffProps[diffPropName] = { + prev: eleProp + }; + self.applyParsedProperty(ele, cxtProp); + retDiffProp.next = ele.pstyle(diffPropName); + + if (retDiffProp.next && retDiffProp.next.bypass) { + retDiffProp.next = retDiffProp.next.bypassed; + } + } + + return { + diffProps: retDiffProps + }; + }; + + styfn$8.updateStyleHints = function (ele) { + var _p = ele._private; + var self = this; + var propNames = self.propertyGroupNames; + var propGrKeys = self.propertyGroupKeys; + + var propHash = function propHash(ele, propNames, seedKey) { + return self.getPropertiesHash(ele, propNames, seedKey); + }; + + var oldStyleKey = _p.styleKey; + + if (ele.removed()) { + return false; + } + + var isNode = _p.group === 'nodes'; // get the style key hashes per prop group + // but lazily -- only use non-default prop values to reduce the number of hashes + // + + var overriddenStyles = ele._private.style; + propNames = Object.keys(overriddenStyles); + + for (var i = 0; i < propGrKeys.length; i++) { + var grKey = propGrKeys[i]; + _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + } + + var updateGrKey1 = function updateGrKey1(val, grKey) { + return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]); + }; + + var updateGrKey2 = function updateGrKey2(val, grKey) { + return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]); + }; + + var updateGrKey = function updateGrKey(val, grKey) { + updateGrKey1(val, grKey); + updateGrKey2(val, grKey); + }; + + var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) { + for (var j = 0; j < strVal.length; j++) { + var ch = strVal.charCodeAt(j); + updateGrKey1(ch, grKey); + updateGrKey2(ch, grKey); + } + }; // - hashing works on 32 bit ints b/c we use bitwise ops + // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function) + // - raise up small numbers so more significant digits are seen by hashing + // - make small numbers larger than a normal value to avoid collisions + // - works in practice and it's relatively cheap + + + var N = 2000000000; + + var cleanNum = function cleanNum(val) { + return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; + }; + + for (var _i = 0; _i < propNames.length; _i++) { + var name = propNames[_i]; + var parsedProp = overriddenStyles[name]; + + if (parsedProp == null) { + continue; + } + + var propInfo = this.properties[name]; + var type = propInfo.type; + var _grKey = propInfo.groupKey; + var normalizedNumberVal = void 0; + + if (propInfo.hashOverride != null) { + normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); + } else if (parsedProp.pfValue != null) { + normalizedNumberVal = parsedProp.pfValue; + } // might not be a number if it allows enums + + + var numberVal = propInfo.enums == null ? parsedProp.value : null; + var haveNormNum = normalizedNumberVal != null; + var haveUnitedNum = numberVal != null; + var haveNum = haveNormNum || haveUnitedNum; + var units = parsedProp.units; // numbers are cheaper to hash than strings + // 1 hash op vs n hash ops (for length n string) + + if (type.number && haveNum && !type.multiple) { + var v = haveNormNum ? normalizedNumberVal : numberVal; + updateGrKey(cleanNum(v), _grKey); + + if (!haveNormNum && units != null) { + updateGrKeyWStr(units, _grKey); + } + } else { + updateGrKeyWStr(parsedProp.strValue, _grKey); + } + } // overall style key + // + + + var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + + for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { + var _grKey2 = propGrKeys[_i2]; + var grHash = _p.styleKeys[_grKey2]; + hash[0] = hashInt(grHash[0], hash[0]); + hash[1] = hashIntAlt(grHash[1], hash[1]); + } + + _p.styleKey = combineHashes(hash[0], hash[1]); // label dims + // + + var sk = _p.styleKeys; + _p.labelDimsKey = combineHashesArray(sk.labelDimensions); + var labelKeys = propHash(ele, ['label'], sk.labelDimensions); + _p.labelKey = combineHashesArray(labelKeys); + _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); + + if (!isNode) { + var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions); + _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); + _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); + var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions); + _p.targetLabelKey = combineHashesArray(targetLabelKeys); + _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); + } // node + // + + + if (isNode) { + var _p$styleKeys = _p.styleKeys, + nodeBody = _p$styleKeys.nodeBody, + nodeBorder = _p$styleKeys.nodeBorder, + backgroundImage = _p$styleKeys.backgroundImage, + compound = _p$styleKeys.compound, + pie = _p$styleKeys.pie; + var nodeKeys = [nodeBody, nodeBorder, backgroundImage, compound, pie].filter(function (k) { + return k != null; + }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); + _p.nodeKey = combineHashesArray(nodeKeys); + _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT; + } + + return oldStyleKey !== _p.styleKey; + }; + + styfn$8.clearStyleHints = function (ele) { + var _p = ele._private; + _p.styleCxtKey = ''; + _p.styleKeys = {}; + _p.styleKey = null; + _p.labelKey = null; + _p.labelStyleKey = null; + _p.sourceLabelKey = null; + _p.sourceLabelStyleKey = null; + _p.targetLabelKey = null; + _p.targetLabelStyleKey = null; + _p.nodeKey = null; + _p.hasPie = null; + }; // apply a property to the style (for internal use) + // returns whether application was successful + // + // now, this function flattens the property, and here's how: + // + // for parsedProp:{ bypass: true, deleteBypass: true } + // no property is generated, instead the bypass property in the + // element's style is replaced by what's pointed to by the `bypassed` + // field in the bypass property (i.e. restoring the property the + // bypass was overriding) + // + // for parsedProp:{ mapped: truthy } + // the generated flattenedProp:{ mapping: prop } + // + // for parsedProp:{ bypass: true } + // the generated flattenedProp:{ bypassed: parsedProp } + + + styfn$8.applyParsedProperty = function (ele, parsedProp) { + var self = this; + var prop = parsedProp; + var style = ele._private.style; + var flatProp; + var types = self.types; + var type = self.properties[prop.name].type; + var propIsBypass = prop.bypass; + var origProp = style[prop.name]; + var origPropIsBypass = origProp && origProp.bypass; + var _p = ele._private; + var flatPropMapping = 'mapping'; + + var getVal = function getVal(p) { + if (p == null) { + return null; + } else if (p.pfValue != null) { + return p.pfValue; + } else { + return p.value; + } + }; + + var checkTriggers = function checkTriggers() { + var fromVal = getVal(origProp); + var toVal = getVal(prop); + self.checkTriggers(ele, prop.name, fromVal, toVal); + }; + + if (prop && prop.name.substr(0, 3) === 'pie') { + warn('The pie style properties are deprecated. Create charts using background images instead.'); + } // edge sanity checks to prevent the client from making serious mistakes + + + if (parsedProp.name === 'curve-style' && ele.isEdge() && ( // loops must be bundled beziers + parsedProp.value !== 'bezier' && ele.isLoop() || // edges connected to compound nodes can not be haystacks + parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) { + prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass); + } + + if (prop["delete"]) { + // delete the property and use the default value on falsey value + style[prop.name] = undefined; + checkTriggers(); + return true; + } + + if (prop.deleteBypassed) { + // delete the property that the + if (!origProp) { + checkTriggers(); + return true; // can't delete if no prop + } else if (origProp.bypass) { + // delete bypassed + origProp.bypassed = undefined; + checkTriggers(); + return true; + } else { + return false; // we're unsuccessful deleting the bypassed + } + } // check if we need to delete the current bypass + + + if (prop.deleteBypass) { + // then this property is just here to indicate we need to delete + if (!origProp) { + checkTriggers(); + return true; // property is already not defined + } else if (origProp.bypass) { + // then replace the bypass property with the original + // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary) + style[prop.name] = origProp.bypassed; + checkTriggers(); + return true; + } else { + return false; // we're unsuccessful deleting the bypass + } + } + + var printMappingErr = function printMappingErr() { + warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined'); + }; // put the property in the style objects + + + switch (prop.mapped) { + // flatten the property if mapped + case types.mapData: + { + // flatten the field (e.g. data.foo.bar) + var fields = prop.field.split('.'); + var fieldVal = _p.data; + + for (var i = 0; i < fields.length && fieldVal; i++) { + var field = fields[i]; + fieldVal = fieldVal[field]; + } + + if (fieldVal == null) { + printMappingErr(); + return false; + } + + var percent; + + if (!number$1(fieldVal)) { + // then don't apply and fall back on the existing style + warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)'); + return false; + } else { + var fieldWidth = prop.fieldMax - prop.fieldMin; + + if (fieldWidth === 0) { + // safety check -- not strictly necessary as no props of zero range should be passed here + percent = 0; + } else { + percent = (fieldVal - prop.fieldMin) / fieldWidth; + } + } // make sure to bound percent value + + + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + + if (type.color) { + var r1 = prop.valueMin[0]; + var r2 = prop.valueMax[0]; + var g1 = prop.valueMin[1]; + var g2 = prop.valueMax[1]; + var b1 = prop.valueMin[2]; + var b2 = prop.valueMax[2]; + var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; + var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; + var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; + flatProp = { + // colours are simple, so just create the flat property instead of expensive string parsing + bypass: prop.bypass, + // we're a bypass if the mapping property is a bypass + name: prop.name, + value: clr, + strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')' + }; + } else if (type.number) { + var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; + flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); + } else { + return false; // can only map to colours and numbers + } + + if (!flatProp) { + // if we can't flatten the property, then don't apply the property and fall back on the existing style + printMappingErr(); + return false; + } + + flatProp.mapping = prop; // keep a reference to the mapping + + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + // direct mapping + + case types.data: + { + // flatten the field (e.g. data.foo.bar) + var _fields = prop.field.split('.'); + + var _fieldVal = _p.data; + + for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { + var _field = _fields[_i3]; + _fieldVal = _fieldVal[_field]; + } + + if (_fieldVal != null) { + flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); + } + + if (!flatProp) { + // if we can't flatten the property, then don't apply and fall back on the existing style + printMappingErr(); + return false; + } + + flatProp.mapping = prop; // keep a reference to the mapping + + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + + case types.fn: + { + var fn = prop.value; + var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function + + prop.prevFnValue = fnRetVal; + + if (fnRetVal == null) { + warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)'); + return false; + } + + flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); + + if (!flatProp) { + warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)'); + return false; + } + + flatProp.mapping = copy(prop); // keep a reference to the mapping + + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + + case undefined: + break; + // just set the property + + default: + return false; + // not a valid mapping + } // if the property is a bypass property, then link the resultant property to the original one + + + if (propIsBypass) { + if (origPropIsBypass) { + // then this bypass overrides the existing one + prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass + } else { + // then link the orig prop to the new bypass + prop.bypassed = origProp; + } + + style[prop.name] = prop; // and set + } else { + // prop is not bypass + if (origPropIsBypass) { + // then keep the orig prop (since it's a bypass) and link to the new prop + origProp.bypassed = prop; + } else { + // then just replace the old prop with the new one + style[prop.name] = prop; + } + } + + checkTriggers(); + return true; + }; + + styfn$8.cleanElements = function (eles, keepBypasses) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + this.clearStyleHints(ele); + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + + if (!keepBypasses) { + ele._private.style = {}; + } else { + var style = ele._private.style; + var propNames = Object.keys(style); + + for (var j = 0; j < propNames.length; j++) { + var propName = propNames[j]; + var eleProp = style[propName]; + + if (eleProp != null) { + if (eleProp.bypass) { + eleProp.bypassed = null; + } else { + style[propName] = null; + } + } + } + } + } + }; // updates the visual style for all elements (useful for manual style modification after init) + + + styfn$8.update = function () { + var cy = this._private.cy; + var eles = cy.mutableElements(); + eles.updateStyle(); + }; // diffProps : { name => { prev, next } } + + + styfn$8.updateTransitions = function (ele, diffProps) { + var self = this; + var _p = ele._private; + var props = ele.pstyle('transition-property').value; + var duration = ele.pstyle('transition-duration').pfValue; + var delay = ele.pstyle('transition-delay').pfValue; + + if (props.length > 0 && duration > 0) { + var style = {}; // build up the style to animate towards + + var anyPrev = false; + + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + var styProp = ele.pstyle(prop); + var diffProp = diffProps[prop]; + + if (!diffProp) { + continue; + } + + var prevProp = diffProp.prev; + var fromProp = prevProp; + var toProp = diffProp.next != null ? diffProp.next : styProp; + var diff = false; + var initVal = void 0; + var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity) + + if (!fromProp) { + continue; + } // consider px values + + + if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) { + diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy + + initVal = fromProp.pfValue + initDt * diff; // consider numerical values + } else if (number$1(fromProp.value) && number$1(toProp.value)) { + diff = toProp.value - fromProp.value; // nonzero is truthy + + initVal = fromProp.value + initDt * diff; // consider colour values + } else if (array(fromProp.value) && array(toProp.value)) { + diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; + initVal = fromProp.strValue; + } // the previous value is good for an animation only if it's different + + + if (diff) { + style[prop] = toProp.strValue; // to val + + this.applyBypass(ele, prop, initVal); // from val + + anyPrev = true; + } + } // end if props allow ani + // can't transition if there's nothing previous to transition from + + + if (!anyPrev) { + return; + } + + _p.transitioning = true; + new Promise$1(function (resolve) { + if (delay > 0) { + ele.delayAnimation(delay).play().promise().then(resolve); + } else { + resolve(); + } + }).then(function () { + return ele.animation({ + style: style, + duration: duration, + easing: ele.pstyle('transition-timing-function').value, + queue: false + }).play().promise(); + }).then(function () { + // if( !isBypass ){ + self.removeBypasses(ele, props); + ele.emitAndNotify('style'); // } + + _p.transitioning = false; + }); + } else if (_p.transitioning) { + this.removeBypasses(ele, props); + ele.emitAndNotify('style'); + _p.transitioning = false; + } + }; + + styfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) { + var prop = this.properties[name]; + var triggerCheck = getTrigger(prop); + + if (triggerCheck != null && triggerCheck(fromValue, toValue)) { + onTrigger(prop); + } + }; + + styfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) { + var _this = this; + + this.checkTrigger(ele, name, fromValue, toValue, function (prop) { + return prop.triggersZOrder; + }, function () { + _this._private.cy.notify('zorder', ele); + }); + }; + + styfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) { + this.checkTrigger(ele, name, fromValue, toValue, function (prop) { + return prop.triggersBounds; + }, function (prop) { + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); // if the prop change makes the bb of pll bezier edges invalid, + // then dirty the pll edge bb cache as well + + if ( // only for beziers -- so performance of other edges isn't affected + prop.triggersBoundsOfParallelBeziers && (name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier') || name === 'display' && (fromValue === 'none' || toValue === 'none'))) { + ele.parallelEdges().forEach(function (pllEdge) { + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + }); + } + }); + }; + + styfn$8.checkTriggers = function (ele, name, fromValue, toValue) { + ele.dirtyStyleCache(); + this.checkZOrderTrigger(ele, name, fromValue, toValue); + this.checkBoundsTrigger(ele, name, fromValue, toValue); + }; + + var styfn$7 = {}; // bypasses are applied to an existing style on an element, and just tacked on temporarily + // returns true iff application was successful for at least 1 specified property + + styfn$7.applyBypass = function (eles, name, value, updateTransitions) { + var self = this; + var props = []; + var isBypass = true; // put all the properties (can specify one or many) in an array after parsing them + + if (name === '*' || name === '**') { + // apply to all property names + if (value !== undefined) { + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var _name = prop.name; + var parsedProp = this.parse(_name, value, true); + + if (parsedProp) { + props.push(parsedProp); + } + } + } + } else if (string(name)) { + // then parse the single property + var _parsedProp = this.parse(name, value, true); + + if (_parsedProp) { + props.push(_parsedProp); + } + } else if (plainObject(name)) { + // then parse each property + var specifiedProps = name; + updateTransitions = value; + var names = Object.keys(specifiedProps); + + for (var _i = 0; _i < names.length; _i++) { + var _name2 = names[_i]; + var _value = specifiedProps[_name2]; + + if (_value === undefined) { + // try camel case name too + _value = specifiedProps[dash2camel(_name2)]; + } + + if (_value !== undefined) { + var _parsedProp2 = this.parse(_name2, _value, true); + + if (_parsedProp2) { + props.push(_parsedProp2); + } + } + } + } else { + // can't do anything without well defined properties + return false; + } // we've failed if there are no valid properties + + + if (props.length === 0) { + return false; + } // now, apply the bypass properties on the elements + + + var ret = false; // return true if at least one succesful bypass applied + + for (var _i2 = 0; _i2 < eles.length; _i2++) { + // for each ele + var ele = eles[_i2]; + var diffProps = {}; + var diffProp = void 0; + + for (var j = 0; j < props.length; j++) { + // for each prop + var _prop = props[j]; + + if (updateTransitions) { + var prevProp = ele.pstyle(_prop.name); + diffProp = diffProps[_prop.name] = { + prev: prevProp + }; + } + + ret = this.applyParsedProperty(ele, copy(_prop)) || ret; + + if (updateTransitions) { + diffProp.next = ele.pstyle(_prop.name); + } + } // for props + + + if (ret) { + this.updateStyleHints(ele); + } + + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } // for eles + + + return ret; + }; // only useful in specific cases like animation + + + styfn$7.overrideBypass = function (eles, name, value) { + name = camel2dash(name); + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var prop = ele._private.style[name]; + var type = this.properties[name].type; + var isColor = type.color; + var isMulti = type.mutiple; + var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; + + if (!prop || !prop.bypass) { + // need a bypass if one doesn't exist + this.applyBypass(ele, name, value); + } else { + prop.value = value; + + if (prop.pfValue != null) { + prop.pfValue = value; + } + + if (isColor) { + prop.strValue = 'rgb(' + value.join(',') + ')'; + } else if (isMulti) { + prop.strValue = value.join(' '); + } else { + prop.strValue = '' + value; + } + + this.updateStyleHints(ele); + } + + this.checkTriggers(ele, name, oldValue, value); + } + }; + + styfn$7.removeAllBypasses = function (eles, updateTransitions) { + return this.removeBypasses(eles, this.propertyNames, updateTransitions); + }; + + styfn$7.removeBypasses = function (eles, props, updateTransitions) { + var isBypass = true; + + for (var j = 0; j < eles.length; j++) { + var ele = eles[j]; + var diffProps = {}; + + for (var i = 0; i < props.length; i++) { + var name = props[i]; + var prop = this.properties[name]; + var prevProp = ele.pstyle(prop.name); + + if (!prevProp || !prevProp.bypass) { + // if a bypass doesn't exist for the prop, nothing needs to be removed + continue; + } + + var value = ''; // empty => remove bypass + + var parsedProp = this.parse(name, value, true); + var diffProp = diffProps[prop.name] = { + prev: prevProp + }; + this.applyParsedProperty(ele, parsedProp); + diffProp.next = ele.pstyle(prop.name); + } // for props + + + this.updateStyleHints(ele); + + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } // for eles + + }; + + var styfn$6 = {}; // gets what an em size corresponds to in pixels relative to a dom element + + styfn$6.getEmSizeInPixels = function () { + var px = this.containerCss('font-size'); + + if (px != null) { + return parseFloat(px); + } else { + return 1; // for headless + } + }; // gets css property from the core container + + + styfn$6.containerCss = function (propName) { + var cy = this._private.cy; + var domElement = cy.container(); + + if (window$1 && domElement && window$1.getComputedStyle) { + return window$1.getComputedStyle(domElement).getPropertyValue(propName); + } + }; + + var styfn$5 = {}; // gets the rendered style for an element + + styfn$5.getRenderedStyle = function (ele, prop) { + if (prop) { + return this.getStylePropertyValue(ele, prop, true); + } else { + return this.getRawStyle(ele, true); + } + }; // gets the raw style for an element + + + styfn$5.getRawStyle = function (ele, isRenderedVal) { + var self = this; + ele = ele[0]; // insure it's an element + + if (ele) { + var rstyle = {}; + + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal); + + if (val != null) { + rstyle[prop.name] = val; + rstyle[dash2camel(prop.name)] = val; + } + } + + return rstyle; + } + }; + + styfn$5.getIndexedStyle = function (ele, property, subproperty, index) { + var pstyle = ele.pstyle(property)[subproperty][index]; + return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0]; + }; + + styfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) { + var self = this; + ele = ele[0]; // insure it's an element + + if (ele) { + var prop = self.properties[propName]; + + if (prop.alias) { + prop = prop.pointsTo; + } + + var type = prop.type; + var styleProp = ele.pstyle(prop.name); + + if (styleProp) { + var value = styleProp.value, + units = styleProp.units, + strValue = styleProp.strValue; + + if (isRenderedVal && type.number && value != null && number$1(value)) { + var zoom = ele.cy().zoom(); + + var getRenderedValue = function getRenderedValue(val) { + return val * zoom; + }; + + var getValueStringWithUnits = function getValueStringWithUnits(val, units) { + return getRenderedValue(val) + units; + }; + + var isArrayValue = array(value); + var haveUnits = isArrayValue ? units.every(function (u) { + return u != null; + }) : units != null; + + if (haveUnits) { + if (isArrayValue) { + return value.map(function (v, i) { + return getValueStringWithUnits(v, units[i]); + }).join(' '); + } else { + return getValueStringWithUnits(value, units); + } + } else { + if (isArrayValue) { + return value.map(function (v) { + return string(v) ? v : '' + getRenderedValue(v); + }).join(' '); + } else { + return '' + getRenderedValue(value); + } + } + } else if (strValue != null) { + return strValue; + } + } + + return null; + } + }; + + styfn$5.getAnimationStartStyle = function (ele, aniProps) { + var rstyle = {}; + + for (var i = 0; i < aniProps.length; i++) { + var aniProp = aniProps[i]; + var name = aniProp.name; + var styleProp = ele.pstyle(name); + + if (styleProp !== undefined) { + // then make a prop of it + if (plainObject(styleProp)) { + styleProp = this.parse(name, styleProp.strValue); + } else { + styleProp = this.parse(name, styleProp); + } + } + + if (styleProp) { + rstyle[name] = styleProp; + } + } + + return rstyle; + }; + + styfn$5.getPropsList = function (propsObj) { + var self = this; + var rstyle = []; + var style = propsObj; + var props = self.properties; + + if (style) { + var names = Object.keys(style); + + for (var i = 0; i < names.length; i++) { + var name = names[i]; + var val = style[name]; + var prop = props[name] || props[camel2dash(name)]; + var styleProp = this.parse(prop.name, val); + + if (styleProp) { + rstyle.push(styleProp); + } + } + } + + return rstyle; + }; + + styfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) { + var hash = seed.slice(); + var name, val, strVal, chVal; + var i, j; + + for (i = 0; i < propNames.length; i++) { + name = propNames[i]; + val = ele.pstyle(name, false); + + if (val == null) { + continue; + } else if (val.pfValue != null) { + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } else { + strVal = val.strValue; + + for (j = 0; j < strVal.length; j++) { + chVal = strVal.charCodeAt(j); + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } + } + } + + return hash; + }; + + styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; + + var styfn$4 = {}; + + styfn$4.appendFromJson = function (json) { + var style = this; + + for (var i = 0; i < json.length; i++) { + var context = json[i]; + var selector = context.selector; + var props = context.style || context.css; + var names = Object.keys(props); + style.selector(selector); // apply selector + + for (var j = 0; j < names.length; j++) { + var name = names[j]; + var value = props[name]; + style.css(name, value); // apply property + } + } + + return style; + }; // accessible cy.style() function + + + styfn$4.fromJson = function (json) { + var style = this; + style.resetToDefault(); + style.appendFromJson(json); + return style; + }; // get json from cy.style() api + + + styfn$4.json = function () { + var json = []; + + for (var i = this.defaultLength; i < this.length; i++) { + var cxt = this[i]; + var selector = cxt.selector; + var props = cxt.properties; + var css = {}; + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + css[prop.name] = prop.strValue; + } + + json.push({ + selector: !selector ? 'core' : selector.toString(), + style: css + }); + } + + return json; + }; + + var styfn$3 = {}; + + styfn$3.appendFromString = function (string) { + var self = this; + var style = this; + var remaining = '' + string; + var selAndBlockStr; + var blockRem; + var propAndValStr; // remove comments from the style string + + remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ''); + + function removeSelAndBlockFromRemaining() { + // remove the parsed selector and block from the remaining text to parse + if (remaining.length > selAndBlockStr.length) { + remaining = remaining.substr(selAndBlockStr.length); + } else { + remaining = ''; + } + } + + function removePropAndValFromRem() { + // remove the parsed property and value from the remaining block text to parse + if (blockRem.length > propAndValStr.length) { + blockRem = blockRem.substr(propAndValStr.length); + } else { + blockRem = ''; + } + } + + for (;;) { + var nothingLeftToParse = remaining.match(/^\s*$/); + + if (nothingLeftToParse) { + break; + } + + var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); + + if (!selAndBlock) { + warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining); + break; + } + + selAndBlockStr = selAndBlock[0]; // parse the selector + + var selectorStr = selAndBlock[1]; + + if (selectorStr !== 'core') { + var selector = new Selector(selectorStr); + + if (selector.invalid) { + warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr); // skip this selector and block + + removeSelAndBlockFromRemaining(); + continue; + } + } // parse the block of properties and values + + + var blockStr = selAndBlock[2]; + var invalidBlock = false; + blockRem = blockStr; + var props = []; + + for (;;) { + var _nothingLeftToParse = blockRem.match(/^\s*$/); + + if (_nothingLeftToParse) { + break; + } + + var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); + + if (!propAndVal) { + warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr); + invalidBlock = true; + break; + } + + propAndValStr = propAndVal[0]; + var propStr = propAndVal[1]; + var valStr = propAndVal[2]; + var prop = self.properties[propStr]; + + if (!prop) { + warn('Skipping property: Invalid property name in: ' + propAndValStr); // skip this property in the block + + removePropAndValFromRem(); + continue; + } + + var parsedProp = style.parse(propStr, valStr); + + if (!parsedProp) { + warn('Skipping property: Invalid property definition in: ' + propAndValStr); // skip this property in the block + + removePropAndValFromRem(); + continue; + } + + props.push({ + name: propStr, + val: valStr + }); + removePropAndValFromRem(); + } + + if (invalidBlock) { + removeSelAndBlockFromRemaining(); + break; + } // put the parsed block in the style + + + style.selector(selectorStr); + + for (var i = 0; i < props.length; i++) { + var _prop = props[i]; + style.css(_prop.name, _prop.val); + } + + removeSelAndBlockFromRemaining(); + } + + return style; + }; + + styfn$3.fromString = function (string) { + var style = this; + style.resetToDefault(); + style.appendFromString(string); + return style; + }; + + var styfn$2 = {}; + + (function () { + var number$1 = number; + var rgba = rgbaNoBackRefs; + var hsla = hslaNoBackRefs; + var hex3$1 = hex3; + var hex6$1 = hex6; + + var data = function data(prefix) { + return '^' + prefix + '\\s*\\(\\s*([\\w\\.]+)\\s*\\)$'; + }; + + var mapData = function mapData(prefix) { + var mapArg = number$1 + '|\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1; + return '^' + prefix + '\\s*\\(([\\w\\.]+)\\s*\\,\\s*(' + number$1 + ')\\s*\\,\\s*(' + number$1 + ')\\s*,\\s*(' + mapArg + ')\\s*\\,\\s*(' + mapArg + ')\\)$'; + }; + + var urlRegexes = ['^url\\s*\\(\\s*[\'"]?(.+?)[\'"]?\\s*\\)$', '^(none)$', '^(.+)$']; // each visual style property has a type and needs to be validated according to it + + styfn$2.types = { + time: { + number: true, + min: 0, + units: 's|ms', + implicitUnits: 'ms' + }, + percent: { + number: true, + min: 0, + max: 100, + units: '%', + implicitUnits: '%' + }, + percentages: { + number: true, + min: 0, + max: 100, + units: '%', + implicitUnits: '%', + multiple: true + }, + zeroOneNumber: { + number: true, + min: 0, + max: 1, + unitless: true + }, + zeroOneNumbers: { + number: true, + min: 0, + max: 1, + unitless: true, + multiple: true + }, + nOneOneNumber: { + number: true, + min: -1, + max: 1, + unitless: true + }, + nonNegativeInt: { + number: true, + min: 0, + integer: true, + unitless: true + }, + position: { + enums: ['parent', 'origin'] + }, + nodeSize: { + number: true, + min: 0, + enums: ['label'] + }, + number: { + number: true, + unitless: true + }, + numbers: { + number: true, + unitless: true, + multiple: true + }, + positiveNumber: { + number: true, + unitless: true, + min: 0, + strictMin: true + }, + size: { + number: true, + min: 0 + }, + bidirectionalSize: { + number: true + }, + // allows negative + bidirectionalSizeMaybePercent: { + number: true, + allowPercent: true + }, + // allows negative + bidirectionalSizes: { + number: true, + multiple: true + }, + // allows negative + sizeMaybePercent: { + number: true, + min: 0, + allowPercent: true + }, + axisDirection: { + enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto'] + }, + paddingRelativeTo: { + enums: ['width', 'height', 'average', 'min', 'max'] + }, + bgWH: { + number: true, + min: 0, + allowPercent: true, + enums: ['auto'], + multiple: true + }, + bgPos: { + number: true, + allowPercent: true, + multiple: true + }, + bgRelativeTo: { + enums: ['inner', 'include-padding'], + multiple: true + }, + bgRepeat: { + enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'], + multiple: true + }, + bgFit: { + enums: ['none', 'contain', 'cover'], + multiple: true + }, + bgCrossOrigin: { + enums: ['anonymous', 'use-credentials'], + multiple: true + }, + bgClip: { + enums: ['none', 'node'], + multiple: true + }, + bgContainment: { + enums: ['inside', 'over'], + multiple: true + }, + color: { + color: true + }, + colors: { + color: true, + multiple: true + }, + fill: { + enums: ['solid', 'linear-gradient', 'radial-gradient'] + }, + bool: { + enums: ['yes', 'no'] + }, + bools: { + enums: ['yes', 'no'], + multiple: true + }, + lineStyle: { + enums: ['solid', 'dotted', 'dashed'] + }, + lineCap: { + enums: ['butt', 'round', 'square'] + }, + borderStyle: { + enums: ['solid', 'dotted', 'dashed', 'double'] + }, + curveStyle: { + enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi'] + }, + 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', 'polygon'] + }, + overlayShape: { + enums: ['roundrectangle', 'round-rectangle', 'ellipse'] + }, + 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'] + }, + 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: true + }, + data: { + mapping: true, + regex: data('data') + }, + layoutData: { + mapping: true, + regex: data('layoutData') + }, + scratch: { + mapping: true, + regex: data('scratch') + }, + mapData: { + mapping: true, + regex: mapData('mapData') + }, + mapLayoutData: { + mapping: true, + regex: mapData('mapLayoutData') + }, + mapScratch: { + mapping: true, + regex: mapData('mapScratch') + }, + fn: { + mapping: true, + fn: true + }, + url: { + regexes: urlRegexes, + singleRegexMatchValue: true + }, + urls: { + regexes: urlRegexes, + singleRegexMatchValue: true, + multiple: true + }, + propList: { + propList: true + }, + angle: { + number: true, + units: 'deg|rad', + implicitUnits: 'rad' + }, + textRotation: { + number: true, + units: 'deg|rad', + implicitUnits: 'rad', + enums: ['none', 'autorotate'] + }, + polygonPointList: { + number: true, + multiple: true, + evenMultiple: true, + min: -1, + max: 1, + unitless: true + }, + edgeDistances: { + enums: ['intersection', 'node-position'] + }, + edgeEndpoint: { + number: true, + multiple: true, + 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: true, + validate: function validate(valArr, unitsArr) { + switch (valArr.length) { + case 2: + // can be % or px only + return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad'; + + case 1: + // can be enum, deg, or rad only + return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad'; + + default: + return false; + } + } + }, + easing: { + regexes: ['^(spring)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$', '^(cubic-bezier)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\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' // different order + ] + }, + boundsExpansion: { + number: true, + multiple: true, + min: 0, + validate: function validate(valArr) { + var length = valArr.length; + return length === 1 || length === 2 || length === 4; + } + } + }; + var diff = { + zeroNonZero: function zeroNonZero(val1, val2) { + if ((val1 == null || val2 == null) && val1 !== val2) { + return true; // null cases could represent any value + } + + if (val1 == 0 && val2 != 0) { + return true; + } else if (val1 != 0 && val2 == 0) { + return true; + } else { + return false; + } + }, + any: function any(val1, val2) { + return val1 != val2; + }, + emptyNonEmpty: function emptyNonEmpty(str1, str2) { + var empty1 = emptyString(str1); + var empty2 = emptyString(str2); + return empty1 && !empty2 || !empty1 && empty2; + } + }; // define visual style properties + // + // - n.b. adding a new group of props may require updates to updateStyleHints() + // - adding new props to an existing group gets handled automatically + + var t = styfn$2.types; + var mainLabel = [{ + name: 'label', + type: t.text, + triggersBounds: diff.any, + triggersZOrder: diff.emptyNonEmpty + }, { + name: 'text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }]; + var sourceLabel = [{ + name: 'source-label', + type: t.text, + triggersBounds: diff.any + }, { + name: 'source-text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'source-text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'source-text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'source-text-offset', + type: t.size, + triggersBounds: diff.any + }]; + var targetLabel = [{ + name: 'target-label', + type: t.text, + triggersBounds: diff.any + }, { + name: 'target-text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'target-text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'target-text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'target-text-offset', + type: t.size, + triggersBounds: diff.any + }]; + var labelDimensions = [{ + name: 'font-family', + type: t.fontFamily, + triggersBounds: diff.any + }, { + name: 'font-style', + type: t.fontStyle, + triggersBounds: diff.any + }, { + name: 'font-weight', + type: t.fontWeight, + triggersBounds: diff.any + }, { + name: 'font-size', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-transform', + type: t.textTransform, + triggersBounds: diff.any + }, { + name: 'text-wrap', + type: t.textWrap, + triggersBounds: diff.any + }, { + name: 'text-overflow-wrap', + type: t.textOverflowWrap, + triggersBounds: diff.any + }, { + name: 'text-max-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-outline-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'line-height', + type: t.positiveNumber, + triggersBounds: diff.any + }]; + var commonLabel = [{ + name: 'text-valign', + type: t.valign, + triggersBounds: diff.any + }, { + name: 'text-halign', + type: t.halign, + triggersBounds: diff.any + }, { + name: 'color', + type: t.color + }, { + name: 'text-outline-color', + type: t.color + }, { + name: 'text-outline-opacity', + type: t.zeroOneNumber + }, { + name: 'text-background-color', + type: t.color + }, { + name: 'text-background-opacity', + type: t.zeroOneNumber + }, { + name: 'text-background-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-border-opacity', + type: t.zeroOneNumber + }, { + name: 'text-border-color', + type: t.color + }, { + name: 'text-border-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-border-style', + type: t.borderStyle, + triggersBounds: diff.any + }, { + name: 'text-background-shape', + type: t.textBackgroundShape, + triggersBounds: diff.any + }, { + name: 'text-justification', + type: t.justification + }]; + var behavior = [{ + name: 'events', + type: t.bool + }, { + name: 'text-events', + type: t.bool + }]; + var visibility = [{ + name: 'display', + type: t.display, + triggersZOrder: diff.any, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: 'visibility', + type: t.visibility, + triggersZOrder: diff.any + }, { + name: 'opacity', + type: t.zeroOneNumber, + triggersZOrder: diff.zeroNonZero + }, { + name: 'text-opacity', + type: t.zeroOneNumber + }, { + name: 'min-zoomed-font-size', + type: t.size + }, { + name: 'z-compound-depth', + type: t.zCompoundDepth, + triggersZOrder: diff.any + }, { + name: 'z-index-compare', + type: t.zIndexCompare, + triggersZOrder: diff.any + }, { + name: 'z-index', + type: t.nonNegativeInt, + triggersZOrder: diff.any + }]; + var overlay = [{ + name: 'overlay-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'overlay-color', + type: t.color + }, { + name: 'overlay-opacity', + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: 'overlay-shape', + type: t.overlayShape, + triggersBounds: diff.any + }]; + var underlay = [{ + name: 'underlay-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'underlay-color', + type: t.color + }, { + name: 'underlay-opacity', + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: 'underlay-shape', + type: t.overlayShape, + triggersBounds: diff.any + }]; + var transition = [{ + name: 'transition-property', + type: t.propList + }, { + name: 'transition-duration', + type: t.time + }, { + name: 'transition-delay', + type: t.time + }, { + name: 'transition-timing-function', + type: t.easing + }]; + + var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) { + if (parsedProp.value === 'label') { + return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway) + } else { + return parsedProp.pfValue; + } + }; + + var nodeBody = [{ + name: 'height', + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: 'width', + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: 'shape', + type: t.nodeShape, + triggersBounds: diff.any + }, { + name: 'shape-polygon-points', + type: t.polygonPointList, + triggersBounds: diff.any + }, { + name: 'background-color', + type: t.color + }, { + name: 'background-fill', + type: t.fill + }, { + name: 'background-opacity', + type: t.zeroOneNumber + }, { + name: 'background-blacken', + type: t.nOneOneNumber + }, { + name: 'background-gradient-stop-colors', + type: t.colors + }, { + name: 'background-gradient-stop-positions', + type: t.percentages + }, { + name: 'background-gradient-direction', + type: t.gradientDirection + }, { + name: 'padding', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'padding-relative-to', + type: t.paddingRelativeTo, + triggersBounds: diff.any + }, { + name: 'bounds-expansion', + type: t.boundsExpansion, + triggersBounds: diff.any + }]; + var nodeBorder = [{ + name: 'border-color', + type: t.color + }, { + name: 'border-opacity', + type: t.zeroOneNumber + }, { + name: 'border-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'border-style', + type: t.borderStyle + }]; + var backgroundImage = [{ + name: 'background-image', + type: t.urls + }, { + name: 'background-image-crossorigin', + type: t.bgCrossOrigin + }, { + name: 'background-image-opacity', + type: t.zeroOneNumbers + }, { + name: 'background-image-containment', + type: t.bgContainment + }, { + name: 'background-image-smoothing', + type: t.bools + }, { + name: 'background-position-x', + type: t.bgPos + }, { + name: 'background-position-y', + type: t.bgPos + }, { + name: 'background-width-relative-to', + type: t.bgRelativeTo + }, { + name: 'background-height-relative-to', + type: t.bgRelativeTo + }, { + name: 'background-repeat', + type: t.bgRepeat + }, { + name: 'background-fit', + type: t.bgFit + }, { + name: 'background-clip', + type: t.bgClip + }, { + name: 'background-width', + type: t.bgWH + }, { + name: 'background-height', + type: t.bgWH + }, { + name: 'background-offset-x', + type: t.bgPos + }, { + name: 'background-offset-y', + type: t.bgPos + }]; + var compound = [{ + name: 'position', + type: t.position, + triggersBounds: diff.any + }, { + name: 'compound-sizing-wrt-labels', + type: t.compoundIncludeLabels, + triggersBounds: diff.any + }, { + name: 'min-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'min-width-bias-left', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-width-bias-right', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-height', + type: t.size, + triggersBounds: diff.any + }, { + name: 'min-height-bias-top', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-height-bias-bottom', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }]; + var edgeLine = [{ + name: 'line-style', + type: t.lineStyle + }, { + name: 'line-color', + type: t.color + }, { + name: 'line-fill', + type: t.fill + }, { + name: 'line-cap', + type: t.lineCap + }, { + name: 'line-opacity', + type: t.zeroOneNumber + }, { + name: 'line-dash-pattern', + type: t.numbers + }, { + name: 'line-dash-offset', + type: t.number + }, { + name: 'line-gradient-stop-colors', + type: t.colors + }, { + name: 'line-gradient-stop-positions', + type: t.percentages + }, { + name: 'curve-style', + type: t.curveStyle, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: 'haystack-radius', + type: t.zeroOneNumber, + triggersBounds: diff.any + }, { + name: 'source-endpoint', + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: 'target-endpoint', + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: 'control-point-step-size', + type: t.size, + triggersBounds: diff.any + }, { + name: 'control-point-distances', + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: 'control-point-weights', + type: t.numbers, + triggersBounds: diff.any + }, { + name: 'segment-distances', + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: 'segment-weights', + type: t.numbers, + triggersBounds: diff.any + }, { + name: 'taxi-turn', + type: t.bidirectionalSizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'taxi-turn-min-distance', + type: t.size, + triggersBounds: diff.any + }, { + name: 'taxi-direction', + type: t.axisDirection, + triggersBounds: diff.any + }, { + name: 'edge-distances', + type: t.edgeDistances, + triggersBounds: diff.any + }, { + name: 'arrow-scale', + type: t.positiveNumber, + triggersBounds: diff.any + }, { + name: 'loop-direction', + type: t.angle, + triggersBounds: diff.any + }, { + name: 'loop-sweep', + type: t.angle, + triggersBounds: diff.any + }, { + name: 'source-distance-from-node', + type: t.size, + triggersBounds: diff.any + }, { + name: 'target-distance-from-node', + type: t.size, + triggersBounds: diff.any + }]; + var ghost = [{ + name: 'ghost', + type: t.bool, + triggersBounds: diff.any + }, { + name: 'ghost-offset-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'ghost-offset-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'ghost-opacity', + type: t.zeroOneNumber + }]; + var core = [{ + name: 'selection-box-color', + type: t.color + }, { + name: 'selection-box-opacity', + type: t.zeroOneNumber + }, { + name: 'selection-box-border-color', + type: t.color + }, { + name: 'selection-box-border-width', + type: t.size + }, { + name: 'active-bg-color', + type: t.color + }, { + name: 'active-bg-opacity', + type: t.zeroOneNumber + }, { + name: 'active-bg-size', + type: t.size + }, { + name: 'outside-texture-bg-color', + type: t.color + }, { + name: 'outside-texture-bg-opacity', + type: t.zeroOneNumber + }]; // pie backgrounds for nodes + + var pie = []; + styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use) + + pie.push({ + name: 'pie-size', + type: t.sizeMaybePercent + }); + + for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { + pie.push({ + name: 'pie-' + i + '-background-color', + type: t.color + }); + pie.push({ + name: 'pie-' + i + '-background-size', + type: t.percent + }); + pie.push({ + name: 'pie-' + i + '-background-opacity', + type: t.zeroOneNumber + }); + } // edge arrows + + + var edgeArrow = []; + var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target']; + [{ + name: 'arrow-shape', + type: t.arrowShape, + triggersBounds: diff.any + }, { + name: 'arrow-color', + type: t.color + }, { + name: 'arrow-fill', + type: t.arrowFill + }].forEach(function (prop) { + arrowPrefixes.forEach(function (prefix) { + var name = prefix + '-' + prop.name; + var type = prop.type, + triggersBounds = prop.triggersBounds; + edgeArrow.push({ + name: name, + type: type, + triggersBounds: triggersBounds + }); + }); + }, {}); + var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, backgroundImage, pie, compound, edgeLine, edgeArrow, core); + var propGroups = styfn$2.propertyGroups = { + // common to all eles + behavior: behavior, + transition: transition, + visibility: visibility, + overlay: overlay, + underlay: underlay, + ghost: ghost, + // labels + commonLabel: commonLabel, + labelDimensions: labelDimensions, + mainLabel: mainLabel, + sourceLabel: sourceLabel, + targetLabel: targetLabel, + // node props + nodeBody: nodeBody, + nodeBorder: nodeBorder, + backgroundImage: backgroundImage, + pie: pie, + compound: compound, + // edge props + edgeLine: edgeLine, + edgeArrow: edgeArrow, + core: core + }; + var propGroupNames = styfn$2.propertyGroupNames = {}; + var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); + propGroupKeys.forEach(function (key) { + propGroupNames[key] = propGroups[key].map(function (prop) { + return prop.name; + }); + propGroups[key].forEach(function (prop) { + return prop.groupKey = key; + }); + }); // define aliases + + var aliases = styfn$2.aliases = [{ + name: 'content', + pointsTo: 'label' + }, { + name: 'control-point-distance', + pointsTo: 'control-point-distances' + }, { + name: 'control-point-weight', + pointsTo: 'control-point-weights' + }, { + 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' + }]; // list of property names + + styfn$2.propertyNames = props.map(function (p) { + return p.name; + }); // allow access of properties by name ( e.g. style.properties.height ) + + for (var _i = 0; _i < props.length; _i++) { + var prop = props[_i]; + props[prop.name] = prop; // allow lookup by name + } // map aliases + + + for (var _i2 = 0; _i2 < aliases.length; _i2++) { + var alias = aliases[_i2]; + var pointsToProp = props[alias.pointsTo]; + var aliasProp = { + name: alias.name, + alias: true, + pointsTo: pointsToProp + }; // add alias prop for parsing + + props.push(aliasProp); + props[alias.name] = aliasProp; // allow lookup by name + } + })(); + + styfn$2.getDefaultProperty = function (name) { + return this.getDefaultProperties()[name]; + }; + + styfn$2.getDefaultProperties = function () { + var _p = this._private; + + if (_p.defaultProperties != null) { + return _p.defaultProperties; + } + + var rawProps = extend({ + // core props + 'selection-box-color': '#ddd', + 'selection-box-opacity': 0.65, + 'selection-box-border-color': '#aaa', + 'selection-box-border-width': 1, + 'active-bg-color': 'black', + 'active-bg-opacity': 0.15, + 'active-bg-size': 30, + 'outside-texture-bg-color': '#000', + 'outside-texture-bg-opacity': 0.125, + // common node/edge props + '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', + 'underlay-opacity': 0, + 'underlay-color': '#000', + 'underlay-padding': 10, + 'underlay-shape': 'round-rectangle', + 'transition-property': 'none', + 'transition-duration': 0, + 'transition-delay': 0, + 'transition-timing-function': 'linear', + // node props + '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', + 'height': 30, + 'width': 30, + 'shape': 'ellipse', + 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1', + 'bounds-expansion': 0, + // node gradient + 'background-gradient-direction': 'to-bottom', + 'background-gradient-stop-colors': '#999', + 'background-gradient-stop-positions': '0%', + // ghost props + 'ghost': 'no', + 'ghost-offset-y': 0, + 'ghost-offset-x': 0, + 'ghost-opacity': 0, + // compound props + '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 + }, { + // node pie bg + '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 (css, prop) { + for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { + var name = prop.name.replace('{{i}}', i); + var val = prop.value; + css[name] = val; + } + + return css; + }, {}), { + // edge props + 'line-style': 'solid', + 'line-color': '#999', + 'line-fill': 'solid', + 'line-cap': 'butt', + 'line-opacity': 1, + 'line-gradient-stop-colors': '#999', + 'line-gradient-stop-positions': '0%', + 'control-point-step-size': 40, + 'control-point-weights': 0.5, + 'segment-weights': 0.5, + 'segment-distances': 20, + 'taxi-turn': '50%', + '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' + }].reduce(function (css, prop) { + styfn$2.arrowPrefixes.forEach(function (prefix) { + var name = prefix + '-' + prop.name; + var val = prop.value; + css[name] = val; + }); + return css; + }, {})); + var parsedProps = {}; + + for (var i = 0; i < this.properties.length; i++) { + var prop = this.properties[i]; + + if (prop.pointsTo) { + continue; + } + + var name = prop.name; + var val = rawProps[name]; + var parsedProp = this.parse(name, val); + parsedProps[name] = parsedProp; + } + + _p.defaultProperties = parsedProps; + return _p.defaultProperties; + }; + + styfn$2.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': 0.25 + }); + this.defaultLength = this.length; + }; + + var styfn$1 = {}; // a caching layer for property parsing + + styfn$1.parse = function (name, value, propIsBypass, propIsFlat) { + var self = this; // function values can't be cached in all cases, and there isn't much benefit of caching them anyway + + if (fn$6(value)) { + return self.parseImplWarn(name, value, propIsBypass, propIsFlat); + } + + var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat; + var bypassKey = propIsBypass ? 't' : 'f'; + var valueKey = '' + value; + var argHash = hashStrings(name, valueKey, bypassKey, flatKey); + var propCache = self.propCache = self.propCache || []; + var ret; + + if (!(ret = propCache[argHash])) { + ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat); + } // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden + // - mappings can't be shared b/c mappings are per-element + + + if (propIsBypass || propIsFlat === 'mapping') { + // need a copy since props are mutated later in their lifecycles + ret = copy(ret); + + if (ret) { + ret.value = copy(ret.value); // because it could be an array, e.g. colour + } + } + + return ret; + }; + + styfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) { + var prop = this.parseImpl(name, value, propIsBypass, propIsFlat); + + if (!prop && value != null) { + warn("The style property `".concat(name, ": ").concat(value, "` is invalid")); + } + + if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') { + warn('The style value of `label` is deprecated for `' + prop.name + '`'); + } + + return prop; + }; // parse a property; return null on invalid; return parsed property otherwise + // fields : + // - name : the name of the property + // - value : the parsed, native-typed value of the property + // - strValue : a string value that represents the property value in valid css + // - bypass : true iff the property is a bypass property + + + styfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) { + var self = this; + name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName') + + var property = self.properties[name]; + var passedValue = value; + var types = self.types; + + if (!property) { + return null; + } // return null on property of unknown name + + + if (value === undefined) { + return null; + } // can't assign undefined + // the property may be an alias + + + if (property.alias) { + property = property.pointsTo; + name = property.name; + } + + var valueIsString = string(value); + + if (valueIsString) { + // trim the value to make parsing easier + value = value.trim(); + } + + var type = property.type; + + if (!type) { + return null; + } // no type, no luck + // check if bypass is null or empty string (i.e. indication to delete bypass property) + + + if (propIsBypass && (value === '' || value === null)) { + return { + name: name, + value: value, + bypass: true, + deleteBypass: true + }; + } // check if value is a function used as a mapper + + + if (fn$6(value)) { + return { + name: name, + value: value, + strValue: 'fn', + mapped: types.fn, + bypass: propIsBypass + }; + } // check if value is mapped + + + var data, mapData; + + if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) { + if (propIsBypass) { + return false; + } // mappers not allowed in bypass + + + var mapped = types.data; + return { + name: name, + value: data, + strValue: '' + value, + mapped: mapped, + field: data[1], + bypass: propIsBypass + }; + } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) { + if (propIsBypass) { + return false; + } // mappers not allowed in bypass + + + if (type.multiple) { + return false; + } // impossible to map to num + + + var _mapped = types.mapData; // we can map only if the type is a colour or a number + + if (!(type.color || type.number)) { + return false; + } + + var valueMin = this.parse(name, mapData[4]); // parse to validate + + if (!valueMin || valueMin.mapped) { + return false; + } // can't be invalid or mapped + + + var valueMax = this.parse(name, mapData[5]); // parse to validate + + if (!valueMax || valueMax.mapped) { + return false; + } // can't be invalid or mapped + // check if valueMin and valueMax are the same + + + if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { + warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`'); + return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range + } else if (type.color) { + var c1 = valueMin.value; + var c2 = valueMax.value; + var same = c1[0] === c2[0] // red + && c1[1] === c2[1] // green + && c1[2] === c2[2] // blue + && ( // optional alpha + c1[3] === c2[3] // same alpha outright + || (c1[3] == null || c1[3] === 1 // full opacity for colour 1? + ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2? + ); + + if (same) { + return false; + } // can't make a mapper without a range + + } + + return { + name: name, + value: mapData, + strValue: '' + value, + mapped: _mapped, + field: mapData[1], + fieldMin: parseFloat(mapData[2]), + // min & max are numeric + fieldMax: parseFloat(mapData[3]), + valueMin: valueMin.value, + valueMax: valueMax.value, + bypass: propIsBypass + }; + } + + if (type.multiple && propIsFlat !== 'multiple') { + var vals; + + if (valueIsString) { + vals = value.split(/\s+/); + } else if (array(value)) { + vals = value; + } else { + vals = [value]; + } + + if (type.evenMultiple && vals.length % 2 !== 0) { + return null; + } + + var valArr = []; + var unitsArr = []; + var pfValArr = []; + var strVal = ''; + var hasEnum = false; + + for (var i = 0; i < vals.length; i++) { + var p = self.parse(name, vals[i], propIsBypass, 'multiple'); + hasEnum = hasEnum || string(p.value); + valArr.push(p.value); + pfValArr.push(p.pfValue != null ? p.pfValue : p.value); + unitsArr.push(p.units); + strVal += (i > 0 ? ' ' : '') + p.strValue; + } + + if (type.validate && !type.validate(valArr, unitsArr)) { + return null; + } + + if (type.singleEnum && hasEnum) { + if (valArr.length === 1 && string(valArr[0])) { + return { + name: name, + value: valArr[0], + strValue: valArr[0], + bypass: propIsBypass + }; + } else { + return null; + } + } + + return { + name: name, + value: valArr, + pfValue: pfValArr, + strValue: strVal, + bypass: propIsBypass, + units: unitsArr + }; + } // several types also allow enums + + + var checkEnums = function checkEnums() { + for (var _i = 0; _i < type.enums.length; _i++) { + var en = type.enums[_i]; + + if (en === value) { + return { + name: name, + value: value, + strValue: '' + value, + bypass: propIsBypass + }; + } + } + + return null; + }; // check the type and return the appropriate object + + + if (type.number) { + var units; + var implicitUnits = 'px'; // not set => px + + if (type.units) { + // use specified units if set + units = type.units; + } + + if (type.implicitUnits) { + implicitUnits = type.implicitUnits; + } + + if (!type.unitless) { + if (valueIsString) { + var unitsRegex = 'px|em' + (type.allowPercent ? '|\\%' : ''); + + if (units) { + unitsRegex = units; + } // only allow explicit units if so set + + + var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$'); + + if (match) { + value = match[1]; + units = match[2] || implicitUnits; + } + } else if (!units || type.implicitUnits) { + units = implicitUnits; // implicitly px if unspecified + } + } + + value = parseFloat(value); // if not a number and enums not allowed, then the value is invalid + + if (isNaN(value) && type.enums === undefined) { + return null; + } // check if this number type also accepts special keywords in place of numbers + // (i.e. `left`, `auto`, etc) + + + if (isNaN(value) && type.enums !== undefined) { + value = passedValue; + return checkEnums(); + } // check if value must be an integer + + + if (type.integer && !integer(value)) { + return null; + } // check value is within range + + + if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) { + return null; + } + + var ret = { + name: name, + value: value, + strValue: '' + value + (units ? units : ''), + units: units, + bypass: propIsBypass + }; // normalise value in pixels + + if (type.unitless || units !== 'px' && units !== 'em') { + ret.pfValue = value; + } else { + ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value; + } // normalise value in ms + + + if (units === 'ms' || units === 's') { + ret.pfValue = units === 'ms' ? value : 1000 * value; + } // normalise value in rad + + + if (units === 'deg' || units === 'rad') { + ret.pfValue = units === 'rad' ? value : deg2rad(value); + } // normalize value in % + + + if (units === '%') { + ret.pfValue = value / 100; + } + + return ret; + } else if (type.propList) { + var props = []; + var propsStr = '' + value; + + if (propsStr === 'none') ; else { + // go over each prop + var propsSplit = propsStr.split(/\s*,\s*|\s+/); + + for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { + var propName = propsSplit[_i2].trim(); + + if (self.properties[propName]) { + props.push(propName); + } else { + warn('`' + propName + '` is not a valid property name'); + } + } + + if (props.length === 0) { + return null; + } + } + + return { + name: name, + value: props, + strValue: props.length === 0 ? 'none' : props.join(' '), + bypass: propIsBypass + }; + } else if (type.color) { + var tuple = color2tuple(value); + + if (!tuple) { + return null; + } + + return { + name: name, + value: tuple, + pfValue: tuple, + strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')', + // n.b. no spaces b/c of multiple support + bypass: propIsBypass + }; + } else if (type.regex || type.regexes) { + // first check enums + if (type.enums) { + var enumProp = checkEnums(); + + if (enumProp) { + return enumProp; + } + } + + var regexes = type.regexes ? type.regexes : [type.regex]; + + for (var _i3 = 0; _i3 < regexes.length; _i3++) { + var regex = new RegExp(regexes[_i3]); // make a regex from the type string + + var m = regex.exec(value); + + if (m) { + // regex matches + return { + name: name, + value: type.singleRegexMatchValue ? m[1] : m, + strValue: '' + value, + bypass: propIsBypass + }; + } + } + + return null; // didn't match any + } else if (type.string) { + // just return + return { + name: name, + value: '' + value, + strValue: '' + value, + bypass: propIsBypass + }; + } else if (type.enums) { + // check enums last because it's a combo type in others + return checkEnums(); + } else { + return null; // not a type we can handle + } + }; + + var Style = function Style(cy) { + if (!(this instanceof Style)) { + return new Style(cy); + } + + if (!core(cy)) { + error('A style must have a core reference'); + return; + } + + this._private = { + cy: cy, + coreStyle: {} + }; + this.length = 0; + this.resetToDefault(); + }; + + var styfn = Style.prototype; + + styfn.instanceString = function () { + return 'style'; + }; // remove all contexts + + + styfn.clear = function () { + var _p = this._private; + var cy = _p.cy; + var eles = cy.elements(); + + for (var i = 0; i < this.length; i++) { + this[i] = undefined; + } + + this.length = 0; + _p.contextStyles = {}; + _p.propDiffs = {}; + this.cleanElements(eles, true); + eles.forEach(function (ele) { + var ele_p = ele[0]._private; + ele_p.styleDirty = true; + ele_p.appliedInitStyle = false; + }); + return this; // chaining + }; + + styfn.resetToDefault = function () { + this.clear(); + this.addDefaultStylesheet(); + return this; + }; // builds a style object for the 'core' selector + + + styfn.core = function (propName) { + return this._private.coreStyle[propName] || this.getDefaultProperty(propName); + }; // create a new context from the specified selector string and switch to that context + + + styfn.selector = function (selectorStr) { + // 'core' is a special case and does not need a selector + var selector = selectorStr === 'core' ? null : new Selector(selectorStr); + var i = this.length++; // new context means new index + + this[i] = { + selector: selector, + properties: [], + mappedProperties: [], + index: i + }; + return this; // chaining + }; // add one or many css rules to the current context + + + styfn.css = function () { + var self = this; + var args = arguments; + + if (args.length === 1) { + var map = args[0]; + + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var mapVal = map[prop.name]; + + if (mapVal === undefined) { + mapVal = map[dash2camel(prop.name)]; + } + + if (mapVal !== undefined) { + this.cssRule(prop.name, mapVal); + } + } + } else if (args.length === 2) { + this.cssRule(args[0], args[1]); + } // do nothing if args are invalid + + + return this; // chaining + }; + + styfn.style = styfn.css; // add a single css rule to the current context + + styfn.cssRule = function (name, value) { + // name-value pair + var property = this.parse(name, value); // add property to current context if valid + + if (property) { + var i = this.length - 1; + this[i].properties.push(property); + this[i].properties[property.name] = property; // allow access by name as well + + if (property.name.match(/pie-(\d+)-background-size/) && property.value) { + this._private.hasPie = true; + } + + if (property.mapped) { + this[i].mappedProperties.push(property); + } // add to core style if necessary + + + var currentSelectorIsCore = !this[i].selector; + + if (currentSelectorIsCore) { + this._private.coreStyle[property.name] = property; + } + } + + return this; // chaining + }; + + styfn.append = function (style) { + if (stylesheet(style)) { + style.appendToStyle(this); + } else if (array(style)) { + this.appendFromJson(style); + } else if (string(style)) { + this.appendFromString(style); + } // you probably wouldn't want to append a Style, since you'd duplicate the default parts + + + return this; + }; // static function + + + Style.fromJson = function (cy, json) { + var style = new Style(cy); + style.fromJson(json); + return style; + }; + + Style.fromString = function (cy, string) { + return new Style(cy).fromString(string); + }; + + [styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) { + extend(styfn, props); + }); + Style.types = styfn.types; + Style.properties = styfn.properties; + Style.propertyGroups = styfn.propertyGroups; + Style.propertyGroupNames = styfn.propertyGroupNames; + Style.propertyGroupKeys = styfn.propertyGroupKeys; + + var corefn$2 = { + style: function style(newStyle) { + if (newStyle) { + var s = this.setStyle(newStyle); + s.update(); + } + + return this._private.style; + }, + setStyle: function setStyle(style) { + var _p = this._private; + + if (stylesheet(style)) { + _p.style = style.generateStyle(this); + } else if (array(style)) { + _p.style = Style.fromJson(this, style); + } else if (string(style)) { + _p.style = Style.fromString(this, style); + } else { + _p.style = Style(this); + } + + return _p.style; + }, + // e.g. cy.data() changed => recalc ele mappers + updateStyle: function updateStyle() { + this.mutableElements().updateStyle(); // just send to all eles + } + }; + + var defaultSelectionType = 'single'; + var corefn$1 = { + autolock: function autolock(bool) { + if (bool !== undefined) { + this._private.autolock = bool ? true : false; + } else { + return this._private.autolock; + } + + return this; // chaining + }, + autoungrabify: function autoungrabify(bool) { + if (bool !== undefined) { + this._private.autoungrabify = bool ? true : false; + } else { + return this._private.autoungrabify; + } + + return this; // chaining + }, + autounselectify: function autounselectify(bool) { + if (bool !== undefined) { + this._private.autounselectify = bool ? true : false; + } else { + return this._private.autounselectify; + } + + return this; // chaining + }, + selectionType: function selectionType(selType) { + var _p = this._private; + + if (_p.selectionType == null) { + _p.selectionType = defaultSelectionType; + } + + if (selType !== undefined) { + if (selType === 'additive' || selType === 'single') { + _p.selectionType = selType; + } + } else { + return _p.selectionType; + } + + return this; + }, + panningEnabled: function panningEnabled(bool) { + if (bool !== undefined) { + this._private.panningEnabled = bool ? true : false; + } else { + return this._private.panningEnabled; + } + + return this; // chaining + }, + userPanningEnabled: function userPanningEnabled(bool) { + if (bool !== undefined) { + this._private.userPanningEnabled = bool ? true : false; + } else { + return this._private.userPanningEnabled; + } + + return this; // chaining + }, + zoomingEnabled: function zoomingEnabled(bool) { + if (bool !== undefined) { + this._private.zoomingEnabled = bool ? true : false; + } else { + return this._private.zoomingEnabled; + } + + return this; // chaining + }, + userZoomingEnabled: function userZoomingEnabled(bool) { + if (bool !== undefined) { + this._private.userZoomingEnabled = bool ? true : false; + } else { + return this._private.userZoomingEnabled; + } + + return this; // chaining + }, + boxSelectionEnabled: function boxSelectionEnabled(bool) { + if (bool !== undefined) { + this._private.boxSelectionEnabled = bool ? true : false; + } else { + return this._private.boxSelectionEnabled; + } + + return this; // chaining + }, + pan: function pan() { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + + switch (args.length) { + case 0: + // .pan() + return pan; + + case 1: + if (string(args[0])) { + // .pan('x') + dim = args[0]; + return pan[dim]; + } else if (plainObject(args[0])) { + // .pan({ x: 0, y: 100 }) + if (!this._private.panningEnabled) { + return this; + } + + dims = args[0]; + x = dims.x; + y = dims.y; + + if (number$1(x)) { + pan.x = x; + } + + if (number$1(y)) { + pan.y = y; + } + + this.emit('pan viewport'); + } + + break; + + case 2: + // .pan('x', 100) + if (!this._private.panningEnabled) { + return this; + } + + dim = args[0]; + val = args[1]; + + if ((dim === 'x' || dim === 'y') && number$1(val)) { + pan[dim] = val; + } + + this.emit('pan viewport'); + break; + // invalid + } + + this.notify('viewport'); + return this; // chaining + }, + panBy: function panBy(arg0, arg1) { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + + if (!this._private.panningEnabled) { + return this; + } + + switch (args.length) { + case 1: + if (plainObject(arg0)) { + // .panBy({ x: 0, y: 100 }) + dims = args[0]; + x = dims.x; + y = dims.y; + + if (number$1(x)) { + pan.x += x; + } + + if (number$1(y)) { + pan.y += y; + } + + this.emit('pan viewport'); + } + + break; + + case 2: + // .panBy('x', 100) + dim = arg0; + val = arg1; + + if ((dim === 'x' || dim === 'y') && number$1(val)) { + pan[dim] += val; + } + + this.emit('pan viewport'); + break; + // invalid + } + + this.notify('viewport'); + return this; // chaining + }, + fit: function fit(elements, padding) { + var viewportState = this.getFitViewport(elements, padding); + + if (viewportState) { + var _p = this._private; + _p.zoom = viewportState.zoom; + _p.pan = viewportState.pan; + this.emit('pan zoom viewport'); + this.notify('viewport'); + } + + return this; // chaining + }, + getFitViewport: function getFitViewport(elements, padding) { + if (number$1(elements) && padding === undefined) { + // elements is optional + padding = elements; + elements = undefined; + } + + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return; + } + + var bb; + + if (string(elements)) { + var sel = elements; + elements = this.$(sel); + } else if (boundingBox(elements)) { + // assume bb + var bbe = elements; + bb = { + x1: bbe.x1, + y1: bbe.y1, + x2: bbe.x2, + y2: bbe.y2 + }; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } else if (!elementOrCollection(elements)) { + elements = this.mutableElements(); + } + + if (elementOrCollection(elements) && elements.empty()) { + return; + } // can't fit to nothing + + + bb = bb || elements.boundingBox(); + var w = this.width(); + var h = this.height(); + var zoom; + padding = number$1(padding) ? padding : 0; + + if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { + zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h); // crop zoom + + zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; + zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; + var pan = { + // now pan to middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return { + zoom: zoom, + pan: pan + }; + } + + return; + }, + zoomRange: function zoomRange(min, max) { + var _p = this._private; + + if (max == null) { + var opts = min; + min = opts.min; + max = opts.max; + } + + if (number$1(min) && number$1(max) && min <= max) { + _p.minZoom = min; + _p.maxZoom = max; + } else if (number$1(min) && max === undefined && min <= _p.maxZoom) { + _p.minZoom = min; + } else if (number$1(max) && min === undefined && max >= _p.minZoom) { + _p.maxZoom = max; + } + + return this; + }, + minZoom: function minZoom(zoom) { + if (zoom === undefined) { + return this._private.minZoom; + } else { + return this.zoomRange({ + min: zoom + }); + } + }, + maxZoom: function maxZoom(zoom) { + if (zoom === undefined) { + return this._private.maxZoom; + } else { + return this.zoomRange({ + max: zoom + }); + } + }, + getZoomedViewport: function getZoomedViewport(params) { + var _p = this._private; + var currentPan = _p.pan; + var currentZoom = _p.zoom; + var pos; // in rendered px + + var zoom; + var bail = false; + + if (!_p.zoomingEnabled) { + // zooming disabled + bail = true; + } + + if (number$1(params)) { + // then set the zoom + zoom = params; + } else if (plainObject(params)) { + // then zoom about a point + zoom = params.level; + + if (params.position != null) { + pos = modelToRenderedPosition(params.position, currentZoom, currentPan); + } else if (params.renderedPosition != null) { + pos = params.renderedPosition; + } + + if (pos != null && !_p.panningEnabled) { + // panning disabled + bail = true; + } + } // crop zoom + + + zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; + zoom = zoom < _p.minZoom ? _p.minZoom : zoom; // can't zoom with invalid params + + if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) { + return null; + } + + if (pos != null) { + // set zoom about position + var pan1 = currentPan; + var zoom1 = currentZoom; + var zoom2 = zoom; + var pan2 = { + x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, + y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y + }; + return { + zoomed: true, + panned: true, + zoom: zoom2, + pan: pan2 + }; + } else { + // just set the zoom + return { + zoomed: true, + panned: false, + zoom: zoom, + pan: currentPan + }; + } + }, + zoom: function zoom(params) { + if (params === undefined) { + // get + return this._private.zoom; + } else { + // set + var vp = this.getZoomedViewport(params); + var _p = this._private; + + if (vp == null || !vp.zoomed) { + return this; + } + + _p.zoom = vp.zoom; + + if (vp.panned) { + _p.pan.x = vp.pan.x; + _p.pan.y = vp.pan.y; + } + + this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport'); + this.notify('viewport'); + return this; // chaining + } + }, + viewport: function viewport(opts) { + var _p = this._private; + var zoomDefd = true; + var panDefd = true; + var events = []; // to trigger + + var zoomFailed = false; + var panFailed = false; + + if (!opts) { + return this; + } + + if (!number$1(opts.zoom)) { + zoomDefd = false; + } + + if (!plainObject(opts.pan)) { + panDefd = false; + } + + if (!zoomDefd && !panDefd) { + return this; + } + + if (zoomDefd) { + var z = opts.zoom; + + if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { + zoomFailed = true; + } else { + _p.zoom = z; + events.push('zoom'); + } + } + + if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { + var p = opts.pan; + + if (number$1(p.x)) { + _p.pan.x = p.x; + panFailed = false; + } + + if (number$1(p.y)) { + _p.pan.y = p.y; + panFailed = false; + } + + if (!panFailed) { + events.push('pan'); + } + } + + if (events.length > 0) { + events.push('viewport'); + this.emit(events.join(' ')); + this.notify('viewport'); + } + + return this; // chaining + }, + center: function center(elements) { + var pan = this.getCenterPan(elements); + + if (pan) { + this._private.pan = pan; + this.emit('pan viewport'); + this.notify('viewport'); + } + + return this; // chaining + }, + getCenterPan: function getCenterPan(elements, zoom) { + if (!this._private.panningEnabled) { + return; + } + + if (string(elements)) { + var selector = elements; + elements = this.mutableElements().filter(selector); + } else if (!elementOrCollection(elements)) { + elements = this.mutableElements(); + } + + if (elements.length === 0) { + return; + } // can't centre pan to nothing + + + var bb = elements.boundingBox(); + var w = this.width(); + var h = this.height(); + zoom = zoom === undefined ? this._private.zoom : zoom; + var pan = { + // middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return pan; + }, + reset: function reset() { + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return this; + } + + this.viewport({ + pan: { + x: 0, + y: 0 + }, + zoom: 1 + }); + return this; // chaining + }, + invalidateSize: function invalidateSize() { + this._private.sizeCache = null; + }, + size: function size() { + var _p = this._private; + var container = _p.container; + return _p.sizeCache = _p.sizeCache || (container ? function () { + var style = window$1.getComputedStyle(container); + + var val = function val(name) { + return parseFloat(style.getPropertyValue(name)); + }; + + return { + width: container.clientWidth - val('padding-left') - val('padding-right'), + height: container.clientHeight - val('padding-top') - val('padding-bottom') + }; + }() : { + // fallback if no container (not 0 b/c can be used for dividing etc) + width: 1, + height: 1 + }); + }, + width: function width() { + return this.size().width; + }, + height: function height() { + return this.size().height; + }, + extent: function extent() { + var pan = this._private.pan; + var zoom = this._private.zoom; + var rb = this.renderedExtent(); + var b = { + x1: (rb.x1 - pan.x) / zoom, + x2: (rb.x2 - pan.x) / zoom, + y1: (rb.y1 - pan.y) / zoom, + y2: (rb.y2 - pan.y) / zoom + }; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + return b; + }, + renderedExtent: function renderedExtent() { + var width = this.width(); + var height = this.height(); + return { + x1: 0, + y1: 0, + x2: width, + y2: height, + w: width, + h: height + }; + }, + multiClickDebounceTime: function multiClickDebounceTime(_int) { + if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime; + return this; // chaining + } + }; // aliases + + corefn$1.centre = corefn$1.center; // backwards compatibility + + corefn$1.autolockNodes = corefn$1.autolock; + corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; + + var fn = { + data: define.data({ + field: 'data', + bindingEvent: 'data', + allowBinding: true, + allowSetting: true, + settingEvent: 'data', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeData: define.removeData({ + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }), + scratch: define.data({ + field: 'scratch', + bindingEvent: 'scratch', + allowBinding: true, + allowSetting: true, + settingEvent: 'scratch', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: 'scratch', + event: 'scratch', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }) + }; // aliases + + fn.attr = fn.data; + fn.removeAttr = fn.removeData; + + var Core = function Core(opts) { + var cy = this; + opts = extend({}, opts); + var container = opts.container; // allow for passing a wrapped jquery object + // e.g. cytoscape({ container: $('#cy') }) + + if (container && !htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + + var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery + + reg = reg || {}; + + if (reg && reg.cy) { + reg.cy.destroy(); + reg = {}; // old instance => replace reg completely + } + + var readies = reg.readies = reg.readies || []; + + if (container) { + container._cyreg = reg; + } // make sure container assoc'd reg points to this cy + + + reg.cy = cy; + var head = window$1 !== undefined && container !== undefined && !opts.headless; + var options = opts; + options.layout = extend({ + name: head ? 'grid' : 'null' + }, options.layout); + options.renderer = extend({ + name: head ? 'canvas' : 'null' + }, options.renderer); + + var defVal = function defVal(def, val, altVal) { + if (val !== undefined) { + return val; + } else if (altVal !== undefined) { + return altVal; + } else { + return def; + } + }; + + var _p = this._private = { + container: container, + // html dom ele container + ready: false, + // whether ready has been triggered + options: options, + // cached options + elements: new Collection(this), + // elements in the graph + listeners: [], + // list of listeners + aniEles: new Collection(this), + // elements being animated + data: options.data || {}, + // data for the core + scratch: {}, + // scratch object for core + layout: null, + renderer: null, + destroyed: false, + // whether destroy was called + notificationsEnabled: true, + // whether notifications are sent to the renderer + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: defVal(true, options.zoomingEnabled), + userZoomingEnabled: defVal(true, options.userZoomingEnabled), + panningEnabled: defVal(true, options.panningEnabled), + userPanningEnabled: defVal(true, options.userPanningEnabled), + boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), + autolock: defVal(false, options.autolock, options.autolockNodes), + autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), + autounselectify: defVal(false, options.autounselectify), + styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled, + zoom: number$1(options.zoom) ? options.zoom : 1, + pan: { + x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0, + y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0 + }, + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + hasCompoundNodes: false, + multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) + }; + + this.createEmitter(); // set selection type + + this.selectionType(options.selectionType); // init zoom bounds + + this.zoomRange({ + min: options.minZoom, + max: options.maxZoom + }); + + var loadExtData = function loadExtData(extData, next) { + var anyIsPromise = extData.some(promise); + + if (anyIsPromise) { + return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init + } else { + next(extData); // exec synchronously for convenience + } + }; // start with the default stylesheet so we have something before loading an external stylesheet + + + if (_p.styleEnabled) { + cy.setStyle([]); + } // create the renderer + + + var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options + + cy.initRenderer(rendererOptions); + + var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { + cy.notifications(false); // remove old elements + + var oldEles = cy.mutableElements(); + + if (oldEles.length > 0) { + oldEles.remove(); + } + + if (elements != null) { + if (plainObject(elements) || array(elements)) { + cy.add(elements); + } + } + + cy.one('layoutready', function (e) { + cy.notifications(true); + cy.emit(e); // we missed this event by turning notifications off, so pass it on + + cy.one('load', onload); + cy.emitAndNotify('load'); + }).one('layoutstop', function () { + cy.one('done', ondone); + cy.emit('done'); + }); + var layoutOpts = extend({}, cy._private.options.layout); + layoutOpts.eles = cy.elements(); + cy.layout(layoutOpts).run(); + }; + + loadExtData([options.style, options.elements], function (thens) { + var initStyle = thens[0]; + var initEles = thens[1]; // init style + + if (_p.styleEnabled) { + cy.style().append(initStyle); + } // initial load + + + setElesAndLayout(initEles, function () { + // onready + cy.startAnimationLoop(); + _p.ready = true; // if a ready callback is specified as an option, the bind it + + if (fn$6(options.ready)) { + cy.on('ready', options.ready); + } // bind all the ready handlers registered before creating this instance + + + for (var i = 0; i < readies.length; i++) { + var fn = readies[i]; + cy.on('ready', fn); + } + + if (reg) { + reg.readies = []; + } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc + + + cy.emit('ready'); + }, options.done); + }); + }; + + var corefn = Core.prototype; // short alias + + extend(corefn, { + instanceString: function instanceString() { + return 'core'; + }, + isReady: function isReady() { + return this._private.ready; + }, + destroyed: function destroyed() { + return this._private.destroyed; + }, + ready: function ready(fn) { + if (this.isReady()) { + this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event + } else { + this.on('ready', fn); + } + + return this; + }, + destroy: function destroy() { + var cy = this; + if (cy.destroyed()) return; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + this.emit('destroy'); + cy._private.destroyed = true; + return cy; + }, + hasElementWithId: function hasElementWithId(id) { + return this._private.elements.hasElementWithId(id); + }, + getElementById: function getElementById(id) { + return this._private.elements.getElementById(id); + }, + hasCompoundNodes: function hasCompoundNodes() { + return this._private.hasCompoundNodes; + }, + headless: function headless() { + return this._private.renderer.isHeadless(); + }, + styleEnabled: function styleEnabled() { + return this._private.styleEnabled; + }, + addToPool: function addToPool(eles) { + this._private.elements.merge(eles); + + return this; // chaining + }, + removeFromPool: function removeFromPool(eles) { + this._private.elements.unmerge(eles); + + return this; + }, + container: function container() { + return this._private.container || null; + }, + mount: function mount(container) { + if (container == null) { + return; + } + + var cy = this; + var _p = cy._private; + var options = _p.options; + + if (!htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + + cy.stopAnimationLoop(); + cy.destroyRenderer(); + _p.container = container; + _p.styleEnabled = true; + cy.invalidateSize(); + cy.initRenderer(extend({}, options, options.renderer, { + // allow custom renderer name to be re-used, otherwise use canvas + name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name + })); + cy.startAnimationLoop(); + cy.style(options.style); + cy.emit('mount'); + return cy; + }, + unmount: function unmount() { + var cy = this; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + cy.initRenderer({ + name: 'null' + }); + cy.emit('unmount'); + return cy; + }, + options: function options() { + return copy(this._private.options); + }, + json: function json(obj) { + var cy = this; + var _p = cy._private; + var eles = cy.mutableElements(); + + var getFreshRef = function getFreshRef(ele) { + return cy.getElementById(ele.id()); + }; + + if (plainObject(obj)) { + // set + cy.startBatch(); + + if (obj.elements) { + var idInJson = {}; + + var updateEles = function updateEles(jsons, gr) { + var toAdd = []; + var toMod = []; + + for (var i = 0; i < jsons.length; i++) { + var json = jsons[i]; + + if (!json.data.id) { + warn('cy.json() cannot handle elements without an ID attribute'); + continue; + } + + var id = '' + json.data.id; // id must be string + + var ele = cy.getElementById(id); + idInJson[id] = true; + + if (ele.length !== 0) { + // existing element should be updated + toMod.push({ + ele: ele, + json: json + }); + } else { + // otherwise should be added + if (gr) { + json.group = gr; + toAdd.push(json); + } else { + toAdd.push(json); + } + } + } + + cy.add(toAdd); + + for (var _i = 0; _i < toMod.length; _i++) { + var _toMod$_i = toMod[_i], + _ele = _toMod$_i.ele, + _json = _toMod$_i.json; + + _ele.json(_json); + } + }; + + if (array(obj.elements)) { + // elements: [] + updateEles(obj.elements); + } else { + // elements: { nodes: [], edges: [] } + var grs = ['nodes', 'edges']; + + for (var i = 0; i < grs.length; i++) { + var gr = grs[i]; + var elements = obj.elements[gr]; + + if (array(elements)) { + updateEles(elements, gr); + } + } + } + + var parentsToRemove = cy.collection(); + eles.filter(function (ele) { + return !idInJson[ele.id()]; + }).forEach(function (ele) { + if (ele.isParent()) { + parentsToRemove.merge(ele); + } else { + ele.remove(); + } + }); // so that children are not removed w/parent + + parentsToRemove.forEach(function (ele) { + return ele.children().move({ + parent: null + }); + }); // intermediate parents may be moved by prior line, so make sure we remove by fresh refs + + parentsToRemove.forEach(function (ele) { + return getFreshRef(ele).remove(); + }); + } + + if (obj.style) { + cy.style(obj.style); + } + + if (obj.zoom != null && obj.zoom !== _p.zoom) { + cy.zoom(obj.zoom); + } + + if (obj.pan) { + if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { + cy.pan(obj.pan); + } + } + + if (obj.data) { + cy.data(obj.data); + } + + var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime']; + + for (var _i2 = 0; _i2 < fields.length; _i2++) { + var f = fields[_i2]; + + if (obj[f] != null) { + cy[f](obj[f]); + } + } + + cy.endBatch(); + return this; // chaining + } else { + // get + var flat = !!obj; + var json = {}; + + if (flat) { + json.elements = this.elements().map(function (ele) { + return ele.json(); + }); + } else { + json.elements = {}; + eles.forEach(function (ele) { + var group = ele.group(); + + if (!json.elements[group]) { + json.elements[group] = []; + } + + json.elements[group].push(ele.json()); + }); + } + + if (this._private.styleEnabled) { + json.style = cy.style().json(); + } + + json.data = copy(cy.data()); + var options = _p.options; + json.zoomingEnabled = _p.zoomingEnabled; + json.userZoomingEnabled = _p.userZoomingEnabled; + json.zoom = _p.zoom; + json.minZoom = _p.minZoom; + json.maxZoom = _p.maxZoom; + json.panningEnabled = _p.panningEnabled; + json.userPanningEnabled = _p.userPanningEnabled; + json.pan = copy(_p.pan); + json.boxSelectionEnabled = _p.boxSelectionEnabled; + json.renderer = copy(options.renderer); + json.hideEdgesOnViewport = options.hideEdgesOnViewport; + json.textureOnViewport = options.textureOnViewport; + json.wheelSensitivity = options.wheelSensitivity; + json.motionBlur = options.motionBlur; + json.multiClickDebounceTime = options.multiClickDebounceTime; + return json; + } + } + }); + corefn.$id = corefn.getElementById; + [corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) { + extend(corefn, props); + }); + + /* eslint-disable no-unused-vars */ + + var defaults$7 = { + fit: true, + // whether to fit the viewport to the graph + directed: false, + // whether the tree is directed downwards (or edges can point in any direction if false) + padding: 30, + // padding on fit + circle: false, + // put depths in concentric circles if true, put depths top down if false + grid: false, + // whether to create an even grid into which the DAG is placed (circle:false only) + spacingFactor: 1.75, + // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + roots: undefined, + // the roots of the trees + maximal: false, + // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only) + depthSort: undefined, + // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled, + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + + }; + /* eslint-enable */ + + var getInfo = function getInfo(ele) { + return ele.scratch('breadthfirst'); + }; + + var setInfo = function setInfo(ele, obj) { + return ele.scratch('breadthfirst', obj); + }; + + function BreadthFirstLayout(options) { + this.options = extend({}, defaults$7, options); + } + + BreadthFirstLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().filter(function (n) { + return !n.isParent(); + }); + var graph = eles; + var directed = options.directed; + var maximal = options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code + + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var roots; + + if (elementOrCollection(options.roots)) { + roots = options.roots; + } else if (array(options.roots)) { + var rootsArray = []; + + for (var i = 0; i < options.roots.length; i++) { + var id = options.roots[i]; + var ele = cy.getElementById(id); + rootsArray.push(ele); + } + + roots = cy.collection(rootsArray); + } else if (string(options.roots)) { + roots = cy.$(options.roots); + } else { + if (directed) { + roots = nodes.roots(); + } else { + var components = eles.components(); + roots = cy.collection(); + + var _loop = function _loop(_i) { + var comp = components[_i]; + var maxDegree = comp.maxDegree(false); + var compRoots = comp.filter(function (ele) { + return ele.degree(false) === maxDegree; + }); + roots = roots.add(compRoots); + }; + + for (var _i = 0; _i < components.length; _i++) { + _loop(_i); + } + } + } + + var depths = []; + var foundByBfs = {}; + + var addToDepth = function addToDepth(ele, d) { + if (depths[d] == null) { + depths[d] = []; + } + + var i = depths[d].length; + depths[d].push(ele); + setInfo(ele, { + index: i, + depth: d + }); + }; + + var changeDepth = function changeDepth(ele, newDepth) { + var _getInfo = getInfo(ele), + depth = _getInfo.depth, + index = _getInfo.index; + + depths[depth][index] = null; + addToDepth(ele, newDepth); + }; // find the depths of the nodes + + + graph.bfs({ + roots: roots, + directed: options.directed, + visit: function visit(node, edge, pNode, i, depth) { + var ele = node[0]; + var id = ele.id(); + addToDepth(ele, depth); + foundByBfs[id] = true; + } + }); // check for nodes not found by bfs + + var orphanNodes = []; + + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _ele = nodes[_i2]; + + if (foundByBfs[_ele.id()]) { + continue; + } else { + orphanNodes.push(_ele); + } + } // assign the nodes a depth and index + + + var assignDepthsAt = function assignDepthsAt(i) { + var eles = depths[i]; + + for (var j = 0; j < eles.length; j++) { + var _ele2 = eles[j]; + + if (_ele2 == null) { + eles.splice(j, 1); + j--; + continue; + } + + setInfo(_ele2, { + depth: i, + index: j + }); + } + }; + + var assignDepths = function assignDepths() { + for (var _i3 = 0; _i3 < depths.length; _i3++) { + assignDepthsAt(_i3); + } + }; + + var adjustMaximally = function adjustMaximally(ele, shifted) { + var eInfo = getInfo(ele); + var incomers = ele.incomers().filter(function (el) { + return el.isNode() && eles.has(el); + }); + var maxDepth = -1; + var id = ele.id(); + + for (var k = 0; k < incomers.length; k++) { + var incmr = incomers[k]; + var iInfo = getInfo(incmr); + maxDepth = Math.max(maxDepth, iInfo.depth); + } + + if (eInfo.depth <= maxDepth) { + if (shifted[id]) { + return null; + } + + changeDepth(ele, maxDepth + 1); + shifted[id] = true; + return true; + } + + return false; + }; // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1) + + + if (directed && maximal) { + var Q = []; + var shifted = {}; + + var enqueue = function enqueue(n) { + return Q.push(n); + }; + + var dequeue = function dequeue() { + return Q.shift(); + }; + + nodes.forEach(function (n) { + return Q.push(n); + }); + + while (Q.length > 0) { + var _ele3 = dequeue(); + + var didShift = adjustMaximally(_ele3, shifted); + + if (didShift) { + _ele3.outgoers().filter(function (el) { + return el.isNode() && eles.has(el); + }).forEach(enqueue); + } else if (didShift === null) { + warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.'); + break; // exit on failure + } + } + } + + assignDepths(); // clear holes + // find min distance we need to leave between nodes + + var minDistance = 0; + + if (options.avoidOverlap) { + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + var n = nodes[_i4]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + } // get the weighted percent for an element based on its connectivity to other levels + + + var cachedWeightedPercent = {}; + + var getWeightedPercent = function getWeightedPercent(ele) { + if (cachedWeightedPercent[ele.id()]) { + return cachedWeightedPercent[ele.id()]; + } + + var eleDepth = getInfo(ele).depth; + var neighbors = ele.neighborhood(); + var percent = 0; + var samples = 0; + + for (var _i5 = 0; _i5 < neighbors.length; _i5++) { + var neighbor = neighbors[_i5]; + + if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) { + continue; + } + + var bf = getInfo(neighbor); + + if (bf == null) { + continue; + } + + var index = bf.index; + var depth = bf.depth; // unassigned neighbours shouldn't affect the ordering + + if (index == null || depth == null) { + continue; + } + + var nDepth = depths[depth].length; + + if (depth < eleDepth) { + // only get influenced by elements above + percent += index / nDepth; + samples++; + } + } + + samples = Math.max(1, samples); + percent = percent / samples; + + if (samples === 0) { + // put lone nodes at the start + percent = 0; + } + + cachedWeightedPercent[ele.id()] = percent; + return percent; + }; // rearrange the indices in each depth level based on connectivity + + + var sortFn = function sortFn(a, b) { + var apct = getWeightedPercent(a); + var bpct = getWeightedPercent(b); + var diff = apct - bpct; + + if (diff === 0) { + return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons + } else { + return diff; + } + }; + + if (options.depthSort !== undefined) { + sortFn = options.depthSort; + } // sort each level to make connected nodes closer + + + for (var _i6 = 0; _i6 < depths.length; _i6++) { + depths[_i6].sort(sortFn); + + assignDepthsAt(_i6); + } // assign orphan nodes to a new top-level depth + + + var orphanDepth = []; + + for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { + orphanDepth.push(orphanNodes[_i7]); + } + + depths.unshift(orphanDepth); + assignDepths(); + var biggestDepthSize = 0; + + for (var _i8 = 0; _i8 < depths.length; _i8++) { + biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); + } + + var center = { + x: bb.x1 + bb.w / 2, + y: bb.x1 + bb.h / 2 + }; + var maxDepthSize = depths.reduce(function (max, eles) { + return Math.max(max, eles.length); + }, 0); + + var getPosition = function getPosition(ele) { + var _getInfo2 = getInfo(ele), + depth = _getInfo2.depth, + index = _getInfo2.index; + + var depthSize = depths[depth].length; + var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance); + var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); + var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); + radiusStepSize = Math.max(radiusStepSize, minDistance); + + if (!options.circle) { + var epos = { + x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX, + y: (depth + 1) * distanceY + }; + return epos; + } else { + var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); + var theta = 2 * Math.PI / depths[depth].length * index; + + if (depth === 0 && depths[0].length === 1) { + radius = 1; + } + + return { + x: center.x + radius * Math.cos(theta), + y: center.y + radius * Math.sin(theta) + }; + } + }; + + eles.nodes().layoutPositions(this, options, getPosition); + return this; // chaining + }; + + var defaults$6 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox and radius if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + radius: undefined, + // the radius of the circle + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: undefined, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + sort: undefined, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + + }; + + function CircleLayout(options) { + this.options = extend({}, defaults$6, options); + } + + CircleLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; + var nodes = eles.nodes().not(':parent'); + + if (options.sort) { + nodes = nodes.sort(options.sort); + } + + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep; + var dTheta = sweep / Math.max(1, nodes.length - 1); + var r; + var minDistance = 0; + + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + + if (number$1(options.radius)) { + r = options.radius; + } else if (nodes.length <= 1) { + r = 0; + } else { + r = Math.min(bb.h, bb.w) / 2 - minDistance; + } // calculate the radius + + + if (nodes.length > 1 && options.avoidOverlap) { + // but only if more than one node (can't overlap) + minDistance *= 1.75; // just to have some nice spacing + + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping + + r = Math.max(rMin, r); + } + + var getPos = function getPos(ele, i) { + var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1); + var rx = r * Math.cos(theta); + var ry = r * Math.sin(theta); + var pos = { + x: center.x + rx, + y: center.y + ry + }; + return pos; + }; + + eles.nodes().layoutPositions(this, options, getPos); + return this; // chaining + }; + + var defaults$5 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: undefined, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + equidistant: false, + // whether levels have an equal radial distance betwen them, may cause bounding box overflow + minNodeSpacing: 10, + // min spacing between outside of nodes (used for radius adjustment) + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + height: undefined, + // height of layout area (overrides container height) + width: undefined, + // width of layout area (overrides container width) + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + concentric: function concentric(node) { + // returns numeric value for each node, placing higher nodes in levels towards the centre + return node.degree(); + }, + levelWidth: function levelWidth(nodes) { + // the variation of concentric values in each level + return nodes.maxDegree() / 4; + }, + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + + }; + + function ConcentricLayout(options) { + this.options = extend({}, defaults$5, options); + } + + ConcentricLayout.prototype.run = function () { + var params = this.options; + var options = params; + var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().not(':parent'); + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var nodeValues = []; // { node, value } + + var maxNodeSize = 0; + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var value = void 0; // calculate the node value + + value = options.concentric(node); + nodeValues.push({ + value: value, + node: node + }); // for style mapping + + node._private.scratch.concentric = value; + } // in case we used the `concentric` in style + + + nodes.updateStyle(); // calculate max size now based on potentially updated mappers + + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + + var nbb = _node.layoutDimensions(options); + + maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); + } // sort node values in descreasing order + + + nodeValues.sort(function (a, b) { + return b.value - a.value; + }); + var levelWidth = options.levelWidth(nodes); // put the values into levels + + var levels = [[]]; + var currentLevel = levels[0]; + + for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { + var val = nodeValues[_i2]; + + if (currentLevel.length > 0) { + var diff = Math.abs(currentLevel[0].value - val.value); + + if (diff >= levelWidth) { + currentLevel = []; + levels.push(currentLevel); + } + } + + currentLevel.push(val); + } // create positions from levels + + + var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes + + if (!options.avoidOverlap) { + // then strictly constrain to bb + var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; + var maxR = Math.min(bb.w, bb.h) / 2 - minDist; + var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); + minDist = Math.min(minDist, rStep); + } // find the metrics for each level + + + var r = 0; + + for (var _i3 = 0; _i3 < levels.length; _i3++) { + var level = levels[_i3]; + var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep; + var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); // calculate the radius + + if (level.length > 1 && options.avoidOverlap) { + // but only if more than one node (can't overlap) + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping + + r = Math.max(rMin, r); + } + + level.r = r; + r += minDist; + } + + if (options.equidistant) { + var rDeltaMax = 0; + var _r = 0; + + for (var _i4 = 0; _i4 < levels.length; _i4++) { + var _level = levels[_i4]; + var rDelta = _level.r - _r; + rDeltaMax = Math.max(rDeltaMax, rDelta); + } + + _r = 0; + + for (var _i5 = 0; _i5 < levels.length; _i5++) { + var _level2 = levels[_i5]; + + if (_i5 === 0) { + _r = _level2.r; + } + + _level2.r = _r; + _r += rDeltaMax; + } + } // calculate the node positions + + + var pos = {}; // id => position + + for (var _i6 = 0; _i6 < levels.length; _i6++) { + var _level3 = levels[_i6]; + var _dTheta = _level3.dTheta; + var _r2 = _level3.r; + + for (var j = 0; j < _level3.length; j++) { + var _val = _level3[j]; + var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j; + var p = { + x: center.x + _r2 * Math.cos(theta), + y: center.y + _r2 * Math.sin(theta) + }; + pos[_val.node.id()] = p; + } + } // position the nodes + + + eles.nodes().layoutPositions(this, options, function (ele) { + var id = ele.id(); + return pos[id]; + }); + return this; // chaining + }; + + /* + The CoSE layout was written by Gerardo Huck. + https://www.linkedin.com/in/gerardohuck/ + + Based on the following article: + http://dl.acm.org/citation.cfm?id=1498047 + + Modifications tracked on Github. + */ + var DEBUG; + /** + * @brief : default layout options + */ + + var defaults$4 = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // Whether to animate while running the layout + // true : Animate continuously as the layout is running + // false : Just show the end result + // 'end' : Animate with the end result, from the initial positions to the end positions + animate: true, + // Easing of the animation for animate:'end' + animationEasing: undefined, + // The duration of the animation for animate:'end' + animationDuration: undefined, + // A function that determines whether the node should be animated + // All nodes animated by default on animate enabled + // Non-animated nodes are positioned immediately when the layout starts + animateFilter: function animateFilter(node, i) { + return true; + }, + // The layout animates only after this many milliseconds for animate:true + // (prevents flashing on fast runs) + animationThreshold: 250, + // Number of iterations between consecutive screen positions update + refresh: 20, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 30, + // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + boundingBox: undefined, + // Excludes the label when calculating node bounding boxes for the layout algorithm + nodeDimensionsIncludeLabels: false, + // Randomize the initial positions of the nodes (true) or use existing positions (false) + randomize: false, + // Extra spacing between components in non-compound graphs + componentSpacing: 40, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function nodeRepulsion(node) { + return 2048; + }, + // Node repulsion (overlapping) multiplier + nodeOverlap: 4, + // Ideal edge (non nested) length + idealEdgeLength: function idealEdgeLength(edge) { + return 32; + }, + // Divisor to compute edge forces + edgeElasticity: function edgeElasticity(edge) { + return 32; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 1.2, + // Gravity force (constant) + gravity: 1, + // Maximum number of iterations to perform + numIter: 1000, + // Initial temperature (maximum node displacement) + initialTemp: 1000, + // Cooling factor (how the temperature is reduced between consecutive iterations + coolingFactor: 0.99, + // Lower temperature threshold (below this point the layout will end) + minTemp: 1.0 + }; + /** + * @brief : constructor + * @arg options : object containing layout options + */ + + function CoseLayout(options) { + this.options = extend({}, defaults$4, options); + this.options.layout = this; + } + /** + * @brief : runs the layout + */ + + + CoseLayout.prototype.run = function () { + var options = this.options; + var cy = options.cy; + var layout = this; + layout.stopped = false; + + if (options.animate === true || options.animate === false) { + layout.emit({ + type: 'layoutstart', + layout: layout + }); + } // Set DEBUG - Global variable + + + if (true === options.debug) { + DEBUG = true; + } else { + DEBUG = false; + } // Initialize layout info + + + var layoutInfo = createLayoutInfo(cy, layout, options); // Show LayoutInfo contents if debugging + + if (DEBUG) { + printLayoutInfo(layoutInfo); + } // If required, randomize node positions + + + if (options.randomize) { + randomizePositions(layoutInfo); + } + + var startTime = performanceNow(); + + var refresh = function refresh() { + refreshPositions(layoutInfo, cy, options); // Fit the graph if necessary + + if (true === options.fit) { + cy.fit(options.padding); + } + }; + + var mainLoop = function mainLoop(i) { + if (layout.stopped || i >= options.numIter) { + // logDebug("Layout manually stopped. Stopping computation in step " + i); + return false; + } // Do one step in the phisical simulation + + + step(layoutInfo, options); // Update temperature + + layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor; // logDebug("New temperature: " + layoutInfo.temperature); + + if (layoutInfo.temperature < options.minTemp) { + // logDebug("Temperature drop below minimum threshold. Stopping computation in step " + i); + return false; + } + + return true; + }; + + var done = function done() { + if (options.animate === true || options.animate === false) { + refresh(); // Layout has finished + + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + } else { + var nodes = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); + nodes.layoutPositions(layout, options, getScaledPos); + } + }; + + var i = 0; + var loopRet = true; + + if (options.animate === true) { + var frame = function frame() { + var f = 0; + + while (loopRet && f < options.refresh) { + loopRet = mainLoop(i); + i++; + f++; + } + + if (!loopRet) { + // it's done + separateComponents(layoutInfo, options); + done(); + } else { + var now = performanceNow(); + + if (now - startTime >= options.animationThreshold) { + refresh(); + } + + requestAnimationFrame(frame); + } + }; + + frame(); + } else { + while (loopRet) { + loopRet = mainLoop(i); + i++; + } + + separateComponents(layoutInfo, options); + done(); + } + + return this; // chaining + }; + /** + * @brief : called on continuous layouts to stop them before they finish + */ + + + CoseLayout.prototype.stop = function () { + this.stopped = true; + + if (this.thread) { + this.thread.stop(); + } + + this.emit('layoutstop'); + return this; // chaining + }; + + CoseLayout.prototype.destroy = function () { + if (this.thread) { + this.thread.stop(); + } + + return this; // chaining + }; + /** + * @brief : Creates an object which is contains all the data + * used in the layout process + * @arg cy : cytoscape.js object + * @return : layoutInfo object initialized + */ + + + var createLayoutInfo = function createLayoutInfo(cy, layout, options) { + // Shortcut + var edges = options.eles.edges(); + var nodes = options.eles.nodes(); + var layoutInfo = { + isCompound: cy.hasCompoundNodes(), + layoutNodes: [], + idToIndex: {}, + nodeSize: nodes.size(), + graphSet: [], + indexToGraph: [], + layoutEdges: [], + edgeSize: edges.size(), + temperature: options.initialTemp, + clientWidth: cy.width(), + clientHeight: cy.width(), + boundingBox: makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }) + }; + var components = options.eles.components(); + var id2cmptId = {}; + + for (var i = 0; i < components.length; i++) { + var component = components[i]; + + for (var j = 0; j < component.length; j++) { + var node = component[j]; + id2cmptId[node.id()] = i; + } + } // Iterate over all nodes, creating layout nodes + + + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = nodes[i]; + var nbb = n.layoutDimensions(options); + var tempNode = {}; + tempNode.isLocked = n.locked(); + tempNode.id = n.data('id'); + tempNode.parentId = n.data('parent'); + tempNode.cmptId = id2cmptId[n.id()]; + tempNode.children = []; + tempNode.positionX = n.position('x'); + tempNode.positionY = n.position('y'); + tempNode.offsetX = 0; + tempNode.offsetY = 0; + tempNode.height = nbb.w; + tempNode.width = nbb.h; + tempNode.maxX = tempNode.positionX + tempNode.width / 2; + tempNode.minX = tempNode.positionX - tempNode.width / 2; + tempNode.maxY = tempNode.positionY + tempNode.height / 2; + tempNode.minY = tempNode.positionY - tempNode.height / 2; + tempNode.padLeft = parseFloat(n.style('padding')); + tempNode.padRight = parseFloat(n.style('padding')); + tempNode.padTop = parseFloat(n.style('padding')); + tempNode.padBottom = parseFloat(n.style('padding')); // forces + + tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion; // Add new node + + layoutInfo.layoutNodes.push(tempNode); // Add entry to id-index map + + layoutInfo.idToIndex[tempNode.id] = i; + } // Inline implementation of a queue, used for traversing the graph in BFS order + + + var queue = []; + var start = 0; // Points to the start the queue + + var end = -1; // Points to the end of the queue + + var tempGraph = []; // Second pass to add child information and + // initialize queue for hierarchical traversal + + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + var p_id = n.parentId; // Check if node n has a parent node + + if (null != p_id) { + // Add node Id to parent's list of children + layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); + } else { + // If a node doesn't have a parent, then it's in the root graph + queue[++end] = n.id; + tempGraph.push(n.id); + } + } // Add root graph to graphSet + + + layoutInfo.graphSet.push(tempGraph); // Traverse the graph, level by level, + + while (start <= end) { + // Get the node to visit and remove it from queue + var node_id = queue[start++]; + var node_ix = layoutInfo.idToIndex[node_id]; + var node = layoutInfo.layoutNodes[node_ix]; + var children = node.children; + + if (children.length > 0) { + // Add children nodes as a new graph to graph set + layoutInfo.graphSet.push(children); // Add children to que queue to be visited + + for (var i = 0; i < children.length; i++) { + queue[++end] = children[i]; + } + } + } // Create indexToGraph map + + + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + + for (var j = 0; j < graph.length; j++) { + var index = layoutInfo.idToIndex[graph[j]]; + layoutInfo.indexToGraph[index] = i; + } + } // Iterate over all edges, creating Layout Edges + + + for (var i = 0; i < layoutInfo.edgeSize; i++) { + var e = edges[i]; + var tempEdge = {}; + tempEdge.id = e.data('id'); + tempEdge.sourceId = e.data('source'); + tempEdge.targetId = e.data('target'); // Compute ideal length + + var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength; + var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity; // Check if it's an inter graph edge + + var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; + var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; + var sourceGraph = layoutInfo.indexToGraph[sourceIx]; + var targetGraph = layoutInfo.indexToGraph[targetIx]; + + if (sourceGraph != targetGraph) { + // Find lowest common graph ancestor + var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); // Compute sum of node depths, relative to lca graph + + var lcaGraph = layoutInfo.graphSet[lca]; + var depth = 0; // Source depth + + var tempNode = layoutInfo.layoutNodes[sourceIx]; + + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } // Target depth + + + tempNode = layoutInfo.layoutNodes[targetIx]; + + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId + + // ". Index: " + lca + " Contents: " + lcaGraph.toString() + + // ". Depth: " + depth); + // Update idealLength + + + idealLength *= depth * options.nestingFactor; + } + + tempEdge.idealLength = idealLength; + tempEdge.elasticity = elasticity; + layoutInfo.layoutEdges.push(tempEdge); + } // Finally, return layoutInfo object + + + return layoutInfo; + }; + /** + * @brief : This function finds the index of the lowest common + * graph ancestor between 2 nodes in the subtree + * (from the graph hierarchy induced tree) whose + * root is graphIx + * + * @arg node1: node1's ID + * @arg node2: node2's ID + * @arg layoutInfo: layoutInfo object + * + */ + + + var findLCA = function findLCA(node1, node2, layoutInfo) { + // Find their common ancester, starting from the root graph + var res = findLCA_aux(node1, node2, 0, layoutInfo); + + if (2 > res.count) { + // If aux function couldn't find the common ancester, + // then it is the root graph + return 0; + } else { + return res.graph; + } + }; + /** + * @brief : Auxiliary function used for LCA computation + * + * @arg node1 : node1's ID + * @arg node2 : node2's ID + * @arg graphIx : subgraph index + * @arg layoutInfo : layoutInfo object + * + * @return : object of the form {count: X, graph: Y}, where: + * X is the number of ancesters (max: 2) found in + * graphIx (and it's subgraphs), + * Y is the graph index of the lowest graph containing + * all X nodes + */ + + + var findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) { + var graph = layoutInfo.graphSet[graphIx]; // If both nodes belongs to graphIx + + if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { + return { + count: 2, + graph: graphIx + }; + } // Make recursive calls for all subgraphs + + + var c = 0; + + for (var i = 0; i < graph.length; i++) { + var nodeId = graph[i]; + var nodeIx = layoutInfo.idToIndex[nodeId]; + var children = layoutInfo.layoutNodes[nodeIx].children; // If the node has no child, skip it + + if (0 === children.length) { + continue; + } + + var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; + var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo); + + if (0 === result.count) { + // Neither node1 nor node2 are present in this subgraph + continue; + } else if (1 === result.count) { + // One of (node1, node2) is present in this subgraph + c++; + + if (2 === c) { + // We've already found both nodes, no need to keep searching + break; + } + } else { + // Both nodes are present in this subgraph + return result; + } + } + + return { + count: c, + graph: graphIx + }; + }; + /** + * @brief: printsLayoutInfo into js console + * Only used for debbuging + */ + + +var printLayoutInfo; + /** + * @brief : Randomizes the position of all nodes + */ + + + var randomizePositions = function randomizePositions(layoutInfo, cy) { + var width = layoutInfo.clientWidth; + var height = layoutInfo.clientHeight; + + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; // No need to randomize compound nodes or locked nodes + + if (0 === n.children.length && !n.isLocked) { + n.positionX = Math.random() * width; + n.positionY = Math.random() * height; + } + } + }; + + var getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) { + var bb = layoutInfo.boundingBox; + var coseBB = { + x1: Infinity, + x2: -Infinity, + y1: Infinity, + y2: -Infinity + }; + + if (options.boundingBox) { + nodes.forEach(function (node) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]]; + coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); + coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); + coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); + coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); + }); + coseBB.w = coseBB.x2 - coseBB.x1; + coseBB.h = coseBB.y2 - coseBB.y1; + } + + return function (ele, i) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]]; + + if (options.boundingBox) { + // then add extra bounding box constraint + var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; + var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; + return { + x: bb.x1 + pctX * bb.w, + y: bb.y1 + pctY * bb.h + }; + } else { + return { + x: lnode.positionX, + y: lnode.positionY + }; + } + }; + }; + /** + * @brief : Updates the positions of nodes in the network + * @arg layoutInfo : LayoutInfo object + * @arg cy : Cytoscape object + * @arg options : Layout options + */ + + + var refreshPositions = function refreshPositions(layoutInfo, cy, options) { + // var s = 'Refreshing positions'; + // logDebug(s); + var layout = options.layout; + var nodes = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); + nodes.positions(getScaledPos); // Trigger layoutReady only on first call + + if (true !== layoutInfo.ready) { + // s = 'Triggering layoutready'; + // logDebug(s); + layoutInfo.ready = true; + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: this + }); + } + }; + /** + * @brief : Logs a debug message in JS console, if DEBUG is ON + */ + // var logDebug = function(text) { + // if (DEBUG) { + // console.debug(text); + // } + // }; + + /** + * @brief : Performs one iteration of the physical simulation + * @arg layoutInfo : LayoutInfo object already initialized + * @arg cy : Cytoscape object + * @arg options : Layout options + */ + + + var step = function step(layoutInfo, options, _step) { + // var s = "\n\n###############################"; + // s += "\nSTEP: " + step; + // s += "\n###############################\n"; + // logDebug(s); + // Calculate node repulsions + calculateNodeForces(layoutInfo, options); // Calculate edge forces + + calculateEdgeForces(layoutInfo); // Calculate gravity forces + + calculateGravityForces(layoutInfo, options); // Propagate forces from parent to child + + propagateForces(layoutInfo); // Update positions based on calculated forces + + updatePositions(layoutInfo); + }; + /** + * @brief : Computes the node repulsion forces + */ + + + var calculateNodeForces = function calculateNodeForces(layoutInfo, options) { + // Go through each of the graphs in graphSet + // Nodes only repel each other if they belong to the same graph + // var s = 'calculateNodeForces'; + // logDebug(s); + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + var numNodes = graph.length; // s = "Set: " + graph.toString(); + // logDebug(s); + // Now get all the pairs of nodes + // Only get each pair once, (A, B) = (B, A) + + for (var j = 0; j < numNodes; j++) { + var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + + for (var k = j + 1; k < numNodes; k++) { + var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; + nodeRepulsion(node1, node2, layoutInfo, options); + } + } + } + }; + + var randomDistance = function randomDistance(max) { + return -max + 2 * max * Math.random(); + }; + /** + * @brief : Compute the node repulsion forces between a pair of nodes + */ + + + var nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) { + // var s = "Node repulsion. Node1: " + node1.id + " Node2: " + node2.id; + var cmptId1 = node1.cmptId; + var cmptId2 = node2.cmptId; + + if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { + return; + } // Get direction of line connecting both node centers + + + var directionX = node2.positionX - node1.positionX; + var directionY = node2.positionY - node1.positionY; + var maxRandDist = 1; // s += "\ndirectionX: " + directionX + ", directionY: " + directionY; + // If both centers are the same, apply a random force + + if (0 === directionX && 0 === directionY) { + directionX = randomDistance(maxRandDist); + directionY = randomDistance(maxRandDist); + } + + var overlap = nodesOverlap(node1, node2, directionX, directionY); + + if (overlap > 0) { + // s += "\nNodes DO overlap."; + // s += "\nOverlap: " + overlap; + // If nodes overlap, repulsion force is proportional + // to the overlap + var force = options.nodeOverlap * overlap; // Compute the module and components of the force vector + + var distance = Math.sqrt(directionX * directionX + directionY * directionY); // s += "\nDistance: " + distance; + + var forceX = force * directionX / distance; + var forceY = force * directionY / distance; + } else { + // s += "\nNodes do NOT overlap."; + // If there's no overlap, force is inversely proportional + // to squared distance + // Get clipping points for both nodes + var point1 = findClippingPoint(node1, directionX, directionY); + var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); // Use clipping points to compute distance + + var distanceX = point2.x - point1.x; + var distanceY = point2.y - point1.y; + var distanceSqr = distanceX * distanceX + distanceY * distanceY; + var distance = Math.sqrt(distanceSqr); // s += "\nDistance: " + distance; + // Compute the module and components of the force vector + + var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; + var forceX = force * distanceX / distance; + var forceY = force * distanceY / distance; + } // Apply force + + + if (!node1.isLocked) { + node1.offsetX -= forceX; + node1.offsetY -= forceY; + } + + if (!node2.isLocked) { + node2.offsetX += forceX; + node2.offsetY += forceY; + } // s += "\nForceX: " + forceX + " ForceY: " + forceY; + // logDebug(s); + + + return; + }; + /** + * @brief : Determines whether two nodes overlap or not + * @return : Amount of overlapping (0 => no overlap) + */ + + + var nodesOverlap = function nodesOverlap(node1, node2, dX, dY) { + if (dX > 0) { + var overlapX = node1.maxX - node2.minX; + } else { + var overlapX = node2.maxX - node1.minX; + } + + if (dY > 0) { + var overlapY = node1.maxY - node2.minY; + } else { + var overlapY = node2.maxY - node1.minY; + } + + if (overlapX >= 0 && overlapY >= 0) { + return Math.sqrt(overlapX * overlapX + overlapY * overlapY); + } else { + return 0; + } + }; + /** + * @brief : Finds the point in which an edge (direction dX, dY) intersects + * the rectangular bounding box of it's source/target node + */ + + + var findClippingPoint = function findClippingPoint(node, dX, dY) { + // Shorcuts + var X = node.positionX; + var Y = node.positionY; + var H = node.height || 1; + var W = node.width || 1; + var dirSlope = dY / dX; + var nodeSlope = H / W; // var s = 'Computing clipping point of node ' + node.id + + // " . Height: " + H + ", Width: " + W + + // "\nDirection " + dX + ", " + dY; + // + // Compute intersection + + var res = {}; // Case: Vertical direction (up) + + if (0 === dX && 0 < dY) { + res.x = X; // s += "\nUp direction"; + + res.y = Y + H / 2; + return res; + } // Case: Vertical direction (down) + + + if (0 === dX && 0 > dY) { + res.x = X; + res.y = Y + H / 2; // s += "\nDown direction"; + + return res; + } // Case: Intersects the right border + + + if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X + W / 2; + res.y = Y + W * dY / 2 / dX; // s += "\nRightborder"; + + return res; + } // Case: Intersects the left border + + + if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X - W / 2; + res.y = Y - W * dY / 2 / dX; // s += "\nLeftborder"; + + return res; + } // Case: Intersects the top border + + + if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X + H * dX / 2 / dY; + res.y = Y + H / 2; // s += "\nTop border"; + + return res; + } // Case: Intersects the bottom border + + + if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X - H * dX / 2 / dY; + res.y = Y - H / 2; // s += "\nBottom border"; + + return res; + } // s += "\nClipping point found at " + res.x + ", " + res.y; + // logDebug(s); + + + return res; + }; + /** + * @brief : Calculates all edge forces + */ + + + var calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) { + // Iterate over all edges + for (var i = 0; i < layoutInfo.edgeSize; i++) { + // Get edge, source & target nodes + var edge = layoutInfo.layoutEdges[i]; + var sourceIx = layoutInfo.idToIndex[edge.sourceId]; + var source = layoutInfo.layoutNodes[sourceIx]; + var targetIx = layoutInfo.idToIndex[edge.targetId]; + var target = layoutInfo.layoutNodes[targetIx]; // Get direction of line connecting both node centers + + var directionX = target.positionX - source.positionX; + var directionY = target.positionY - source.positionY; // If both centers are the same, do nothing. + // A random force has already been applied as node repulsion + + if (0 === directionX && 0 === directionY) { + continue; + } // Get clipping points for both nodes + + + var point1 = findClippingPoint(source, directionX, directionY); + var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); + var lx = point2.x - point1.x; + var ly = point2.y - point1.y; + var l = Math.sqrt(lx * lx + ly * ly); + var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; + + if (0 !== l) { + var forceX = force * lx / l; + var forceY = force * ly / l; + } else { + var forceX = 0; + var forceY = 0; + } // Add this force to target and source nodes + + + if (!source.isLocked) { + source.offsetX += forceX; + source.offsetY += forceY; + } + + if (!target.isLocked) { + target.offsetX -= forceX; + target.offsetY -= forceY; + } // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id; + // s += "\nDistance: " + l + " Force: (" + forceX + ", " + forceY + ")"; + // logDebug(s); + + } + }; + /** + * @brief : Computes gravity forces for all nodes + */ + + + var calculateGravityForces = function calculateGravityForces(layoutInfo, options) { + if (options.gravity === 0) { + return; + } + + var distThreshold = 1; // var s = 'calculateGravityForces'; + // logDebug(s); + + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + var numNodes = graph.length; // s = "Set: " + graph.toString(); + // logDebug(s); + // Compute graph center + + if (0 === i) { + var centerX = layoutInfo.clientHeight / 2; + var centerY = layoutInfo.clientWidth / 2; + } else { + // Get Parent node for this graph, and use its position as center + var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; + var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; + var centerX = parent.positionX; + var centerY = parent.positionY; + } // s = "Center found at: " + centerX + ", " + centerY; + // logDebug(s); + // Apply force to all nodes in graph + + + for (var j = 0; j < numNodes; j++) { + var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; // s = "Node: " + node.id; + + if (node.isLocked) { + continue; + } + + var dx = centerX - node.positionX; + var dy = centerY - node.positionY; + var d = Math.sqrt(dx * dx + dy * dy); + + if (d > distThreshold) { + var fx = options.gravity * dx / d; + var fy = options.gravity * dy / d; + node.offsetX += fx; + node.offsetY += fy; // s += ": Applied force: " + fx + ", " + fy; + } // logDebug(s); + + } + } + }; + /** + * @brief : This function propagates the existing offsets from + * parent nodes to its descendents. + * @arg layoutInfo : layoutInfo Object + * @arg cy : cytoscape Object + * @arg options : Layout options + */ + + + var propagateForces = function propagateForces(layoutInfo, options) { + // Inline implementation of a queue, used for traversing the graph in BFS order + var queue = []; + var start = 0; // Points to the start the queue + + var end = -1; // Points to the end of the queue + // logDebug('propagateForces'); + // Start by visiting the nodes in the root graph + + queue.push.apply(queue, layoutInfo.graphSet[0]); + end += layoutInfo.graphSet[0].length; // Traverse the graph, level by level, + + while (start <= end) { + // Get the node to visit and remove it from queue + var nodeId = queue[start++]; + var nodeIndex = layoutInfo.idToIndex[nodeId]; + var node = layoutInfo.layoutNodes[nodeIndex]; + var children = node.children; // We only need to process the node if it's compound + + if (0 < children.length && !node.isLocked) { + var offX = node.offsetX; + var offY = node.offsetY; // var s = "Propagating offset from parent node : " + node.id + + // ". OffsetX: " + offX + ". OffsetY: " + offY; + // s += "\n Children: " + children.toString(); + // logDebug(s); + + for (var i = 0; i < children.length; i++) { + var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]]; // Propagate offset + + childNode.offsetX += offX; + childNode.offsetY += offY; // Add children to queue to be visited + + queue[++end] = children[i]; + } // Reset parent offsets + + + node.offsetX = 0; + node.offsetY = 0; + } + } + }; + /** + * @brief : Updates the layout model positions, based on + * the accumulated forces + */ + + + var updatePositions = function updatePositions(layoutInfo, options) { + // var s = 'Updating positions'; + // logDebug(s); + // Reset boundaries for compound nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + + if (0 < n.children.length) { + // logDebug("Resetting boundaries of compound node: " + n.id); + n.maxX = undefined; + n.minX = undefined; + n.maxY = undefined; + n.minY = undefined; + } + } + + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + + if (0 < n.children.length || n.isLocked) { + // No need to set compound or locked node position + // logDebug("Skipping position update of node: " + n.id); + continue; + } // s = "Node: " + n.id + " Previous position: (" + + // n.positionX + ", " + n.positionY + ")."; + // Limit displacement in order to improve stability + + + var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); + n.positionX += tempForce.x; + n.positionY += tempForce.y; + n.offsetX = 0; + n.offsetY = 0; + n.minX = n.positionX - n.width; + n.maxX = n.positionX + n.width; + n.minY = n.positionY - n.height; + n.maxY = n.positionY + n.height; // s += " New Position: (" + n.positionX + ", " + n.positionY + ")."; + // logDebug(s); + // Update ancestry boudaries + + updateAncestryBoundaries(n, layoutInfo); + } // Update size, position of compund nodes + + + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + + if (0 < n.children.length && !n.isLocked) { + n.positionX = (n.maxX + n.minX) / 2; + n.positionY = (n.maxY + n.minY) / 2; + n.width = n.maxX - n.minX; + n.height = n.maxY - n.minY; // s = "Updating position, size of compound node " + n.id; + // s += "\nPositionX: " + n.positionX + ", PositionY: " + n.positionY; + // s += "\nWidth: " + n.width + ", Height: " + n.height; + // logDebug(s); + } + } + }; + /** + * @brief : Limits a force (forceX, forceY) to be not + * greater (in modulo) than max. + 8 Preserves force direction. + */ + + + var limitForce = function limitForce(forceX, forceY, max) { + // var s = "Limiting force: (" + forceX + ", " + forceY + "). Max: " + max; + var force = Math.sqrt(forceX * forceX + forceY * forceY); + + if (force > max) { + var res = { + x: max * forceX / force, + y: max * forceY / force + }; + } else { + var res = { + x: forceX, + y: forceY + }; + } // s += ".\nResult: (" + res.x + ", " + res.y + ")"; + // logDebug(s); + + + return res; + }; + /** + * @brief : Function used for keeping track of compound node + * sizes, since they should bound all their subnodes. + */ + + + var updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) { + // var s = "Propagating new position/size of node " + node.id; + var parentId = node.parentId; + + if (null == parentId) { + // If there's no parent, we are done + // s += ". No parent node."; + // logDebug(s); + return; + } // Get Parent Node + + + var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; + var flag = false; // MaxX + + if (null == p.maxX || node.maxX + p.padRight > p.maxX) { + p.maxX = node.maxX + p.padRight; + flag = true; // s += "\nNew maxX for parent node " + p.id + ": " + p.maxX; + } // MinX + + + if (null == p.minX || node.minX - p.padLeft < p.minX) { + p.minX = node.minX - p.padLeft; + flag = true; // s += "\nNew minX for parent node " + p.id + ": " + p.minX; + } // MaxY + + + if (null == p.maxY || node.maxY + p.padBottom > p.maxY) { + p.maxY = node.maxY + p.padBottom; + flag = true; // s += "\nNew maxY for parent node " + p.id + ": " + p.maxY; + } // MinY + + + if (null == p.minY || node.minY - p.padTop < p.minY) { + p.minY = node.minY - p.padTop; + flag = true; // s += "\nNew minY for parent node " + p.id + ": " + p.minY; + } // If updated boundaries, propagate changes upward + + + if (flag) { + // logDebug(s); + return updateAncestryBoundaries(p, layoutInfo); + } // s += ". No changes in boundaries/position of parent node " + p.id; + // logDebug(s); + + + return; + }; + + var separateComponents = function separateComponents(layoutInfo, options) { + var nodes = layoutInfo.layoutNodes; + var components = []; + + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var cid = node.cmptId; + var component = components[cid] = components[cid] || []; + component.push(node); + } + + var totalA = 0; + + for (var i = 0; i < components.length; i++) { + var c = components[i]; + + if (!c) { + continue; + } + + c.x1 = Infinity; + c.x2 = -Infinity; + c.y1 = Infinity; + c.y2 = -Infinity; + + for (var j = 0; j < c.length; j++) { + var n = c[j]; + c.x1 = Math.min(c.x1, n.positionX - n.width / 2); + c.x2 = Math.max(c.x2, n.positionX + n.width / 2); + c.y1 = Math.min(c.y1, n.positionY - n.height / 2); + c.y2 = Math.max(c.y2, n.positionY + n.height / 2); + } + + c.w = c.x2 - c.x1; + c.h = c.y2 - c.y1; + totalA += c.w * c.h; + } + + components.sort(function (c1, c2) { + return c2.w * c2.h - c1.w * c1.h; + }); + var x = 0; + var y = 0; + var usedW = 0; + var rowH = 0; + var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; + + for (var i = 0; i < components.length; i++) { + var c = components[i]; + + if (!c) { + continue; + } + + for (var j = 0; j < c.length; j++) { + var n = c[j]; + + if (!n.isLocked) { + n.positionX += x - c.x1; + n.positionY += y - c.y1; + } + } + + x += c.w + options.componentSpacing; + usedW += c.w + options.componentSpacing; + rowH = Math.max(rowH, c.h); + + if (usedW > maxRowW) { + y += rowH + options.componentSpacing; + x = 0; + usedW = 0; + rowH = 0; + } + } + }; + + var defaults$3 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // padding used on fit + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + avoidOverlapPadding: 10, + // extra spacing around nodes when avoidOverlap: true + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + condense: false, + // uses all available space on false, uses minimal space on true + rows: undefined, + // force num of rows in the grid + cols: undefined, + // force num of columns in the grid + position: function position(node) {}, + // returns { row, col } for element + sort: undefined, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + + }; + + function GridLayout(options) { + this.options = extend({}, defaults$3, options); + } + + GridLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().not(':parent'); + + if (options.sort) { + nodes = nodes.sort(options.sort); + } + + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + + if (bb.h === 0 || bb.w === 0) { + eles.nodes().layoutPositions(this, options, function (ele) { + return { + x: bb.x1, + y: bb.y1 + }; + }); + } else { + // width/height * splits^2 = cells where splits is number of times to split width + var cells = nodes.size(); + var splits = Math.sqrt(cells * bb.h / bb.w); + var rows = Math.round(splits); + var cols = Math.round(bb.w / bb.h * splits); + + var small = function small(val) { + if (val == null) { + return Math.min(rows, cols); + } else { + var min = Math.min(rows, cols); + + if (min == rows) { + rows = val; + } else { + cols = val; + } + } + }; + + var large = function large(val) { + if (val == null) { + return Math.max(rows, cols); + } else { + var max = Math.max(rows, cols); + + if (max == rows) { + rows = val; + } else { + cols = val; + } + } + }; + + var oRows = options.rows; + var oCols = options.cols != null ? options.cols : options.columns; // if rows or columns were set in options, use those values + + if (oRows != null && oCols != null) { + rows = oRows; + cols = oCols; + } else if (oRows != null && oCols == null) { + rows = oRows; + cols = Math.ceil(cells / rows); + } else if (oRows == null && oCols != null) { + cols = oCols; + rows = Math.ceil(cells / cols); + } // otherwise use the automatic values and adjust accordingly + // if rounding was up, see if we can reduce rows or columns + else if (cols * rows > cells) { + var sm = small(); + var lg = large(); // reducing the small side takes away the most cells, so try it first + + if ((sm - 1) * lg >= cells) { + small(sm - 1); + } else if ((lg - 1) * sm >= cells) { + large(lg - 1); + } + } else { + // if rounding was too low, add rows or columns + while (cols * rows < cells) { + var _sm = small(); + + var _lg = large(); // try to add to larger side first (adds less in multiplication) + + + if ((_lg + 1) * _sm >= cells) { + large(_lg + 1); + } else { + small(_sm + 1); + } + } + } + + var cellWidth = bb.w / cols; + var cellHeight = bb.h / rows; + + if (options.condense) { + cellWidth = 0; + cellHeight = 0; + } + + if (options.avoidOverlap) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var pos = node._private.position; + + if (pos.x == null || pos.y == null) { + // for bb + pos.x = 0; + pos.y = 0; + } + + var nbb = node.layoutDimensions(options); + var p = options.avoidOverlapPadding; + var w = nbb.w + p; + var h = nbb.h + p; + cellWidth = Math.max(cellWidth, w); + cellHeight = Math.max(cellHeight, h); + } + } + + var cellUsed = {}; // e.g. 'c-0-2' => true + + var used = function used(row, col) { + return cellUsed['c-' + row + '-' + col] ? true : false; + }; + + var use = function use(row, col) { + cellUsed['c-' + row + '-' + col] = true; + }; // to keep track of current cell position + + + var row = 0; + var col = 0; + + var moveToNextCell = function moveToNextCell() { + col++; + + if (col >= cols) { + col = 0; + row++; + } + }; // get a cache of all the manual positions + + + var id2manPos = {}; + + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + var rcPos = options.position(_node); + + if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) { + // must have at least row or col def'd + var _pos = { + row: rcPos.row, + col: rcPos.col + }; + + if (_pos.col === undefined) { + // find unused col + _pos.col = 0; + + while (used(_pos.row, _pos.col)) { + _pos.col++; + } + } else if (_pos.row === undefined) { + // find unused row + _pos.row = 0; + + while (used(_pos.row, _pos.col)) { + _pos.row++; + } + } + + id2manPos[_node.id()] = _pos; + use(_pos.row, _pos.col); + } + } + + var getPos = function getPos(element, i) { + var x, y; + + if (element.locked() || element.isParent()) { + return false; + } // see if we have a manual position set + + + var rcPos = id2manPos[element.id()]; + + if (rcPos) { + x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1; + y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1; + } else { + // otherwise set automatically + while (used(row, col)) { + moveToNextCell(); + } + + x = col * cellWidth + cellWidth / 2 + bb.x1; + y = row * cellHeight + cellHeight / 2 + bb.y1; + use(row, col); + moveToNextCell(); + } + + return { + x: x, + y: y + }; + }; + + nodes.layoutPositions(this, options, getPos); + } + + return this; // chaining + }; + + var defaults$2 = { + ready: function ready() {}, + // on layoutready + stop: function stop() {} // on layoutstop + + }; // constructor + // options : object containing layout options + + function NullLayout(options) { + this.options = extend({}, defaults$2, options); + } // runs the layout + + + NullLayout.prototype.run = function () { + var options = this.options; + var eles = options.eles; // elements to consider in the layout + + var layout = this; // cy is automatically populated for us in the constructor + // (disable eslint for next line as this serves as example layout code to external developers) + // eslint-disable-next-line no-unused-vars + + options.cy; + layout.emit('layoutstart'); // puts all nodes at (0, 0) + // n.b. most layouts would use layoutPositions(), instead of positions() and manual events + + eles.nodes().positions(function () { + return { + x: 0, + y: 0 + }; + }); // trigger layoutready when each node has had its position set at least once + + layout.one('layoutready', options.ready); + layout.emit('layoutready'); // trigger layoutstop when the layout stops (e.g. finishes) + + layout.one('layoutstop', options.stop); + layout.emit('layoutstop'); + return this; // chaining + }; // called on continuous layouts to stop them before they finish + + + NullLayout.prototype.stop = function () { + return this; // chaining + }; + + var defaults$1 = { + positions: undefined, + // map of (node id) => (position obj); or function(node){ return somPos; } + zoom: undefined, + // the zoom level to set (prob want fit = false if set) + pan: undefined, + // the pan level to set (prob want fit = false if set) + fit: true, + // whether to fit to viewport + padding: 30, + // padding on fit + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + + }; + + function PresetLayout(options) { + this.options = extend({}, defaults$1, options); + } + + PresetLayout.prototype.run = function () { + var options = this.options; + var eles = options.eles; + var nodes = eles.nodes(); + var posIsFn = fn$6(options.positions); + + function getPosition(node) { + if (options.positions == null) { + return copyPosition(node.position()); + } + + if (posIsFn) { + return options.positions(node); + } + + var pos = options.positions[node._private.data.id]; + + if (pos == null) { + return null; + } + + return pos; + } + + nodes.layoutPositions(this, options, function (node, i) { + var position = getPosition(node); + + if (node.locked() || position == null) { + return false; + } + + return position; + }); + return this; // chaining + }; + + var defaults = { + fit: true, + // whether to fit to viewport + padding: 30, + // fit padding + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + + }; + + function RandomLayout(options) { + this.options = extend({}, defaults, options); + } + + RandomLayout.prototype.run = function () { + var options = this.options; + var cy = options.cy; + var eles = options.eles; + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + + var getPos = function getPos(node, i) { + return { + x: bb.x1 + Math.round(Math.random() * bb.w), + y: bb.y1 + Math.round(Math.random() * bb.h) + }; + }; + + eles.nodes().layoutPositions(this, options, getPos); + return this; // chaining + }; + + var layout = [{ + name: 'breadthfirst', + impl: BreadthFirstLayout + }, { + name: 'circle', + impl: CircleLayout + }, { + name: 'concentric', + impl: ConcentricLayout + }, { + name: 'cose', + impl: CoseLayout + }, { + name: 'grid', + impl: GridLayout + }, { + name: 'null', + impl: NullLayout + }, { + name: 'preset', + impl: PresetLayout + }, { + name: 'random', + impl: RandomLayout + }]; + + function NullRenderer(options) { + this.options = options; + this.notifications = 0; // for testing + } + + var noop = function noop() {}; + + var throwImgErr = function throwImgErr() { + throw new Error('A headless instance can not render images'); + }; + + NullRenderer.prototype = { + recalculateRenderedStyle: noop, + notify: function notify() { + this.notifications++; + }, + init: noop, + isHeadless: function isHeadless() { + return true; + }, + png: throwImgErr, + jpg: throwImgErr + }; + + var BRp$f = {}; + BRp$f.arrowShapeWidth = 0.3; + + BRp$f.registerArrowShapes = function () { + var arrowShapes = this.arrowShapes = {}; + var renderer = this; // Contract for arrow shapes: + // 0, 0 is arrow tip + // (0, 1) is direction towards node + // (1, 0) is right + // + // functional api: + // collide: check x, y in shape + // roughCollide: called before collide, no false negatives + // draw: draw + // spacing: dist(arrowTip, nodeBoundary) + // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip + + var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) { + var x1 = translation.x - size / 2 - padding; + var x2 = translation.x + size / 2 + padding; + var y1 = translation.y - size / 2 - padding; + var y2 = translation.y + size / 2 + padding; + var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2; + return inside; + }; + + var transform = function transform(x, y, size, angle, translation) { + var xRotated = x * Math.cos(angle) - y * Math.sin(angle); + var yRotated = x * Math.sin(angle) + y * Math.cos(angle); + var xScaled = xRotated * size; + var yScaled = yRotated * size; + var xTranslated = xScaled + translation.x; + var yTranslated = yScaled + translation.y; + return { + x: xTranslated, + y: yTranslated + }; + }; + + var transformPoints = function transformPoints(pts, size, angle, translation) { + var retPts = []; + + for (var i = 0; i < pts.length; i += 2) { + var x = pts[i]; + var y = pts[i + 1]; + retPts.push(transform(x, y, size, angle, translation)); + } + + return retPts; + }; + + var pointsToArr = function pointsToArr(pts) { + var ret = []; + + for (var i = 0; i < pts.length; i++) { + var p = pts[i]; + ret.push(p.x, p.y); + } + + return ret; + }; + + var standardGap = function standardGap(edge) { + return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2; + }; + + var defineArrowShape = function defineArrowShape(name, defn) { + if (string(defn)) { + defn = arrowShapes[defn]; + } + + arrowShapes[name] = extend({ + name: name, + points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], + collide: function collide(x, y, size, angle, translation, padding) { + var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, points); + return inside; + }, + roughCollide: bbCollide, + draw: function draw(context, size, angle, translation) { + var points = transformPoints(this.points, size, angle, translation); + renderer.arrowShapeImpl('polygon')(context, points); + }, + spacing: function spacing(edge) { + return 0; + }, + gap: standardGap + }, defn); + }; + + defineArrowShape('none', { + collide: falsify, + roughCollide: falsify, + draw: noop$1, + spacing: zeroify, + gap: zeroify + }); + defineArrowShape('triangle', { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3] + }); + defineArrowShape('arrow', 'triangle'); + defineArrowShape('triangle-backcurve', { + points: arrowShapes['triangle'].points, + controlPoint: [0, -0.15], + roughCollide: bbCollide, + draw: function draw(context, size, angle, translation, edgeWidth) { + var ptsTrans = transformPoints(this.points, size, angle, translation); + var ctrlPt = this.controlPoint; + var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); + }, + gap: function gap(edge) { + return standardGap(edge) * 0.8; + } + }); + defineArrowShape('triangle-tee', { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var teePts = transformPoints(this.pointsTee, size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, teePts); + } + }); + defineArrowShape('circle-triangle', { + radius: 0.15, + pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + return pointInsidePolygonPoints(x, y, triPts) || circleInside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.pointsTr, size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; + } + }); + defineArrowShape('triangle-cross', { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + baseCrossLinePts: [-0.15, -0.4, // first half of the rectangle + -0.15, -0.4, 0.15, -0.4, // second half of the rectangle + 0.15, -0.4], + crossLinePts: function crossLinePts(size, edgeWidth) { + // shift points so that the distance between the cross points matches edge width + var p = this.baseCrossLinePts.slice(); + var shiftFactor = edgeWidth / size; + var y0 = 3; + var y1 = 5; + p[y0] = p[y0] - shiftFactor; + p[y1] = p[y1] - shiftFactor; + return p; + }, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts); + } + }); + defineArrowShape('vee', { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], + gap: function gap(edge) { + return standardGap(edge) * 0.525; + } + }); + defineArrowShape('circle', { + radius: 0.15, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; + } + }); + defineArrowShape('tee', { + points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], + spacing: function spacing(edge) { + return 1; + }, + gap: function gap(edge) { + return 1; + } + }); + defineArrowShape('square', { + points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3] + }); + defineArrowShape('diamond', { + points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], + gap: function gap(edge) { + return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; + } + }); + defineArrowShape('chevron', { + points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], + gap: function gap(edge) { + return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; + } + }); + }; + + var BRp$e = {}; // Project mouse + + BRp$e.projectIntoViewport = function (clientX, clientY) { + var cy = this.cy; + var offsets = this.findContainerClientCoords(); + var offsetLeft = offsets[0]; + var offsetTop = offsets[1]; + var scale = offsets[4]; + var pan = cy.pan(); + var zoom = cy.zoom(); + var x = ((clientX - offsetLeft) / scale - pan.x) / zoom; + var y = ((clientY - offsetTop) / scale - pan.y) / zoom; + return [x, y]; + }; + + BRp$e.findContainerClientCoords = function () { + if (this.containerBB) { + return this.containerBB; + } + + var container = this.container; + var rect = container.getBoundingClientRect(); + var style = window$1.getComputedStyle(container); + + var styleValue = function styleValue(name) { + return parseFloat(style.getPropertyValue(name)); + }; + + var padding = { + left: styleValue('padding-left'), + right: styleValue('padding-right'), + top: styleValue('padding-top'), + bottom: styleValue('padding-bottom') + }; + var border = { + left: styleValue('border-left-width'), + right: styleValue('border-right-width'), + top: styleValue('border-top-width'), + bottom: styleValue('border-bottom-width') + }; + var clientWidth = container.clientWidth; + var clientHeight = container.clientHeight; + var paddingHor = padding.left + padding.right; + var paddingVer = padding.top + padding.bottom; + var borderHor = border.left + border.right; + var scale = rect.width / (clientWidth + borderHor); + var unscaledW = clientWidth - paddingHor; + var unscaledH = clientHeight - paddingVer; + var left = rect.left + padding.left + border.left; + var top = rect.top + padding.top + border.top; + return this.containerBB = [left, top, unscaledW, unscaledH, scale]; + }; + + BRp$e.invalidateContainerClientCoordsCache = function () { + this.containerBB = null; + }; + + BRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) { + return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0]; + }; + + BRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) { + var self = this; + var r = this; + var eles = r.getCachedZSortedEles(); + var near = []; // 1 node max, 1 edge max + + var zoom = r.cy.zoom(); + var hasCompounds = r.cy.hasCompoundNodes(); + var edgeThreshold = (isTouch ? 24 : 8) / zoom; + var nodeThreshold = (isTouch ? 8 : 2) / zoom; + var labelThreshold = (isTouch ? 8 : 2) / zoom; + var minSqDist = Infinity; + var nearEdge; + var nearNode; + + if (interactiveElementsOnly) { + eles = eles.interactive; + } + + function addEle(ele, sqDist) { + if (ele.isNode()) { + if (nearNode) { + return; // can't replace node + } else { + nearNode = ele; + near.push(ele); + } + } + + if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) { + if (nearEdge) { + // then replace existing edge + // can replace only if same z-index + if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) { + for (var i = 0; i < near.length; i++) { + if (near[i].isEdge()) { + near[i] = ele; + nearEdge = ele; + minSqDist = sqDist != null ? sqDist : minSqDist; + break; + } + } + } + } else { + near.push(ele); + nearEdge = ele; + minSqDist = sqDist != null ? sqDist : minSqDist; + } + } + } + + function checkNode(node) { + var width = node.outerWidth() + 2 * nodeThreshold; + var height = node.outerHeight() + 2 * nodeThreshold; + var hw = width / 2; + var hh = height / 2; + var pos = node.position(); + + if (pos.x - hw <= x && x <= pos.x + hw // bb check x + && pos.y - hh <= y && y <= pos.y + hh // bb check y + ) { + var shape = r.nodeShapes[self.getNodeShape(node)]; + + if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y)) { + addEle(node, 0); + return true; + } + } + } + + function checkEdge(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var styleWidth = edge.pstyle('width').pfValue; + var scale = edge.pstyle('arrow-scale').value; + var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre + + var widthSq = width * width; + var width2 = width * 2; + var src = _p.source; + var tgt = _p.target; + var sqDist; + + if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') { + var pts = rs.allpts; + + for (var i = 0; i + 3 < pts.length; i += 2) { + if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) { + addEle(edge, sqDist); + return true; + } + } + } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { + var pts = rs.allpts; + + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) { + addEle(edge, sqDist); + return true; + } + } + } // if we're close to the edge but didn't hit it, maybe we hit its arrows + + + var src = src || _p.source; + var tgt = tgt || _p.target; + var arSize = self.getArrowWidth(styleWidth, scale); + var arrows = [{ + name: 'source', + x: rs.arrowStartX, + y: rs.arrowStartY, + angle: rs.srcArrowAngle + }, { + name: 'target', + x: rs.arrowEndX, + y: rs.arrowEndY, + angle: rs.tgtArrowAngle + }, { + name: 'mid-source', + x: rs.midX, + y: rs.midY, + angle: rs.midsrcArrowAngle + }, { + name: 'mid-target', + x: rs.midX, + y: rs.midY, + angle: rs.midtgtArrowAngle + }]; + + for (var i = 0; i < arrows.length; i++) { + var ar = arrows[i]; + var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value]; + var edgeWidth = edge.pstyle('width').pfValue; + + if (shape.roughCollide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold)) { + addEle(edge); + return true; + } + } // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence) + + + if (hasCompounds && near.length > 0) { + checkNode(src); + checkNode(tgt); + } + } + + function preprop(obj, name, pre) { + return getPrefixedProperty(obj, name, pre); + } + + function checkLabel(ele, prefix) { + var _p = ele._private; + var th = labelThreshold; + var prefixDash; + + if (prefix) { + prefixDash = prefix + '-'; + } else { + prefixDash = ''; + } + + ele.boundingBox(); + var bb = _p.labelBounds[prefix || 'main']; + var text = ele.pstyle(prefixDash + 'label').value; + var eventsEnabled = ele.pstyle('text-events').strValue === 'yes'; + + if (!eventsEnabled || !text) { + return; + } + + var lx = preprop(_p.rscratch, 'labelX', prefix); + var ly = preprop(_p.rscratch, 'labelY', prefix); + var theta = preprop(_p.rscratch, 'labelAngle', prefix); + var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue; + var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue; + var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin + + var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly) + + var ly1 = bb.y1 - th - oy; + var ly2 = bb.y2 + th - oy; + + if (theta) { + var cos = Math.cos(theta); + var sin = Math.sin(theta); + + var rotate = function rotate(x, y) { + x = x - lx; + y = y - ly; + return { + x: x * cos - y * sin + lx, + y: x * sin + y * cos + ly + }; + }; + + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + var points = [// with the margin added after the rotation is applied + px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy]; + + if (pointInsidePolygonPoints(x, y, points)) { + addEle(ele); + return true; + } + } else { + // do a cheaper bb check + if (inBoundingBox(bb, x, y)) { + addEle(ele); + return true; + } + } + } + + for (var i = eles.length - 1; i >= 0; i--) { + // reverse order for precedence + var ele = eles[i]; + + if (ele.isNode()) { + checkNode(ele) || checkLabel(ele); + } else { + // then edge + checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target'); + } + } + + return near; + }; // 'Give me everything from this box' + + + BRp$e.getAllInBox = function (x1, y1, x2, y2) { + var eles = this.getCachedZSortedEles().interactive; + var box = []; + var x1c = Math.min(x1, x2); + var x2c = Math.max(x1, x2); + var y1c = Math.min(y1, y2); + var y2c = Math.max(y1, y2); + x1 = x1c; + x2 = x2c; + y1 = y1c; + y2 = y2c; + var boxBb = makeBoundingBox({ + x1: x1, + y1: y1, + x2: x2, + y2: y2 + }); + + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + + if (ele.isNode()) { + var node = ele; + var nodeBb = node.boundingBox({ + includeNodes: true, + includeEdges: false, + includeLabels: false + }); + + if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { + box.push(node); + } + } else { + var edge = ele; + var _p = edge._private; + var rs = _p.rscratch; + + if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { + continue; + } + + if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { + continue; + } + + if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') { + var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; + var allInside = true; + + for (var i = 0; i < pts.length; i++) { + if (!pointInBoundingBox(boxBb, pts[i])) { + allInside = false; + break; + } + } + + if (allInside) { + box.push(edge); + } + } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') { + box.push(edge); + } + } + } + + return box; + }; + + var BRp$d = {}; + + BRp$d.calculateArrowAngles = function (edge) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === 'haystack'; + var isBezier = rs.edgeType === 'bezier'; + var isMultibezier = rs.edgeType === 'multibezier'; + var isSegments = rs.edgeType === 'segments'; + var isCompound = rs.edgeType === 'compound'; + var isSelf = rs.edgeType === 'self'; // Displacement gives direction for arrowhead orientation + + var dispX, dispY; + var startX, startY, endX, endY, midX, midY; + + if (isHaystack) { + startX = rs.haystackPts[0]; + startY = rs.haystackPts[1]; + endX = rs.haystackPts[2]; + endY = rs.haystackPts[3]; + } else { + startX = rs.arrowStartX; + startY = rs.arrowStartY; + endX = rs.arrowEndX; + endY = rs.arrowEndY; + } + + midX = rs.midX; + midY = rs.midY; // source + // + + if (isSegments) { + dispX = startX - rs.segpts[0]; + dispY = startY - rs.segpts[1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts = rs.allpts; + var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1); + var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1); + dispX = startX - bX; + dispY = startY - bY; + } else { + dispX = startX - midX; + dispY = startY - midY; + } + + rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); // mid target + // + + var midX = rs.midX; + var midY = rs.midY; + + if (isHaystack) { + midX = (startX + endX) / 2; + midY = (startY + endY) / 2; + } + + dispX = endX - startX; + dispY = endY - startY; + + if (isSegments) { + var pts = rs.allpts; + + if (pts.length / 2 % 2 === 0) { + var i2 = pts.length / 2; + var i1 = i2 - 2; + dispX = pts[i2] - pts[i1]; + dispY = pts[i2 + 1] - pts[i1 + 1]; + } else { + var i2 = pts.length / 2 - 1; + var i1 = i2 - 2; + var i3 = i2 + 2; + dispX = pts[i2] - pts[i1]; + dispY = pts[i2 + 1] - pts[i1 + 1]; + } + } else if (isMultibezier || isCompound || isSelf) { + var pts = rs.allpts; + var cpts = rs.ctrlpts; + var bp0x, bp0y; + var bp1x, bp1y; + + if (cpts.length / 2 % 2 === 0) { + var p0 = pts.length / 2 - 1; // startpt + + var ic = p0 + 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0); + bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0); + bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001); + bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001); + } else { + var ic = pts.length / 2 - 1; // ctrpt + + var p0 = ic - 2; // startpt + + var p1 = ic + 2; // endpt + + bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999); + bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999); + bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5); + bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5); + } + + dispX = bp1x - bp0x; + dispY = bp1y - bp0y; + } + + rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); + rs.midDispX = dispX; + rs.midDispY = dispY; // mid source + // + + dispX *= -1; + dispY *= -1; + + if (isSegments) { + var pts = rs.allpts; + + if (pts.length / 2 % 2 === 0) ; else { + var i2 = pts.length / 2 - 1; + var i3 = i2 + 2; + dispX = -(pts[i3] - pts[i2]); + dispY = -(pts[i3 + 1] - pts[i2 + 1]); + } + } + + rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); // target + // + + if (isSegments) { + dispX = endX - rs.segpts[rs.segpts.length - 2]; + dispY = endY - rs.segpts[rs.segpts.length - 1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts = rs.allpts; + var l = pts.length; + var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9); + var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9); + dispX = endX - bX; + dispY = endY - bY; + } else { + dispX = endX - midX; + dispY = endY - midY; + } + + rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); + }; + + BRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) { + var cache = this.arrowWidthCache = this.arrowWidthCache || {}; + var cachedVal = cache[edgeWidth + ', ' + scale]; + + if (cachedVal) { + return cachedVal; + } + + cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; + cache[edgeWidth + ', ' + scale] = cachedVal; + return cachedVal; + }; + + var BRp$c = {}; + + BRp$c.findHaystackPoints = function (edges) { + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var _p = edge._private; + var rs = _p.rscratch; + + if (!rs.haystack) { + var angle = Math.random() * 2 * Math.PI; + rs.source = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + angle = Math.random() * 2 * Math.PI; + rs.target = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + } + + var src = _p.source; + var tgt = _p.target; + var srcPos = src.position(); + var tgtPos = tgt.position(); + var srcW = src.width(); + var tgtW = tgt.width(); + var srcH = src.height(); + var tgtH = tgt.height(); + var radius = edge.pstyle('haystack-radius').value; + var halfRadius = radius / 2; // b/c have to half width/height + + rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; + rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; + rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; // always override as haystack in case set to different type previously + + rs.edgeType = 'haystack'; + rs.haystack = true; + this.storeEdgeProjections(edge); + this.calculateArrowAngles(edge); + this.recalculateEdgeLabelProjections(edge); + this.calculateLabelAngles(edge); + } + }; + + BRp$c.findSegmentsPoints = function (edge, pairInfo) { + // Segments (multiple straight lines) + var rs = edge._private.rscratch; + var posPts = pairInfo.posPts, + intersectionPts = pairInfo.intersectionPts, + vectorNormInverse = pairInfo.vectorNormInverse; + var edgeDistances = edge.pstyle('edge-distances').value; + var segmentWs = edge.pstyle('segment-weights'); + var segmentDs = edge.pstyle('segment-distances'); + var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); + rs.edgeType = 'segments'; + rs.segpts = []; + + for (var s = 0; s < segmentsN; s++) { + var w = segmentWs.pfValue[s]; + var d = segmentDs.pfValue[s]; + var w1 = 1 - w; + var w2 = w; + var midptPts = edgeDistances === 'node-position' ? posPts : intersectionPts; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); + } + }; + + BRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { + // Self-edge + var rs = edge._private.rscratch; + var dirCounts = pairInfo.dirCounts, + srcPos = pairInfo.srcPos; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var loopDir = edge.pstyle('loop-direction').pfValue; + var loopSwp = edge.pstyle('loop-sweep').pfValue; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + rs.edgeType = 'self'; + var j = i; + var loopDist = stepSize; + + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + + var loopAngle = loopDir - Math.PI / 2; + var outAngle = loopAngle - loopSwp / 2; + var inAngle = loopAngle + loopSwp / 2; // increase by step size for overlapping loops, keyed on direction and sweep values + + var dc = String(loopDir + '_' + loopSwp); + j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc]; + rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; + }; + + BRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { + // Compound edge + var rs = edge._private.rscratch; + rs.edgeType = 'compound'; + var srcPos = pairInfo.srcPos, + tgtPos = pairInfo.tgtPos, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var j = i; + var loopDist = stepSize; + + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + + var loopW = 50; + var loopaPos = { + x: srcPos.x - srcW / 2, + y: srcPos.y - srcH / 2 + }; + var loopbPos = { + x: tgtPos.x - tgtW / 2, + y: tgtPos.y - tgtH / 2 + }; + var loopPos = { + x: Math.min(loopaPos.x, loopbPos.x), + y: Math.min(loopaPos.y, loopbPos.y) + }; // avoids cases with impossible beziers + + var minCompoundStretch = 0.5; + var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); + var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); + rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; + }; + + BRp$c.findStraightEdgePoints = function (edge) { + // Straight edge within bundle + edge._private.rscratch.edgeType = 'straight'; + }; + + BRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) { + var rs = edge._private.rscratch; + var vectorNormInverse = pairInfo.vectorNormInverse, + posPts = pairInfo.posPts, + intersectionPts = pairInfo.intersectionPts; + var edgeDistances = edge.pstyle('edge-distances').value; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptWs = edge.pstyle('control-point-weights'); + var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var ctrlptWeight = ctrlptWs.value[0]; // (Multi)bezier + + var multi = edgeIsUnbundled; + rs.edgeType = multi ? 'multibezier' : 'bezier'; + rs.ctrlpts = []; + + for (var b = 0; b < bezierN; b++) { + var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1); + var manctrlptDist = void 0; + var sign = signum(normctrlptDist); + + if (multi) { + ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size + + ctrlptWeight = ctrlptWs.value[b]; + } + + if (edgeIsUnbundled) { + // multi or single unbundled + manctrlptDist = ctrlptDist; + } else { + manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined; + } + + var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist; + var w1 = 1 - ctrlptWeight; + var w2 = ctrlptWeight; + var midptPts = edgeDistances === 'node-position' ? posPts : intersectionPts; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); + } + }; + + BRp$c.findTaxiPoints = function (edge, pairInfo) { + // Taxicab geometry with two turns maximum + var rs = edge._private.rscratch; + rs.edgeType = 'segments'; + var VERTICAL = 'vertical'; + var HORIZONTAL = 'horizontal'; + var LEFTWARD = 'leftward'; + var RIGHTWARD = 'rightward'; + var DOWNWARD = 'downward'; + var UPWARD = 'upward'; + var AUTO = 'auto'; + var posPts = pairInfo.posPts, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH; + var edgeDistances = edge.pstyle('edge-distances').value; + var dIncludesNodeBody = edgeDistances !== 'node-position'; + var taxiDir = edge.pstyle('taxi-direction').value; + var rawTaxiDir = taxiDir; // unprocessed value + + var taxiTurn = edge.pstyle('taxi-turn'); + var turnIsPercent = taxiTurn.units === '%'; + var taxiTurnPfVal = taxiTurn.pfValue; + var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side + + var minD = edge.pstyle('taxi-turn-min-distance').pfValue; + var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; + var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; + var pdx = posPts.x2 - posPts.x1; + var pdy = posPts.y2 - posPts.y1; // take away the effective w/h from the magnitude of the delta value + + var subDWH = function subDWH(dxy, dwh) { + if (dxy > 0) { + return Math.max(dxy - dwh, 0); + } else { + return Math.min(dxy + dwh, 0); + } + }; + + var dx = subDWH(pdx, dw); + var dy = subDWH(pdy, dh); + var isExplicitDir = false; + + if (rawTaxiDir === AUTO) { + taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; + } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { + taxiDir = VERTICAL; + isExplicitDir = true; + } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { + taxiDir = HORIZONTAL; + isExplicitDir = true; + } + + var isVert = taxiDir === VERTICAL; + var l = isVert ? dy : dx; + var pl = isVert ? pdy : pdx; + var sgnL = signum(pl); + var forcedDir = false; + + if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction + && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { + sgnL *= -1; + l = sgnL * Math.abs(l); + forcedDir = true; + } + + var d; + + if (turnIsPercent) { + var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; + d = p * l; + } else { + var k = taxiTurnPfVal < 0 ? l : 0; + d = k + taxiTurnPfVal * sgnL; + } + + var getIsTooClose = function getIsTooClose(d) { + return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l); + }; + + var isTooCloseSrc = getIsTooClose(d); + var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); + var isTooClose = isTooCloseSrc || isTooCloseTgt; + + if (isTooClose && !forcedDir) { + // non-ideal routing + if (isVert) { + // vertical fallbacks + var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; + var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; + + if (lShapeInsideSrc) { + // horizontal Z-shape (direction not respected) + var x = (posPts.x1 + posPts.x2) / 2; + var y1 = posPts.y1, + y2 = posPts.y2; + rs.segpts = [x, y1, x, y2]; + } else if (lShapeInsideTgt) { + // vertical Z-shape (distance not respected) + var y = (posPts.y1 + posPts.y2) / 2; + var x1 = posPts.x1, + x2 = posPts.x2; + rs.segpts = [x1, y, x2, y]; + } else { + // L-shape fallback (turn distance not respected, but works well with tree siblings) + rs.segpts = [posPts.x1, posPts.y2]; + } + } else { + // horizontal fallbacks + var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; + + var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; + + if (_lShapeInsideSrc) { + // vertical Z-shape (direction not respected) + var _y = (posPts.y1 + posPts.y2) / 2; + + var _x = posPts.x1, + _x2 = posPts.x2; + rs.segpts = [_x, _y, _x2, _y]; + } else if (_lShapeInsideTgt) { + // horizontal Z-shape (turn distance not respected) + var _x3 = (posPts.x1 + posPts.x2) / 2; + + var _y2 = posPts.y1, + _y3 = posPts.y2; + rs.segpts = [_x3, _y2, _x3, _y3]; + } else { + // L-shape (turn distance not respected, but works well for tree siblings) + rs.segpts = [posPts.x2, posPts.y1]; + } + } + } else { + // ideal routing + if (isVert) { + var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); + + var _x4 = posPts.x1, + _x5 = posPts.x2; + rs.segpts = [_x4, _y4, _x5, _y4]; + } else { + // horizontal + var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); + + var _y5 = posPts.y1, + _y6 = posPts.y2; + rs.segpts = [_x6, _y5, _x6, _y6]; + } + } + }; + + BRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) { + var rs = edge._private.rscratch; // can only correct beziers for now... + + if (rs.edgeType === 'bezier') { + var srcPos = pairInfo.srcPos, + tgtPos = pairInfo.tgtPos, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH, + srcShape = pairInfo.srcShape, + tgtShape = pairInfo.tgtShape; + var badStart = !number$1(rs.startX) || !number$1(rs.startY); + var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY); + var badEnd = !number$1(rs.endX) || !number$1(rs.endY); + var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY); + var minCpADistFactor = 3; + var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; + var minCpADist = minCpADistFactor * arrowW; + var startACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.startX, + y: rs.startY + }); + var closeStartACp = startACpDist < minCpADist; + var endACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.endX, + y: rs.endY + }); + var closeEndACp = endACpDist < minCpADist; + var overlapping = false; + + if (badStart || badAStart || closeStartACp) { + overlapping = true; // project control point along line from src centre to outside the src shape + // (otherwise intersection will yield nothing) + + var cpD = { + // delta + x: rs.ctrlpts[0] - srcPos.x, + y: rs.ctrlpts[1] - srcPos.y + }; + var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line + + var cpM = { + // normalised delta + x: cpD.x / cpL, + y: cpD.y / cpL + }; + var radius = Math.max(srcW, srcH); + var cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + cpM.x * 2 * radius, + y: rs.ctrlpts[1] + cpM.y * 2 * radius + }; + var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0); + + if (closeStartACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); + } else { + rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; + rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; + } + } + + if (badEnd || badAEnd || closeEndACp) { + overlapping = true; // project control point along line from tgt centre to outside the tgt shape + // (otherwise intersection will yield nothing) + + var _cpD = { + // delta + x: rs.ctrlpts[0] - tgtPos.x, + y: rs.ctrlpts[1] - tgtPos.y + }; + + var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line + + + var _cpM = { + // normalised delta + x: _cpD.x / _cpL, + y: _cpD.y / _cpL + }; + + var _radius = Math.max(srcW, srcH); + + var _cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, + y: rs.ctrlpts[1] + _cpM.y * 2 * _radius + }; + var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0); + + if (closeEndACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); + } else { + rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; + rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; + } + } + + if (overlapping) { + // recalc endpts + this.findEndpoints(edge); + } + } + }; + + BRp$c.storeAllpts = function (edge) { + var rs = edge._private.rscratch; + + if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + + for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { + // ctrl pt itself + rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); // the midpt between ctrlpts as intermediate destination pts + + if (b + 3 < rs.ctrlpts.length) { + rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); + } + } + + rs.allpts.push(rs.endX, rs.endY); + var m, mt; + + if (rs.ctrlpts.length / 2 % 2 === 0) { + m = rs.allpts.length / 2 - 1; + rs.midX = rs.allpts[m]; + rs.midY = rs.allpts[m + 1]; + } else { + m = rs.allpts.length / 2 - 3; + mt = 0.5; + rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); + rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); + } + } else if (rs.edgeType === 'straight') { + // need to calc these after endpts + rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; // default midpt for labels etc + + rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; + rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; + } else if (rs.edgeType === 'segments') { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + rs.allpts.push.apply(rs.allpts, rs.segpts); + rs.allpts.push(rs.endX, rs.endY); + + if (rs.segpts.length % 4 === 0) { + var i2 = rs.segpts.length / 2; + var i1 = i2 - 2; + rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2; + rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2; + } else { + var _i = rs.segpts.length / 2 - 1; + + rs.midX = rs.segpts[_i]; + rs.midY = rs.segpts[_i + 1]; + } + } + }; + + BRp$c.checkForInvalidEdgeWarning = function (edge) { + var rs = edge[0]._private.rscratch; + + if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) { + rs.loggedErr = false; + } else { + if (!rs.loggedErr) { + rs.loggedErr = true; + warn('Edge `' + edge.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.'); + } + } + }; + + BRp$c.findEdgeControlPoints = function (edges) { + var _this = this; + + if (!edges || edges.length === 0) { + return; + } + + var r = this; + var cy = r.cy; + var hasCompounds = cy.hasCompoundNodes(); + var hashTable = { + map: new Map$2(), + get: function get(pairId) { + var map2 = this.map.get(pairId[0]); + + if (map2 != null) { + return map2.get(pairId[1]); + } else { + return null; + } + }, + set: function set(pairId, val) { + var map2 = this.map.get(pairId[0]); + + if (map2 == null) { + map2 = new Map$2(); + this.map.set(pairId[0], map2); + } + + map2.set(pairId[1], val); + } + }; + var pairIds = []; + var haystackEdges = []; // create a table of edge (src, tgt) => list of edges between them + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var _p = edge._private; + var curveStyle = edge.pstyle('curve-style').value; // ignore edges who are not to be displayed + // they shouldn't take up space + + if (edge.removed() || !edge.takesUpSpace()) { + continue; + } + + if (curveStyle === 'haystack') { + haystackEdges.push(edge); + continue; + } + + var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle === 'taxi'; + var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier'; + var src = _p.source; + var tgt = _p.target; + var srcIndex = src.poolIndex(); + var tgtIndex = tgt.poolIndex(); + var pairId = [srcIndex, tgtIndex].sort(); + var tableEntry = hashTable.get(pairId); + + if (tableEntry == null) { + tableEntry = { + eles: [] + }; + hashTable.set(pairId, tableEntry); + pairIds.push(pairId); + } + + tableEntry.eles.push(edge); + + if (edgeIsUnbundled) { + tableEntry.hasUnbundled = true; + } + + if (edgeIsBezier) { + tableEntry.hasBezier = true; + } + } // for each pair (src, tgt), create the ctrl pts + // Nested for loop is OK; total number of iterations for both loops = edgeCount + + + var _loop = function _loop(p) { + var pairId = pairIds[p]; + var pairInfo = hashTable.get(pairId); + var swappedpairInfo = void 0; + + if (!pairInfo.hasUnbundled) { + var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) { + return e.isBundledBezier(); + }); + clearArray(pairInfo.eles); + pllEdges.forEach(function (edge) { + return pairInfo.eles.push(edge); + }); // for each pair id, the edges should be sorted by index + + pairInfo.eles.sort(function (edge1, edge2) { + return edge1.poolIndex() - edge2.poolIndex(); + }); + } + + var firstEdge = pairInfo.eles[0]; + var src = firstEdge.source(); + var tgt = firstEdge.target(); // make sure src/tgt distinction is consistent w.r.t. pairId + + if (src.poolIndex() > tgt.poolIndex()) { + var temp = src; + src = tgt; + tgt = temp; + } + + var srcPos = pairInfo.srcPos = src.position(); + var tgtPos = pairInfo.tgtPos = tgt.position(); + var srcW = pairInfo.srcW = src.outerWidth(); + var srcH = pairInfo.srcH = src.outerHeight(); + var tgtW = pairInfo.tgtW = tgt.outerWidth(); + var tgtH = pairInfo.tgtH = tgt.outerHeight(); + + var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)]; + + var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)]; + + pairInfo.dirCounts = { + 'north': 0, + 'west': 0, + 'south': 0, + 'east': 0, + 'northwest': 0, + 'southwest': 0, + 'northeast': 0, + 'southeast': 0 + }; + + for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { + var _edge = pairInfo.eles[_i2]; + var rs = _edge[0]._private.rscratch; + + var _curveStyle = _edge.pstyle('curve-style').value; + + var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle === 'segments' || _curveStyle === 'taxi'; // whether the normalised pair order is the reverse of the edge's src-tgt order + + + var edgeIsSwapped = !src.same(_edge.source()); + + if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { + pairInfo.calculatedIntersection = true; // pt outside src shape to calc distance/displacement from src to tgt + + var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0); + var srcIntn = pairInfo.srcIntn = srcOutside; // pt outside tgt shape to calc distance/displacement from src to tgt + + var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0); + var tgtIntn = pairInfo.tgtIntn = tgtOutside; + var intersectionPts = pairInfo.intersectionPts = { + x1: srcOutside[0], + x2: tgtOutside[0], + y1: srcOutside[1], + y2: tgtOutside[1] + }; + var posPts = pairInfo.posPts = { + x1: srcPos.x, + x2: tgtPos.x, + y1: srcPos.y, + y2: tgtPos.y + }; + var dy = tgtOutside[1] - srcOutside[1]; + var dx = tgtOutside[0] - srcOutside[0]; + var l = Math.sqrt(dx * dx + dy * dy); + var vector = pairInfo.vector = { + x: dx, + y: dy + }; + var vectorNorm = pairInfo.vectorNorm = { + x: vector.x / l, + y: vector.y / l + }; + var vectorNormInverse = { + x: -vectorNorm.y, + y: vectorNorm.x + }; // if node shapes overlap, then no ctrl pts to draw + + pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y); + pairInfo.vectorNormInverse = vectorNormInverse; + swappedpairInfo = { + nodesOverlap: pairInfo.nodesOverlap, + dirCounts: pairInfo.dirCounts, + calculatedIntersection: true, + hasBezier: pairInfo.hasBezier, + hasUnbundled: pairInfo.hasUnbundled, + eles: pairInfo.eles, + srcPos: tgtPos, + tgtPos: srcPos, + srcW: tgtW, + srcH: tgtH, + tgtW: srcW, + tgtH: srcH, + srcIntn: tgtIntn, + tgtIntn: srcIntn, + srcShape: tgtShape, + tgtShape: srcShape, + posPts: { + x1: posPts.x2, + y1: posPts.y2, + x2: posPts.x1, + y2: posPts.y1 + }, + intersectionPts: { + x1: intersectionPts.x2, + y1: intersectionPts.y2, + x2: intersectionPts.x1, + y2: intersectionPts.y1 + }, + vector: { + x: -vector.x, + y: -vector.y + }, + vectorNorm: { + x: -vectorNorm.x, + y: -vectorNorm.y + }, + vectorNormInverse: { + x: -vectorNormInverse.x, + y: -vectorNormInverse.y + } + }; + } + + var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; + rs.nodesOverlap = passedPairInfo.nodesOverlap; + rs.srcIntn = passedPairInfo.srcIntn; + rs.tgtIntn = passedPairInfo.tgtIntn; + + if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) { + _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (src === tgt) { + _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (_curveStyle === 'segments') { + _this.findSegmentsPoints(_edge, passedPairInfo); + } else if (_curveStyle === 'taxi') { + _this.findTaxiPoints(_edge, passedPairInfo); + } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { + _this.findStraightEdgePoints(_edge); + } else { + _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); + } + + _this.findEndpoints(_edge); + + _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); + + _this.checkForInvalidEdgeWarning(_edge); + + _this.storeAllpts(_edge); + + _this.storeEdgeProjections(_edge); + + _this.calculateArrowAngles(_edge); + + _this.recalculateEdgeLabelProjections(_edge); + + _this.calculateLabelAngles(_edge); + } // for pair edges + + }; + + for (var p = 0; p < pairIds.length; p++) { + _loop(p); + } // for pair ids + // haystacks avoid the expense of pairInfo stuff (intersections etc.) + + + this.findHaystackPoints(haystackEdges); + }; + + function getPts(pts) { + var retPts = []; + + if (pts == null) { + return; + } + + for (var i = 0; i < pts.length; i += 2) { + var x = pts[i]; + var y = pts[i + 1]; + retPts.push({ + x: x, + y: y + }); + } + + return retPts; + } + + BRp$c.getSegmentPoints = function (edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + + if (type === 'segments') { + this.recalculateRenderedStyle(edge); + return getPts(rs.segpts); + } + }; + + BRp$c.getControlPoints = function (edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + + if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') { + this.recalculateRenderedStyle(edge); + return getPts(rs.ctrlpts); + } + }; + + BRp$c.getEdgeMidpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + return { + x: rs.midX, + y: rs.midY + }; + }; + + var BRp$b = {}; + + BRp$b.manualEndptToPx = function (node, prop) { + var r = this; + var npos = node.position(); + var w = node.outerWidth(); + var h = node.outerHeight(); + + if (prop.value.length === 2) { + var p = [prop.pfValue[0], prop.pfValue[1]]; + + if (prop.units[0] === '%') { + p[0] = p[0] * w; + } + + if (prop.units[1] === '%') { + p[1] = p[1] * h; + } + + p[0] += npos.x; + p[1] += npos.y; + return p; + } else { + var angle = prop.pfValue[0]; + angle = -Math.PI / 2 + angle; // start at 12 o'clock + + var l = 2 * Math.max(w, h); + var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; + return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0); + } + }; + + BRp$b.findEndpoints = function (edge) { + var r = this; + var intersect; + var source = edge.source()[0]; + var target = edge.target()[0]; + var srcPos = source.position(); + var tgtPos = target.position(); + var tgtArShape = edge.pstyle('target-arrow-shape').value; + var srcArShape = edge.pstyle('source-arrow-shape').value; + var tgtDist = edge.pstyle('target-distance-from-node').pfValue; + var srcDist = edge.pstyle('source-distance-from-node').pfValue; + var curveStyle = edge.pstyle('curve-style').value; + var rs = edge._private.rscratch; + var et = rs.edgeType; + var taxi = curveStyle === 'taxi'; + var self = et === 'self' || et === 'compound'; + var bezier = et === 'bezier' || et === 'multibezier' || self; + var multi = et !== 'bezier'; + var lines = et === 'straight' || et === 'segments'; + var segments = et === 'segments'; + var hasEndpts = bezier || multi || lines; + var overrideEndpts = self || taxi; + var srcManEndpt = edge.pstyle('source-endpoint'); + var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value; + var tgtManEndpt = edge.pstyle('target-endpoint'); + var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value; + rs.srcManEndpt = srcManEndpt; + rs.tgtManEndpt = tgtManEndpt; + var p1; // last known point of edge on target side + + var p2; // last known point of edge on source side + + var p1_i; // point to intersect with target shape + + var p2_i; // point to intersect with source shape + + if (bezier) { + var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; + var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; + p1 = cpEnd; + p2 = cpStart; + } else if (lines) { + var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); + var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); + p1 = tgtArrowFromPt; + p2 = srcArrowFromPt; + } + + if (tgtManEndptVal === 'inside-to-node') { + intersect = [tgtPos.x, tgtPos.y]; + } else if (tgtManEndpt.units) { + intersect = this.manualEndptToPx(target, tgtManEndpt); + } else if (tgtManEndptVal === 'outside-to-line') { + intersect = rs.tgtIntn; // use cached value from ctrlpt calc + } else { + if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') { + p1_i = p1; + } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') { + p1_i = [srcPos.x, srcPos.y]; + } + + intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0); + + if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') { + var trs = target._private.rscratch; + var lw = trs.labelWidth; + var lh = trs.labelHeight; + var lx = trs.labelX; + var ly = trs.labelY; + var lw2 = lw / 2; + var lh2 = lh / 2; + var va = target.pstyle('text-valign').value; + + if (va === 'top') { + ly -= lh2; + } else if (va === 'bottom') { + ly += lh2; + } + + var ha = target.pstyle('text-halign').value; + + if (ha === 'left') { + lx -= lw2; + } else if (ha === 'right') { + lx += lw2; + } + + var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); + + if (labelIntersect.length > 0) { + var refPt = srcPos; + var intSqdist = sqdist(refPt, array2point(intersect)); + var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); + var minSqDist = intSqdist; + + if (labIntSqdist < intSqdist) { + intersect = labelIntersect; + minSqDist = labIntSqdist; + } + + if (labelIntersect.length > 2) { + var labInt2SqDist = sqdist(refPt, { + x: labelIntersect[2], + y: labelIntersect[3] + }); + + if (labInt2SqDist < minSqDist) { + intersect = [labelIntersect[2], labelIntersect[3]]; + } + } + } + } + } + + var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); + var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); + rs.endX = edgeEnd[0]; + rs.endY = edgeEnd[1]; + rs.arrowEndX = arrowEnd[0]; + rs.arrowEndY = arrowEnd[1]; + + if (srcManEndptVal === 'inside-to-node') { + intersect = [srcPos.x, srcPos.y]; + } else if (srcManEndpt.units) { + intersect = this.manualEndptToPx(source, srcManEndpt); + } else if (srcManEndptVal === 'outside-to-line') { + intersect = rs.srcIntn; // use cached value from ctrlpt calc + } else { + if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') { + p2_i = p2; + } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') { + p2_i = [tgtPos.x, tgtPos.y]; + } + + intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0); + + if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') { + var srs = source._private.rscratch; + var _lw = srs.labelWidth; + var _lh = srs.labelHeight; + var _lx = srs.labelX; + var _ly = srs.labelY; + + var _lw2 = _lw / 2; + + var _lh2 = _lh / 2; + + var _va = source.pstyle('text-valign').value; + + if (_va === 'top') { + _ly -= _lh2; + } else if (_va === 'bottom') { + _ly += _lh2; + } + + var _ha = source.pstyle('text-halign').value; + + if (_ha === 'left') { + _lx -= _lw2; + } else if (_ha === 'right') { + _lx += _lw2; + } + + var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); + + if (_labelIntersect.length > 0) { + var _refPt = tgtPos; + + var _intSqdist = sqdist(_refPt, array2point(intersect)); + + var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); + + var _minSqDist = _intSqdist; + + if (_labIntSqdist < _intSqdist) { + intersect = [_labelIntersect[0], _labelIntersect[1]]; + _minSqDist = _labIntSqdist; + } + + if (_labelIntersect.length > 2) { + var _labInt2SqDist = sqdist(_refPt, { + x: _labelIntersect[2], + y: _labelIntersect[3] + }); + + if (_labInt2SqDist < _minSqDist) { + intersect = [_labelIntersect[2], _labelIntersect[3]]; + } + } + } + } + } + + var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); + var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); + rs.startX = edgeStart[0]; + rs.startY = edgeStart[1]; + rs.arrowStartX = arrowStart[0]; + rs.arrowStartY = arrowStart[1]; + + if (hasEndpts) { + if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) { + rs.badLine = true; + } else { + rs.badLine = false; + } + } + }; + + BRp$b.getSourceEndpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + + switch (rs.edgeType) { + case 'haystack': + return { + x: rs.haystackPts[0], + y: rs.haystackPts[1] + }; + + default: + return { + x: rs.arrowStartX, + y: rs.arrowStartY + }; + } + }; + + BRp$b.getTargetEndpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + + switch (rs.edgeType) { + case 'haystack': + return { + x: rs.haystackPts[2], + y: rs.haystackPts[3] + }; + + default: + return { + x: rs.arrowEndX, + y: rs.arrowEndY + }; + } + }; + + var BRp$a = {}; + + function pushBezierPts(r, edge, pts) { + var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) { + return qbezierAt(p1, p2, p3, t); + }; + + var _p = edge._private; + var bpts = _p.rstyle.bezierPts; + + for (var i = 0; i < r.bezierProjPcts.length; i++) { + var p = r.bezierProjPcts[i]; + bpts.push({ + x: qbezierAt$1(pts[0], pts[2], pts[4], p), + y: qbezierAt$1(pts[1], pts[3], pts[5], p) + }); + } + } + + BRp$a.storeEdgeProjections = function (edge) { + var _p = edge._private; + var rs = _p.rscratch; + var et = rs.edgeType; // clear the cached points state + + _p.rstyle.bezierPts = null; + _p.rstyle.linePts = null; + _p.rstyle.haystackPts = null; + + if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') { + _p.rstyle.bezierPts = []; + + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + pushBezierPts(this, edge, rs.allpts.slice(i, i + 6)); + } + } else if (et === 'segments') { + var lpts = _p.rstyle.linePts = []; + + for (var i = 0; i + 1 < rs.allpts.length; i += 2) { + lpts.push({ + x: rs.allpts[i], + y: rs.allpts[i + 1] + }); + } + } else if (et === 'haystack') { + var hpts = rs.haystackPts; + _p.rstyle.haystackPts = [{ + x: hpts[0], + y: hpts[1] + }, { + x: hpts[2], + y: hpts[3] + }]; + } + + _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; + }; + + BRp$a.recalculateEdgeProjections = function (edges) { + this.findEdgeControlPoints(edges); + }; + + /* global document */ + + var BRp$9 = {}; + + BRp$9.recalculateNodeLabelProjection = function (node) { + var content = node.pstyle('label').strValue; + + if (emptyString(content)) { + return; + } + + var textX, textY; + var _p = node._private; + var nodeWidth = node.width(); + var nodeHeight = node.height(); + var padding = node.padding(); + var nodePos = node.position(); + var textHalign = node.pstyle('text-halign').strValue; + var textValign = node.pstyle('text-valign').strValue; + var rs = _p.rscratch; + var rstyle = _p.rstyle; + + switch (textHalign) { + case 'left': + textX = nodePos.x - nodeWidth / 2 - padding; + break; + + case 'right': + textX = nodePos.x + nodeWidth / 2 + padding; + break; + + default: + // e.g. center + textX = nodePos.x; + } + + switch (textValign) { + case 'top': + textY = nodePos.y - nodeHeight / 2 - padding; + break; + + case 'bottom': + textY = nodePos.y + nodeHeight / 2 + padding; + break; + + default: + // e.g. middle + textY = nodePos.y; + } + + rs.labelX = textX; + rs.labelY = textY; + rstyle.labelX = textX; + rstyle.labelY = textY; + this.calculateLabelAngles(node); + this.applyLabelDimensions(node); + }; + + var lineAngleFromDelta = function lineAngleFromDelta(dx, dy) { + var angle = Math.atan(dy / dx); + + if (dx === 0 && angle < 0) { + angle = angle * -1; + } + + return angle; + }; + + var lineAngle = function lineAngle(p0, p1) { + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + return lineAngleFromDelta(dx, dy); + }; + + var bezierAngle = function bezierAngle(p0, p1, p2, t) { + var t0 = bound(0, t - 0.001, 1); + var t1 = bound(0, t + 0.001, 1); + var lp0 = qbezierPtAt(p0, p1, p2, t0); + var lp1 = qbezierPtAt(p0, p1, p2, t1); + return lineAngle(lp0, lp1); + }; + + BRp$9.recalculateEdgeLabelProjections = function (edge) { + var p; + var _p = edge._private; + var rs = _p.rscratch; + var r = this; + var content = { + mid: edge.pstyle('label').strValue, + source: edge.pstyle('source-label').strValue, + target: edge.pstyle('target-label').strValue + }; + + if (content.mid || content.source || content.target) ; else { + return; // no labels => no calcs + } // add center point to style so bounding box calculations can use it + // + + + p = { + x: rs.midX, + y: rs.midY + }; + + var setRs = function setRs(propName, prefix, value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + setPrefixedProperty(_p.rstyle, propName, prefix, value); + }; + + setRs('labelX', null, p.x); + setRs('labelY', null, p.y); + var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); + setRs('labelAutoAngle', null, midAngle); + + var createControlPointInfo = function createControlPointInfo() { + if (createControlPointInfo.cache) { + return createControlPointInfo.cache; + } // use cache so only 1x per edge + + + var ctrlpts = []; // store each ctrlpt info init + + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + var p0 = { + x: rs.allpts[i], + y: rs.allpts[i + 1] + }; + var p1 = { + x: rs.allpts[i + 2], + y: rs.allpts[i + 3] + }; // ctrlpt + + var p2 = { + x: rs.allpts[i + 4], + y: rs.allpts[i + 5] + }; + ctrlpts.push({ + p0: p0, + p1: p1, + p2: p2, + startDist: 0, + length: 0, + segments: [] + }); + } + + var bpts = _p.rstyle.bezierPts; + var nProjs = r.bezierProjPcts.length; + + function addSegment(cp, p0, p1, t0, t1) { + var length = dist(p0, p1); + var prevSegment = cp.segments[cp.segments.length - 1]; + var segment = { + p0: p0, + p1: p1, + t0: t0, + t1: t1, + startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, + length: length + }; + cp.segments.push(segment); + cp.length += length; + } // update each ctrlpt with segment info + + + for (var _i = 0; _i < ctrlpts.length; _i++) { + var cp = ctrlpts[_i]; + var prevCp = ctrlpts[_i - 1]; + + if (prevCp) { + cp.startDist = prevCp.startDist + prevCp.length; + } + + addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first + + for (var j = 0; j < nProjs - 1; j++) { + addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); + } + + addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last + } + + return createControlPointInfo.cache = ctrlpts; + }; + + var calculateEndProjection = function calculateEndProjection(prefix) { + var angle; + var isSrc = prefix === 'source'; + + if (!content[prefix]) { + return; + } + + var offset = edge.pstyle(prefix + '-text-offset').pfValue; + + switch (rs.edgeType) { + case 'self': + case 'compound': + case 'bezier': + case 'multibezier': + { + var cps = createControlPointInfo(); + var selected; + var startDist = 0; + var totalDist = 0; // find the segment we're on + + for (var i = 0; i < cps.length; i++) { + var _cp = cps[isSrc ? i : cps.length - 1 - i]; + + for (var j = 0; j < _cp.segments.length; j++) { + var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; + var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1; + startDist = totalDist; + totalDist += _seg.length; + + if (totalDist >= offset || lastSeg) { + selected = { + cp: _cp, + segment: _seg + }; + break; + } + } + + if (selected) { + break; + } + } + + var cp = selected.cp; + var seg = selected.segment; + var tSegment = (offset - startDist) / seg.length; + var segDt = seg.t1 - seg.t0; + var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; + t = bound(0, t, 1); + p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); + angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); + break; + } + + case 'straight': + case 'segments': + case 'haystack': + { + var d = 0, + di, + d0; + var p0, p1; + var l = rs.allpts.length; + + for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { + if (isSrc) { + p0 = { + x: rs.allpts[_i2], + y: rs.allpts[_i2 + 1] + }; + p1 = { + x: rs.allpts[_i2 + 2], + y: rs.allpts[_i2 + 3] + }; + } else { + p0 = { + x: rs.allpts[l - 2 - _i2], + y: rs.allpts[l - 1 - _i2] + }; + p1 = { + x: rs.allpts[l - 4 - _i2], + y: rs.allpts[l - 3 - _i2] + }; + } + + di = dist(p0, p1); + d0 = d; + d += di; + + if (d >= offset) { + break; + } + } + + var pD = offset - d0; + + var _t = pD / di; + + _t = bound(0, _t, 1); + p = lineAt(p0, p1, _t); + angle = lineAngle(p0, p1); + break; + } + } + + setRs('labelX', prefix, p.x); + setRs('labelY', prefix, p.y); + setRs('labelAutoAngle', prefix, angle); + }; + + calculateEndProjection('source'); + calculateEndProjection('target'); + this.applyLabelDimensions(edge); + }; + + BRp$9.applyLabelDimensions = function (ele) { + this.applyPrefixedLabelDimensions(ele); + + if (ele.isEdge()) { + this.applyPrefixedLabelDimensions(ele, 'source'); + this.applyPrefixedLabelDimensions(ele, 'target'); + } + }; + + BRp$9.applyPrefixedLabelDimensions = function (ele, prefix) { + var _p = ele._private; + var text = this.getLabelText(ele, prefix); + var labelDims = this.calculateLabelDimensions(ele, text); + var lineHeight = ele.pstyle('line-height').pfValue; + var textWrap = ele.pstyle('text-wrap').strValue; + var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || []; + var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1); + var normPerLineHeight = labelDims.height / numLines; + var labelLineHeight = normPerLineHeight * lineHeight; + var width = labelDims.width; + var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; + setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width); + setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width); + setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height); + setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height); + setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight); + }; + + BRp$9.getLabelText = function (ele, prefix) { + var _p = ele._private; + var pfd = prefix ? prefix + '-' : ''; + var text = ele.pstyle(pfd + 'label').strValue; + var textTransform = ele.pstyle('text-transform').value; + + var rscratch = function rscratch(propName, value) { + if (value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + return value; + } else { + return getPrefixedProperty(_p.rscratch, propName, prefix); + } + }; // for empty text, skip all processing + + + if (!text) { + return ''; + } + + if (textTransform == 'none') ; else if (textTransform == 'uppercase') { + text = text.toUpperCase(); + } else if (textTransform == 'lowercase') { + text = text.toLowerCase(); + } + + var wrapStyle = ele.pstyle('text-wrap').value; + + if (wrapStyle === 'wrap') { + var labelKey = rscratch('labelKey'); // save recalc if the label is the same as before + + if (labelKey != null && rscratch('labelWrapKey') === labelKey) { + return rscratch('labelWrapCachedText'); + } + + var zwsp = "\u200B"; + var lines = text.split('\n'); + var maxW = ele.pstyle('text-max-width').pfValue; + var overflow = ele.pstyle('text-overflow-wrap').value; + var overflowAny = overflow === 'anywhere'; + var wrappedLines = []; + var wordsRegex = /[\s\u200b]+/; + var wordSeparator = overflowAny ? '' : ' '; + + for (var l = 0; l < lines.length; l++) { + var line = lines[l]; + var lineDims = this.calculateLabelDimensions(ele, line); + var lineW = lineDims.width; + + if (overflowAny) { + var processedLine = line.split('').join(zwsp); + line = processedLine; + } + + if (lineW > maxW) { + // line is too long + var words = line.split(wordsRegex); + var subline = ''; + + for (var w = 0; w < words.length; w++) { + var word = words[w]; + var testLine = subline.length === 0 ? word : subline + wordSeparator + word; + var testDims = this.calculateLabelDimensions(ele, testLine); + var testW = testDims.width; + + if (testW <= maxW) { + // word fits on current line + subline += word + wordSeparator; + } else { + // word starts new line + if (subline) { + wrappedLines.push(subline); + } + + subline = word + wordSeparator; + } + } // if there's remaining text, put it in a wrapped line + + + if (!subline.match(/^[\s\u200b]+$/)) { + wrappedLines.push(subline); + } + } else { + // line is already short enough + wrappedLines.push(line); + } + } // for + + + rscratch('labelWrapCachedLines', wrappedLines); + text = rscratch('labelWrapCachedText', wrappedLines.join('\n')); + rscratch('labelWrapKey', labelKey); + } else if (wrapStyle === 'ellipsis') { + var _maxW = ele.pstyle('text-max-width').pfValue; + var ellipsized = ''; + var ellipsis = "\u2026"; + var incLastCh = false; + + if (this.calculateLabelDimensions(ele, text).width < _maxW) { + // the label already fits + return text; + } + + for (var i = 0; i < text.length; i++) { + var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width; + + if (widthWithNextCh > _maxW) { + break; + } + + ellipsized += text[i]; + + if (i === text.length - 1) { + incLastCh = true; + } + } + + if (!incLastCh) { + ellipsized += ellipsis; + } + + return ellipsized; + } // if ellipsize + + + return text; + }; + + BRp$9.getLabelJustification = function (ele) { + var justification = ele.pstyle('text-justification').strValue; + var textHalign = ele.pstyle('text-halign').strValue; + + if (justification === 'auto') { + if (ele.isNode()) { + switch (textHalign) { + case 'left': + return 'right'; + + case 'right': + return 'left'; + + default: + return 'center'; + } + } else { + return 'center'; + } + } else { + return justification; + } + }; + + BRp$9.calculateLabelDimensions = function (ele, text) { + var r = this; + var cacheKey = hashString(text, ele._private.labelDimsKey); + var cache = r.labelDimCache || (r.labelDimCache = []); + var existingVal = cache[cacheKey]; + + if (existingVal != null) { + return existingVal; + } + + var padding = 0; // add padding around text dims, as the measurement isn't that accurate + + var fStyle = ele.pstyle('font-style').strValue; + var size = ele.pstyle('font-size').pfValue; + var family = ele.pstyle('font-family').strValue; + var weight = ele.pstyle('font-weight').strValue; + var canvas = this.labelCalcCanvas; + var c2d = this.labelCalcCanvasContext; + + if (!canvas) { + canvas = this.labelCalcCanvas = document.createElement('canvas'); + c2d = this.labelCalcCanvasContext = canvas.getContext('2d'); + var ds = canvas.style; + ds.position = 'absolute'; + ds.left = '-9999px'; + ds.top = '-9999px'; + ds.zIndex = '-1'; + ds.visibility = 'hidden'; + ds.pointerEvents = 'none'; + } + + c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size, "px ").concat(family); + var width = 0; + var height = 0; + var lines = text.split('\n'); + + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var metrics = c2d.measureText(line); + var w = Math.ceil(metrics.width); + var h = size; + width = Math.max(w, width); + height += h; + } + + width += padding; + height += padding; + return cache[cacheKey] = { + width: width, + height: height + }; + }; + + BRp$9.calculateLabelAngle = function (ele, prefix) { + var _p = ele._private; + var rs = _p.rscratch; + var isEdge = ele.isEdge(); + var prefixDash = prefix ? prefix + '-' : ''; + var rot = ele.pstyle(prefixDash + 'text-rotation'); + var rotStr = rot.strValue; + + if (rotStr === 'none') { + return 0; + } else if (isEdge && rotStr === 'autorotate') { + return rs.labelAutoAngle; + } else if (rotStr === 'autorotate') { + return 0; + } else { + return rot.pfValue; + } + }; + + BRp$9.calculateLabelAngles = function (ele) { + var r = this; + var isEdge = ele.isEdge(); + var _p = ele._private; + var rs = _p.rscratch; + rs.labelAngle = r.calculateLabelAngle(ele); + + if (isEdge) { + rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source'); + rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target'); + } + }; + + var BRp$8 = {}; + var TOO_SMALL_CUT_RECT = 28; + var warnedCutRect = false; + + BRp$8.getNodeShape = function (node) { + var r = this; + var shape = node.pstyle('shape').value; + + if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) { + if (!warnedCutRect) { + warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead'); + warnedCutRect = true; + } + + return 'rectangle'; + } + + if (node.isParent()) { + if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') { + return shape; + } else { + return 'rectangle'; + } + } + + if (shape === 'polygon') { + var points = node.pstyle('shape-polygon-points').value; + return r.nodeShapes.makePolygon(points).name; + } + + return shape; + }; + + var BRp$7 = {}; + + BRp$7.registerCalculationListeners = function () { + var cy = this.cy; + var elesToUpdate = cy.collection(); + var r = this; + + var enqueue = function enqueue(eles) { + var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + elesToUpdate.merge(eles); + + if (dirtyStyleCaches) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var rstyle = _p.rstyle; + rstyle.clean = false; + rstyle.cleanConnected = false; + } + } + }; + + r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) { + var ele = e.target; + enqueue(ele); + }).on('style.* background.*', function onDirtyStyle(e) { + var ele = e.target; + enqueue(ele, false); + }); + + var updateEleCalcs = function updateEleCalcs(willDraw) { + if (willDraw) { + var fns = r.onUpdateEleCalcsFns; // because we need to have up-to-date style (e.g. stylesheet mappers) + // before calculating rendered style (and pstyle might not be called yet) + + elesToUpdate.cleanStyle(); + + for (var i = 0; i < elesToUpdate.length; i++) { + var ele = elesToUpdate[i]; + var rstyle = ele._private.rstyle; + + if (ele.isNode() && !rstyle.cleanConnected) { + enqueue(ele.connectedEdges()); + rstyle.cleanConnected = true; + } + } + + if (fns) { + for (var _i = 0; _i < fns.length; _i++) { + var fn = fns[_i]; + fn(willDraw, elesToUpdate); + } + } + + r.recalculateRenderedStyle(elesToUpdate); + elesToUpdate = cy.collection(); + } + }; + + r.flushRenderedStyleQueue = function () { + updateEleCalcs(true); + }; + + r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); + }; + + BRp$7.onUpdateEleCalcs = function (fn) { + var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; + fns.push(fn); + }; + + BRp$7.recalculateRenderedStyle = function (eles, useCache) { + var isCleanConnected = function isCleanConnected(ele) { + return ele._private.rstyle.cleanConnected; + }; + + var edges = []; + var nodes = []; // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox() + + if (this.destroyed) { + return; + } // use cache by default for perf + + + if (useCache === undefined) { + useCache = true; + } + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var rstyle = _p.rstyle; // an edge may be implicitly dirty b/c of one of its connected nodes + // (and a request for recalc may come in between frames) + + if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { + rstyle.clean = false; + } // only update if dirty and in graph + + + if (useCache && rstyle.clean || ele.removed()) { + continue; + } // only update if not display: none + + + if (ele.pstyle('display').value === 'none') { + continue; + } + + if (_p.group === 'nodes') { + nodes.push(ele); + } else { + // edges + edges.push(ele); + } + + rstyle.clean = true; + } // update node data from projections + + + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _ele = nodes[_i2]; + var _p2 = _ele._private; + var _rstyle = _p2.rstyle; + + var pos = _ele.position(); + + this.recalculateNodeLabelProjection(_ele); + _rstyle.nodeX = pos.x; + _rstyle.nodeY = pos.y; + _rstyle.nodeW = _ele.pstyle('width').pfValue; + _rstyle.nodeH = _ele.pstyle('height').pfValue; + } + + this.recalculateEdgeProjections(edges); // update edge data from projections + + for (var _i3 = 0; _i3 < edges.length; _i3++) { + var _ele2 = edges[_i3]; + var _p3 = _ele2._private; + var _rstyle2 = _p3.rstyle; + var rs = _p3.rscratch; // update rstyle positions + + _rstyle2.srcX = rs.arrowStartX; + _rstyle2.srcY = rs.arrowStartY; + _rstyle2.tgtX = rs.arrowEndX; + _rstyle2.tgtY = rs.arrowEndY; + _rstyle2.midX = rs.midX; + _rstyle2.midY = rs.midY; + _rstyle2.labelAngle = rs.labelAngle; + _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; + _rstyle2.targetLabelAngle = rs.targetLabelAngle; + } + }; + + var BRp$6 = {}; + + BRp$6.updateCachedGrabbedEles = function () { + var eles = this.cachedZSortedEles; + + if (!eles) { + // just let this be recalculated on the next z sort tick + return; + } + + eles.drag = []; + eles.nondrag = []; + var grabTargets = []; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var rs = ele._private.rscratch; + + if (ele.grabbed() && !ele.isParent()) { + grabTargets.push(ele); + } else if (rs.inDragLayer) { + eles.drag.push(ele); + } else { + eles.nondrag.push(ele); + } + } // put the grab target nodes last so it's on top of its neighbourhood + + + for (var i = 0; i < grabTargets.length; i++) { + var ele = grabTargets[i]; + eles.drag.push(ele); + } + }; + + BRp$6.invalidateCachedZSortedEles = function () { + this.cachedZSortedEles = null; + }; + + BRp$6.getCachedZSortedEles = function (forceRecalc) { + if (forceRecalc || !this.cachedZSortedEles) { + var eles = this.cy.mutableElements().toArray(); + eles.sort(zIndexSort); + eles.interactive = eles.filter(function (ele) { + return ele.interactive(); + }); + this.cachedZSortedEles = eles; + this.updateCachedGrabbedEles(); + } else { + eles = this.cachedZSortedEles; + } + + return eles; + }; + + var BRp$5 = {}; + [BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) { + extend(BRp$5, props); + }); + + var BRp$4 = {}; + + BRp$4.getCachedImage = function (url, crossOrigin, onLoad) { + var r = this; + var imageCache = r.imageCache = r.imageCache || {}; + var cache = imageCache[url]; + + if (cache) { + if (!cache.image.complete) { + cache.image.addEventListener('load', onLoad); + } + + return cache.image; + } else { + cache = imageCache[url] = imageCache[url] || {}; + var image = cache.image = new Image(); // eslint-disable-line no-undef + + image.addEventListener('load', onLoad); + image.addEventListener('error', function () { + image.error = true; + }); // #1582 safari doesn't load data uris with crossOrigin properly + // https://bugs.webkit.org/show_bug.cgi?id=123978 + + var dataUriPrefix = 'data:'; + var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; + + if (!isDataUri) { + image.crossOrigin = crossOrigin; // prevent tainted canvas + } + + image.src = url; + return image; + } + }; + + var BRp$3 = {}; + /* global document, window, ResizeObserver, MutationObserver */ + + BRp$3.registerBinding = function (target, event, handler, useCapture) { + // eslint-disable-line no-unused-vars + var args = Array.prototype.slice.apply(arguments, [1]); // copy + + var b = this.binder(target); + return b.on.apply(b, args); + }; + + BRp$3.binder = function (tgt) { + var r = this; + var tgtIsDom = tgt === window || tgt === document || tgt === document.body || domElement(tgt); + + if (r.supportsPassiveEvents == null) { + // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection + var supportsPassive = false; + + try { + var opts = Object.defineProperty({}, 'passive', { + get: function get() { + supportsPassive = true; + return true; + } + }); + window.addEventListener('test', null, opts); + } catch (err) {// not supported + } + + r.supportsPassiveEvents = supportsPassive; + } + + var on = function on(event, handler, useCapture) { + var args = Array.prototype.slice.call(arguments); + + if (tgtIsDom && r.supportsPassiveEvents) { + // replace useCapture w/ opts obj + args[2] = { + capture: useCapture != null ? useCapture : false, + passive: false, + once: false + }; + } + + r.bindings.push({ + target: tgt, + args: args + }); + (tgt.addEventListener || tgt.on).apply(tgt, args); + return this; + }; + + return { + on: on, + addEventListener: on, + addListener: on, + bind: on + }; + }; + + BRp$3.nodeIsDraggable = function (node) { + return node && node.isNode() && !node.locked() && node.grabbable(); + }; + + BRp$3.nodeIsGrabbable = function (node) { + return this.nodeIsDraggable(node) && node.interactive(); + }; + + BRp$3.load = function () { + var r = this; + + var isSelected = function isSelected(ele) { + return ele.selected(); + }; + + var triggerEvents = function triggerEvents(target, names, e, position) { + if (target == null) { + target = r.cy; + } + + for (var i = 0; i < names.length; i++) { + var name = names[i]; + target.emit({ + originalEvent: e, + type: name, + position: position + }); + } + }; + + var isMultSelKeyDown = function isMultSelKeyDown(e) { + return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey + }; + + var allowPanningPassthrough = function allowPanningPassthrough(down, downs) { + var allowPassthrough = true; + + if (r.cy.hasCompoundNodes() && down && down.pannable()) { + // a grabbable compound node below the ele => no passthrough panning + for (var i = 0; downs && i < downs.length; i++) { + var down = downs[i]; //if any parent node in event hierarchy isn't pannable, reject passthrough + + if (down.isNode() && down.isParent() && !down.pannable()) { + allowPassthrough = false; + break; + } + } + } else { + allowPassthrough = true; + } + + return allowPassthrough; + }; + + var setGrabbed = function setGrabbed(ele) { + ele[0]._private.grabbed = true; + }; + + var setFreed = function setFreed(ele) { + ele[0]._private.grabbed = false; + }; + + var setInDragLayer = function setInDragLayer(ele) { + ele[0]._private.rscratch.inDragLayer = true; + }; + + var setOutDragLayer = function setOutDragLayer(ele) { + ele[0]._private.rscratch.inDragLayer = false; + }; + + var setGrabTarget = function setGrabTarget(ele) { + ele[0]._private.rscratch.isGrabTarget = true; + }; + + var removeGrabTarget = function removeGrabTarget(ele) { + ele[0]._private.rscratch.isGrabTarget = false; + }; + + var addToDragList = function addToDragList(ele, opts) { + var list = opts.addToList; + var listHasEle = list.has(ele); + + if (!listHasEle && ele.grabbable() && !ele.locked()) { + list.merge(ele); + setGrabbed(ele); + } + }; // helper function to determine which child nodes and inner edges + // of a compound node to be dragged as well as the grabbed and selected nodes + + + var addDescendantsToDrag = function addDescendantsToDrag(node, opts) { + if (!node.cy().hasCompoundNodes()) { + return; + } + + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } // nothing to do + + + var innerNodes = node.descendants(); + + if (opts.inDragLayer) { + innerNodes.forEach(setInDragLayer); + innerNodes.connectedEdges().forEach(setInDragLayer); + } + + if (opts.addToList) { + addToDragList(innerNodes, opts); + } + }; // adds the given nodes and its neighbourhood to the drag layer + + + var addNodesToDrag = function addNodesToDrag(nodes, opts) { + opts = opts || {}; + var hasCompoundNodes = nodes.cy().hasCompoundNodes(); + + if (opts.inDragLayer) { + nodes.forEach(setInDragLayer); + nodes.neighborhood().stdFilter(function (ele) { + return !hasCompoundNodes || ele.isEdge(); + }).forEach(setInDragLayer); + } + + if (opts.addToList) { + nodes.forEach(function (ele) { + addToDragList(ele, opts); + }); + } + + addDescendantsToDrag(nodes, opts); // always add to drag + // also add nodes and edges related to the topmost ancestor + + updateAncestorsInDragLayer(nodes, { + inDragLayer: opts.inDragLayer + }); + r.updateCachedGrabbedEles(); + }; + + var addNodeToDrag = addNodesToDrag; + + var freeDraggedElements = function freeDraggedElements(grabbedEles) { + if (!grabbedEles) { + return; + } // just go over all elements rather than doing a bunch of (possibly expensive) traversals + + + r.getCachedZSortedEles().forEach(function (ele) { + setFreed(ele); + setOutDragLayer(ele); + removeGrabTarget(ele); + }); + r.updateCachedGrabbedEles(); + }; // helper function to determine which ancestor nodes and edges should go + // to the drag layer (or should be removed from drag layer). + + + var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) { + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } // nothing to do + + + if (!node.cy().hasCompoundNodes()) { + return; + } // find top-level parent + + + var parent = node.ancestors().orphans(); // no parent node: no nodes to add to the drag layer + + if (parent.same(node)) { + return; + } + + var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants()); + var edges = nodes.connectedEdges(); + + if (opts.inDragLayer) { + edges.forEach(setInDragLayer); + nodes.forEach(setInDragLayer); + } + + if (opts.addToList) { + nodes.forEach(function (ele) { + addToDragList(ele, opts); + }); + } + }; + + var blurActiveDomElement = function blurActiveDomElement() { + if (document.activeElement != null && document.activeElement.blur != null) { + document.activeElement.blur(); + } + }; + + var haveMutationsApi = typeof MutationObserver !== 'undefined'; + var haveResizeObserverApi = typeof ResizeObserver !== 'undefined'; // watch for when the cy container is removed from the dom + + if (haveMutationsApi) { + r.removeObserver = new MutationObserver(function (mutns) { + // eslint-disable-line no-undef + for (var i = 0; i < mutns.length; i++) { + var mutn = mutns[i]; + var rNodes = mutn.removedNodes; + + if (rNodes) { + for (var j = 0; j < rNodes.length; j++) { + var rNode = rNodes[j]; + + if (rNode === r.container) { + r.destroy(); + break; + } + } + } + } + }); + + if (r.container.parentNode) { + r.removeObserver.observe(r.container.parentNode, { + childList: true + }); + } + } else { + r.registerBinding(r.container, 'DOMNodeRemoved', function (e) { + // eslint-disable-line no-unused-vars + r.destroy(); + }); + } + + var onResize = debounce_1(function () { + r.cy.resize(); + }, 100); + + if (haveMutationsApi) { + r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef + + r.styleObserver.observe(r.container, { + attributes: true + }); + } // auto resize + + + r.registerBinding(window, 'resize', onResize); // eslint-disable-line no-undef + + if (haveResizeObserverApi) { + r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef + + r.resizeObserver.observe(r.container); + } + + var forEachUp = function forEachUp(domEle, fn) { + while (domEle != null) { + fn(domEle); + domEle = domEle.parentNode; + } + }; + + var invalidateCoords = function invalidateCoords() { + r.invalidateContainerClientCoordsCache(); + }; + + forEachUp(r.container, function (domEle) { + r.registerBinding(domEle, 'transitionend', invalidateCoords); + r.registerBinding(domEle, 'animationend', invalidateCoords); + r.registerBinding(domEle, 'scroll', invalidateCoords); + }); // stop right click menu from appearing on cy + + r.registerBinding(r.container, 'contextmenu', function (e) { + e.preventDefault(); + }); + + var inBoxSelection = function inBoxSelection() { + return r.selection[4] !== 0; + }; + + var eventInContainer = function eventInContainer(e) { + // save cycles if mouse events aren't to be captured + var containerPageCoords = r.findContainerClientCoords(); + var x = containerPageCoords[0]; + var y = containerPageCoords[1]; + var width = containerPageCoords[2]; + var height = containerPageCoords[3]; + var positions = e.touches ? e.touches : [e]; + var atLeastOnePosInside = false; + + for (var i = 0; i < positions.length; i++) { + var p = positions[i]; + + if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) { + atLeastOnePosInside = true; + break; + } + } + + if (!atLeastOnePosInside) { + return false; + } + + var container = r.container; + var target = e.target; + var tParent = target.parentNode; + var containerIsTarget = false; + + while (tParent) { + if (tParent === container) { + containerIsTarget = true; + break; + } + + tParent = tParent.parentNode; + } + + if (!containerIsTarget) { + return false; + } // if target is outisde cy container, then this event is not for us + + + return true; + }; // Primary key + + + r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) { + if (!eventInContainer(e)) { + return; + } + + e.preventDefault(); + blurActiveDomElement(); + r.hoverData.capture = true; + r.hoverData.which = e.which; + var cy = r.cy; + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var select = r.selection; + var nears = r.findNearestElements(pos[0], pos[1], true, false); + var near = nears[0]; + var draggedElements = r.dragData.possibleDragElements; + r.hoverData.mdownPos = pos; + r.hoverData.mdownGPos = gpos; + + var checkForTaphold = function checkForTaphold() { + r.hoverData.tapholdCancelled = false; + clearTimeout(r.hoverData.tapholdTimeout); + r.hoverData.tapholdTimeout = setTimeout(function () { + if (r.hoverData.tapholdCancelled) { + return; + } else { + var ele = r.hoverData.down; + + if (ele) { + ele.emit({ + originalEvent: e, + type: 'taphold', + position: { + x: pos[0], + y: pos[1] + } + }); + } else { + cy.emit({ + originalEvent: e, + type: 'taphold', + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + }, r.tapholdDuration); + }; // Right click button + + + if (e.which == 3) { + r.hoverData.cxtStarted = true; + var cxtEvt = { + originalEvent: e, + type: 'cxttapstart', + position: { + x: pos[0], + y: pos[1] + } + }; + + if (near) { + near.activate(); + near.emit(cxtEvt); + r.hoverData.down = near; + } else { + cy.emit(cxtEvt); + } + + r.hoverData.downTime = new Date().getTime(); + r.hoverData.cxtDragged = false; // Primary button + } else if (e.which == 1) { + if (near) { + near.activate(); + } // Element dragging + + + { + // If something is under the cursor and it is draggable, prepare to grab it + if (near != null) { + if (r.nodeIsGrabbable(near)) { + var makeEvent = function makeEvent(type) { + return { + originalEvent: e, + type: type, + position: { + x: pos[0], + y: pos[1] + } + }; + }; + + var triggerGrab = function triggerGrab(ele) { + ele.emit(makeEvent('grab')); + }; + + setGrabTarget(near); + + if (!near.selected()) { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + addNodeToDrag(near, { + addToList: draggedElements + }); + near.emit(makeEvent('grabon')).emit(makeEvent('grab')); + } else { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + var selectedNodes = cy.$(function (ele) { + return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedElements + }); + near.emit(makeEvent('grabon')); + selectedNodes.forEach(triggerGrab); + } + + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + } + + r.hoverData.down = near; + r.hoverData.downs = nears; + r.hoverData.downTime = new Date().getTime(); + } + triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, { + x: pos[0], + y: pos[1] + }); + + if (near == null) { + select[4] = 1; + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint('select', true); + r.redraw(); + } else if (near.pannable()) { + select[4] = 1; // for future pan + } + + checkForTaphold(); + } // Initialize selection box coordinates + + + select[0] = select[2] = pos[0]; + select[1] = select[3] = pos[1]; + }, false); + r.registerBinding(window, 'mousemove', function mousemoveHandler(e) { + // eslint-disable-line no-undef + var capture = r.hoverData.capture; + + if (!capture && !eventInContainer(e)) { + return; + } + + var preventDefault = false; + var cy = r.cy; + var zoom = cy.zoom(); + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var mdownPos = r.hoverData.mdownPos; + var mdownGPos = r.hoverData.mdownGPos; + var select = r.selection; + var near = null; + + if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { + near = r.findNearestElement(pos[0], pos[1], true, false); + } + + var last = r.hoverData.last; + var down = r.hoverData.down; + var disp = [pos[0] - select[2], pos[1] - select[3]]; + var draggedElements = r.dragData.possibleDragElements; + var isOverThresholdDrag; + + if (mdownGPos) { + var dx = gpos[0] - mdownGPos[0]; + var dx2 = dx * dx; + var dy = gpos[1] - mdownGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; + } + + var multSelKeyDown = isMultSelKeyDown(e); + + if (isOverThresholdDrag) { + r.hoverData.tapholdCancelled = true; + } + + var updateDragDelta = function updateDragDelta() { + var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || []; + + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + }; + + preventDefault = true; + triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, { + x: pos[0], + y: pos[1] + }); + + var goIntoBoxMode = function goIntoBoxMode() { + r.data.bgActivePosistion = undefined; + + if (!r.hoverData.selecting) { + cy.emit({ + originalEvent: e, + type: 'boxstart', + position: { + x: pos[0], + y: pos[1] + } + }); + } + + select[4] = 1; + r.hoverData.selecting = true; + r.redrawHint('select', true); + r.redraw(); + }; // trigger context drag if rmouse down + + + if (r.hoverData.which === 3) { + // but only if over threshold + if (isOverThresholdDrag) { + var cxtEvt = { + originalEvent: e, + type: 'cxtdrag', + position: { + x: pos[0], + y: pos[1] + } + }; + + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + + r.hoverData.cxtDragged = true; + + if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { + if (r.hoverData.cxtOver) { + r.hoverData.cxtOver.emit({ + originalEvent: e, + type: 'cxtdragout', + position: { + x: pos[0], + y: pos[1] + } + }); + } + + r.hoverData.cxtOver = near; + + if (near) { + near.emit({ + originalEvent: e, + type: 'cxtdragover', + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + } // Check if we are drag panning the entire graph + + } else if (r.hoverData.dragging) { + preventDefault = true; + + if (cy.panningEnabled() && cy.userPanningEnabled()) { + var deltaP; + + if (r.hoverData.justStartedPan) { + var mdPos = r.hoverData.mdownPos; + deltaP = { + x: (pos[0] - mdPos[0]) * zoom, + y: (pos[1] - mdPos[1]) * zoom + }; + r.hoverData.justStartedPan = false; + } else { + deltaP = { + x: disp[0] * zoom, + y: disp[1] * zoom + }; + } + + cy.panBy(deltaP); + cy.emit('dragpan'); + r.hoverData.dragged = true; + } // Needs reproject due to pan changing viewport + + + pos = r.projectIntoViewport(e.clientX, e.clientY); // Checks primary button down & out of time & mouse not moved much + } else if (select[4] == 1 && (down == null || down.pannable())) { + if (isOverThresholdDrag) { + if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { + goIntoBoxMode(); + } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); + + if (allowPassthrough) { + r.hoverData.dragging = true; + r.hoverData.justStartedPan = true; + select[4] = 0; + r.data.bgActivePosistion = array2point(mdownPos); + r.redrawHint('select', true); + r.redraw(); + } + } + + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + } + } else { + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + + if ((!down || !down.grabbed()) && near != last) { + if (last) { + triggerEvents(last, ['mouseout', 'tapdragout'], e, { + x: pos[0], + y: pos[1] + }); + } + + if (near) { + triggerEvents(near, ['mouseover', 'tapdragover'], e, { + x: pos[0], + y: pos[1] + }); + } + + r.hoverData.last = near; + } + + if (down) { + if (isOverThresholdDrag) { + // then we can take action + if (cy.boxSelectionEnabled() && multSelKeyDown) { + // then selection overrides + if (down && down.grabbed()) { + freeDraggedElements(draggedElements); + down.emit('freeon'); + draggedElements.emit('free'); + + if (r.dragData.didDrag) { + down.emit('dragfreeon'); + draggedElements.emit('dragfree'); + } + } + + goIntoBoxMode(); + } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { + // drag node + var justStartedDrag = !r.dragData.didDrag; + + if (justStartedDrag) { + r.redrawHint('eles', true); + } + + r.dragData.didDrag = true; // indicate that we actually did drag the node + // now, add the elements to the drag layer if not done already + + if (!r.hoverData.draggingEles) { + addNodesToDrag(draggedElements, { + inDragLayer: true + }); + } + + var totalShift = { + x: 0, + y: 0 + }; + + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + + if (justStartedDrag) { + var dragDelta = r.hoverData.dragDelta; + + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + + r.hoverData.draggingEles = true; + draggedElements.silentShift(totalShift).emit('position drag'); + r.redrawHint('drag', true); + r.redraw(); + } + } else { + // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant + updateDragDelta(); + } + } // prevent the dragging from triggering text selection on the page + + + preventDefault = true; + } + + select[2] = pos[0]; + select[3] = pos[1]; + + if (preventDefault) { + if (e.stopPropagation) e.stopPropagation(); + if (e.preventDefault) e.preventDefault(); + return false; + } + }, false); + var clickTimeout, didDoubleClick, prevClickTimeStamp; + r.registerBinding(window, 'mouseup', function mouseupHandler(e) { + // eslint-disable-line no-undef + var capture = r.hoverData.capture; + + if (!capture) { + return; + } + + r.hoverData.capture = false; + var cy = r.cy; + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var select = r.selection; + var near = r.findNearestElement(pos[0], pos[1], true, false); + var draggedElements = r.dragData.possibleDragElements; + var down = r.hoverData.down; + var multSelKeyDown = isMultSelKeyDown(e); + + if (r.data.bgActivePosistion) { + r.redrawHint('select', true); + r.redraw(); + } + + r.hoverData.tapholdCancelled = true; + r.data.bgActivePosistion = undefined; // not active bg now + + if (down) { + down.unactivate(); + } + + if (r.hoverData.which === 3) { + var cxtEvt = { + originalEvent: e, + type: 'cxttapend', + position: { + x: pos[0], + y: pos[1] + } + }; + + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + + if (!r.hoverData.cxtDragged) { + var cxtTap = { + originalEvent: e, + type: 'cxttap', + position: { + x: pos[0], + y: pos[1] + } + }; + + if (down) { + down.emit(cxtTap); + } else { + cy.emit(cxtTap); + } + } + + r.hoverData.cxtDragged = false; + r.hoverData.which = null; + } else if (r.hoverData.which === 1) { + triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, { + x: pos[0], + y: pos[1] + }); + + if (!r.dragData.didDrag && // didn't move a node around + !r.hoverData.dragged && // didn't pan + !r.hoverData.selecting && // not box selection + !r.hoverData.isOverThresholdDrag // didn't move too much + ) { + triggerEvents(down, ["click", "tap", "vclick"], e, { + x: pos[0], + y: pos[1] + }); + didDoubleClick = false; + + if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { + clickTimeout && clearTimeout(clickTimeout); + didDoubleClick = true; + prevClickTimeStamp = null; + triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { + x: pos[0], + y: pos[1] + }); + } else { + clickTimeout = setTimeout(function () { + if (didDoubleClick) return; + triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { + x: pos[0], + y: pos[1] + }); + }, cy.multiClickDebounceTime()); + prevClickTimeStamp = e.timeStamp; + } + } // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something + + + if (down == null // not mousedown on node + && !r.dragData.didDrag // didn't move the node around + && !r.hoverData.selecting // not box selection + && !r.hoverData.dragged // didn't pan + && !isMultSelKeyDown(e)) { + cy.$(isSelected).unselect(['tapunselect']); + + if (draggedElements.length > 0) { + r.redrawHint('eles', true); + } + + r.dragData.possibleDragElements = draggedElements = cy.collection(); + } // Single selection + + + if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { + if (near != null && near._private.selectable) { + if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) { + if (near.selected()) { + near.unselect(['tapunselect']); + } else { + near.select(['tapselect']); + } + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(near).unselect(['tapunselect']); + near.select(['tapselect']); + } + } + + r.redrawHint('eles', true); + } + } + + if (r.hoverData.selecting) { + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + r.redrawHint('select', true); + + if (box.length > 0) { + r.redrawHint('eles', true); + } + + cy.emit({ + type: 'boxend', + originalEvent: e, + position: { + x: pos[0], + y: pos[1] + } + }); + + var eleWouldBeSelected = function eleWouldBeSelected(ele) { + return ele.selectable() && !ele.selected(); + }; + + if (cy.selectionType() === 'additive') { + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(box).unselect(); + } + + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + } // always need redraw in case eles unselectable + + + r.redraw(); + } // Cancel drag pan + + + if (r.hoverData.dragging) { + r.hoverData.dragging = false; + r.redrawHint('select', true); + r.redrawHint('eles', true); + r.redraw(); + } + + if (!select[4]) { + r.redrawHint('drag', true); + r.redrawHint('eles', true); + var downWasGrabbed = down && down.grabbed(); + freeDraggedElements(draggedElements); + + if (downWasGrabbed) { + down.emit('freeon'); + draggedElements.emit('free'); + + if (r.dragData.didDrag) { + down.emit('dragfreeon'); + draggedElements.emit('dragfree'); + } + } + } + } // else not right mouse + + + select[4] = 0; + r.hoverData.down = null; + r.hoverData.cxtStarted = false; + r.hoverData.draggingEles = false; + r.hoverData.selecting = false; + r.hoverData.isOverThresholdDrag = false; + r.dragData.didDrag = false; + r.hoverData.dragged = false; + r.hoverData.dragDelta = []; + r.hoverData.mdownPos = null; + r.hoverData.mdownGPos = null; + }, false); + + var wheelHandler = function wheelHandler(e) { + if (r.scrollingPage) { + return; + } // while scrolling, ignore wheel-to-zoom + + + var cy = r.cy; + var zoom = cy.zoom(); + var pan = cy.pan(); + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; + + if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { + // if pan dragging or cxt dragging, wheel movements make no zoom + e.preventDefault(); + return; + } + + if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { + e.preventDefault(); + r.data.wheelZooming = true; + clearTimeout(r.data.wheelTimeout); + r.data.wheelTimeout = setTimeout(function () { + r.data.wheelZooming = false; + r.redrawHint('eles', true); + r.redraw(); + }, 150); + var diff; + + if (e.deltaY != null) { + diff = e.deltaY / -250; + } else if (e.wheelDeltaY != null) { + diff = e.wheelDeltaY / 1000; + } else { + diff = e.wheelDelta / 1000; + } + + diff = diff * r.wheelSensitivity; + var needsWheelFix = e.deltaMode === 1; + + if (needsWheelFix) { + // fixes slow wheel events on ff/linux and ff/windows + diff *= 33; + } + + var newZoom = cy.zoom() * Math.pow(10, diff); + + if (e.type === 'gesturechange') { + newZoom = r.gestureStartZoom * e.scale; + } + + cy.zoom({ + level: newZoom, + renderedPosition: { + x: rpos[0], + y: rpos[1] + } + }); + cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom'); + } + }; // Functions to help with whether mouse wheel should trigger zooming + // -- + + + r.registerBinding(r.container, 'wheel', wheelHandler, true); // disable nonstandard wheel events + // r.registerBinding(r.container, 'mousewheel', wheelHandler, true); + // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true); + // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox + + r.registerBinding(window, 'scroll', function scrollHandler(e) { + // eslint-disable-line no-unused-vars + r.scrollingPage = true; + clearTimeout(r.scrollingPageTimeout); + r.scrollingPageTimeout = setTimeout(function () { + r.scrollingPage = false; + }, 250); + }, true); // desktop safari pinch to zoom start + + r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) { + r.gestureStartZoom = r.cy.zoom(); + + if (!r.hasTouchStarted) { + // don't affect touch devices like iphone + e.preventDefault(); + } + }, true); + r.registerBinding(r.container, 'gesturechange', function (e) { + if (!r.hasTouchStarted) { + // don't affect touch devices like iphone + wheelHandler(e); + } + }, true); // Functions to help with handling mouseout/mouseover on the Cytoscape container + // Handle mouseout on Cytoscape container + + r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: 'mouseout', + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: 'mouseover', + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom + + var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom + + var center1, modelCenter1; // center point on start pinch to zoom + + var offsetLeft, offsetTop; + var containerWidth, containerHeight; + var twoFingersStartInside; + + var distance = function distance(x1, y1, x2, y2) { + return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); + }; + + var distanceSq = function distanceSq(x1, y1, x2, y2) { + return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); + }; + + var touchstartHandler; + r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) { + r.hasTouchStarted = true; + + if (!eventInContainer(e)) { + return; + } + + blurActiveDomElement(); + r.touchData.capture = true; + r.data.bgActivePosistion = undefined; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } // record starting points for pinch-to-zoom + + + if (e.touches[1]) { + r.touchData.singleTouchMoved = true; + freeDraggedElements(r.dragData.touchDragEles); + var offsets = r.findContainerClientCoords(); + offsetLeft = offsets[0]; + offsetTop = offsets[1]; + containerWidth = offsets[2]; + containerHeight = offsets[3]; + f1x1 = e.touches[0].clientX - offsetLeft; + f1y1 = e.touches[0].clientY - offsetTop; + f2x1 = e.touches[1].clientX - offsetLeft; + f2y1 = e.touches[1].clientY - offsetTop; + twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; + var pan = cy.pan(); + var zoom = cy.zoom(); + distance1 = distance(f1x1, f1y1, f2x1, f2y1); + distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); + center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; + modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; // consider context tap + + var cxtDistThreshold = 200; + var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; + + if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { + var near1 = r.findNearestElement(now[0], now[1], true, true); + var near2 = r.findNearestElement(now[2], now[3], true, true); + + if (near1 && near1.isNode()) { + near1.activate().emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + r.touchData.start = near1; + } else if (near2 && near2.isNode()) { + near2.activate().emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + r.touchData.start = near2; + } else { + cy.emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + } + + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + + r.touchData.cxt = true; + r.touchData.cxtDragged = false; + r.data.bgActivePosistion = undefined; + r.redraw(); + return; + } + } + + if (e.touches[2]) { + // ignore + // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) + if (cy.boxSelectionEnabled()) { + e.preventDefault(); + } + } else if (e.touches[1]) ; else if (e.touches[0]) { + var nears = r.findNearestElements(now[0], now[1], true, true); + var near = nears[0]; + + if (near != null) { + near.activate(); + r.touchData.start = near; + r.touchData.starts = nears; + + if (r.nodeIsGrabbable(near)) { + var draggedEles = r.dragData.touchDragEles = cy.collection(); + var selectedNodes = null; + r.redrawHint('eles', true); + r.redrawHint('drag', true); + + if (near.selected()) { + // reset drag elements, since near will be added again + selectedNodes = cy.$(function (ele) { + return ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedEles + }); + } else { + addNodeToDrag(near, { + addToList: draggedEles + }); + } + + setGrabTarget(near); + + var makeEvent = function makeEvent(type) { + return { + originalEvent: e, + type: type, + position: { + x: now[0], + y: now[1] + } + }; + }; + + near.emit(makeEvent('grabon')); + + if (selectedNodes) { + selectedNodes.forEach(function (n) { + n.emit(makeEvent('grab')); + }); + } else { + near.emit(makeEvent('grab')); + } + } + } + + triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, { + x: now[0], + y: now[1] + }); + + if (near == null) { + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint('select', true); + r.redraw(); + } // Tap, taphold + // ----- + + + r.touchData.singleTouchMoved = false; + r.touchData.singleTouchStartTime = +new Date(); + clearTimeout(r.touchData.tapholdTimeout); + r.touchData.tapholdTimeout = setTimeout(function () { + if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect + && !r.touchData.selecting // box selection shouldn't allow taphold through + ) { + triggerEvents(r.touchData.start, ['taphold'], e, { + x: now[0], + y: now[1] + }); + } + }, r.tapholdDuration); + } + + if (e.touches.length >= 1) { + var sPos = r.touchData.startPosition = []; + + for (var i = 0; i < now.length; i++) { + sPos[i] = earlier[i] = now[i]; + } + + var touch0 = e.touches[0]; + r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; + } + }, false); + var touchmoveHandler; + r.registerBinding(window, 'touchmove', touchmoveHandler = function touchmoveHandler(e) { + // eslint-disable-line no-undef + var capture = r.touchData.capture; + + if (!capture && !eventInContainer(e)) { + return; + } + + var select = r.selection; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + var zoom = cy.zoom(); + + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + + var startGPos = r.touchData.startGPosition; + var isOverThresholdDrag; + + if (capture && e.touches[0] && startGPos) { + var disp = []; + + for (var j = 0; j < now.length; j++) { + disp[j] = now[j] - earlier[j]; + } + + var dx = e.touches[0].clientX - startGPos[0]; + var dx2 = dx * dx; + var dy = e.touches[0].clientY - startGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + isOverThresholdDrag = dist2 >= r.touchTapThreshold2; + } // context swipe cancelling + + + if (capture && r.touchData.cxt) { + e.preventDefault(); + var f1x2 = e.touches[0].clientX - offsetLeft, + f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, + f2y2 = e.touches[1].clientY - offsetTop; // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); + + var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); + var factorSq = distance2Sq / distance1Sq; + var distThreshold = 150; + var distThresholdSq = distThreshold * distThreshold; + var factorThreshold = 1.5; + var factorThresholdSq = factorThreshold * factorThreshold; // cancel ctx gestures if the distance b/t the fingers increases + + if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { + r.touchData.cxt = false; + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var cxtEvt = { + originalEvent: e, + type: 'cxttapend', + position: { + x: now[0], + y: now[1] + } + }; + + if (r.touchData.start) { + r.touchData.start.unactivate().emit(cxtEvt); + r.touchData.start = null; + } else { + cy.emit(cxtEvt); + } + } + } // context swipe + + + if (capture && r.touchData.cxt) { + var cxtEvt = { + originalEvent: e, + type: 'cxtdrag', + position: { + x: now[0], + y: now[1] + } + }; + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + + if (r.touchData.start) { + r.touchData.start.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + + r.touchData.cxtDragged = true; + var near = r.findNearestElement(now[0], now[1], true, true); + + if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { + if (r.touchData.cxtOver) { + r.touchData.cxtOver.emit({ + originalEvent: e, + type: 'cxtdragout', + position: { + x: now[0], + y: now[1] + } + }); + } + + r.touchData.cxtOver = near; + + if (near) { + near.emit({ + originalEvent: e, + type: 'cxtdragover', + position: { + x: now[0], + y: now[1] + } + }); + } + } // box selection + + } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = undefined; + this.lastThreeTouch = +new Date(); + + if (!r.touchData.selecting) { + cy.emit({ + originalEvent: e, + type: 'boxstart', + position: { + x: now[0], + y: now[1] + } + }); + } + + r.touchData.selecting = true; + r.touchData.didSelect = true; + select[4] = 1; + + if (!select || select.length === 0 || select[0] === undefined) { + select[0] = (now[0] + now[2] + now[4]) / 3; + select[1] = (now[1] + now[3] + now[5]) / 3; + select[2] = (now[0] + now[2] + now[4]) / 3 + 1; + select[3] = (now[1] + now[3] + now[5]) / 3 + 1; + } else { + select[2] = (now[0] + now[2] + now[4]) / 3; + select[3] = (now[1] + now[3] + now[5]) / 3; + } + + r.redrawHint('select', true); + r.redraw(); // pinch to zoom + } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom + && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { + // two fingers => pinch to zoom + e.preventDefault(); + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var draggedEles = r.dragData.touchDragEles; + + if (draggedEles) { + r.redrawHint('drag', true); + + for (var i = 0; i < draggedEles.length; i++) { + var de_p = draggedEles[i]._private; + de_p.grabbed = false; + de_p.rscratch.inDragLayer = false; + } + } + + var _start = r.touchData.start; // (x2, y2) for fingers 1 and 2 + + var f1x2 = e.touches[0].clientX - offsetLeft, + f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, + f2y2 = e.touches[1].clientY - offsetTop; + var distance2 = distance(f1x2, f1y2, f2x2, f2y2); // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); + // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq ); + + var factor = distance2 / distance1; + + if (twoFingersStartInside) { + // delta finger1 + var df1x = f1x2 - f1x1; + var df1y = f1y2 - f1y1; // delta finger 2 + + var df2x = f2x2 - f2x1; + var df2y = f2y2 - f2y1; // translation is the normalised vector of the two fingers movement + // i.e. so pinching cancels out and moving together pans + + var tx = (df1x + df2x) / 2; + var ty = (df1y + df2y) / 2; // now calculate the zoom + + var zoom1 = cy.zoom(); + var zoom2 = zoom1 * factor; + var pan1 = cy.pan(); // the model center point converted to the current rendered pos + + var ctrx = modelCenter1[0] * zoom1 + pan1.x; + var ctry = modelCenter1[1] * zoom1 + pan1.y; + var pan2 = { + x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, + y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry + }; // remove dragged eles + + if (_start && _start.active()) { + var draggedEles = r.dragData.touchDragEles; + freeDraggedElements(draggedEles); + r.redrawHint('drag', true); + r.redrawHint('eles', true); + + _start.unactivate().emit('freeon'); + + draggedEles.emit('free'); + + if (r.dragData.didDrag) { + _start.emit('dragfreeon'); + + draggedEles.emit('dragfree'); + } + } + + cy.viewport({ + zoom: zoom2, + pan: pan2, + cancelOnFailedZoom: true + }); + cy.emit('pinchzoom'); + distance1 = distance2; + f1x1 = f1x2; + f1y1 = f1y2; + f2x1 = f2x2; + f2y1 = f2y2; + r.pinching = true; + } // Re-project + + + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning + ) { + var start = r.touchData.start; + var last = r.touchData.last; + var near; + + if (!r.hoverData.draggingEles && !r.swipePanning) { + near = r.findNearestElement(now[0], now[1], true, true); + } + + if (capture && start != null) { + e.preventDefault(); + } // dragging nodes + + + if (capture && start != null && r.nodeIsDraggable(start)) { + if (isOverThresholdDrag) { + // then dragging can happen + var draggedEles = r.dragData.touchDragEles; + var justStartedDrag = !r.dragData.didDrag; + + if (justStartedDrag) { + addNodesToDrag(draggedEles, { + inDragLayer: true + }); + } + + r.dragData.didDrag = true; + var totalShift = { + x: 0, + y: 0 + }; + + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + + if (justStartedDrag) { + r.redrawHint('eles', true); + var dragDelta = r.touchData.dragDelta; + + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + + r.hoverData.draggingEles = true; + draggedEles.silentShift(totalShift).emit('position drag'); + r.redrawHint('drag', true); + + if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { + r.redrawHint('eles', true); + } + + r.redraw(); + } else { + // otherise keep track of drag delta for later + var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; + + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + } + } // touchmove + + + { + triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, { + x: now[0], + y: now[1] + }); + + if ((!start || !start.grabbed()) && near != last) { + if (last) { + last.emit({ + originalEvent: e, + type: 'tapdragout', + position: { + x: now[0], + y: now[1] + } + }); + } + + if (near) { + near.emit({ + originalEvent: e, + type: 'tapdragover', + position: { + x: now[0], + y: now[1] + } + }); + } + } + + r.touchData.last = near; + } // check to cancel taphold + + if (capture) { + for (var i = 0; i < now.length; i++) { + if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) { + r.touchData.singleTouchMoved = true; + } + } + } // panning + + + if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts); + + if (allowPassthrough) { + e.preventDefault(); + + if (!r.data.bgActivePosistion) { + r.data.bgActivePosistion = array2point(r.touchData.startPosition); + } + + if (r.swipePanning) { + cy.panBy({ + x: disp[0] * zoom, + y: disp[1] * zoom + }); + cy.emit('dragpan'); + } else if (isOverThresholdDrag) { + r.swipePanning = true; + cy.panBy({ + x: dx * zoom, + y: dy * zoom + }); + cy.emit('dragpan'); + + if (start) { + start.unactivate(); + r.redrawHint('select', true); + r.touchData.start = null; + } + } + } // Re-project + + + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + } + + for (var j = 0; j < now.length; j++) { + earlier[j] = now[j]; + } // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning + + + if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + r.redraw(); + } + }, false); + var touchcancelHandler; + r.registerBinding(window, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) { + // eslint-disable-line no-unused-vars + var start = r.touchData.start; + r.touchData.capture = false; + + if (start) { + start.unactivate(); + } + }); + var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; + r.registerBinding(window, 'touchend', touchendHandler = function touchendHandler(e) { + // eslint-disable-line no-unused-vars + var start = r.touchData.start; + var capture = r.touchData.capture; + + if (capture) { + if (e.touches.length === 0) { + r.touchData.capture = false; + } + + e.preventDefault(); + } else { + return; + } + + var select = r.selection; + r.swipePanning = false; + r.hoverData.draggingEles = false; + var cy = r.cy; + var zoom = cy.zoom(); + var now = r.touchData.now; + var earlier = r.touchData.earlier; + + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + + if (start) { + start.unactivate(); + } + + var ctxTapend; + + if (r.touchData.cxt) { + ctxTapend = { + originalEvent: e, + type: 'cxttapend', + position: { + x: now[0], + y: now[1] + } + }; + + if (start) { + start.emit(ctxTapend); + } else { + cy.emit(ctxTapend); + } + + if (!r.touchData.cxtDragged) { + var ctxTap = { + originalEvent: e, + type: 'cxttap', + position: { + x: now[0], + y: now[1] + } + }; + + if (start) { + start.emit(ctxTap); + } else { + cy.emit(ctxTap); + } + } + + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + + r.touchData.cxt = false; + r.touchData.start = null; + r.redraw(); + return; + } // no more box selection if we don't have three fingers + + + if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { + r.touchData.selecting = false; + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + select[0] = undefined; + select[1] = undefined; + select[2] = undefined; + select[3] = undefined; + select[4] = 0; + r.redrawHint('select', true); + cy.emit({ + type: 'boxend', + originalEvent: e, + position: { + x: now[0], + y: now[1] + } + }); + + var eleWouldBeSelected = function eleWouldBeSelected(ele) { + return ele.selectable() && !ele.selected(); + }; + + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + + if (box.nonempty()) { + r.redrawHint('eles', true); + } + + r.redraw(); + } + + if (start != null) { + start.unactivate(); + } + + if (e.touches[2]) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var draggedEles = r.dragData.touchDragEles; + + if (start != null) { + var startWasGrabbed = start._private.grabbed; + freeDraggedElements(draggedEles); + r.redrawHint('drag', true); + r.redrawHint('eles', true); + + if (startWasGrabbed) { + start.emit('freeon'); + draggedEles.emit('free'); + + if (r.dragData.didDrag) { + start.emit('dragfreeon'); + draggedEles.emit('dragfree'); + } + } + + triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { + x: now[0], + y: now[1] + }); + start.unactivate(); + r.touchData.start = null; + } else { + var near = r.findNearestElement(now[0], now[1], true, true); + triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { + x: now[0], + y: now[1] + }); + } + + var dx = r.touchData.startPosition[0] - now[0]; + var dx2 = dx * dx; + var dy = r.touchData.startPosition[1] - now[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + var rdist2 = dist2 * zoom * zoom; // Tap event, roughly same as mouse click event for touch + + if (!r.touchData.singleTouchMoved) { + if (!start) { + cy.$(':selected').unselect(['tapunselect']); + } + + triggerEvents(start, ['tap', 'vclick'], e, { + x: now[0], + y: now[1] + }); + didDoubleTouch = false; + + if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { + touchTimeout && clearTimeout(touchTimeout); + didDoubleTouch = true; + prevTouchTimeStamp = null; + triggerEvents(start, ['dbltap', 'vdblclick'], e, { + x: now[0], + y: now[1] + }); + } else { + touchTimeout = setTimeout(function () { + if (didDoubleTouch) return; + triggerEvents(start, ['onetap', 'voneclick'], e, { + x: now[0], + y: now[1] + }); + }, cy.multiClickDebounceTime()); + prevTouchTimeStamp = e.timeStamp; + } + } // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance + + + if (start != null && !r.dragData.didDrag // didn't drag nodes around + && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection + ) { + if (cy.selectionType() === 'single') { + cy.$(isSelected).unmerge(start).unselect(['tapunselect']); + start.select(['tapselect']); + } else { + if (start.selected()) { + start.unselect(['tapunselect']); + } else { + start.select(['tapselect']); + } + } + + r.redrawHint('eles', true); + } + + r.touchData.singleTouchMoved = true; + } + + for (var j = 0; j < now.length; j++) { + earlier[j] = now[j]; + } + + r.dragData.didDrag = false; // reset for next touchstart + + if (e.touches.length === 0) { + r.touchData.dragDelta = []; + r.touchData.startPosition = null; + r.touchData.startGPosition = null; + r.touchData.didSelect = false; + } + + if (e.touches.length < 2) { + if (e.touches.length === 1) { + // the old start global pos'n may not be the same finger that remains + r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; + } + + r.pinching = false; + r.redrawHint('eles', true); + r.redraw(); + } //r.redraw(); + + }, false); // fallback compatibility layer for ms pointer events + + if (typeof TouchEvent === 'undefined') { + var pointers = []; + + var makeTouch = function makeTouch(e) { + return { + clientX: e.clientX, + clientY: e.clientY, + force: 1, + identifier: e.pointerId, + pageX: e.pageX, + pageY: e.pageY, + radiusX: e.width / 2, + radiusY: e.height / 2, + screenX: e.screenX, + screenY: e.screenY, + target: e.target + }; + }; + + var makePointer = function makePointer(e) { + return { + event: e, + touch: makeTouch(e) + }; + }; + + var addPointer = function addPointer(e) { + pointers.push(makePointer(e)); + }; + + var removePointer = function removePointer(e) { + for (var i = 0; i < pointers.length; i++) { + var p = pointers[i]; + + if (p.event.pointerId === e.pointerId) { + pointers.splice(i, 1); + return; + } + } + }; + + var updatePointer = function updatePointer(e) { + var p = pointers.filter(function (p) { + return p.event.pointerId === e.pointerId; + })[0]; + p.event = e; + p.touch = makeTouch(e); + }; + + var addTouchesToEvent = function addTouchesToEvent(e) { + e.touches = pointers.map(function (p) { + return p.touch; + }); + }; + + var pointerIsMouse = function pointerIsMouse(e) { + return e.pointerType === 'mouse' || e.pointerType === 4; + }; + + r.registerBinding(r.container, 'pointerdown', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + + e.preventDefault(); + addPointer(e); + addTouchesToEvent(e); + touchstartHandler(e); + }); + r.registerBinding(r.container, 'pointerup', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + + removePointer(e); + addTouchesToEvent(e); + touchendHandler(e); + }); + r.registerBinding(r.container, 'pointercancel', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + + removePointer(e); + addTouchesToEvent(e); + touchcancelHandler(e); + }); + r.registerBinding(r.container, 'pointermove', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + + e.preventDefault(); + updatePointer(e); + addTouchesToEvent(e); + touchmoveHandler(e); + }); + } + }; + + var BRp$2 = {}; + + BRp$2.generatePolygon = function (name, points) { + return this.nodeShapes[name] = { + renderer: this, + name: name, + points: points, + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding); + } + }; + }; + + BRp$2.generateEllipse = function () { + return this.nodeShapes['ellipse'] = { + renderer: this, + name: 'ellipse', + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return checkInEllipse(x, y, width, height, centerX, centerY, padding); + } + }; + }; + + BRp$2.generateRoundPolygon = function (name, points) { + // Pre-compute control points + // Since these points depend on the radius length (which in turns depend on the width/height of the node) we will only pre-compute + // the unit vectors. + // For simplicity the layout will be: + // [ p0, UnitVectorP0P1, p1, UniVectorP1P2, ..., pn, UnitVectorPnP0 ] + var allPoints = new Array(points.length * 2); + + for (var i = 0; i < points.length / 2; i++) { + var sourceIndex = i * 2; + var destIndex = void 0; + + if (i < points.length / 2 - 1) { + destIndex = (i + 1) * 2; + } else { + destIndex = 0; + } + + allPoints[i * 4] = points[sourceIndex]; + allPoints[i * 4 + 1] = points[sourceIndex + 1]; + var xDest = points[destIndex] - points[sourceIndex]; + var yDest = points[destIndex + 1] - points[sourceIndex + 1]; + var norm = Math.sqrt(xDest * xDest + yDest * yDest); + allPoints[i * 4 + 2] = xDest / norm; + allPoints[i * 4 + 3] = yDest / norm; + } + + return this.nodeShapes[name] = { + renderer: this, + name: name, + points: allPoints, + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height); + } + }; + }; + + BRp$2.generateRoundRectangle = function () { + return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = { + renderer: this, + name: 'round-rectangle', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = cornerRadius * 2; // Check hBox + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } // Check vBox + + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } // Check top left quarter circle + + + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } // Check top right quarter circle + + + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } // Check bottom right quarter circle + + + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } // Check bottom left quarter circle + + + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + + return false; + } + }; + }; + + BRp$2.generateCutRectangle = function () { + return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = { + renderer: this, + name: 'cut-rectangle', + cornerLength: getCutRectangleCornerLength(), + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY) { + var cl = this.cornerLength; + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; // points are in clockwise order, inner (imaginary) triangle pt on [4, 5] + + return { + topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], + topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], + bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], + bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] + }; + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); + return polygonIntersectLine(x, y, pts, nodeX, nodeY); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * this.cornerLength, [0, -1], padding)) { + return true; + } // Check vBox + + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * this.cornerLength, height, [0, -1], padding)) { + return true; + } + + var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); + return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft); + } + }; + }; + + BRp$2.generateBarrel = function () { + return this.nodeShapes['barrel'] = { + renderer: this, + name: 'barrel', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + // use two fixed t values for the bezier curve approximation + var t0 = 0.15; + var t1 = 0.5; + var t2 = 0.85; + var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + + var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) { + // approximate curve pts based on the two t values + var m0 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t0); + var m1 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t1); + var m2 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t2); + return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]]; + }; + + var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); + return polygonIntersectLine(x, y, pts, nodeX, nodeY); + }, + generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) { + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; // points are in clockwise order, inner (imaginary) control pt on [4, 5] + + var pts = { + topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], + topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], + bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], + bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] + }; + pts.topLeft.isTop = true; + pts.topRight.isTop = true; + pts.bottomLeft.isBottom = true; + pts.bottomRight.isBottom = true; + return pts; + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; // Check hBox + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) { + return true; + } // Check vBox + + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) { + return true; + } + + var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY); + + var getCurveT = function getCurveT(x, y, curvePts) { + var x0 = curvePts[4]; + var x1 = curvePts[2]; + var x2 = curvePts[0]; + var y0 = curvePts[5]; // var y1 = curvePts[ 3 ]; + + var y2 = curvePts[1]; + var xMin = Math.min(x0, x2); + var xMax = Math.max(x0, x2); + var yMin = Math.min(y0, y2); + var yMax = Math.max(y0, y2); + + if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) { + var coeff = bezierPtsToQuadCoeff(x0, x1, x2); + var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x); + var validRoots = roots.filter(function (r) { + return 0 <= r && r <= 1; + }); + + if (validRoots.length > 0) { + return validRoots[0]; + } + } + + return null; + }; + + var curveRegions = Object.keys(barrelCurvePts); + + for (var i = 0; i < curveRegions.length; i++) { + var corner = curveRegions[i]; + var cornerPts = barrelCurvePts[corner]; + var t = getCurveT(x, y, cornerPts); + + if (t == null) { + continue; + } + + var y0 = cornerPts[5]; + var y1 = cornerPts[3]; + var y2 = cornerPts[1]; + var bezY = qbezierAt(y0, y1, y2, t); + + if (cornerPts.isTop && bezY <= y) { + return true; + } + + if (cornerPts.isBottom && y <= bezY) { + return true; + } + } + + return false; + } + }; + }; + + BRp$2.generateBottomRoundrectangle = function () { + return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = { + renderer: this, + name: 'bottom-round-rectangle', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var topStartX = nodeX - (width / 2 + padding); + var topStartY = nodeY - (height / 2 + padding); + var topEndY = topStartY; + var topEndX = nodeX + (width / 2 + padding); + var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + + if (topIntersections.length > 0) { + return topIntersections; + } + + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = 2 * cornerRadius; // Check hBox + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } // Check vBox + + + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } // check non-rounded top side + + + var outerWidth = width / 2 + 2 * padding; + var outerHeight = height / 2 + 2 * padding; + var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; + + if (pointInsidePolygonPoints(x, y, points)) { + return true; + } // Check bottom right quarter circle + + + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } // Check bottom left quarter circle + + + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + + return false; + } + }; + }; + + BRp$2.registerNodeShapes = function () { + var nodeShapes = this.nodeShapes = {}; + var renderer = this; + this.generateEllipse(); + this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0)); + this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0)); + this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0)); + nodeShapes['square'] = nodeShapes['rectangle']; + this.generateRoundRectangle(); + this.generateCutRectangle(); + this.generateBarrel(); + this.generateBottomRoundrectangle(); + { + var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; + this.generatePolygon('diamond', diamondPoints); + this.generateRoundPolygon('round-diamond', diamondPoints); + } + this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0)); + this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0)); + this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0)); + this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0)); + this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0)); + this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0)); + this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0)); + this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0)); + var star5Points = new Array(20); + { + var outerPoints = generateUnitNgonPoints(5, 0); + var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); // Outer radius is 1; inner radius of star is smaller + + var innerRadius = 0.5 * (3 - Math.sqrt(5)); + innerRadius *= 1.57; + + for (var i = 0; i < innerPoints.length / 2; i++) { + innerPoints[i * 2] *= innerRadius; + innerPoints[i * 2 + 1] *= innerRadius; + } + + for (var i = 0; i < 20 / 4; i++) { + star5Points[i * 4] = outerPoints[i * 2]; + star5Points[i * 4 + 1] = outerPoints[i * 2 + 1]; + star5Points[i * 4 + 2] = innerPoints[i * 2]; + star5Points[i * 4 + 3] = innerPoints[i * 2 + 1]; + } + } + star5Points = fitPolygonToSquare(star5Points); + this.generatePolygon('star', star5Points); + this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]); + this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); + this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); + { + var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; + this.generatePolygon('tag', tagPoints); + this.generateRoundPolygon('round-tag', tagPoints); + } + + nodeShapes.makePolygon = function (points) { + // use caching on user-specified polygons so they are as fast as native shapes + var key = points.join('$'); + var name = 'polygon-' + key; + var shape; + + if (shape = this[name]) { + // got cached shape + return shape; + } // create and cache new shape + + + return renderer.generatePolygon(name, points); + }; + }; + + var BRp$1 = {}; + + BRp$1.timeToRender = function () { + return this.redrawTotalTime / this.redrawCount; + }; + + BRp$1.redraw = function (options) { + options = options || staticEmptyObject(); + var r = this; + + if (r.averageRedrawTime === undefined) { + r.averageRedrawTime = 0; + } + + if (r.lastRedrawTime === undefined) { + r.lastRedrawTime = 0; + } + + if (r.lastDrawTime === undefined) { + r.lastDrawTime = 0; + } + + r.requestedFrame = true; + r.renderOptions = options; + }; + + BRp$1.beforeRender = function (fn, priority) { + // the renderer can't add tick callbacks when destroyed + if (this.destroyed) { + return; + } + + if (priority == null) { + error('Priority is not optional for beforeRender'); + } + + var cbs = this.beforeRenderCallbacks; + cbs.push({ + fn: fn, + priority: priority + }); // higher priority callbacks executed first + + cbs.sort(function (a, b) { + return b.priority - a.priority; + }); + }; + + var beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) { + var cbs = r.beforeRenderCallbacks; + + for (var i = 0; i < cbs.length; i++) { + cbs[i].fn(willDraw, startTime); + } + }; + + BRp$1.startRenderLoop = function () { + var r = this; + var cy = r.cy; + + if (r.renderLoopStarted) { + return; + } else { + r.renderLoopStarted = true; + } + + var renderFn = function renderFn(requestTime) { + if (r.destroyed) { + return; + } + + if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) { + beforeRenderCallbacks(r, true, requestTime); + var startTime = performanceNow(); + r.render(r.renderOptions); + var endTime = r.lastDrawTime = performanceNow(); + + if (r.averageRedrawTime === undefined) { + r.averageRedrawTime = endTime - startTime; + } + + if (r.redrawCount === undefined) { + r.redrawCount = 0; + } + + r.redrawCount++; + + if (r.redrawTotalTime === undefined) { + r.redrawTotalTime = 0; + } + + var duration = endTime - startTime; + r.redrawTotalTime += duration; + r.lastRedrawTime = duration; // use a weighted average with a bias from the previous average so we don't spike so easily + + r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; + r.requestedFrame = false; + } else { + beforeRenderCallbacks(r, false, requestTime); + } + + r.skipFrame = false; + requestAnimationFrame(renderFn); + }; + + requestAnimationFrame(renderFn); + }; + + var BaseRenderer = function BaseRenderer(options) { + this.init(options); + }; + + var BR = BaseRenderer; + var BRp = BR.prototype; + BRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl']; + + BRp.init = function (options) { + var r = this; + r.options = options; + r.cy = options.cy; + var ctr = r.container = options.cy.container(); // prepend a stylesheet in the head such that + + if (window$1) { + var document = window$1.document; + var head = document.head; + var stylesheetId = '__________cytoscape_stylesheet'; + var className = '__________cytoscape_container'; + var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null; + + if (ctr.className.indexOf(className) < 0) { + ctr.className = (ctr.className || '') + ' ' + className; + } + + if (!stylesheetAlreadyExists) { + var stylesheet = document.createElement('style'); + stylesheet.id = stylesheetId; + stylesheet.innerHTML = '.' + className + ' { position: relative; }'; + head.insertBefore(stylesheet, head.children[0]); // first so lowest priority + } + + var computedStyle = window$1.getComputedStyle(ctr); + var position = computedStyle.getPropertyValue('position'); + + if (position === 'static') { + warn('A Cytoscape container has style position:static and so can not use UI extensions properly'); + } + } + + r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag + + r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; //--Pointer-related data + + r.hoverData = { + down: null, + last: null, + downTime: null, + triggerMode: null, + dragging: false, + initialPan: [null, null], + capture: false + }; + r.dragData = { + possibleDragElements: [] + }; + r.touchData = { + start: null, + capture: false, + // These 3 fields related to tap, taphold events + startPosition: [null, null, null, null, null, null], + singleTouchStartTime: null, + singleTouchMoved: true, + now: [null, null, null, null, null, null], + earlier: [null, null, null, null, null, null] + }; + r.redraws = 0; + r.showFps = options.showFps; + r.debug = options.debug; + r.hideEdgesOnViewport = options.hideEdgesOnViewport; + r.textureOnViewport = options.textureOnViewport; + r.wheelSensitivity = options.wheelSensitivity; + r.motionBlurEnabled = options.motionBlur; // on by default + + r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null; + r.motionBlur = options.motionBlur; // for initial kick off + + r.motionBlurOpacity = options.motionBlurOpacity; + r.motionBlurTransparency = 1 - r.motionBlurOpacity; + r.motionBlurPxRatio = 1; + r.mbPxRBlurry = 1; //0.8; + + r.minMbLowQualFrames = 4; + r.fullQualityMb = false; + r.clearedForMotionBlur = []; + r.desktopTapThreshold = options.desktopTapThreshold; + r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold; + r.touchTapThreshold = options.touchTapThreshold; + r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold; + r.tapholdDuration = 500; + r.bindings = []; + r.beforeRenderCallbacks = []; + r.beforeRenderPriorities = { + // higher priority execs before lower one + animations: 400, + eleCalcs: 300, + eleTxrDeq: 200, + lyrTxrDeq: 150, + lyrTxrSkip: 100 + }; + r.registerNodeShapes(); + r.registerArrowShapes(); + r.registerCalculationListeners(); + }; + + BRp.notify = function (eventName, eles) { + var r = this; + var cy = r.cy; // the renderer can't be notified after it's destroyed + + if (this.destroyed) { + return; + } + + if (eventName === 'init') { + r.load(); + return; + } + + if (eventName === 'destroy') { + r.destroy(); + return; + } + + if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') { + r.invalidateCachedZSortedEles(); + } + + if (eventName === 'viewport') { + r.redrawHint('select', true); + } + + if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + } + + r.redrawHint('eles', true); + r.redrawHint('drag', true); + this.startRenderLoop(); + this.redraw(); + }; + + BRp.destroy = function () { + var r = this; + r.destroyed = true; + r.cy.stopAnimationLoop(); + + for (var i = 0; i < r.bindings.length; i++) { + var binding = r.bindings[i]; + var b = binding; + var tgt = b.target; + (tgt.off || tgt.removeEventListener).apply(tgt, b.args); + } + + r.bindings = []; + r.beforeRenderCallbacks = []; + r.onUpdateEleCalcsFns = []; + + if (r.removeObserver) { + r.removeObserver.disconnect(); + } + + if (r.styleObserver) { + r.styleObserver.disconnect(); + } + + if (r.resizeObserver) { + r.resizeObserver.disconnect(); + } + + if (r.labelCalcDiv) { + try { + document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef + } catch (e) {// ie10 issue #1014 + } + } + }; + + BRp.isHeadless = function () { + return false; + }; + + [BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) { + extend(BRp, props); + }); + + var fullFpsTime = 1000 / 60; // assume 60 frames per second + + var defs = { + setupDequeueing: function setupDequeueing(opts) { + return function setupDequeueingImpl() { + var self = this; + var r = this.renderer; + + if (self.dequeueingSetup) { + return; + } else { + self.dequeueingSetup = true; + } + + var queueRedraw = debounce_1(function () { + r.redrawHint('eles', true); + r.redrawHint('drag', true); + r.redraw(); + }, opts.deqRedrawThreshold); + + var dequeue = function dequeue(willDraw, frameStartTime) { + var startTime = performanceNow(); + var avgRenderTime = r.averageRedrawTime; + var renderTime = r.lastRedrawTime; + var deqd = []; + var extent = r.cy.extent(); + var pixelRatio = r.getPixelRatio(); // if we aren't in a tick that causes a draw, then the rendered style + // queue won't automatically be flushed before dequeueing starts + + if (!willDraw) { + r.flushRenderedStyleQueue(); + } + + while (true) { + // eslint-disable-line no-constant-condition + var now = performanceNow(); + var duration = now - startTime; + var frameDuration = now - frameStartTime; + + if (renderTime < fullFpsTime) { + // if we're rendering faster than the ideal fps, then do dequeueing + // during all of the remaining frame time + var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); + + if (frameDuration >= opts.deqFastCost * timeAvailable) { + break; + } + } else { + if (willDraw) { + if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { + break; + } + } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { + break; + } + } + + var thisDeqd = opts.deq(self, pixelRatio, extent); + + if (thisDeqd.length > 0) { + for (var i = 0; i < thisDeqd.length; i++) { + deqd.push(thisDeqd[i]); + } + } else { + break; + } + } // callbacks on dequeue + + + if (deqd.length > 0) { + opts.onDeqd(self, deqd); + + if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) { + queueRedraw(); + } + } + }; + + var priority = opts.priority || noop$1; + r.beforeRender(dequeue, priority(self)); + }; + } + }; + + // Uses keys so elements may share the same cache. + + var ElementTextureCacheLookup = /*#__PURE__*/function () { + function ElementTextureCacheLookup(getKey) { + var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify; + + _classCallCheck(this, ElementTextureCacheLookup); + + this.idsByKey = new Map$2(); + this.keyForId = new Map$2(); + this.cachesByLvl = new Map$2(); + this.lvls = []; + this.getKey = getKey; + this.doesEleInvalidateKey = doesEleInvalidateKey; + } + + _createClass(ElementTextureCacheLookup, [{ + key: "getIdsFor", + value: function getIdsFor(key) { + if (key == null) { + error("Can not get id list for null key"); + } + + var idsByKey = this.idsByKey; + var ids = this.idsByKey.get(key); + + if (!ids) { + ids = new Set$1(); + idsByKey.set(key, ids); + } + + return ids; + } + }, { + key: "addIdForKey", + value: function addIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key).add(id); + } + } + }, { + key: "deleteIdForKey", + value: function deleteIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key)["delete"](id); + } + } + }, { + key: "getNumberOfIdsForKey", + value: function getNumberOfIdsForKey(key) { + if (key == null) { + return 0; + } else { + return this.getIdsFor(key).size; + } + } + }, { + key: "updateKeyMappingFor", + value: function updateKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var currKey = this.getKey(ele); + this.deleteIdForKey(prevKey, id); + this.addIdForKey(currKey, id); + this.keyForId.set(id, currKey); + } + }, { + key: "deleteKeyMappingFor", + value: function deleteKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + this.deleteIdForKey(prevKey, id); + this.keyForId["delete"](id); + } + }, { + key: "keyHasChangedFor", + value: function keyHasChangedFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var newKey = this.getKey(ele); + return prevKey !== newKey; + } + }, { + key: "isInvalid", + value: function isInvalid(ele) { + return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); + } + }, { + key: "getCachesAt", + value: function getCachesAt(lvl) { + var cachesByLvl = this.cachesByLvl, + lvls = this.lvls; + var caches = cachesByLvl.get(lvl); + + if (!caches) { + caches = new Map$2(); + cachesByLvl.set(lvl, caches); + lvls.push(lvl); + } + + return caches; + } + }, { + key: "getCache", + value: function getCache(key, lvl) { + return this.getCachesAt(lvl).get(key); + } + }, { + key: "get", + value: function get(ele, lvl) { + var key = this.getKey(ele); + var cache = this.getCache(key, lvl); // getting for an element may need to add to the id list b/c eles can share keys + + if (cache != null) { + this.updateKeyMappingFor(ele); + } + + return cache; + } + }, { + key: "getForCachedKey", + value: function getForCachedKey(ele, lvl) { + var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key + + var cache = this.getCache(key, lvl); + return cache; + } + }, { + key: "hasCache", + value: function hasCache(key, lvl) { + return this.getCachesAt(lvl).has(key); + } + }, { + key: "has", + value: function has(ele, lvl) { + var key = this.getKey(ele); + return this.hasCache(key, lvl); + } + }, { + key: "setCache", + value: function setCache(key, lvl, cache) { + cache.key = key; + this.getCachesAt(lvl).set(key, cache); + } + }, { + key: "set", + value: function set(ele, lvl, cache) { + var key = this.getKey(ele); + this.setCache(key, lvl, cache); + this.updateKeyMappingFor(ele); + } + }, { + key: "deleteCache", + value: function deleteCache(key, lvl) { + this.getCachesAt(lvl)["delete"](key); + } + }, { + key: "delete", + value: function _delete(ele, lvl) { + var key = this.getKey(ele); + this.deleteCache(key, lvl); + } + }, { + key: "invalidateKey", + value: function invalidateKey(key) { + var _this = this; + + this.lvls.forEach(function (lvl) { + return _this.deleteCache(key, lvl); + }); + } // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + + }, { + key: "invalidate", + value: function invalidate(ele) { + var id = ele.id(); + var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key) + + this.deleteKeyMappingFor(ele); + var entireKeyInvalidated = this.doesEleInvalidateKey(ele); + + if (entireKeyInvalidated) { + // clear mapping for current key + this.invalidateKey(key); + } + + return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; + } + }]); + + return ElementTextureCacheLookup; + }(); + + var minTxrH = 25; // the size of the texture cache for small height eles (special case) + + var txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up + + var minLvl$1 = -4; // when scaling smaller than that we don't need to re-render + + var maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful) + + var maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used + + var eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps + + var defTxrWidth = 1024; // default/minimum texture width + + var maxTxrW = 1024; // the maximum width of a texture + + var maxTxrH = 1024; // the maximum height of a texture + + var minUtility = 0.2; // if usage of texture is less than this, it is retired + + var maxFullness = 0.8; // fullness of texture after which queue removal is checked + + var maxFullnessChecks = 10; // dequeued after this many checks + + var deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame + + var deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time + + var deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing + + var deqFastCost$1 = 0.9; // % of frame time to be used when >60fps + + var deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile + + var maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch + + var getTxrReasons = { + dequeue: 'dequeue', + downscale: 'downscale', + highQuality: 'highQuality' + }; + var initDefaults = defaults$g({ + getKey: null, + doesEleInvalidateKey: falsify, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: trueify, + allowEdgeTxrCaching: true, + allowParentTxrCaching: true + }); + + var ElementTextureCache = function ElementTextureCache(renderer, initOptions) { + var self = this; + self.renderer = renderer; + self.onDequeues = []; + var opts = initDefaults(initOptions); + extend(self, opts); + self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); + self.setupDequeueing(); + }; + + var ETCp = ElementTextureCache.prototype; + ETCp.reasons = getTxrReasons; // the list of textures in which new subtextures for elements can be placed + + ETCp.getTextureQueue = function (txrH) { + var self = this; + self.eleImgCaches = self.eleImgCaches || {}; + return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || []; + }; // the list of usused textures which can be recycled (in use in texture queue) + + + ETCp.getRetiredTextureQueue = function (txrH) { + var self = this; + var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {}; + var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; + return rtxtrQ; + }; // queue of element draw requests at different scale levels + + + ETCp.getElementQueue = function () { + var self = this; + var q = self.eleCacheQueue = self.eleCacheQueue || new heap(function (a, b) { + return b.reqs - a.reqs; + }); + return q; + }; // queue of element draw requests at different scale levels (element id lookup) + + + ETCp.getElementKeyToQueue = function () { + var self = this; + var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {}; + return k2q; + }; + + ETCp.getElement = function (ele, bb, pxRatio, lvl, reason) { + var self = this; + var r = this.renderer; + var zoom = r.cy.zoom(); + var lookup = this.lookup; + + if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { + return null; + } + + if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) { + return null; + } + + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + } + + if (lvl < minLvl$1) { + lvl = minLvl$1; + } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { + return null; + } + + var scale = Math.pow(2, lvl); + var eleScaledH = bb.h * scale; + var eleScaledW = bb.w * scale; + var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); + + if (!this.isVisible(ele, scaledLabelShown)) { + return null; + } + + var eleCache = lookup.get(ele, lvl); // if this get was on an unused/invalidated cache, then restore the texture usage metric + + if (eleCache && eleCache.invalidated) { + eleCache.invalidated = false; + eleCache.texture.invalidatedWidth -= eleCache.width; + } + + if (eleCache) { + return eleCache; + } + + var txrH; // which texture height this ele belongs to + + if (eleScaledH <= minTxrH) { + txrH = minTxrH; + } else if (eleScaledH <= txrStepH) { + txrH = txrStepH; + } else { + txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; + } + + if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { + return null; // caching large elements is not efficient + } + + var txrQ = self.getTextureQueue(txrH); // first try the second last one in case it has space at the end + + var txr = txrQ[txrQ.length - 2]; + + var addNewTxr = function addNewTxr() { + return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW); + }; // try the last one if there is no second last one + + + if (!txr) { + txr = txrQ[txrQ.length - 1]; + } // if the last one doesn't exist, we need a first one + + + if (!txr) { + txr = addNewTxr(); + } // if there's no room in the current texture, we need a new one + + + if (txr.width - txr.usedWidth < eleScaledW) { + txr = addNewTxr(); + } + + var scalableFrom = function scalableFrom(otherCache) { + return otherCache && otherCache.scaledLabelShown === scaledLabelShown; + }; + + var deqing = reason && reason === getTxrReasons.dequeue; + var highQualityReq = reason && reason === getTxrReasons.highQuality; + var downscaleReq = reason && reason === getTxrReasons.downscale; + var higherCache; // the nearest cache with a higher level + + for (var l = lvl + 1; l <= maxLvl$1; l++) { + var c = lookup.get(ele, l); + + if (c) { + higherCache = c; + break; + } + } + + var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; + + var downscale = function downscale() { + txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); + }; // reset ele area in texture + + + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); + + if (scalableFrom(oneUpCache)) { + // then we can relatively cheaply rescale the existing image w/o rerendering + downscale(); + } else if (scalableFrom(higherCache)) { + // then use the higher cache for now and queue the next level down + // to cheaply scale towards the smaller level + if (highQualityReq) { + for (var _l = higherCache.level; _l > lvl; _l--) { + oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); + } + + downscale(); + } else { + self.queueElement(ele, higherCache.level - 1); + return higherCache; + } + } else { + var lowerCache; // the nearest cache with a lower level + + if (!deqing && !highQualityReq && !downscaleReq) { + for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { + var _c = lookup.get(ele, _l2); + + if (_c) { + lowerCache = _c; + break; + } + } + } + + if (scalableFrom(lowerCache)) { + // then use the lower quality cache for now and queue the better one for later + self.queueElement(ele, lvl); + return lowerCache; + } + + txr.context.translate(txr.usedWidth, 0); + txr.context.scale(scale, scale); + this.drawElement(txr.context, ele, bb, scaledLabelShown, false); + txr.context.scale(1 / scale, 1 / scale); + txr.context.translate(-txr.usedWidth, 0); + } + + eleCache = { + x: txr.usedWidth, + texture: txr, + level: lvl, + scale: scale, + width: eleScaledW, + height: eleScaledH, + scaledLabelShown: scaledLabelShown + }; + txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); + txr.eleCaches.push(eleCache); + lookup.set(ele, lvl, eleCache); + self.checkTextureFullness(txr); + return eleCache; + }; + + ETCp.invalidateElements = function (eles) { + for (var i = 0; i < eles.length; i++) { + this.invalidateElement(eles[i]); + } + }; + + ETCp.invalidateElement = function (ele) { + var self = this; + var lookup = self.lookup; + var caches = []; + var invalid = lookup.isInvalid(ele); + + if (!invalid) { + return; // override the invalidation request if the element key has not changed + } + + for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { + var cache = lookup.getForCachedKey(ele, lvl); + + if (cache) { + caches.push(cache); + } + } + + var noOtherElesUseCache = lookup.invalidate(ele); + + if (noOtherElesUseCache) { + for (var i = 0; i < caches.length; i++) { + var _cache = caches[i]; + var txr = _cache.texture; // remove space from the texture it belongs to + + txr.invalidatedWidth += _cache.width; // mark the cache as invalidated + + _cache.invalidated = true; // retire the texture if its utility is low + + self.checkTextureUtility(txr); + } + } // remove from queue since the old req was for the old state + + + self.removeFromQueue(ele); + }; + + ETCp.checkTextureUtility = function (txr) { + // invalidate all entries in the cache if the cache size is small + if (txr.invalidatedWidth >= minUtility * txr.width) { + this.retireTexture(txr); + } + }; + + ETCp.checkTextureFullness = function (txr) { + // if texture has been mostly filled and passed over several times, remove + // it from the queue so we don't need to waste time looking at it to put new things + var self = this; + var txrQ = self.getTextureQueue(txr.height); + + if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { + removeFromArray(txrQ, txr); + } else { + txr.fullnessChecks++; + } + }; + + ETCp.retireTexture = function (txr) { + var self = this; + var txrH = txr.height; + var txrQ = self.getTextureQueue(txrH); + var lookup = this.lookup; // retire the texture from the active / searchable queue: + + removeFromArray(txrQ, txr); + txr.retired = true; // remove the refs from the eles to the caches: + + var eleCaches = txr.eleCaches; + + for (var i = 0; i < eleCaches.length; i++) { + var eleCache = eleCaches[i]; + lookup.deleteCache(eleCache.key, eleCache.level); + } + + clearArray(eleCaches); // add the texture to a retired queue so it can be recycled in future: + + var rtxtrQ = self.getRetiredTextureQueue(txrH); + rtxtrQ.push(txr); + }; + + ETCp.addTexture = function (txrH, minW) { + var self = this; + var txrQ = self.getTextureQueue(txrH); + var txr = {}; + txrQ.push(txr); + txr.eleCaches = []; + txr.height = txrH; + txr.width = Math.max(defTxrWidth, minW); + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height); + txr.context = txr.canvas.getContext('2d'); + return txr; + }; + + ETCp.recycleTexture = function (txrH, minW) { + var self = this; + var txrQ = self.getTextureQueue(txrH); + var rtxtrQ = self.getRetiredTextureQueue(txrH); + + for (var i = 0; i < rtxtrQ.length; i++) { + var txr = rtxtrQ[i]; + + if (txr.width >= minW) { + txr.retired = false; + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + clearArray(txr.eleCaches); + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(0, 0, txr.width, txr.height); + removeFromArray(rtxtrQ, txr); + txrQ.push(txr); + return txr; + } + } + }; + + ETCp.queueElement = function (ele, lvl) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var key = this.getKey(ele); + var existingReq = k2q[key]; + + if (existingReq) { + // use the max lvl b/c in between lvls are cheap to make + existingReq.level = Math.max(existingReq.level, lvl); + existingReq.eles.merge(ele); + existingReq.reqs++; + q.updateItem(existingReq); + } else { + var req = { + eles: ele.spawn().merge(ele), + level: lvl, + reqs: 1, + key: key + }; + q.push(req); + k2q[key] = req; + } + }; + + ETCp.dequeue = function (pxRatio + /*, extent*/ + ) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var dequeued = []; + var lookup = self.lookup; + + for (var i = 0; i < maxDeqSize$1; i++) { + if (q.size() > 0) { + var req = q.pop(); + var key = req.key; + var ele = req.eles[0]; // all eles have the same key + + var cacheExists = lookup.hasCache(ele, req.level); // clear out the key to req lookup + + k2q[key] = null; // dequeueing isn't necessary with an existing cache + + if (cacheExists) { + continue; + } + + dequeued.push(req); + var bb = self.getBoundingBox(ele); + self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); + } else { + break; + } + } + + return dequeued; + }; + + ETCp.removeFromQueue = function (ele) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var key = this.getKey(ele); + var req = k2q[key]; + + if (req != null) { + if (req.eles.length === 1) { + // remove if last ele in the req + // bring to front of queue + req.reqs = MAX_INT$1; + q.updateItem(req); + q.pop(); // remove from queue + + k2q[key] = null; // remove from lookup map + } else { + // otherwise just remove ele from req + req.eles.unmerge(ele); + } + } + }; + + ETCp.onDequeue = function (fn) { + this.onDequeues.push(fn); + }; + + ETCp.offDequeue = function (fn) { + removeFromArray(this.onDequeues, fn); + }; + + ETCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold$1, + deqCost: deqCost$1, + deqAvgCost: deqAvgCost$1, + deqNoDrawCost: deqNoDrawCost$1, + deqFastCost: deqFastCost$1, + deq: function deq(self, pxRatio, extent) { + return self.dequeue(pxRatio, extent); + }, + onDeqd: function onDeqd(self, deqd) { + for (var i = 0; i < self.onDequeues.length; i++) { + var fn = self.onDequeues[i]; + fn(deqd); + } + }, + shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) { + for (var i = 0; i < deqd.length; i++) { + var eles = deqd[i].eles; + + for (var j = 0; j < eles.length; j++) { + var bb = eles[j].boundingBox(); + + if (boundingBoxesIntersect(bb, extent)) { + return true; + } + } + } + + return false; + }, + priority: function priority(self) { + return self.renderer.beforeRenderPriorities.eleTxrDeq; + } + }); + + var defNumLayers = 1; // default number of layers to use + + var minLvl = -4; // when scaling smaller than that we don't need to re-render + + var maxLvl = 2; // when larger than this scale just render directly (caching is not helpful) + + var maxZoom = 3.99; // beyond this zoom level, layered textures are not used + + var deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile + + var refineEleDebounceTime = 50; // time to debounce sharper ele texture updates + + var deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame + + var deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time + + var deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing + + var deqFastCost = 0.9; // % of frame time to be used when >60fps + + var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch + + var invalidThreshold = 250; // time threshold for disabling b/c of invalidations + + var maxLayerArea = 4000 * 4000; // layers can't be bigger than this + + var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm) + // var log = function(){ console.log.apply( console, arguments ); }; + + var LayeredTextureCache = function LayeredTextureCache(renderer) { + var self = this; + var r = self.renderer = renderer; + var cy = r.cy; + self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ] + + self.firstGet = true; + self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; + self.skipping = false; + self.eleTxrDeqs = cy.collection(); + self.scheduleElementRefinement = debounce_1(function () { + self.refineElementTextures(self.eleTxrDeqs); + self.eleTxrDeqs.unmerge(self.eleTxrDeqs); + }, refineEleDebounceTime); + r.beforeRender(function (willDraw, now) { + if (now - self.lastInvalidationTime <= invalidThreshold) { + self.skipping = true; + } else { + self.skipping = false; + } + }, r.beforeRenderPriorities.lyrTxrSkip); + + var qSort = function qSort(a, b) { + return b.reqs - a.reqs; + }; + + self.layersQueue = new heap(qSort); + self.setupDequeueing(); + }; + + var LTCp = LayeredTextureCache.prototype; + var layerIdPool = 0; + var MAX_INT = Math.pow(2, 53) - 1; + + LTCp.makeLayer = function (bb, lvl) { + var scale = Math.pow(2, lvl); + var w = Math.ceil(bb.w * scale); + var h = Math.ceil(bb.h * scale); + var canvas = this.renderer.makeOffscreenCanvas(w, h); + var layer = { + id: layerIdPool = ++layerIdPool % MAX_INT, + bb: bb, + level: lvl, + width: w, + height: h, + canvas: canvas, + context: canvas.getContext('2d'), + eles: [], + elesQueue: [], + reqs: 0 + }; // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level); + + var cxt = layer.context; + var dx = -layer.bb.x1; + var dy = -layer.bb.y1; // do the transform on creation to save cycles (it's the same for all eles) + + cxt.scale(scale, scale); + cxt.translate(dx, dy); + return layer; + }; + + LTCp.getLayers = function (eles, pxRatio, lvl) { + var self = this; + var r = self.renderer; + var cy = r.cy; + var zoom = cy.zoom(); + var firstGet = self.firstGet; + self.firstGet = false; // log('--\nget layers with %s eles', eles.length); + //log eles.map(function(ele){ return ele.id() }) ); + + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + + if (lvl < minLvl) { + lvl = minLvl; + } else if (zoom >= maxZoom || lvl > maxLvl) { + return null; + } + } + + self.validateLayersElesOrdering(lvl, eles); + var layersByLvl = self.layersByLevel; + var scale = Math.pow(2, lvl); + var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; + var bb; + var lvlComplete = self.levelIsComplete(lvl, eles); + var tmpLayers; + + var checkTempLevels = function checkTempLevels() { + var canUseAsTmpLvl = function canUseAsTmpLvl(l) { + self.validateLayersElesOrdering(l, eles); + + if (self.levelIsComplete(l, eles)) { + tmpLayers = layersByLvl[l]; + return true; + } + }; + + var checkLvls = function checkLvls(dir) { + if (tmpLayers) { + return; + } + + for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) { + if (canUseAsTmpLvl(l)) { + break; + } + } + }; + + checkLvls(+1); + checkLvls(-1); // remove the invalid layers; they will be replaced as needed later in this function + + for (var i = layers.length - 1; i >= 0; i--) { + var layer = layers[i]; + + if (layer.invalid) { + removeFromArray(layers, layer); + } + } + }; + + if (!lvlComplete) { + // if the current level is incomplete, then use the closest, best quality layerset temporarily + // and later queue the current layerset so we can get the proper quality level soon + checkTempLevels(); + } else { + // log('level complete, using existing layers\n--'); + return layers; + } + + var getBb = function getBb() { + if (!bb) { + bb = makeBoundingBox(); + + for (var i = 0; i < eles.length; i++) { + updateBoundingBox(bb, eles[i].boundingBox()); + } + } + + return bb; + }; + + var makeLayer = function makeLayer(opts) { + opts = opts || {}; + var after = opts.after; + getBb(); + var area = bb.w * scale * (bb.h * scale); + + if (area > maxLayerArea) { + return null; + } + + var layer = self.makeLayer(bb, lvl); + + if (after != null) { + var index = layers.indexOf(after) + 1; + layers.splice(index, 0, layer); + } else if (opts.insert === undefined || opts.insert) { + // no after specified => first layer made so put at start + layers.unshift(layer); + } // if( tmpLayers ){ + //self.queueLayer( layer ); + // } + + + return layer; + }; + + if (self.skipping && !firstGet) { + // log('skip layers'); + return null; + } // log('do layers'); + + + var layer = null; + var maxElesPerLayer = eles.length / defNumLayers; + var allowLazyQueueing = !firstGet; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; // log('look at ele', ele.id()); + + var existingLayer = caches[lvl]; + + if (existingLayer) { + // reuse layer for later eles + // log('reuse layer for', ele.id()); + layer = existingLayer; + continue; + } + + if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { + // log('make new layer for ele %s', ele.id()); + layer = makeLayer({ + insert: true, + after: layer + }); // if now layer can be built then we can't use layers at this level + + if (!layer) { + return null; + } // log('new layer with id %s', layer.id); + + } + + if (tmpLayers || allowLazyQueueing) { + // log('queue ele %s in layer %s', ele.id(), layer.id); + self.queueLayer(layer, ele); + } else { + // log('draw ele %s in layer %s', ele.id(), layer.id); + self.drawEleInLayer(layer, ele, lvl, pxRatio); + } + + layer.eles.push(ele); + caches[lvl] = layer; + } // log('--'); + + + if (tmpLayers) { + // then we only queued the current layerset and can't draw it yet + return tmpLayers; + } + + if (allowLazyQueueing) { + // log('lazy queue level', lvl); + return null; + } + + return layers; + }; // a layer may want to use an ele cache of a higher level to avoid blurriness + // so the layer level might not equal the ele level + + + LTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) { + return lvl; + }; + + LTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) { + var self = this; + var r = this.renderer; + var context = layer.context; + var bb = ele.boundingBox(); + + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + + lvl = self.getEleLevelForLayerLevel(lvl, pxRatio); + + { + r.setImgSmoothing(context, false); + } + + { + r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); + } + + { + r.setImgSmoothing(context, true); + } + }; + + LTCp.levelIsComplete = function (lvl, eles) { + var self = this; + var layers = self.layersByLevel[lvl]; + + if (!layers || layers.length === 0) { + return false; + } + + var numElesInLayers = 0; + + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; // if there are any eles needed to be drawn yet, the level is not complete + + if (layer.reqs > 0) { + return false; + } // if the layer is invalid, the level is not complete + + + if (layer.invalid) { + return false; + } + + numElesInLayers += layer.eles.length; + } // we should have exactly the number of eles passed in to be complete + + + if (numElesInLayers !== eles.length) { + return false; + } + + return true; + }; + + LTCp.validateLayersElesOrdering = function (lvl, eles) { + var layers = this.layersByLevel[lvl]; + + if (!layers) { + return; + } // if in a layer the eles are not in the same order, then the layer is invalid + // (i.e. there is an ele in between the eles in the layer) + + + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + var offset = -1; // find the offset + + for (var j = 0; j < eles.length; j++) { + if (layer.eles[0] === eles[j]) { + offset = j; + break; + } + } + + if (offset < 0) { + // then the layer has nonexistant elements and is invalid + this.invalidateLayer(layer); + continue; + } // the eles in the layer must be in the same continuous order, else the layer is invalid + + + var o = offset; + + for (var j = 0; j < layer.eles.length; j++) { + if (layer.eles[j] !== eles[o + j]) { + // log('invalidate based on ordering', layer.id); + this.invalidateLayer(layer); + break; + } + } + } + }; + + LTCp.updateElementsInLayers = function (eles, update) { + var self = this; + var isEles = element(eles[0]); // collect udpated elements (cascaded from the layers) and update each + // layer itself along the way + + for (var i = 0; i < eles.length; i++) { + var req = isEles ? null : eles[i]; + var ele = isEles ? eles[i] : eles[i].ele; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + + for (var l = minLvl; l <= maxLvl; l++) { + var layer = caches[l]; + + if (!layer) { + continue; + } // if update is a request from the ele cache, then it affects only + // the matching level + + + if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) { + continue; + } + + update(layer, ele, req); + } + } + }; + + LTCp.haveLayers = function () { + var self = this; + var haveLayers = false; + + for (var l = minLvl; l <= maxLvl; l++) { + var layers = self.layersByLevel[l]; + + if (layers && layers.length > 0) { + haveLayers = true; + break; + } + } + + return haveLayers; + }; + + LTCp.invalidateElements = function (eles) { + var self = this; + + if (eles.length === 0) { + return; + } + + self.lastInvalidationTime = performanceNow(); // log('update invalidate layer time from eles'); + + if (eles.length === 0 || !self.haveLayers()) { + return; + } + + self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { + self.invalidateLayer(layer); + }); + }; + + LTCp.invalidateLayer = function (layer) { + // log('update invalidate layer time'); + this.lastInvalidationTime = performanceNow(); + + if (layer.invalid) { + return; + } // save cycles + + + var lvl = layer.level; + var eles = layer.eles; + var layers = this.layersByLevel[lvl]; // log('invalidate layer', layer.id ); + + removeFromArray(layers, layer); // layer.eles = []; + + layer.elesQueue = []; + layer.invalid = true; + + if (layer.replacement) { + layer.replacement.invalid = true; + } + + for (var i = 0; i < eles.length; i++) { + var caches = eles[i]._private.rscratch.imgLayerCaches; + + if (caches) { + caches[lvl] = null; + } + } + }; + + LTCp.refineElementTextures = function (eles) { + var self = this; // log('refine', eles.length); + + self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { + var rLyr = layer.replacement; + + if (!rLyr) { + rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level); + rLyr.replaces = layer; + rLyr.eles = layer.eles; // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level); + } + + if (!rLyr.reqs) { + for (var i = 0; i < rLyr.eles.length; i++) { + self.queueLayer(rLyr, rLyr.eles[i]); + } // log('queue replacement layer refinement', rLyr.id); + + } + }); + }; + + LTCp.enqueueElementRefinement = function (ele) { + + this.eleTxrDeqs.merge(ele); + this.scheduleElementRefinement(); + }; + + LTCp.queueLayer = function (layer, ele) { + var self = this; + var q = self.layersQueue; + var elesQ = layer.elesQueue; + var hasId = elesQ.hasId = elesQ.hasId || {}; // if a layer is going to be replaced, queuing is a waste of time + + if (layer.replacement) { + return; + } + + if (ele) { + if (hasId[ele.id()]) { + return; + } + + elesQ.push(ele); + hasId[ele.id()] = true; + } + + if (layer.reqs) { + layer.reqs++; + q.updateItem(layer); + } else { + layer.reqs = 1; + q.push(layer); + } + }; + + LTCp.dequeue = function (pxRatio) { + var self = this; + var q = self.layersQueue; + var deqd = []; + var eleDeqs = 0; + + while (eleDeqs < maxDeqSize) { + if (q.size() === 0) { + break; + } + + var layer = q.peek(); // if a layer has been or will be replaced, then don't waste time with it + + if (layer.replacement) { + // log('layer %s in queue skipped b/c it already has a replacement', layer.id); + q.pop(); + continue; + } // if this is a replacement layer that has been superceded, then forget it + + + if (layer.replaces && layer !== layer.replaces.replacement) { + // log('layer is no longer the most uptodate replacement; dequeued', layer.id) + q.pop(); + continue; + } + + if (layer.invalid) { + // log('replacement layer %s is invalid; dequeued', layer.id); + q.pop(); + continue; + } + + var ele = layer.elesQueue.shift(); + + if (ele) { + // log('dequeue layer %s', layer.id); + self.drawEleInLayer(layer, ele, layer.level, pxRatio); + eleDeqs++; + } + + if (deqd.length === 0) { + // we need only one entry in deqd to queue redrawing etc + deqd.push(true); + } // if the layer has all its eles done, then remove from the queue + + + if (layer.elesQueue.length === 0) { + q.pop(); + layer.reqs = 0; // log('dequeue of layer %s complete', layer.id); + // when a replacement layer is dequeued, it replaces the old layer in the level + + if (layer.replaces) { + self.applyLayerReplacement(layer); + } + + self.requestRedraw(); + } + } + + return deqd; + }; + + LTCp.applyLayerReplacement = function (layer) { + var self = this; + var layersInLevel = self.layersByLevel[layer.level]; + var replaced = layer.replaces; + var index = layersInLevel.indexOf(replaced); // if the replaced layer is not in the active list for the level, then replacing + // refs would be a mistake (i.e. overwriting the true active layer) + + if (index < 0 || replaced.invalid) { + // log('replacement layer would have no effect', layer.id); + return; + } + + layersInLevel[index] = layer; // replace level ref + // replace refs in eles + + for (var i = 0; i < layer.eles.length; i++) { + var _p = layer.eles[i]._private; + var cache = _p.imgLayerCaches = _p.imgLayerCaches || {}; + + if (cache) { + cache[layer.level] = layer; + } + } // log('apply replacement layer %s over %s', layer.id, replaced.id); + + + self.requestRedraw(); + }; + + LTCp.requestRedraw = debounce_1(function () { + var r = this.renderer; + r.redrawHint('eles', true); + r.redrawHint('drag', true); + r.redraw(); + }, 100); + LTCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold, + deqCost: deqCost, + deqAvgCost: deqAvgCost, + deqNoDrawCost: deqNoDrawCost, + deqFastCost: deqFastCost, + deq: function deq(self, pxRatio) { + return self.dequeue(pxRatio); + }, + onDeqd: noop$1, + shouldRedraw: trueify, + priority: function priority(self) { + return self.renderer.beforeRenderPriorities.lyrTxrDeq; + } + }); + + var CRp$a = {}; + var impl; + + function polygon(context, points) { + for (var i = 0; i < points.length; i++) { + var pt = points[i]; + context.lineTo(pt.x, pt.y); + } + } + + function triangleBackcurve(context, points, controlPoint) { + var firstPt; + + for (var i = 0; i < points.length; i++) { + var pt = points[i]; + + if (i === 0) { + firstPt = pt; + } + + context.lineTo(pt.x, pt.y); + } + + context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); + } + + function triangleTee(context, trianglePoints, teePoints) { + if (context.beginPath) { + context.beginPath(); + } + + var triPts = trianglePoints; + + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + + var teePts = teePoints; + var firstTeePt = teePoints[0]; + context.moveTo(firstTeePt.x, firstTeePt.y); + + for (var i = 1; i < teePts.length; i++) { + var pt = teePts[i]; + context.lineTo(pt.x, pt.y); + } + + if (context.closePath) { + context.closePath(); + } + } + + function circleTriangle(context, trianglePoints, rx, ry, r) { + if (context.beginPath) { + context.beginPath(); + } + + context.arc(rx, ry, r, 0, Math.PI * 2, false); + var triPts = trianglePoints; + var firstTrPt = triPts[0]; + context.moveTo(firstTrPt.x, firstTrPt.y); + + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + + if (context.closePath) { + context.closePath(); + } + } + + function circle(context, rx, ry, r) { + context.arc(rx, ry, r, 0, Math.PI * 2, false); + } + + CRp$a.arrowShapeImpl = function (name) { + return (impl || (impl = { + 'polygon': polygon, + 'triangle-backcurve': triangleBackcurve, + 'triangle-tee': triangleTee, + 'circle-triangle': circleTriangle, + 'triangle-cross': triangleTee, + 'circle': circle + }))[name]; + }; + + var CRp$9 = {}; + + CRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { + var r = this; + + if (ele.isNode()) { + r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } else { + r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } + }; + + CRp$9.drawElementOverlay = function (context, ele) { + var r = this; + + if (ele.isNode()) { + r.drawNodeOverlay(context, ele); + } else { + r.drawEdgeOverlay(context, ele); + } + }; + + CRp$9.drawElementUnderlay = function (context, ele) { + var r = this; + + if (ele.isNode()) { + r.drawNodeUnderlay(context, ele); + } else { + r.drawEdgeUnderlay(context, ele); + } + }; + + CRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) { + var r = this; + var bb = eleTxrCache.getBoundingBox(ele); + + if (bb.w === 0 || bb.h === 0) { + return; + } // ignore zero size case + + + var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); + + if (eleCache != null) { + var opacity = getOpacity(r, ele); + + if (opacity === 0) { + return; + } + + var theta = getRotation(r, ele); + var x1 = bb.x1, + y1 = bb.y1, + w = bb.w, + h = bb.h; + var x, y, sx, sy, smooth; + + if (theta !== 0) { + var rotPt = eleTxrCache.getRotationPoint(ele); + sx = rotPt.x; + sy = rotPt.y; + context.translate(sx, sy); + context.rotate(theta); + smooth = r.getImgSmoothing(context); + + if (!smooth) { + r.setImgSmoothing(context, true); + } + + var off = eleTxrCache.getRotationOffset(ele); + x = off.x; + y = off.y; + } else { + x = x1; + y = y1; + } + + var oldGlobalAlpha; + + if (opacity !== 1) { + oldGlobalAlpha = context.globalAlpha; + context.globalAlpha = oldGlobalAlpha * opacity; + } + + context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h); + + if (opacity !== 1) { + context.globalAlpha = oldGlobalAlpha; + } + + if (theta !== 0) { + context.rotate(-theta); + context.translate(-sx, -sy); + + if (!smooth) { + r.setImgSmoothing(context, false); + } + } + } else { + eleTxrCache.drawElement(context, ele); // direct draw fallback + } + }; + + var getZeroRotation = function getZeroRotation() { + return 0; + }; + + var getLabelRotation = function getLabelRotation(r, ele) { + return r.getTextAngle(ele, null); + }; + + var getSourceLabelRotation = function getSourceLabelRotation(r, ele) { + return r.getTextAngle(ele, 'source'); + }; + + var getTargetLabelRotation = function getTargetLabelRotation(r, ele) { + return r.getTextAngle(ele, 'target'); + }; + + var getOpacity = function getOpacity(r, ele) { + return ele.effectiveOpacity(); + }; + + var getTextOpacity = function getTextOpacity(e, ele) { + return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); + }; + + CRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) { + var r = this; + var _r$data = r.data, + eleTxrCache = _r$data.eleTxrCache, + lblTxrCache = _r$data.lblTxrCache, + slbTxrCache = _r$data.slbTxrCache, + tlbTxrCache = _r$data.tlbTxrCache; + var bb = ele.boundingBox(); + var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; + + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + + if (!extent || boundingBoxesIntersect(bb, extent)) { + var isEdge = ele.isEdge(); + + var badLine = ele.element()._private.rscratch.badLine; + + r.drawElementUnderlay(context, ele); + r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); + + if (!isEdge || !badLine) { + r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); + } + + if (isEdge && !badLine) { + r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); + r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); + } + + r.drawElementOverlay(context, ele); + } + }; + + CRp$9.drawElements = function (context, eles) { + var r = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + r.drawElement(context, ele); + } + }; + + CRp$9.drawCachedElements = function (context, eles, pxRatio, extent) { + var r = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + + CRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) { + var r = this; + + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + + if (!ele.isNode()) { + continue; + } + + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + + CRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) { + var r = this; + var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); + + if (layers) { + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + var bb = layer.bb; + + if (bb.w === 0 || bb.h === 0) { + continue; + } + + context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); + } + } else { + // fall back on plain caching if no layers + r.drawCachedElements(context, eles, pxRatio, extent); + } + }; + + /* global Path2D */ + var CRp$8 = {}; + + CRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + var rs = edge._private.rscratch; + + if (shouldDrawOpacity && !edge.visible()) { + return; + } // if bezier ctrl pts can not be calculated, then die + + + if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { + // isNaN in case edge is impossible and browser bugs (e.g. safari) + return; + } + + var bb; + + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + + var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1; + var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1; + var curveStyle = edge.pstyle('curve-style').value; + var lineStyle = edge.pstyle('line-style').value; + var edgeWidth = edge.pstyle('width').pfValue; + var lineCap = edge.pstyle('line-cap').value; + var effectiveLineOpacity = opacity * lineOpacity; // separate arrow opacity would require arrow-opacity property + + var effectiveArrowOpacity = opacity * lineOpacity; + + var drawLine = function drawLine() { + var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity; + + if (curveStyle === 'straight-triangle') { + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgeTrianglePath(edge, context, rs.allpts); + } else { + context.lineWidth = edgeWidth; + context.lineCap = lineCap; + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgePath(edge, context, rs.allpts, lineStyle); + context.lineCap = 'butt'; // reset for other drawing functions + } + }; + + var drawOverlay = function drawOverlay() { + if (!shouldDrawOverlay) { + return; + } + + r.drawEdgeOverlay(context, edge); + }; + + var drawUnderlay = function drawUnderlay() { + if (!shouldDrawOverlay) { + return; + } + + r.drawEdgeUnderlay(context, edge); + }; + + var drawArrows = function drawArrows() { + var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity; + r.drawArrowheads(context, edge, arrowOpacity); + }; + + var drawText = function drawText() { + r.drawElementText(context, edge, null, drawLabel); + }; + + context.lineJoin = 'round'; + var ghost = edge.pstyle('ghost').value === 'yes'; + + if (ghost) { + var gx = edge.pstyle('ghost-offset-x').pfValue; + var gy = edge.pstyle('ghost-offset-y').pfValue; + var ghostOpacity = edge.pstyle('ghost-opacity').value; + var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; + context.translate(gx, gy); + drawLine(effectiveGhostOpacity); + drawArrows(effectiveGhostOpacity); + context.translate(-gx, -gy); + } + + drawUnderlay(); + drawLine(); + drawArrows(); + drawOverlay(); + drawText(); + + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + + var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + + return function (context, edge) { + if (!edge.visible()) { + return; + } + + var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + + if (opacity === 0) { + return; + } + + var r = this; + var usePaths = r.usePaths(); + var rs = edge._private.rscratch; + var padding = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var width = 2 * padding; + var color = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; + context.lineWidth = width; + + if (rs.edgeType === 'self' && !usePaths) { + context.lineCap = 'butt'; + } else { + context.lineCap = 'round'; + } + + r.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + r.drawEdgePath(edge, context, rs.allpts, 'solid'); + }; + }; + + CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay'); + CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay'); + + CRp$8.drawEdgePath = function (edge, context, pts, type) { + var rs = edge._private.rscratch; + var canvasCxt = context; + var path; + var pathCacheHit = false; + var usePaths = this.usePaths(); + var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue; + var lineDashOffset = edge.pstyle('line-dash-offset').pfValue; + + if (usePaths) { + var pathCacheKey = pts.join('$'); + var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; + + if (keyMatches) { + path = context = rs.pathCache; + pathCacheHit = true; + } else { + path = context = new Path2D(); + rs.pathCacheKey = pathCacheKey; + rs.pathCache = path; + } + } + + if (canvasCxt.setLineDash) { + // for very outofdate browsers + switch (type) { + case 'dotted': + canvasCxt.setLineDash([1, 1]); + break; + + case 'dashed': + canvasCxt.setLineDash(lineDashPattern); + canvasCxt.lineDashOffset = lineDashOffset; + break; + + case 'solid': + canvasCxt.setLineDash([]); + break; + } + } + + if (!pathCacheHit && !rs.badLine) { + if (context.beginPath) { + context.beginPath(); + } + + context.moveTo(pts[0], pts[1]); + + switch (rs.edgeType) { + case 'bezier': + case 'self': + case 'compound': + case 'multibezier': + for (var i = 2; i + 3 < pts.length; i += 4) { + context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]); + } + + break; + + case 'straight': + case 'segments': + case 'haystack': + for (var _i = 2; _i + 1 < pts.length; _i += 2) { + context.lineTo(pts[_i], pts[_i + 1]); + } + + break; + } + } + + context = canvasCxt; + + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } // reset any line dashes + + + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + }; + + CRp$8.drawEdgeTrianglePath = function (edge, context, pts) { + // use line stroke style for triangle fill style + context.fillStyle = context.strokeStyle; + var edgeWidth = edge.pstyle('width').pfValue; + + for (var i = 0; i + 1 < pts.length; i += 2) { + var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]]; + var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); + var normal = [vector[1] / length, -vector[0] / length]; + var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2]; + context.beginPath(); + context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]); + context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]); + context.lineTo(pts[i + 2], pts[i + 3]); + context.closePath(); + context.fill(); + } + }; + + CRp$8.drawArrowheads = function (context, edge, opacity) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === 'haystack'; + + if (!isHaystack) { + this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); + } + + this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); + this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); + + if (!isHaystack) { + this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); + } + }; + + CRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) { + if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) { + return; + } + + var self = this; + var arrowShape = edge.pstyle(prefix + '-arrow-shape').value; + + if (arrowShape === 'none') { + return; + } + + var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled'; + var arrowFill = edge.pstyle(prefix + '-arrow-fill').value; + var edgeWidth = edge.pstyle('width').pfValue; + var edgeOpacity = edge.pstyle('opacity').value; + + if (opacity === undefined) { + opacity = edgeOpacity; + } + + var gco = context.globalCompositeOperation; + + if (opacity !== 1 || arrowFill === 'hollow') { + // then extra clear is needed + context.globalCompositeOperation = 'destination-out'; + self.colorFillStyle(context, 255, 255, 255, 1); + self.colorStrokeStyle(context, 255, 255, 255, 1); + self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, x, y, angle); + context.globalCompositeOperation = gco; + } // otherwise, the opaque arrow clears it for free :) + + + var color = edge.pstyle(prefix + '-arrow-color').value; + self.colorFillStyle(context, color[0], color[1], color[2], opacity); + self.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, x, y, angle); + }; + + CRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, x, y, angle) { + var r = this; + var usePaths = this.usePaths() && shape !== 'triangle-cross'; + var pathCacheHit = false; + var path; + var canvasContext = context; + var translation = { + x: x, + y: y + }; + var scale = edge.pstyle('arrow-scale').value; + var size = this.getArrowWidth(edgeWidth, scale); + var shapeImpl = r.arrowShapes[shape]; + + if (usePaths) { + var cache = r.arrowPathCache = r.arrowPathCache || []; + var key = hashString(shape); + var cachedPath = cache[key]; + + if (cachedPath != null) { + path = context = cachedPath; + pathCacheHit = true; + } else { + path = context = new Path2D(); + cache[key] = path; + } + } + + if (!pathCacheHit) { + if (context.beginPath) { + context.beginPath(); + } + + if (usePaths) { + // store in the path cache with values easily manipulated later + shapeImpl.draw(context, 1, 0, { + x: 0, + y: 0 + }, 1); + } else { + shapeImpl.draw(context, size, angle, translation, edgeWidth); + } + + if (context.closePath) { + context.closePath(); + } + } + + context = canvasContext; + + if (usePaths) { + // set transform to arrow position/orientation + context.translate(x, y); + context.rotate(angle); + context.scale(size, size); + } + + if (fill === 'filled' || fill === 'both') { + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + + if (fill === 'hollow' || fill === 'both') { + context.lineWidth = (shapeImpl.matchEdgeWidth ? edgeWidth : 1) / (usePaths ? size : 1); + context.lineJoin = 'miter'; + + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + } + + if (usePaths) { + // reset transform by applying inverse + context.scale(1 / size, 1 / size); + context.rotate(-angle); + context.translate(-x, -y); + } + }; + + var CRp$7 = {}; + + CRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) { + // detect problematic cases for old browsers with bad images (cheaper than try-catch) + if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) { + return; + } + + try { + context.drawImage(img, ix, iy, iw, ih, x, y, w, h); + } catch (e) { + warn(e); + } + }; + + CRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) { + var r = this; + var pos = node.position(); + var nodeX = pos.x; + var nodeY = pos.y; + var styleObj = node.cy().style(); + var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); + var fit = getIndexedStyle(node, 'background-fit', 'value', index); + var repeat = getIndexedStyle(node, 'background-repeat', 'value', index); + var nodeW = node.width(); + var nodeH = node.height(); + var paddingX2 = node.padding() * 2; + var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); + var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); + var rs = node._private.rscratch; + var clip = getIndexedStyle(node, 'background-clip', 'value', index); + var shouldClip = clip === 'node'; + var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity; + var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index); + var imgW = img.width || img.cachedW; + var imgH = img.height || img.cachedH; // workaround for broken browsers like ie + + if (null == imgW || null == imgH) { + document.body.appendChild(img); // eslint-disable-line no-undef + + imgW = img.cachedW = img.width || img.offsetWidth; + imgH = img.cachedH = img.height || img.offsetHeight; + document.body.removeChild(img); // eslint-disable-line no-undef + } + + var w = imgW; + var h = imgH; + + if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') { + if (getIndexedStyle(node, 'background-width', 'units', index) === '%') { + w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW; + } else { + w = getIndexedStyle(node, 'background-width', 'pfValue', index); + } + } + + if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') { + if (getIndexedStyle(node, 'background-height', 'units', index) === '%') { + h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH; + } else { + h = getIndexedStyle(node, 'background-height', 'pfValue', index); + } + } + + if (w === 0 || h === 0) { + return; // no point in drawing empty image (and chrome is broken in this case) + } + + if (fit === 'contain') { + var scale = Math.min(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } else if (fit === 'cover') { + var scale = Math.max(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } + + var x = nodeX - nodeTW / 2; // left + + var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index); + var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index); + + if (posXUnits === '%') { + x += (nodeTW - w) * posXPfVal; + } else { + x += posXPfVal; + } + + var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index); + var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index); + + if (offXUnits === '%') { + x += (nodeTW - w) * offXPfVal; + } else { + x += offXPfVal; + } + + var y = nodeY - nodeTH / 2; // top + + var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index); + var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index); + + if (posYUnits === '%') { + y += (nodeTH - h) * posYPfVal; + } else { + y += posYPfVal; + } + + var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index); + var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index); + + if (offYUnits === '%') { + y += (nodeTH - h) * offYPfVal; + } else { + y += offYPfVal; + } + + if (rs.pathCache) { + x -= nodeX; + y -= nodeY; + nodeX = 0; + nodeY = 0; + } + + var gAlpha = context.globalAlpha; + context.globalAlpha = imgOpacity; + var smoothingEnabled = r.getImgSmoothing(context); + var isSmoothingSwitched = false; + + if (smooth === 'no' && smoothingEnabled) { + r.setImgSmoothing(context, false); + isSmoothingSwitched = true; + } else if (smooth === 'yes' && !smoothingEnabled) { + r.setImgSmoothing(context, true); + isSmoothingSwitched = true; + } + + if (repeat === 'no-repeat') { + if (shouldClip) { + context.save(); + + if (rs.pathCache) { + context.clip(rs.pathCache); + } else { + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.clip(); + } + } + + r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h); + + if (shouldClip) { + context.restore(); + } + } else { + var pattern = context.createPattern(img, repeat); + context.fillStyle = pattern; + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.translate(x, y); + context.fill(); + context.translate(-x, -y); + } + + context.globalAlpha = gAlpha; + + if (isSmoothingSwitched) { + r.setImgSmoothing(context, smoothingEnabled); + } + }; + + var CRp$6 = {}; + + CRp$6.eleTextBiggerThanMin = function (ele, scale) { + if (!scale) { + var zoom = ele.cy().zoom(); + var pxRatio = this.getPixelRatio(); + var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level + + scale = Math.pow(2, lvl); + } + + var computedSize = ele.pstyle('font-size').pfValue * scale; + var minSize = ele.pstyle('min-zoomed-font-size').pfValue; + + if (computedSize < minSize) { + return false; + } + + return true; + }; + + CRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) { + var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + + if (force == null) { + if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { + return; + } + } else if (force === false) { + return; + } + + if (ele.isNode()) { + var label = ele.pstyle('label'); + + if (!label || !label.value) { + return; + } + + var justification = r.getLabelJustification(ele); + context.textAlign = justification; + context.textBaseline = 'bottom'; + } else { + var badLine = ele.element()._private.rscratch.badLine; + + var _label = ele.pstyle('label'); + + var srcLabel = ele.pstyle('source-label'); + var tgtLabel = ele.pstyle('target-label'); + + if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { + return; + } + + context.textAlign = 'center'; + context.textBaseline = 'bottom'; + } + + var applyRotation = !shiftToOriginWithBb; + var bb; + + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + + if (prefix == null) { + r.drawText(context, ele, null, applyRotation, useEleOpacity); + + if (ele.isEdge()) { + r.drawText(context, ele, 'source', applyRotation, useEleOpacity); + r.drawText(context, ele, 'target', applyRotation, useEleOpacity); + } + } else { + r.drawText(context, ele, prefix, applyRotation, useEleOpacity); + } + + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + + CRp$6.getFontCache = function (context) { + var cache; + this.fontCaches = this.fontCaches || []; + + for (var i = 0; i < this.fontCaches.length; i++) { + cache = this.fontCaches[i]; + + if (cache.context === context) { + return cache; + } + } + + cache = { + context: context + }; + this.fontCaches.push(cache); + return cache; + }; // set up canvas context with font + // returns transformed text string + + + CRp$6.setupTextStyle = function (context, ele) { + var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + // Font style + var labelStyle = ele.pstyle('font-style').strValue; + var labelSize = ele.pstyle('font-size').pfValue + 'px'; + var labelFamily = ele.pstyle('font-family').strValue; + var labelWeight = ele.pstyle('font-weight').strValue; + var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1; + var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity; + var color = ele.pstyle('color').value; + var outlineColor = ele.pstyle('text-outline-color').value; + context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily; + context.lineJoin = 'round'; // so text outlines aren't jagged + + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); + }; // TODO ensure re-used + + + function roundRect(ctx, x, y, width, height) { + var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5; + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); + ctx.fill(); + } + + CRp$6.getTextAngle = function (ele, prefix) { + var theta; + var _p = ele._private; + var rscratch = _p.rscratch; + var pdash = prefix ? prefix + '-' : ''; + var rotation = ele.pstyle(pdash + 'text-rotation'); + var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix); + + if (rotation.strValue === 'autorotate') { + theta = ele.isEdge() ? textAngle : 0; + } else if (rotation.strValue === 'none') { + theta = 0; + } else { + theta = rotation.pfValue; + } + + return theta; + }; + + CRp$6.drawText = function (context, ele, prefix) { + var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var _p = ele._private; + var rscratch = _p.rscratch; + var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; + + if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) { + return; + } // use 'main' as an alias for the main label (i.e. null prefix) + + + if (prefix === 'main') { + prefix = null; + } + + var textX = getPrefixedProperty(rscratch, 'labelX', prefix); + var textY = getPrefixedProperty(rscratch, 'labelY', prefix); + var orgTextX, orgTextY; // used for rotation + + var text = this.getLabelText(ele, prefix); + + if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) { + this.setupTextStyle(context, ele, useEleOpacity); + var pdash = prefix ? prefix + '-' : ''; + var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix); + var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix); + var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue; + var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue; + var isEdge = ele.isEdge(); + var halign = ele.pstyle('text-halign').value; + var valign = ele.pstyle('text-valign').value; + + if (isEdge) { + halign = 'center'; + valign = 'center'; + } + + textX += marginX; + textY += marginY; + var theta; + + if (!applyRotation) { + theta = 0; + } else { + theta = this.getTextAngle(ele, prefix); + } + + if (theta !== 0) { + orgTextX = textX; + orgTextY = textY; + context.translate(orgTextX, orgTextY); + context.rotate(theta); + textX = 0; + textY = 0; + } + + switch (valign) { + case 'top': + break; + + case 'center': + textY += textH / 2; + break; + + case 'bottom': + textY += textH; + break; + } + + var backgroundOpacity = ele.pstyle('text-background-opacity').value; + var borderOpacity = ele.pstyle('text-border-opacity').value; + var textBorderWidth = ele.pstyle('text-border-width').pfValue; + var backgroundPadding = ele.pstyle('text-background-padding').pfValue; + + if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { + var bgX = textX - backgroundPadding; + + switch (halign) { + case 'left': + bgX -= textW; + break; + + case 'center': + bgX -= textW / 2; + break; + } + + var bgY = textY - textH - backgroundPadding; + var bgW = textW + 2 * backgroundPadding; + var bgH = textH + 2 * backgroundPadding; + + if (backgroundOpacity > 0) { + var textFill = context.fillStyle; + var textBackgroundColor = ele.pstyle('text-background-color').value; + context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')'; + var styleShape = ele.pstyle('text-background-shape').strValue; + + if (styleShape.indexOf('round') === 0) { + roundRect(context, bgX, bgY, bgW, bgH, 2); + } else { + context.fillRect(bgX, bgY, bgW, bgH); + } + + context.fillStyle = textFill; + } + + if (textBorderWidth > 0 && borderOpacity > 0) { + var textStroke = context.strokeStyle; + var textLineWidth = context.lineWidth; + var textBorderColor = ele.pstyle('text-border-color').value; + var textBorderStyle = ele.pstyle('text-border-style').value; + context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')'; + context.lineWidth = textBorderWidth; + + if (context.setLineDash) { + // for very outofdate browsers + switch (textBorderStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + + case 'dashed': + context.setLineDash([4, 2]); + break; + + case 'double': + context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders + + context.setLineDash([]); + break; + + case 'solid': + context.setLineDash([]); + break; + } + } + + context.strokeRect(bgX, bgY, bgW, bgH); + + if (textBorderStyle === 'double') { + var whiteWidth = textBorderWidth / 2; + context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); + } + + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + + context.lineWidth = textLineWidth; + context.strokeStyle = textStroke; + } + } + + var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle + + if (lineWidth > 0) { + context.lineWidth = lineWidth; + } + + if (ele.pstyle('text-wrap').value === 'wrap') { + var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix); + var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix); + var halfTextW = textW / 2; + var justification = this.getLabelJustification(ele); + + if (justification === 'auto') ; else if (halign === 'left') { + // auto justification : right + if (justification === 'left') { + textX += -textW; + } else if (justification === 'center') { + textX += -halfTextW; + } // else same as auto + + } else if (halign === 'center') { + // auto justfication : center + if (justification === 'left') { + textX += -halfTextW; + } else if (justification === 'right') { + textX += halfTextW; + } // else same as auto + + } else if (halign === 'right') { + // auto justification : left + if (justification === 'center') { + textX += halfTextW; + } else if (justification === 'right') { + textX += textW; + } // else same as auto + + } + + switch (valign) { + case 'top': + textY -= (lines.length - 1) * lineHeight; + break; + + case 'center': + case 'bottom': + textY -= (lines.length - 1) * lineHeight; + break; + } + + for (var l = 0; l < lines.length; l++) { + if (lineWidth > 0) { + context.strokeText(lines[l], textX, textY); + } + + context.fillText(lines[l], textX, textY); + textY += lineHeight; + } + } else { + if (lineWidth > 0) { + context.strokeText(text, textX, textY); + } + + context.fillText(text, textX, textY); + } + + if (theta !== 0) { + context.rotate(-theta); + context.translate(-orgTextX, -orgTextY); + } + } + }; + + /* global Path2D */ + var CRp$5 = {}; + + CRp$5.drawNode = function (context, node, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + var nodeWidth, nodeHeight; + var _p = node._private; + var rs = _p.rscratch; + var pos = node.position(); + + if (!number$1(pos.x) || !number$1(pos.y)) { + return; // can't draw node with undefined position + } + + if (shouldDrawOpacity && !node.visible()) { + return; + } + + var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; + var usePaths = r.usePaths(); + var path; + var pathCacheHit = false; + var padding = node.padding(); + nodeWidth = node.width() + 2 * padding; + nodeHeight = node.height() + 2 * padding; // + // setup shift + + var bb; + + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } // + // load bg image + + + var bgImgProp = node.pstyle('background-image'); + var urls = bgImgProp.value; + var urlDefined = new Array(urls.length); + var image = new Array(urls.length); + var numImages = 0; + + for (var i = 0; i < urls.length; i++) { + var url = urls[i]; + var defd = urlDefined[i] = url != null && url !== 'none'; + + if (defd) { + var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i); + numImages++; // get image, and if not loaded then ask to redraw when later loaded + + image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () { + _p.backgroundTimestamp = Date.now(); + node.emitAndNotify('background'); + }); + } + } // + // setup styles + + + var darkness = node.pstyle('background-blacken').value; + var borderWidth = node.pstyle('border-width').pfValue; + var bgOpacity = node.pstyle('background-opacity').value * eleOpacity; + var borderColor = node.pstyle('border-color').value; + var borderStyle = node.pstyle('border-style').value; + var borderOpacity = node.pstyle('border-opacity').value * eleOpacity; + context.lineJoin = 'miter'; // so borders are square with the node shape + + var setupShapeColor = function setupShapeColor() { + var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity; + r.eleFillStyle(context, node, bgOpy); + }; + + var setupBorderColor = function setupBorderColor() { + var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity; + r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); + }; // + // setup shape + + + var styleShape = node.pstyle('shape').strValue; + var shapePts = node.pstyle('shape-polygon-points').pfValue; + + if (usePaths) { + context.translate(pos.x, pos.y); + var pathCache = r.nodePathCache = r.nodePathCache || []; + var key = hashStrings(styleShape === 'polygon' ? styleShape + ',' + shapePts.join(',') : styleShape, '' + nodeHeight, '' + nodeWidth); + var cachedPath = pathCache[key]; + + if (cachedPath != null) { + path = cachedPath; + pathCacheHit = true; + rs.pathCache = path; + } else { + path = new Path2D(); + pathCache[key] = rs.pathCache = path; + } + } + + var drawShape = function drawShape() { + if (!pathCacheHit) { + var npos = pos; + + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + + r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight); + } + + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + }; + + var drawImages = function drawImages() { + var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; + var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var prevBging = _p.backgrounding; + var totalCompleted = 0; + + for (var _i = 0; _i < image.length; _i++) { + var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i); + + if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') { + totalCompleted++; + continue; + } + + if (urlDefined[_i] && image[_i].complete && !image[_i].error) { + totalCompleted++; + r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity); + } + } + + _p.backgrounding = !(totalCompleted === numImages); + + if (prevBging !== _p.backgrounding) { + // update style b/c :backgrounding state changed + node.updateStyle(false); + } + }; + + var drawPie = function drawPie() { + var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity; + + if (r.hasPie(node)) { + r.drawPie(context, node, pieOpacity); // redraw/restore path if steps after pie need it + + if (redrawShape) { + if (!usePaths) { + r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight); + } + } + } + }; + + var darken = function darken() { + var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; + var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; + var c = darkness > 0 ? 0 : 255; + + if (darkness !== 0) { + r.colorFillStyle(context, c, c, c, opacity); + + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + }; + + var drawBorder = function drawBorder() { + if (borderWidth > 0) { + context.lineWidth = borderWidth; + context.lineCap = 'butt'; + + if (context.setLineDash) { + // for very outofdate browsers + switch (borderStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + + case 'dashed': + context.setLineDash([4, 2]); + break; + + case 'solid': + case 'double': + context.setLineDash([]); + break; + } + } + + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + + if (borderStyle === 'double') { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + + context.globalCompositeOperation = gco; + } // reset in case we changed the border style + + + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + } + }; + + var drawOverlay = function drawOverlay() { + if (shouldDrawOverlay) { + r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + + var drawUnderlay = function drawUnderlay() { + if (shouldDrawOverlay) { + r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + + var drawText = function drawText() { + r.drawElementText(context, node, null, drawLabel); + }; + + var ghost = node.pstyle('ghost').value === 'yes'; + + if (ghost) { + var gx = node.pstyle('ghost-offset-x').pfValue; + var gy = node.pstyle('ghost-offset-y').pfValue; + var ghostOpacity = node.pstyle('ghost-opacity').value; + var effGhostOpacity = ghostOpacity * eleOpacity; + context.translate(gx, gy); + setupShapeColor(ghostOpacity * bgOpacity); + drawShape(); + drawImages(effGhostOpacity, true); + setupBorderColor(ghostOpacity * borderOpacity); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(effGhostOpacity, false); + darken(effGhostOpacity); + context.translate(-gx, -gy); + } + + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + + drawUnderlay(); + + if (usePaths) { + context.translate(pos.x, pos.y); + } + + setupShapeColor(); + drawShape(); + drawImages(eleOpacity, true); + setupBorderColor(); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(eleOpacity, false); + darken(); + + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + + drawText(); + drawOverlay(); // + // clean up shift + + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + + var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + + return function (context, node, pos, nodeWidth, nodeHeight) { + var r = this; + + if (!node.visible()) { + return; + } + + var padding = node.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var opacity = node.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + var color = node.pstyle("".concat(overlayOrUnderlay, "-color")).value; + var shape = node.pstyle("".concat(overlayOrUnderlay, "-shape")).value; + + if (opacity > 0) { + pos = pos || node.position(); + + if (nodeWidth == null || nodeHeight == null) { + var _padding = node.padding(); + + nodeWidth = node.width() + 2 * _padding; + nodeHeight = node.height() + 2 * _padding; + } + + r.colorFillStyle(context, color[0], color[1], color[2], opacity); + r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2); + context.fill(); + } + }; + }; + + CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay'); + CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay'); // does the node have at least one pie piece? + + CRp$5.hasPie = function (node) { + node = node[0]; // ensure ele ref + + return node._private.hasPie; + }; + + CRp$5.drawPie = function (context, node, nodeOpacity, pos) { + node = node[0]; // ensure ele ref + + pos = pos || node.position(); + var cyStyle = node.cy().style(); + var pieSize = node.pstyle('pie-size'); + var x = pos.x; + var y = pos.y; + var nodeW = node.width(); + var nodeH = node.height(); + var radius = Math.min(nodeW, nodeH) / 2; // must fit in node + + var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] + + var usePaths = this.usePaths(); + + if (usePaths) { + x = 0; + y = 0; + } + + if (pieSize.units === '%') { + radius = radius * pieSize.pfValue; + } else if (pieSize.pfValue !== undefined) { + radius = pieSize.pfValue / 2; + } + + for (var i = 1; i <= cyStyle.pieBackgroundN; i++) { + // 1..N + var size = node.pstyle('pie-' + i + '-background-size').value; + var color = node.pstyle('pie-' + i + '-background-color').value; + var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity; + var percent = size / 100; // map integer range [0, 100] to [0, 1] + // percent can't push beyond 1 + + if (percent + lastPercent > 1) { + percent = 1 - lastPercent; + } + + var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise + + var angleDelta = 2 * Math.PI * percent; + var angleEnd = angleStart + angleDelta; // ignore if + // - zero size + // - we're already beyond the full circle + // - adding the current slice would go beyond the full circle + + if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) { + continue; + } + + context.beginPath(); + context.moveTo(x, y); + context.arc(x, y, radius, angleStart, angleEnd); + context.closePath(); + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + context.fill(); + lastPercent += percent; + } + }; + + var CRp$4 = {}; + var motionBlurDelay = 100; // var isFirefox = typeof InstallTrigger !== 'undefined'; + + CRp$4.getPixelRatio = function () { + var context = this.data.contexts[0]; + + if (this.forcedPixelRatio != null) { + return this.forcedPixelRatio; + } + + var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; + return (window.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef + }; + + CRp$4.paintCache = function (context) { + var caches = this.paintCaches = this.paintCaches || []; + var needToCreateCache = true; + var cache; + + for (var i = 0; i < caches.length; i++) { + cache = caches[i]; + + if (cache.context === context) { + needToCreateCache = false; + break; + } + } + + if (needToCreateCache) { + cache = { + context: context + }; + caches.push(cache); + } + + return cache; + }; + + CRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) { + var gradientStyle; + var usePaths = this.usePaths(); + var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value, + positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue; + + if (fill === 'radial-gradient') { + if (ele.isEdge()) { + var start = ele.sourceEndpoint(), + end = ele.targetEndpoint(), + mid = ele.midpoint(); + var d1 = dist(start, mid); + var d2 = dist(end, mid); + gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); + } else { + var pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), + width = ele.paddedWidth(), + height = ele.paddedHeight(); + gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); + } + } else { + if (ele.isEdge()) { + var _start = ele.sourceEndpoint(), + _end = ele.targetEndpoint(); + + gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); + } else { + var _pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), + _width = ele.paddedWidth(), + _height = ele.paddedHeight(), + halfWidth = _width / 2, + halfHeight = _height / 2; + + var direction = ele.pstyle('background-gradient-direction').value; + + switch (direction) { + case 'to-bottom': + gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); + break; + + case 'to-top': + gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); + break; + + case 'to-left': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); + break; + + case 'to-right': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); + break; + + case 'to-bottom-right': + case 'to-right-bottom': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); + break; + + case 'to-top-right': + case 'to-right-top': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); + break; + + case 'to-bottom-left': + case 'to-left-bottom': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); + break; + + case 'to-top-left': + case 'to-left-top': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); + break; + } + } + } + + if (!gradientStyle) return null; // invalid gradient style + + var hasPositions = positions.length === colors.length; + var length = colors.length; + + for (var i = 0; i < length; i++) { + gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')'); + } + + return gradientStyle; + }; + + CRp$4.gradientFillStyle = function (context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity); + if (!gradientStyle) return null; // error + + context.fillStyle = gradientStyle; + }; + + CRp$4.colorFillStyle = function (context, r, g, b, a) { + context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; // turn off for now, seems context does its own caching + // var cache = this.paintCache(context); + // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // if( cache.fillStyle !== fillStyle ){ + // context.fillStyle = cache.fillStyle = fillStyle; + // } + }; + + CRp$4.eleFillStyle = function (context, ele, opacity) { + var backgroundFill = ele.pstyle('background-fill').value; + + if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') { + this.gradientFillStyle(context, ele, backgroundFill, opacity); + } else { + var backgroundColor = ele.pstyle('background-color').value; + this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); + } + }; + + CRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity); + if (!gradientStyle) return null; // error + + context.strokeStyle = gradientStyle; + }; + + CRp$4.colorStrokeStyle = function (context, r, g, b, a) { + context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; // turn off for now, seems context does its own caching + // var cache = this.paintCache(context); + // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // if( cache.strokeStyle !== strokeStyle ){ + // context.strokeStyle = cache.strokeStyle = strokeStyle; + // } + }; + + CRp$4.eleStrokeStyle = function (context, ele, opacity) { + var lineFill = ele.pstyle('line-fill').value; + + if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') { + this.gradientStrokeStyle(context, ele, lineFill, opacity); + } else { + var lineColor = ele.pstyle('line-color').value; + this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); + } + }; // Resize canvas + + + CRp$4.matchCanvasSize = function (container) { + var r = this; + var data = r.data; + var bb = r.findContainerClientCoords(); + var width = bb[2]; + var height = bb[3]; + var pixelRatio = r.getPixelRatio(); + var mbPxRatio = r.motionBlurPxRatio; + + if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { + pixelRatio = mbPxRatio; + } + + var canvasWidth = width * pixelRatio; + var canvasHeight = height * pixelRatio; + var canvas; + + if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { + return; // save cycles if same + } + + r.fontCaches = null; // resizing resets the style + + var canvasContainer = data.canvasContainer; + canvasContainer.style.width = width + 'px'; + canvasContainer.style.height = height + 'px'; + + for (var i = 0; i < r.CANVAS_LAYERS; i++) { + canvas = data.canvases[i]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + + for (var i = 0; i < r.BUFFER_COUNT; i++) { + canvas = data.bufferCanvases[i]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + + r.textureMult = 1; + + if (pixelRatio <= 1) { + canvas = data.bufferCanvases[r.TEXTURE_BUFFER]; + r.textureMult = 2; + canvas.width = canvasWidth * r.textureMult; + canvas.height = canvasHeight * r.textureMult; + } + + r.canvasWidth = canvasWidth; + r.canvasHeight = canvasHeight; + }; + + CRp$4.renderTo = function (cxt, zoom, pan, pxRatio) { + this.render({ + forcedContext: cxt, + forcedZoom: zoom, + forcedPan: pan, + drawAllLayers: true, + forcedPxRatio: pxRatio + }); + }; + + CRp$4.render = function (options) { + options = options || staticEmptyObject(); + var forcedContext = options.forcedContext; + var drawAllLayers = options.drawAllLayers; + var drawOnlyNodeLayer = options.drawOnlyNodeLayer; + var forcedZoom = options.forcedZoom; + var forcedPan = options.forcedPan; + var r = this; + var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio; + var cy = r.cy; + var data = r.data; + var needDraw = data.canvasNeedsRedraw; + var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); + var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur; + var mbPxRatio = r.motionBlurPxRatio; + var hasCompoundNodes = cy.hasCompoundNodes(); + var inNodeDragGesture = r.hoverData.draggingEles; + var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; + motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; + var motionBlurFadeEffect = motionBlur; + + if (!forcedContext) { + if (r.prevPxRatio !== pixelRatio) { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + + r.prevPxRatio = pixelRatio; + } + + if (!forcedContext && r.motionBlurTimeout) { + clearTimeout(r.motionBlurTimeout); + } + + if (motionBlur) { + if (r.mbFrames == null) { + r.mbFrames = 0; + } + + r.mbFrames++; + + if (r.mbFrames < 3) { + // need several frames before even high quality motionblur + motionBlurFadeEffect = false; + } // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing) + + + if (r.mbFrames > r.minMbLowQualFrames) { + //r.fullQualityMb = false; + r.motionBlurPxRatio = r.mbPxRBlurry; + } + } + + if (r.clearingMotionBlur) { + r.motionBlurPxRatio = 1; + } // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame + // because a rogue async texture frame would clear needDraw + + + if (r.textureDrawLastFrame && !textureDraw) { + needDraw[r.NODE] = true; + needDraw[r.SELECT_BOX] = true; + } + + var style = cy.style(); + var zoom = cy.zoom(); + var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom; + var pan = cy.pan(); + var effectivePan = { + x: pan.x, + y: pan.y + }; + var vp = { + zoom: zoom, + pan: { + x: pan.x, + y: pan.y + } + }; + var prevVp = r.prevViewport; + var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed) + + if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { + r.motionBlurPxRatio = 1; + } + + if (forcedPan) { + effectivePan = forcedPan; + } // apply pixel ratio + + + effectiveZoom *= pixelRatio; + effectivePan.x *= pixelRatio; + effectivePan.y *= pixelRatio; + var eles = r.getCachedZSortedEles(); + + function mbclear(context, x, y, w, h) { + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency); + context.fillRect(x, y, w, h); + context.globalCompositeOperation = gco; + } + + function setContextTransform(context, clear) { + var ePan, eZoom, w, h; + + if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { + ePan = { + x: pan.x * mbPxRatio, + y: pan.y * mbPxRatio + }; + eZoom = zoom * mbPxRatio; + w = r.canvasWidth * mbPxRatio; + h = r.canvasHeight * mbPxRatio; + } else { + ePan = effectivePan; + eZoom = effectiveZoom; + w = r.canvasWidth; + h = r.canvasHeight; + } + + context.setTransform(1, 0, 0, 1, 0, 0); + + if (clear === 'motionBlur') { + mbclear(context, 0, 0, w, h); + } else if (!forcedContext && (clear === undefined || clear)) { + context.clearRect(0, 0, w, h); + } + + if (!drawAllLayers) { + context.translate(ePan.x, ePan.y); + context.scale(eZoom, eZoom); + } + + if (forcedPan) { + context.translate(forcedPan.x, forcedPan.y); + } + + if (forcedZoom) { + context.scale(forcedZoom, forcedZoom); + } + } + + if (!textureDraw) { + r.textureDrawLastFrame = false; + } + + if (textureDraw) { + r.textureDrawLastFrame = true; + + if (!r.textureCache) { + r.textureCache = {}; + r.textureCache.bb = cy.mutableElements().boundingBox(); + r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; + var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; + cxt.setTransform(1, 0, 0, 1, 0, 0); + cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); + r.render({ + forcedContext: cxt, + drawOnlyNodeLayer: true, + forcedPxRatio: pixelRatio * r.textureMult + }); + var vp = r.textureCache.viewport = { + zoom: cy.zoom(), + pan: cy.pan(), + width: r.canvasWidth, + height: r.canvasHeight + }; + vp.mpan = { + x: (0 - vp.pan.x) / vp.zoom, + y: (0 - vp.pan.y) / vp.zoom + }; + } + + needDraw[r.DRAG] = false; + needDraw[r.NODE] = false; + var context = data.contexts[r.NODE]; + var texture = r.textureCache.texture; + var vp = r.textureCache.viewport; + context.setTransform(1, 0, 0, 1, 0, 0); + + if (motionBlur) { + mbclear(context, 0, 0, vp.width, vp.height); + } else { + context.clearRect(0, 0, vp.width, vp.height); + } + + var outsideBgColor = style.core('outside-texture-bg-color').value; + var outsideBgOpacity = style.core('outside-texture-bg-opacity').value; + r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); + context.fillRect(0, 0, vp.width, vp.height); + var zoom = cy.zoom(); + setContextTransform(context, false); + context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + } else if (r.textureOnViewport && !forcedContext) { + // clear the cache since we don't need it + r.textureCache = null; + } + + var extent = cy.extent(); + var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); + var hideEdges = r.hideEdgesOnViewport && vpManip; + var needMbClear = []; + needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; + + if (needMbClear[r.NODE]) { + r.clearedForMotionBlur[r.NODE] = true; + } + + needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; + + if (needMbClear[r.DRAG]) { + r.clearedForMotionBlur[r.DRAG] = true; + } + + if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { + var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]); + var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined; + setContextTransform(context, clear); + + if (hideEdges) { + r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); + } else { + r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); + } + + if (r.debug) { + r.drawDebugPoints(context, eles.nondrag); + } + + if (!drawAllLayers && !motionBlur) { + needDraw[r.NODE] = false; + } + } + + if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { + var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]); + setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined); + + if (hideEdges) { + r.drawCachedNodes(context, eles.drag, pixelRatio, extent); + } else { + r.drawCachedElements(context, eles.drag, pixelRatio, extent); + } + + if (r.debug) { + r.drawDebugPoints(context, eles.drag); + } + + if (!drawAllLayers && !motionBlur) { + needDraw[r.DRAG] = false; + } + } + + if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { + var context = forcedContext || data.contexts[r.SELECT_BOX]; + setContextTransform(context); + + if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { + var zoom = r.cy.zoom(); + var borderWidth = style.core('selection-box-border-width').value / zoom; + context.lineWidth = borderWidth; + context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; + context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + + if (borderWidth > 0) { + context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; + context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + } + } + + if (data.bgActivePosistion && !r.hoverData.selecting) { + var zoom = r.cy.zoom(); + var pos = data.bgActivePosistion; + context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')'; + context.beginPath(); + context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI); + context.fill(); + } + + var timeToRender = r.lastRedrawTime; + + if (r.showFps && timeToRender) { + timeToRender = Math.round(timeToRender); + var fps = Math.round(1000 / timeToRender); + context.setTransform(1, 0, 0, 1, 0, 0); + context.fillStyle = 'rgba(255, 0, 0, 0.75)'; + context.strokeStyle = 'rgba(255, 0, 0, 0.75)'; + context.lineWidth = 1; + context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20); + var maxFps = 60; + context.strokeRect(0, 30, 250, 20); + context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); + } + + if (!drawAllLayers) { + needDraw[r.SELECT_BOX] = false; + } + } // motionblur: blit rendered blurry frames + + + if (motionBlur && mbPxRatio !== 1) { + var cxtNode = data.contexts[r.NODE]; + var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; + var cxtDrag = data.contexts[r.DRAG]; + var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; + + var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) { + cxt.setTransform(1, 0, 0, 1, 0, 0); + + if (needClear || !motionBlurFadeEffect) { + cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight); + } else { + mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight); + } + + var pxr = mbPxRatio; + cxt.drawImage(txt, // img + 0, 0, // sx, sy + r.canvasWidth * pxr, r.canvasHeight * pxr, // sw, sh + 0, 0, // x, y + r.canvasWidth, r.canvasHeight // w, h + ); + }; + + if (needDraw[r.NODE] || needMbClear[r.NODE]) { + drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); + needDraw[r.NODE] = false; + } + + if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { + drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); + needDraw[r.DRAG] = false; + } + } + + r.prevViewport = vp; + + if (r.clearingMotionBlur) { + r.clearingMotionBlur = false; + r.motionBlurCleared = true; + r.motionBlur = true; + } + + if (motionBlur) { + r.motionBlurTimeout = setTimeout(function () { + r.motionBlurTimeout = null; + r.clearedForMotionBlur[r.NODE] = false; + r.clearedForMotionBlur[r.DRAG] = false; + r.motionBlur = false; + r.clearingMotionBlur = !textureDraw; + r.mbFrames = 0; + needDraw[r.NODE] = true; + needDraw[r.DRAG] = true; + r.redraw(); + }, motionBlurDelay); + } + + if (!forcedContext) { + cy.emit('render'); + } + }; + + var CRp$3 = {}; // @O Polygon drawing + + CRp$3.drawPolygonPath = function (context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + + if (context.beginPath) { + context.beginPath(); + } + + context.moveTo(x + halfW * points[0], y + halfH * points[1]); + + for (var i = 1; i < points.length / 2; i++) { + context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]); + } + + context.closePath(); + }; + + CRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + + if (context.beginPath) { + context.beginPath(); + } + + for (var _i = 0; _i < points.length / 4; _i++) { + var sourceUv = void 0, + destUv = void 0; + + if (_i === 0) { + sourceUv = points.length - 2; + } else { + sourceUv = _i * 4 - 2; + } + + destUv = _i * 4 + 2; + var px = x + halfW * points[_i * 4]; + var py = y + halfH * points[_i * 4 + 1]; + var cosTheta = -points[sourceUv] * points[destUv] - points[sourceUv + 1] * points[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * points[sourceUv]; + var cp0y = py - offset * points[sourceUv + 1]; + var cp1x = px + offset * points[destUv]; + var cp1y = py + offset * points[destUv + 1]; + + if (_i === 0) { + context.moveTo(cp0x, cp0y); + } else { + context.lineTo(cp0x, cp0y); + } + + context.arcTo(px, py, cp1x, cp1y, cornerRadius); + } + + context.closePath(); + }; // Round rectangle drawing + + + CRp$3.drawRoundRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + + if (context.beginPath) { + context.beginPath(); + } // Start at top middle + + + context.moveTo(x, y - halfHeight); // Arc from middle top to right side + + context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius); // Arc from right side to bottom + + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); // Arc from bottom to left side + + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); // Arc from left side to topBorder + + context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius); // Join line + + context.lineTo(x, y - halfHeight); + context.closePath(); + }; + + CRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + + if (context.beginPath) { + context.beginPath(); + } // Start at top middle + + + context.moveTo(x, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight); + context.lineTo(x + halfWidth, y); + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + context.lineTo(x - halfWidth, y - halfHeight); + context.lineTo(x, y - halfHeight); + context.closePath(); + }; + + CRp$3.drawCutRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerLength = getCutRectangleCornerLength(); + + if (context.beginPath) { + context.beginPath(); + } + + context.moveTo(x - halfWidth + cornerLength, y - halfHeight); + context.lineTo(x + halfWidth - cornerLength, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight + cornerLength); + context.lineTo(x + halfWidth, y + halfHeight - cornerLength); + context.lineTo(x + halfWidth - cornerLength, y + halfHeight); + context.lineTo(x - halfWidth + cornerLength, y + halfHeight); + context.lineTo(x - halfWidth, y + halfHeight - cornerLength); + context.lineTo(x - halfWidth, y - halfHeight + cornerLength); + context.closePath(); + }; + + CRp$3.drawBarrelPath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var xBegin = x - halfWidth; + var xEnd = x + halfWidth; + var yBegin = y - halfHeight; + var yEnd = y + halfHeight; + var barrelCurveConstants = getBarrelCurveConstants(width, height); + var wOffset = barrelCurveConstants.widthOffset; + var hOffset = barrelCurveConstants.heightOffset; + var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; + + if (context.beginPath) { + context.beginPath(); + } + + context.moveTo(xBegin, yBegin + hOffset); + context.lineTo(xBegin, yEnd - hOffset); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); + context.lineTo(xEnd - wOffset, yEnd); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); + context.lineTo(xEnd, yBegin + hOffset); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); + context.lineTo(xBegin + wOffset, yBegin); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); + context.closePath(); + }; + + var sin0 = Math.sin(0); + var cos0 = Math.cos(0); + var sin = {}; + var cos = {}; + var ellipseStepSize = Math.PI / 40; + + for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + sin[i] = Math.sin(i); + cos[i] = Math.cos(i); + } + + CRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) { + if (context.beginPath) { + context.beginPath(); + } + + if (context.ellipse) { + context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI); + } else { + var xPos, yPos; + var rw = width / 2; + var rh = height / 2; + + for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0; + yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0; + + if (i === 0) { + context.moveTo(xPos, yPos); + } else { + context.lineTo(xPos, yPos); + } + } + } + + context.closePath(); + }; + + /* global atob, ArrayBuffer, Uint8Array, Blob */ + var CRp$2 = {}; + + CRp$2.createBuffer = function (w, h) { + var buffer = document.createElement('canvas'); // eslint-disable-line no-undef + + buffer.width = w; + buffer.height = h; + return [buffer, buffer.getContext('2d')]; + }; + + CRp$2.bufferCanvasImage = function (options) { + var cy = this.cy; + var eles = cy.mutableElements(); + var bb = eles.boundingBox(); + var ctrRect = this.findContainerClientCoords(); + var width = options.full ? Math.ceil(bb.w) : ctrRect[2]; + var height = options.full ? Math.ceil(bb.h) : ctrRect[3]; + var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight); + var pxRatio = this.getPixelRatio(); + var scale = 1; + + if (options.scale !== undefined) { + width *= options.scale; + height *= options.scale; + scale = options.scale; + } else if (specdMaxDims) { + var maxScaleW = Infinity; + var maxScaleH = Infinity; + + if (number$1(options.maxWidth)) { + maxScaleW = scale * options.maxWidth / width; + } + + if (number$1(options.maxHeight)) { + maxScaleH = scale * options.maxHeight / height; + } + + scale = Math.min(maxScaleW, maxScaleH); + width *= scale; + height *= scale; + } + + if (!specdMaxDims) { + width *= pxRatio; + height *= pxRatio; + scale *= pxRatio; + } + + var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef + + buffCanvas.width = width; + buffCanvas.height = height; + buffCanvas.style.width = width + 'px'; + buffCanvas.style.height = height + 'px'; + var buffCxt = buffCanvas.getContext('2d'); // Rasterize the layers, but only if container has nonzero size + + if (width > 0 && height > 0) { + buffCxt.clearRect(0, 0, width, height); + buffCxt.globalCompositeOperation = 'source-over'; + var zsortedEles = this.getCachedZSortedEles(); + + if (options.full) { + // draw the full bounds of the graph + buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(bb.x1 * scale, bb.y1 * scale); + } else { + // draw the current view + var pan = cy.pan(); + var translation = { + x: pan.x * scale, + y: pan.y * scale + }; + scale *= cy.zoom(); + buffCxt.translate(translation.x, translation.y); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(-translation.x, -translation.y); + } // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs + + + if (options.bg) { + buffCxt.globalCompositeOperation = 'destination-over'; + buffCxt.fillStyle = options.bg; + buffCxt.rect(0, 0, width, height); + buffCxt.fill(); + } + } + + return buffCanvas; + }; + + function b64ToBlob(b64, mimeType) { + var bytes = atob(b64); + var buff = new ArrayBuffer(bytes.length); + var buffUint8 = new Uint8Array(buff); + + for (var i = 0; i < bytes.length; i++) { + buffUint8[i] = bytes.charCodeAt(i); + } + + return new Blob([buff], { + type: mimeType + }); + } + + function b64UriToB64(b64uri) { + var i = b64uri.indexOf(','); + return b64uri.substr(i + 1); + } + + function output(options, canvas, mimeType) { + var getB64Uri = function getB64Uri() { + return canvas.toDataURL(mimeType, options.quality); + }; + + switch (options.output) { + case 'blob-promise': + return new Promise$1(function (resolve, reject) { + try { + canvas.toBlob(function (blob) { + if (blob != null) { + resolve(blob); + } else { + reject(new Error('`canvas.toBlob()` sent a null value in its callback')); + } + }, mimeType, options.quality); + } catch (err) { + reject(err); + } + }); + + case 'blob': + return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); + + case 'base64': + return b64UriToB64(getB64Uri()); + + case 'base64uri': + default: + return getB64Uri(); + } + } + + CRp$2.png = function (options) { + return output(options, this.bufferCanvasImage(options), 'image/png'); + }; + + CRp$2.jpg = function (options) { + return output(options, this.bufferCanvasImage(options), 'image/jpeg'); + }; + + var CRp$1 = {}; + + CRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points) { + switch (name) { + case 'ellipse': + return this.drawEllipsePath(context, centerX, centerY, width, height); + + case 'polygon': + return this.drawPolygonPath(context, centerX, centerY, width, height, points); + + case 'round-polygon': + return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points); + + case 'roundrectangle': + case 'round-rectangle': + return this.drawRoundRectanglePath(context, centerX, centerY, width, height); + + case 'cutrectangle': + case 'cut-rectangle': + return this.drawCutRectanglePath(context, centerX, centerY, width, height); + + case 'bottomroundrectangle': + case 'bottom-round-rectangle': + return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height); + + case 'barrel': + return this.drawBarrelPath(context, centerX, centerY, width, height); + } + }; + + var CR = CanvasRenderer; + var CRp = CanvasRenderer.prototype; + CRp.CANVAS_LAYERS = 3; // + + CRp.SELECT_BOX = 0; + CRp.DRAG = 1; + CRp.NODE = 2; + CRp.BUFFER_COUNT = 3; // + + CRp.TEXTURE_BUFFER = 0; + CRp.MOTIONBLUR_BUFFER_NODE = 1; + CRp.MOTIONBLUR_BUFFER_DRAG = 2; + + function CanvasRenderer(options) { + var r = this; + r.data = { + canvases: new Array(CRp.CANVAS_LAYERS), + contexts: new Array(CRp.CANVAS_LAYERS), + canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), + bufferCanvases: new Array(CRp.BUFFER_COUNT), + bufferContexts: new Array(CRp.CANVAS_LAYERS) + }; + var tapHlOffAttr = '-webkit-tap-highlight-color'; + var tapHlOffStyle = 'rgba(0,0,0,0)'; + r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef + + var containerStyle = r.data.canvasContainer.style; + r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; + containerStyle.position = 'relative'; + containerStyle.zIndex = '0'; + containerStyle.overflow = 'hidden'; + var container = options.cy.container(); + container.appendChild(r.data.canvasContainer); + container.style[tapHlOffAttr] = tapHlOffStyle; + var styleMap = { + '-webkit-user-select': 'none', + '-moz-user-select': '-moz-none', + 'user-select': 'none', + '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', + 'outline-style': 'none' + }; + + if (ms()) { + styleMap['-ms-touch-action'] = 'none'; + styleMap['touch-action'] = 'none'; + } + + for (var i = 0; i < CRp.CANVAS_LAYERS; i++) { + var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef + + r.data.contexts[i] = canvas.getContext('2d'); + Object.keys(styleMap).forEach(function (k) { + canvas.style[k] = styleMap[k]; + }); + canvas.style.position = 'absolute'; + canvas.setAttribute('data-id', 'layer' + i); + canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i); + r.data.canvasContainer.appendChild(canvas); + r.data.canvasNeedsRedraw[i] = false; + } + + r.data.topCanvas = r.data.canvases[0]; + r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node'); + r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox'); + r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag'); + + for (var i = 0; i < CRp.BUFFER_COUNT; i++) { + r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef + + r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d'); + r.data.bufferCanvases[i].style.position = 'absolute'; + r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i); + r.data.bufferCanvases[i].style.zIndex = String(-i - 1); + r.data.bufferCanvases[i].style.visibility = 'hidden'; //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]); + } + + r.pathsEnabled = true; + var emptyBb = makeBoundingBox(); + + var getBoxCenter = function getBoxCenter(bb) { + return { + x: (bb.x1 + bb.x2) / 2, + y: (bb.y1 + bb.y2) / 2 + }; + }; + + var getCenterOffset = function getCenterOffset(bb) { + return { + x: -bb.w / 2, + y: -bb.h / 2 + }; + }; + + var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) { + var _p = ele[0]._private; + var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; + return !same; + }; + + var getStyleKey = function getStyleKey(ele) { + return ele[0]._private.nodeKey; + }; + + var getLabelKey = function getLabelKey(ele) { + return ele[0]._private.labelStyleKey; + }; + + var getSourceLabelKey = function getSourceLabelKey(ele) { + return ele[0]._private.sourceLabelStyleKey; + }; + + var getTargetLabelKey = function getTargetLabelKey(ele) { + return ele[0]._private.targetLabelStyleKey; + }; + + var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElement(context, ele, bb, false, false, useEleOpacity); + }; + + var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity); + }; + + var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity); + }; + + var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity); + }; + + var getElementBox = function getElementBox(ele) { + ele.boundingBox(); + return ele[0]._private.bodyBounds; + }; + + var getLabelBox = function getLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.main || emptyBb; + }; + + var getSourceLabelBox = function getSourceLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.source || emptyBb; + }; + + var getTargetLabelBox = function getTargetLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.target || emptyBb; + }; + + var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) { + return scaledLabelShown; + }; + + var getElementRotationPoint = function getElementRotationPoint(ele) { + return getBoxCenter(getElementBox(ele)); + }; + + var addTextMargin = function addTextMargin(prefix, pt, ele) { + var pre = prefix ? prefix + '-' : ''; + return { + x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue, + y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue + }; + }; + + var getRsPt = function getRsPt(ele, x, y) { + var rs = ele[0]._private.rscratch; + return { + x: rs[x], + y: rs[y] + }; + }; + + var getLabelRotationPoint = function getLabelRotationPoint(ele) { + return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele); + }; + + var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) { + return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele); + }; + + var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) { + return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele); + }; + + var getElementRotationOffset = function getElementRotationOffset(ele) { + return getCenterOffset(getElementBox(ele)); + }; + + var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) { + return getCenterOffset(getSourceLabelBox(ele)); + }; + + var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) { + return getCenterOffset(getTargetLabelBox(ele)); + }; + + var getLabelRotationOffset = function getLabelRotationOffset(ele) { + var bb = getLabelBox(ele); + var p = getCenterOffset(getLabelBox(ele)); + + if (ele.isNode()) { + switch (ele.pstyle('text-halign').value) { + case 'left': + p.x = -bb.w; + break; + + case 'right': + p.x = 0; + break; + } + + switch (ele.pstyle('text-valign').value) { + case 'top': + p.y = -bb.h; + break; + + case 'bottom': + p.y = 0; + break; + } + } + + return p; + }; + + var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { + getKey: getStyleKey, + doesEleInvalidateKey: backgroundTimestampHasChanged, + drawElement: drawElement, + getBoundingBox: getElementBox, + getRotationPoint: getElementRotationPoint, + getRotationOffset: getElementRotationOffset, + allowEdgeTxrCaching: false, + allowParentTxrCaching: false + }); + var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { + getKey: getLabelKey, + drawElement: drawLabel, + getBoundingBox: getLabelBox, + getRotationPoint: getLabelRotationPoint, + getRotationOffset: getLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { + getKey: getSourceLabelKey, + drawElement: drawSourceLabel, + getBoundingBox: getSourceLabelBox, + getRotationPoint: getSourceLabelRotationPoint, + getRotationOffset: getSourceLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { + getKey: getTargetLabelKey, + drawElement: drawTargetLabel, + getBoundingBox: getTargetLabelBox, + getRotationPoint: getTargetLabelRotationPoint, + getRotationOffset: getTargetLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); + r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { + // each cache should check for sub-key diff to see that the update affects that cache particularly + eleTxrCache.invalidateElements(eles); + lblTxrCache.invalidateElements(eles); + slbTxrCache.invalidateElements(eles); + tlbTxrCache.invalidateElements(eles); // any change invalidates the layers + + lyrTxrCache.invalidateElements(eles); // update the old bg timestamp so diffs can be done in the ele txr caches + + for (var _i = 0; _i < eles.length; _i++) { + var _p = eles[_i]._private; + _p.oldBackgroundTimestamp = _p.backgroundTimestamp; + } + }); + + var refineInLayers = function refineInLayers(reqs) { + for (var i = 0; i < reqs.length; i++) { + lyrTxrCache.enqueueElementRefinement(reqs[i].ele); + } + }; + + eleTxrCache.onDequeue(refineInLayers); + lblTxrCache.onDequeue(refineInLayers); + slbTxrCache.onDequeue(refineInLayers); + tlbTxrCache.onDequeue(refineInLayers); + } + + CRp.redrawHint = function (group, bool) { + var r = this; + + switch (group) { + case 'eles': + r.data.canvasNeedsRedraw[CRp.NODE] = bool; + break; + + case 'drag': + r.data.canvasNeedsRedraw[CRp.DRAG] = bool; + break; + + case 'select': + r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool; + break; + } + }; // whether to use Path2D caching for drawing + + + var pathsImpld = typeof Path2D !== 'undefined'; + + CRp.path2dEnabled = function (on) { + if (on === undefined) { + return this.pathsEnabled; + } + + this.pathsEnabled = on ? true : false; + }; + + CRp.usePaths = function () { + return pathsImpld && this.pathsEnabled; + }; + + CRp.setImgSmoothing = function (context, bool) { + if (context.imageSmoothingEnabled != null) { + context.imageSmoothingEnabled = bool; + } else { + context.webkitImageSmoothingEnabled = bool; + context.mozImageSmoothingEnabled = bool; + context.msImageSmoothingEnabled = bool; + } + }; + + CRp.getImgSmoothing = function (context) { + if (context.imageSmoothingEnabled != null) { + return context.imageSmoothingEnabled; + } else { + return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; + } + }; + + CRp.makeOffscreenCanvas = function (width, height) { + var canvas; + + if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== ("undefined" )) { + canvas = new OffscreenCanvas(width, height); + } else { + canvas = document.createElement('canvas'); // eslint-disable-line no-undef + + canvas.width = width; + canvas.height = height; + } + + return canvas; + }; + + [CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) { + extend(CRp, props); + }); + + var renderer = [{ + name: 'null', + impl: NullRenderer + }, { + name: 'base', + impl: BR + }, { + name: 'canvas', + impl: CR + }]; + + var incExts = [{ + type: 'layout', + extensions: layout + }, { + type: 'renderer', + extensions: renderer + }]; + + var extensions = {}; // registered modules for extensions, indexed by name + + var modules = {}; + + function setExtension(type, name, registrant) { + var ext = registrant; + + var overrideErr = function overrideErr(field) { + warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden'); + }; + + if (type === 'core') { + if (Core.prototype[name]) { + return overrideErr(name); + } else { + Core.prototype[name] = registrant; + } + } else if (type === 'collection') { + if (Collection.prototype[name]) { + return overrideErr(name); + } else { + Collection.prototype[name] = registrant; + } + } else if (type === 'layout') { + // fill in missing layout functions in the prototype + var Layout = function Layout(options) { + this.options = options; + registrant.call(this, options); // make sure layout has _private for use w/ std apis like .on() + + if (!plainObject(this._private)) { + this._private = {}; + } + + this._private.cy = options.cy; + this._private.listeners = []; + this.createEmitter(); + }; + + var layoutProto = Layout.prototype = Object.create(registrant.prototype); + var optLayoutFns = []; + + for (var i = 0; i < optLayoutFns.length; i++) { + var fnName = optLayoutFns[i]; + + layoutProto[fnName] = layoutProto[fnName] || function () { + return this; + }; + } // either .start() or .run() is defined, so autogen the other + + + if (layoutProto.start && !layoutProto.run) { + layoutProto.run = function () { + this.start(); + return this; + }; + } else if (!layoutProto.start && layoutProto.run) { + layoutProto.start = function () { + this.run(); + return this; + }; + } + + var regStop = registrant.prototype.stop; + + layoutProto.stop = function () { + var opts = this.options; + + if (opts && opts.animate) { + var anis = this.animations; + + if (anis) { + for (var _i = 0; _i < anis.length; _i++) { + anis[_i].stop(); + } + } + } + + if (regStop) { + regStop.call(this); + } else { + this.emit('layoutstop'); + } + + return this; + }; + + if (!layoutProto.destroy) { + layoutProto.destroy = function () { + return this; + }; + } + + layoutProto.cy = function () { + return this._private.cy; + }; + + var getCy = function getCy(layout) { + return layout._private.cy; + }; + + var emitterOpts = { + addEventFields: function addEventFields(layout, evt) { + evt.layout = layout; + evt.cy = getCy(layout); + evt.target = layout; + }, + bubble: function bubble() { + return true; + }, + parent: function parent(layout) { + return getCy(layout); + } + }; + extend(layoutProto, { + createEmitter: function createEmitter() { + this._private.emitter = new Emitter(emitterOpts, this); + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(evt, cb) { + this.emitter().on(evt, cb); + return this; + }, + one: function one(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + once: function once(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + removeListener: function removeListener(evt, cb) { + this.emitter().removeListener(evt, cb); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + emit: function emit(evt, params) { + this.emitter().emit(evt, params); + return this; + } + }); + define.eventAliasesOn(layoutProto); + ext = Layout; // replace with our wrapped layout + } else if (type === 'renderer' && name !== 'null' && name !== 'base') { + // user registered renderers inherit from base + var BaseRenderer = getExtension('renderer', 'base'); + var bProto = BaseRenderer.prototype; + var RegistrantRenderer = registrant; + var rProto = registrant.prototype; + + var Renderer = function Renderer() { + BaseRenderer.apply(this, arguments); + RegistrantRenderer.apply(this, arguments); + }; + + var proto = Renderer.prototype; + + for (var pName in bProto) { + var pVal = bProto[pName]; + var existsInR = rProto[pName] != null; + + if (existsInR) { + return overrideErr(pName); + } + + proto[pName] = pVal; // take impl from base + } + + for (var _pName in rProto) { + proto[_pName] = rProto[_pName]; // take impl from registrant + } + + bProto.clientFunctions.forEach(function (name) { + proto[name] = proto[name] || function () { + error('Renderer does not implement `renderer.' + name + '()` on its prototype'); + }; + }); + ext = Renderer; + } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') { + // to avoid potential prototype pollution + return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions'); + } + + return setMap({ + map: extensions, + keys: [type, name], + value: ext + }); + } + + function getExtension(type, name) { + return getMap({ + map: extensions, + keys: [type, name] + }); + } + + function setModule(type, name, moduleType, moduleName, registrant) { + return setMap({ + map: modules, + keys: [type, name, moduleType, moduleName], + value: registrant + }); + } + + function getModule(type, name, moduleType, moduleName) { + return getMap({ + map: modules, + keys: [type, name, moduleType, moduleName] + }); + } + + var extension = function extension() { + // e.g. extension('renderer', 'svg') + if (arguments.length === 2) { + return getExtension.apply(null, arguments); + } // e.g. extension('renderer', 'svg', { ... }) + else if (arguments.length === 3) { + return setExtension.apply(null, arguments); + } // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse') + else if (arguments.length === 4) { + return getModule.apply(null, arguments); + } // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... }) + else if (arguments.length === 5) { + return setModule.apply(null, arguments); + } else { + error('Invalid extension access syntax'); + } + }; // allows a core instance to access extensions internally + + + Core.prototype.extension = extension; // included extensions + + incExts.forEach(function (group) { + group.extensions.forEach(function (ext) { + setExtension(group.type, ext.name, ext.impl); + }); + }); + + // (useful for init) + + var Stylesheet = function Stylesheet() { + if (!(this instanceof Stylesheet)) { + return new Stylesheet(); + } + + this.length = 0; + }; + + var sheetfn = Stylesheet.prototype; + + sheetfn.instanceString = function () { + return 'stylesheet'; + }; // just store the selector to be parsed later + + + sheetfn.selector = function (selector) { + var i = this.length++; + this[i] = { + selector: selector, + properties: [] + }; + return this; // chaining + }; // just store the property to be parsed later + + + sheetfn.css = function (name, value) { + var i = this.length - 1; + + if (string(name)) { + this[i].properties.push({ + name: name, + value: value + }); + } else if (plainObject(name)) { + var map = name; + var propNames = Object.keys(map); + + for (var j = 0; j < propNames.length; j++) { + var key = propNames[j]; + var mapVal = map[key]; + + if (mapVal == null) { + continue; + } + + var prop = Style.properties[key] || Style.properties[dash2camel(key)]; + + if (prop == null) { + continue; + } + + var _name = prop.name; + var _value = mapVal; + this[i].properties.push({ + name: _name, + value: _value + }); + } + } + + return this; // chaining + }; + + sheetfn.style = sheetfn.css; // generate a real style object from the dummy stylesheet + + sheetfn.generateStyle = function (cy) { + var style = new Style(cy); + return this.appendToStyle(style); + }; // append a dummy stylesheet object on a real style object + + + sheetfn.appendToStyle = function (style) { + for (var i = 0; i < this.length; i++) { + var context = this[i]; + var selector = context.selector; + var props = context.properties; + style.selector(selector); // apply selector + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + style.css(prop.name, prop.value); // apply property + } + } + + return style; + }; + + var version = "3.23.0"; + + var cytoscape = function cytoscape(options) { + // if no options specified, use default + if (options === undefined) { + options = {}; + } // create instance + + + if (plainObject(options)) { + return new Core(options); + } // allow for registration of extensions + else if (string(options)) { + return extension.apply(extension, arguments); + } + }; // e.g. cytoscape.use( require('cytoscape-foo'), bar ) + + + cytoscape.use = function (ext) { + var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext + + args.unshift(cytoscape); // cytoscape is first arg to ext + + ext.apply(null, args); + return this; + }; + + cytoscape.warnings = function (bool) { + return warnings(bool); + }; // replaced by build system + + + cytoscape.version = version; // expose public apis (mostly for extensions) + + cytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet; + + return cytoscape; + +})); + + +/***/ }), + +/***/ 82241: +/***/ (function(module) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(); + else {} +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_543__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_543__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_543__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_543__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_543__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_543__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_543__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_543__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_543__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_543__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_543__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_543__(__nested_webpack_require_543__.s = 26); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LayoutConstants() {} + +/** + * Layout Quality: 0:draft, 1:default, 2:proof + */ +LayoutConstants.QUALITY = 1; + +/** + * Default parameters + */ +LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; +LayoutConstants.DEFAULT_INCREMENTAL = false; +LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; +LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; +LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; +LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + +// ----------------------------------------------------------------------------- +// Section: General other constants +// ----------------------------------------------------------------------------- +/* + * Margins of a graph to be applied on bouding rectangle of its contents. We + * assume margins on all four sides to be uniform. + */ +LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + +/* + * Whether to consider labels in node dimensions or not + */ +LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_SIZE = 40; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + +/* + * Empty compound node size. When a compound node is empty, its both + * dimensions should be of this value. + */ +LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + +/* + * Minimum length that an edge should take during layout + */ +LayoutConstants.MIN_EDGE_LENGTH = 1; + +/* + * World boundaries that layout operates on + */ +LayoutConstants.WORLD_BOUNDARY = 1000000; + +/* + * World boundaries that random positioning can be performed with + */ +LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; + +/* + * Coordinates of the world center + */ +LayoutConstants.WORLD_CENTER_X = 1200; +LayoutConstants.WORLD_CENTER_Y = 900; + +module.exports = LayoutConstants; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_4947__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_4947__(2); +var IGeometry = __nested_webpack_require_4947__(8); +var IMath = __nested_webpack_require_4947__(9); + +function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; +} + +LEdge.prototype = Object.create(LGraphObject.prototype); + +for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; +} + +LEdge.prototype.getSource = function () { + return this.source; +}; + +LEdge.prototype.getTarget = function () { + return this.target; +}; + +LEdge.prototype.isInterGraph = function () { + return this.isInterGraph; +}; + +LEdge.prototype.getLength = function () { + return this.length; +}; + +LEdge.prototype.isOverlapingSourceAndTarget = function () { + return this.isOverlapingSourceAndTarget; +}; + +LEdge.prototype.getBendpoints = function () { + return this.bendpoints; +}; + +LEdge.prototype.getLca = function () { + return this.lca; +}; + +LEdge.prototype.getSourceInLca = function () { + return this.sourceInLca; +}; + +LEdge.prototype.getTargetInLca = function () { + return this.targetInLca; +}; + +LEdge.prototype.getOtherEnd = function (node) { + if (this.source === node) { + return this.target; + } else if (this.target === node) { + return this.source; + } else { + throw "Node is not incident with this edge"; + } +}; + +LEdge.prototype.getOtherEndInGraph = function (node, graph) { + var otherEnd = this.getOtherEnd(node); + var root = graph.getGraphManager().getRoot(); + + while (true) { + if (otherEnd.getOwner() == graph) { + return otherEnd; + } + + if (otherEnd.getOwner() == root) { + break; + } + + otherEnd = otherEnd.getOwner().getParent(); + } + + return null; +}; + +LEdge.prototype.updateLength = function () { + var clipPointCoordinates = new Array(4); + + this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); + + if (!this.isOverlapingSourceAndTarget) { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } +}; + +LEdge.prototype.updateLengthSimple = function () { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); +}; + +module.exports = LEdge; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; +} + +module.exports = LGraphObject; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __nested_webpack_require_8167__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_8167__(2); +var Integer = __nested_webpack_require_8167__(10); +var RectangleD = __nested_webpack_require_8167__(13); +var LayoutConstants = __nested_webpack_require_8167__(0); +var RandomSeed = __nested_webpack_require_8167__(16); +var PointD = __nested_webpack_require_8167__(4); + +function LNode(gm, loc, size, vNode) { + //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) + if (size == null && vNode == null) { + vNode = loc; + } + + LGraphObject.call(this, vNode); + + //Alternative constructor 2 : LNode(Layout layout, Object vNode) + if (gm.graphManager != null) gm = gm.graphManager; + + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + + if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD(); +} + +LNode.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; +} + +LNode.prototype.getEdges = function () { + return this.edges; +}; + +LNode.prototype.getChild = function () { + return this.child; +}; + +LNode.prototype.getOwner = function () { + // if (this.owner != null) { + // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { + // throw "assert failed"; + // } + // } + + return this.owner; +}; + +LNode.prototype.getWidth = function () { + return this.rect.width; +}; + +LNode.prototype.setWidth = function (width) { + this.rect.width = width; +}; + +LNode.prototype.getHeight = function () { + return this.rect.height; +}; + +LNode.prototype.setHeight = function (height) { + this.rect.height = height; +}; + +LNode.prototype.getCenterX = function () { + return this.rect.x + this.rect.width / 2; +}; + +LNode.prototype.getCenterY = function () { + return this.rect.y + this.rect.height / 2; +}; + +LNode.prototype.getCenter = function () { + return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); +}; + +LNode.prototype.getLocation = function () { + return new PointD(this.rect.x, this.rect.y); +}; + +LNode.prototype.getRect = function () { + return this.rect; +}; + +LNode.prototype.getDiagonal = function () { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); +}; + +/** + * This method returns half the diagonal length of this node. + */ +LNode.prototype.getHalfTheDiagonal = function () { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; +}; + +LNode.prototype.setRect = function (upperLeft, dimension) { + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; +}; + +LNode.prototype.setCenter = function (cx, cy) { + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; +}; + +LNode.prototype.setLocation = function (x, y) { + this.rect.x = x; + this.rect.y = y; +}; + +LNode.prototype.moveBy = function (dx, dy) { + this.rect.x += dx; + this.rect.y += dy; +}; + +LNode.prototype.getEdgeListToNode = function (to) { + var edgeList = []; + var edge; + var self = this; + + self.edges.forEach(function (edge) { + + if (edge.target == to) { + if (edge.source != self) throw "Incorrect edge source!"; + + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getEdgesBetween = function (other) { + var edgeList = []; + var edge; + + var self = this; + self.edges.forEach(function (edge) { + + if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target"; + + if (edge.target == other || edge.source == other) { + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getNeighborsList = function () { + var neighbors = new Set(); + + var self = this; + self.edges.forEach(function (edge) { + + if (edge.source == self) { + neighbors.add(edge.target); + } else { + if (edge.target != self) { + throw "Incorrect incidency!"; + } + + neighbors.add(edge.source); + } + }); + + return neighbors; +}; + +LNode.prototype.withChildren = function () { + var withNeighborsList = new Set(); + var childNode; + var children; + + withNeighborsList.add(this); + + if (this.child != null) { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + children = childNode.withChildren(); + children.forEach(function (node) { + withNeighborsList.add(node); + }); + } + } + + return withNeighborsList; +}; + +LNode.prototype.getNoOfChildren = function () { + var noOfChildren = 0; + var childNode; + + if (this.child == null) { + noOfChildren = 1; + } else { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + + noOfChildren += childNode.getNoOfChildren(); + } + } + + if (noOfChildren == 0) { + noOfChildren = 1; + } + return noOfChildren; +}; + +LNode.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LNode.prototype.calcEstimatedSize = function () { + if (this.child == null) { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } else { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + + return this.estimatedSize; + } +}; + +LNode.prototype.scatter = function () { + var randomCenterX; + var randomCenterY; + + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; + + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; + + this.rect.x = randomCenterX; + this.rect.y = randomCenterY; +}; + +LNode.prototype.updateBounds = function () { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) { + // wrap the children nodes by re-arranging the boundaries + var childGraph = this.getChild(); + childGraph.updateBounds(true); + + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + + // Update compound bounds considering its label properties + if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + + var width = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + + if (this.labelWidth > width) { + this.rect.x -= (this.labelWidth - width) / 2; + this.setWidth(this.labelWidth); + } + + if (this.labelHeight > height) { + if (this.labelPos == "center") { + this.rect.y -= (this.labelHeight - height) / 2; + } else if (this.labelPos == "top") { + this.rect.y -= this.labelHeight - height; + } + this.setHeight(this.labelHeight); + } + } + } +}; + +LNode.prototype.getInclusionTreeDepth = function () { + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; +}; + +LNode.prototype.transform = function (trans) { + var left = this.rect.x; + + if (left > LayoutConstants.WORLD_BOUNDARY) { + left = LayoutConstants.WORLD_BOUNDARY; + } else if (left < -LayoutConstants.WORLD_BOUNDARY) { + left = -LayoutConstants.WORLD_BOUNDARY; + } + + var top = this.rect.y; + + if (top > LayoutConstants.WORLD_BOUNDARY) { + top = LayoutConstants.WORLD_BOUNDARY; + } else if (top < -LayoutConstants.WORLD_BOUNDARY) { + top = -LayoutConstants.WORLD_BOUNDARY; + } + + var leftTop = new PointD(left, top); + var vLeftTop = trans.inverseTransformPoint(leftTop); + + this.setLocation(vLeftTop.x, vLeftTop.y); +}; + +LNode.prototype.getLeft = function () { + return this.rect.x; +}; + +LNode.prototype.getRight = function () { + return this.rect.x + this.rect.width; +}; + +LNode.prototype.getTop = function () { + return this.rect.y; +}; + +LNode.prototype.getBottom = function () { + return this.rect.y + this.rect.height; +}; + +LNode.prototype.getParent = function () { + if (this.owner == null) { + return null; + } + + return this.owner.getParent(); +}; + +module.exports = LNode; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function PointD(x, y) { + if (x == null && y == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x; + this.y = y; + } +} + +PointD.prototype.getX = function () { + return this.x; +}; + +PointD.prototype.getY = function () { + return this.y; +}; + +PointD.prototype.setX = function (x) { + this.x = x; +}; + +PointD.prototype.setY = function (y) { + this.y = y; +}; + +PointD.prototype.getDifference = function (pt) { + return new DimensionD(this.x - pt.x, this.y - pt.y); +}; + +PointD.prototype.getCopy = function () { + return new PointD(this.x, this.y); +}; + +PointD.prototype.translate = function (dim) { + this.x += dim.width; + this.y += dim.height; + return this; +}; + +module.exports = PointD; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __nested_webpack_require_17549__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_17549__(2); +var Integer = __nested_webpack_require_17549__(10); +var LayoutConstants = __nested_webpack_require_17549__(0); +var LGraphManager = __nested_webpack_require_17549__(6); +var LNode = __nested_webpack_require_17549__(3); +var LEdge = __nested_webpack_require_17549__(1); +var RectangleD = __nested_webpack_require_17549__(13); +var Point = __nested_webpack_require_17549__(12); +var LinkedList = __nested_webpack_require_17549__(11); + +function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } +} + +LGraph.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; +} + +LGraph.prototype.getNodes = function () { + return this.nodes; +}; + +LGraph.prototype.getEdges = function () { + return this.edges; +}; + +LGraph.prototype.getGraphManager = function () { + return this.graphManager; +}; + +LGraph.prototype.getParent = function () { + return this.parent; +}; + +LGraph.prototype.getLeft = function () { + return this.left; +}; + +LGraph.prototype.getRight = function () { + return this.right; +}; + +LGraph.prototype.getTop = function () { + return this.top; +}; + +LGraph.prototype.getBottom = function () { + return this.bottom; +}; + +LGraph.prototype.isConnected = function () { + return this.isConnected; +}; + +LGraph.prototype.add = function (obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + + return newNode; + } else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { + throw "Source or target not in graph!"; + } + + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + + if (sourceNode.owner != targetNode.owner) { + return null; + } + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // set as intra-graph edge + newEdge.isInterGraph = false; + + // add to graph edge list + this.getEdges().push(newEdge); + + // add to incidency lists + sourceNode.edges.push(newEdge); + + if (targetNode != sourceNode) { + targetNode.edges.push(newEdge); + } + + return newEdge; + } +}; + +LGraph.prototype.remove = function (obj) { + var node = obj; + if (obj instanceof LNode) { + if (node == null) { + throw "Node is null!"; + } + if (!(node.owner != null && node.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + // remove incident edges first (make a copy to do it safely) + var edgesToBeRemoved = node.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + + if (edge.isInterGraph) { + this.graphManager.remove(edge); + } else { + edge.source.owner.remove(edge); + } + } + + // now the node itself + var index = this.nodes.indexOf(node); + if (index == -1) { + throw "Node not in owner node list!"; + } + + this.nodes.splice(index, 1); + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + edge.source.edges.splice(sourceIndex, 1); + + if (edge.target != edge.source) { + edge.target.edges.splice(targetIndex, 1); + } + + var index = edge.source.owner.getEdges().indexOf(edge); + if (index == -1) { + throw "Not in owner's edge list!"; + } + + edge.source.owner.getEdges().splice(index, 1); + } +}; + +LGraph.prototype.updateLeftTop = function () { + var top = Integer.MAX_VALUE; + var left = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + + var nodes = this.getNodes(); + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + + if (top > nodeTop) { + top = nodeTop; + } + + if (left > nodeLeft) { + left = nodeLeft; + } + } + + // Do we have any nodes in this graph? + if (top == Integer.MAX_VALUE) { + return null; + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = left - margin; + this.top = top - margin; + + // Apply the margins and return the result + return new Point(this.left, this.top); +}; + +LGraph.prototype.updateBounds = function (recursive) { + // calculate bounds + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + + var nodes = this.nodes; + var s = nodes.length; + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + + if (recursive && lNode.child != null) { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + if (left == Integer.MAX_VALUE) { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; +}; + +LGraph.calculateBounds = function (nodes) { + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + + return boundingRect; +}; + +LGraph.prototype.getInclusionTreeDepth = function () { + if (this == this.graphManager.getRoot()) { + return 1; + } else { + return this.parent.getInclusionTreeDepth(); + } +}; + +LGraph.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LGraph.prototype.calcEstimatedSize = function () { + var size = 0; + var nodes = this.nodes; + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + size += lNode.calcEstimatedSize(); + } + + if (size == 0) { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } else { + this.estimatedSize = size / Math.sqrt(this.nodes.length); + } + + return this.estimatedSize; +}; + +LGraph.prototype.updateConnected = function () { + var self = this; + if (this.nodes.length == 0) { + this.isConnected = true; + return; + } + + var queue = new LinkedList(); + var visited = new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + + while (queue.length !== 0) { + currentNode = queue.shift(); + + // Traverse all neighbors of this node + neighborEdges = currentNode.getEdges(); + var size = neighborEdges.length; + for (var i = 0; i < size; i++) { + var neighborEdge = neighborEdges[i]; + currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); + + // Add unvisited neighbors to the list to visit + if (currentNeighbor != null && !visited.has(currentNeighbor)) { + var childrenOfNeighbor = currentNeighbor.withChildren(); + + childrenOfNeighbor.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + } + } + } + + this.isConnected = false; + + if (visited.size >= this.nodes.length) { + var noOfVisitedInThisGraph = 0; + + visited.forEach(function (visitedNode) { + if (visitedNode.owner == self) { + noOfVisitedInThisGraph++; + } + }); + + if (noOfVisitedInThisGraph == this.nodes.length) { + this.isConnected = true; + } + } +}; + +module.exports = LGraph; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __nested_webpack_require_27617__) { + +"use strict"; + + +var LGraph; +var LEdge = __nested_webpack_require_27617__(1); + +function LGraphManager(layout) { + LGraph = __nested_webpack_require_27617__(5); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. + this.layout = layout; + + this.graphs = []; + this.edges = []; +} + +LGraphManager.prototype.addRoot = function () { + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root = this.add(ngraph, nnode); + this.setRootGraph(root); + return this.rootGraph; +}; + +LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) { + //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + + this.graphs.push(newGraph); + + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + + newGraph.parent = parentNode; + parentNode.child = newGraph; + + return newGraph; + } else { + //change the order of the parameters + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + + if (sourceGraph == targetGraph) { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } else { + newEdge.isInterGraph = true; + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // add edge to inter-graph edge list + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + + this.edges.push(newEdge); + + // add edge to source and target incidency lists + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + + return newEdge; + } + } +}; + +LGraphManager.prototype.remove = function (lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { + throw "Invalid parent node!"; + } + + // first the edges (make a copy to do it safely) + var edgesToBeRemoved = []; + + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + graph.remove(edge); + } + + // then the nodes (make a copy to do it safely) + var nodesToBeRemoved = []; + + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + + var node; + s = nodesToBeRemoved.length; + for (var i = 0; i < s; i++) { + node = nodesToBeRemoved[i]; + graph.remove(node); + } + + // check if graph is the root + if (graph == this.rootGraph) { + this.setRootGraph(null); + } + + // now remove the graph itself + var index = this.graphs.indexOf(graph); + this.graphs.splice(index, 1); + + // also reset the parent of the graph + graph.parent = null; + } else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + + // remove edge from source and target nodes' incidency lists + + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + var index = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index, 1); + index = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index, 1); + + // remove edge from owner graph manager's inter-graph edge list + + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + + var index = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index, 1); + } +}; + +LGraphManager.prototype.updateBounds = function () { + this.rootGraph.updateBounds(true); +}; + +LGraphManager.prototype.getGraphs = function () { + return this.graphs; +}; + +LGraphManager.prototype.getAllNodes = function () { + if (this.allNodes == null) { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < s; i++) { + nodeList = nodeList.concat(graphs[i].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; +}; + +LGraphManager.prototype.resetAllNodes = function () { + this.allNodes = null; +}; + +LGraphManager.prototype.resetAllEdges = function () { + this.allEdges = null; +}; + +LGraphManager.prototype.resetAllNodesToApplyGravitation = function () { + this.allNodesToApplyGravitation = null; +}; + +LGraphManager.prototype.getAllEdges = function () { + if (this.allEdges == null) { + var edgeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < graphs.length; i++) { + edgeList = edgeList.concat(graphs[i].getEdges()); + } + + edgeList = edgeList.concat(this.edges); + + this.allEdges = edgeList; + } + return this.allEdges; +}; + +LGraphManager.prototype.getAllNodesToApplyGravitation = function () { + return this.allNodesToApplyGravitation; +}; + +LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) { + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + + this.allNodesToApplyGravitation = nodeList; +}; + +LGraphManager.prototype.getRoot = function () { + return this.rootGraph; +}; + +LGraphManager.prototype.setRootGraph = function (graph) { + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + + this.rootGraph = graph; + // root graph must have a root node associated with it for convenience + if (graph.parent == null) { + graph.parent = this.layout.newNode("Root node"); + } +}; + +LGraphManager.prototype.getLayout = function () { + return this.layout; +}; + +LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) { + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + + if (firstNode == secondNode) { + return true; + } + // Is second node an ancestor of the first one? + var ownerGraph = firstNode.getOwner(); + var parentNode; + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == secondNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + // Is first node an ancestor of the second one? + ownerGraph = secondNode.getOwner(); + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == firstNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + + return false; +}; + +LGraphManager.prototype.calcLowestCommonAncestors = function () { + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + + var edges = this.getAllEdges(); + var s = edges.length; + for (var i = 0; i < s; i++) { + edge = edges[i]; + + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + + if (sourceNode == targetNode) { + edge.lca = sourceNode.getOwner(); + continue; + } + + sourceAncestorGraph = sourceNode.getOwner(); + + while (edge.lca == null) { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + + while (edge.lca == null) { + if (targetAncestorGraph == sourceAncestorGraph) { + edge.lca = targetAncestorGraph; + break; + } + + if (targetAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + + if (sourceAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca == null) { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + + if (edge.lca == null) { + throw "assert failed"; + } + } +}; + +LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) { + if (firstNode == secondNode) { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + + do { + if (firstOwnerGraph == null) { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + + do { + if (secondOwnerGraph == null) { + break; + } + + if (secondOwnerGraph == firstOwnerGraph) { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + + return firstOwnerGraph; +}; + +LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node; + + var nodes = graph.getNodes(); + var s = nodes.length; + for (var i = 0; i < s; i++) { + node = nodes[i]; + node.inclusionTreeDepth = depth; + + if (node.child != null) { + this.calcInclusionTreeDepths(node.child, depth + 1); + } + } +}; + +LGraphManager.prototype.includesInvalidEdge = function () { + var edge; + + var s = this.edges.length; + for (var i = 0; i < s; i++) { + edge = this.edges[i]; + + if (this.isOneAncestorOfOther(edge.source, edge.target)) { + return true; + } + } + return false; +}; + +module.exports = LGraphManager; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __nested_webpack_require_38707__) { + +"use strict"; + + +var LayoutConstants = __nested_webpack_require_38707__(0); + +function FDLayoutConstants() {} + +//FDLayoutConstants inherits static props in LayoutConstants +for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; +} + +FDLayoutConstants.MAX_ITERATIONS = 2500; + +FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; +FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; +FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; +FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; +FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; +FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; +FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; +FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; +FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; +FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; +FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; +FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; +FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; +FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; +FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; +FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; +FDLayoutConstants.MIN_EDGE_LENGTH = 1; +FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + +module.exports = FDLayoutConstants; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __nested_webpack_require_40298__) { + +"use strict"; + + +/** + * This class maintains a list of static geometry related utility methods. + * + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var Point = __nested_webpack_require_40298__(12); + +function IGeometry() {} + +/** + * This method calculates *half* the amount in x and y directions of the two + * input rectangles needed to separate them keeping their respective + * positioning, and returns the result in the input array. An input + * separation buffer added to the amount in both directions. We assume that + * the two rectangles do intersect. + */ +IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) { + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + + var directions = new Array(2); + + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); + + // update the overlapping amounts for the following cases: + if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { + /* Case x.1: + * + * rectA + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectB + */ + overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); + } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { + /* Case x.2: + * + * rectB + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectA + */ + overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); + } + if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { + /* Case y.1: + * ________ rectA + * | + * | + * ______|____ rectB + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); + } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { + /* Case y.2: + * ________ rectB + * | + * | + * ______|____ rectA + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); + } + + // find slope of the line passes two centers + var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); + // if centers are overlapped + if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { + // assume the slope is 1 (45 degree) + slope = 1.0; + } + + var moveByY = slope * overlapAmount[0]; + var moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) { + moveByX = overlapAmount[0]; + } else { + moveByY = overlapAmount[1]; + } + // return half the amount so that if each rectangle is moved by these + // amounts in opposite directions, overlap will be resolved + overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); + overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); +}; + +/** + * This method decides the separation direction of overlapping nodes + * + * if directions[0] = -1, then rectA goes left + * if directions[0] = 1, then rectA goes right + * if directions[1] = -1, then rectA goes up + * if directions[1] = 1, then rectA goes down + */ +IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) { + if (rectA.getCenterX() < rectB.getCenterX()) { + directions[0] = -1; + } else { + directions[0] = 1; + } + + if (rectA.getCenterY() < rectB.getCenterY()) { + directions[1] = -1; + } else { + directions[1] = 1; + } +}; + +/** + * This method calculates the intersection (clipping) points of the two + * input rectangles with line segment defined by the centers of these two + * rectangles. The clipping points are saved in the input double array and + * whether or not the two rectangles overlap is returned. + */ +IGeometry.getIntersection2 = function (rectA, rectB, result) { + //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB + var p1x = rectA.getCenterX(); + var p1y = rectA.getCenterY(); + var p2x = rectB.getCenterX(); + var p2y = rectB.getCenterY(); + + //if two rectangles intersect, then clipping points are centers + if (rectA.intersects(rectB)) { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + //variables for rectA + var topLeftAx = rectA.getX(); + var topLeftAy = rectA.getY(); + var topRightAx = rectA.getRight(); + var bottomLeftAx = rectA.getX(); + var bottomLeftAy = rectA.getBottom(); + var bottomRightAx = rectA.getRight(); + var halfWidthA = rectA.getWidthHalf(); + var halfHeightA = rectA.getHeightHalf(); + //variables for rectB + var topLeftBx = rectB.getX(); + var topLeftBy = rectB.getY(); + var topRightBx = rectB.getRight(); + var bottomLeftBx = rectB.getX(); + var bottomLeftBy = rectB.getBottom(); + var bottomRightBx = rectB.getRight(); + var halfWidthB = rectB.getWidthHalf(); + var halfHeightB = rectB.getHeightHalf(); + + //flag whether clipping points are found + var clipPointAFound = false; + var clipPointBFound = false; + + // line is vertical + if (p1x === p2x) { + if (p1y > p2y) { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } else if (p1y < p2y) { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } else { + //not line, return null; + } + } + // line is horizontal + else if (p1y === p2y) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } else if (p1x < p2x) { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } else { + //not valid line, return null; + } + } else { + //slopes of rectA's and rectB's diagonals + var slopeA = rectA.height / rectA.width; + var slopeB = rectB.height / rectB.width; + + //slope of line between center of rectA and center of rectB + var slopePrime = (p2y - p1y) / (p2x - p1x); + var cardinalDirectionA = void 0; + var cardinalDirectionB = void 0; + var tempPointAx = void 0; + var tempPointAy = void 0; + var tempPointBx = void 0; + var tempPointBy = void 0; + + //determine whether clipping point is the corner of nodeA + if (-slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } else { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } else if (slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } else { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + + //determine whether clipping point is the corner of nodeB + if (-slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } else { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } else if (slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } else { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + + //if both clipping points are corners + if (clipPointAFound && clipPointBFound) { + return false; + } + + //determine Cardinal Direction of rectangles + if (p1x > p2x) { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } else { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } else { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } else { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + //calculate clipping Point if it is not found before + if (!clipPointAFound) { + switch (cardinalDirectionA) { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + -halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + -halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) { + switch (cardinalDirectionB) { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + -halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + -halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; +}; + +/** + * This method returns in which cardinal direction does input point stays + * 1: North + * 2: East + * 3: South + * 4: West + */ +IGeometry.getCardinalDirection = function (slope, slopePrime, line) { + if (slope > slopePrime) { + return line; + } else { + return 1 + line % 4; + } +}; + +/** + * This method calculates the intersection of the two lines defined by + * point pairs (s1,s2) and (f1,f2). + */ +IGeometry.getIntersection = function (s1, s2, f1, f2) { + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + + var x1 = s1.x; + var y1 = s1.y; + var x2 = s2.x; + var y2 = s2.y; + var x3 = f1.x; + var y3 = f1.y; + var x4 = f2.x; + var y4 = f2.y; + var x = void 0, + y = void 0; // intersection point + var a1 = void 0, + a2 = void 0, + b1 = void 0, + b2 = void 0, + c1 = void 0, + c2 = void 0; // coefficients of line eqns. + var denom = void 0; + + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } + + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } + + denom = a1 * b2 - a2 * b1; + + if (denom === 0) { + return null; + } + + x = (b1 * c2 - b2 * c1) / denom; + y = (a2 * c1 - a1 * c2) / denom; + + return new Point(x, y); +}; + +/** + * This method finds and returns the angle of the vector from the + x-axis + * in clockwise direction (compatible w/ Java coordinate system!). + */ +IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) { + var C_angle = void 0; + + if (Cx !== Nx) { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + + if (Nx < Cx) { + C_angle += Math.PI; + } else if (Ny < Cy) { + C_angle += this.TWO_PI; + } + } else if (Ny < Cy) { + C_angle = this.ONE_AND_HALF_PI; // 270 degrees + } else { + C_angle = this.HALF_PI; // 90 degrees + } + + return C_angle; +}; + +/** + * This method checks whether the given two line segments (one with point + * p1 and p2, the other with point p3 and p4) intersect at a point other + * than these points. + */ +IGeometry.doIntersect = function (p1, p2, p3, p4) { + var a = p1.x; + var b = p1.y; + var c = p2.x; + var d = p2.y; + var p = p3.x; + var q = p3.y; + var r = p4.x; + var s = p4.y; + var det = (c - a) * (s - q) - (r - p) * (d - b); + + if (det === 0) { + return false; + } else { + var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; + return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; + } +}; + +// ----------------------------------------------------------------------------- +// Section: Class Constants +// ----------------------------------------------------------------------------- +/** + * Some useful pre-calculated constants + */ +IGeometry.HALF_PI = 0.5 * Math.PI; +IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; +IGeometry.TWO_PI = 2.0 * Math.PI; +IGeometry.THREE_PI = 3.0 * Math.PI; + +module.exports = IGeometry; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function IMath() {} + +/** + * This method returns the sign of the input value. + */ +IMath.sign = function (value) { + if (value > 0) { + return 1; + } else if (value < 0) { + return -1; + } else { + return 0; + } +}; + +IMath.floor = function (value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); +}; + +IMath.ceil = function (value) { + return value < 0 ? Math.floor(value) : Math.ceil(value); +}; + +module.exports = IMath; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Integer() {} + +Integer.MAX_VALUE = 2147483647; +Integer.MIN_VALUE = -2147483648; + +module.exports = Integer; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var nodeFrom = function nodeFrom(value) { + return { value: value, next: null, prev: null }; +}; + +var add = function add(prev, node, next, list) { + if (prev !== null) { + prev.next = node; + } else { + list.head = node; + } + + if (next !== null) { + next.prev = node; + } else { + list.tail = node; + } + + node.prev = prev; + node.next = next; + + list.length++; + + return node; +}; + +var _remove = function _remove(node, list) { + var prev = node.prev, + next = node.next; + + + if (prev !== null) { + prev.next = next; + } else { + list.head = next; + } + + if (next !== null) { + next.prev = prev; + } else { + list.tail = prev; + } + + node.prev = node.next = null; + + list.length--; + + return node; +}; + +var LinkedList = function () { + function LinkedList(vals) { + var _this = this; + + _classCallCheck(this, LinkedList); + + this.length = 0; + this.head = null; + this.tail = null; + + if (vals != null) { + vals.forEach(function (v) { + return _this.push(v); + }); + } + } + + _createClass(LinkedList, [{ + key: "size", + value: function size() { + return this.length; + } + }, { + key: "insertBefore", + value: function insertBefore(val, otherNode) { + return add(otherNode.prev, nodeFrom(val), otherNode, this); + } + }, { + key: "insertAfter", + value: function insertAfter(val, otherNode) { + return add(otherNode, nodeFrom(val), otherNode.next, this); + } + }, { + key: "insertNodeBefore", + value: function insertNodeBefore(newNode, otherNode) { + return add(otherNode.prev, newNode, otherNode, this); + } + }, { + key: "insertNodeAfter", + value: function insertNodeAfter(newNode, otherNode) { + return add(otherNode, newNode, otherNode.next, this); + } + }, { + key: "push", + value: function push(val) { + return add(this.tail, nodeFrom(val), null, this); + } + }, { + key: "unshift", + value: function unshift(val) { + return add(null, nodeFrom(val), this.head, this); + } + }, { + key: "remove", + value: function remove(node) { + return _remove(node, this); + } + }, { + key: "pop", + value: function pop() { + return _remove(this.tail, this).value; + } + }, { + key: "popNode", + value: function popNode() { + return _remove(this.tail, this); + } + }, { + key: "shift", + value: function shift() { + return _remove(this.head, this).value; + } + }, { + key: "shiftNode", + value: function shiftNode() { + return _remove(this.head, this); + } + }, { + key: "get_object_at", + value: function get_object_at(index) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + return current.value; + } + } + }, { + key: "set_object_at", + value: function set_object_at(index, value) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + current.value = value; + } + } + }]); + + return LinkedList; +}(); + +module.exports = LinkedList; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* + *This class is the javascript implementation of the Point.java class in jdk + */ +function Point(x, y, p) { + this.x = null; + this.y = null; + if (x == null && y == null && p == null) { + this.x = 0; + this.y = 0; + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + this.x = x; + this.y = y; + } else if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.x = p.x; + this.y = p.y; + } +} + +Point.prototype.getX = function () { + return this.x; +}; + +Point.prototype.getY = function () { + return this.y; +}; + +Point.prototype.getLocation = function () { + return new Point(this.x, this.y); +}; + +Point.prototype.setLocation = function (x, y, p) { + if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.setLocation(p.x, p.y); + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + //if both parameters are integer just move (x,y) location + if (parseInt(x) == x && parseInt(y) == y) { + this.move(x, y); + } else { + this.x = Math.floor(x + 0.5); + this.y = Math.floor(y + 0.5); + } + } +}; + +Point.prototype.move = function (x, y) { + this.x = x; + this.y = y; +}; + +Point.prototype.translate = function (dx, dy) { + this.x += dx; + this.y += dy; +}; + +Point.prototype.equals = function (obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return this.x == pt.x && this.y == pt.y; + } + return this == obj; +}; + +Point.prototype.toString = function () { + return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; +}; + +module.exports = Point; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RectangleD(x, y, width, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + + if (x != null && y != null && width != null && height != null) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } +} + +RectangleD.prototype.getX = function () { + return this.x; +}; + +RectangleD.prototype.setX = function (x) { + this.x = x; +}; + +RectangleD.prototype.getY = function () { + return this.y; +}; + +RectangleD.prototype.setY = function (y) { + this.y = y; +}; + +RectangleD.prototype.getWidth = function () { + return this.width; +}; + +RectangleD.prototype.setWidth = function (width) { + this.width = width; +}; + +RectangleD.prototype.getHeight = function () { + return this.height; +}; + +RectangleD.prototype.setHeight = function (height) { + this.height = height; +}; + +RectangleD.prototype.getRight = function () { + return this.x + this.width; +}; + +RectangleD.prototype.getBottom = function () { + return this.y + this.height; +}; + +RectangleD.prototype.intersects = function (a) { + if (this.getRight() < a.x) { + return false; + } + + if (this.getBottom() < a.y) { + return false; + } + + if (a.getRight() < this.x) { + return false; + } + + if (a.getBottom() < this.y) { + return false; + } + + return true; +}; + +RectangleD.prototype.getCenterX = function () { + return this.x + this.width / 2; +}; + +RectangleD.prototype.getMinX = function () { + return this.getX(); +}; + +RectangleD.prototype.getMaxX = function () { + return this.getX() + this.width; +}; + +RectangleD.prototype.getCenterY = function () { + return this.y + this.height / 2; +}; + +RectangleD.prototype.getMinY = function () { + return this.getY(); +}; + +RectangleD.prototype.getMaxY = function () { + return this.getY() + this.height; +}; + +RectangleD.prototype.getWidthHalf = function () { + return this.width / 2; +}; + +RectangleD.prototype.getHeightHalf = function () { + return this.height / 2; +}; + +module.exports = RectangleD; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function UniqueIDGeneretor() {} + +UniqueIDGeneretor.lastID = 0; + +UniqueIDGeneretor.createID = function (obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; +}; + +UniqueIDGeneretor.getString = function (id) { + if (id == null) id = UniqueIDGeneretor.lastID; + return "Object#" + id + ""; +}; + +UniqueIDGeneretor.isPrimitive = function (arg) { + var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); + return arg == null || type != "object" && type != "function"; +}; + +module.exports = UniqueIDGeneretor; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __nested_webpack_require_64072__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var LayoutConstants = __nested_webpack_require_64072__(0); +var LGraphManager = __nested_webpack_require_64072__(6); +var LNode = __nested_webpack_require_64072__(3); +var LEdge = __nested_webpack_require_64072__(1); +var LGraph = __nested_webpack_require_64072__(5); +var PointD = __nested_webpack_require_64072__(4); +var Transform = __nested_webpack_require_64072__(17); +var Emitter = __nested_webpack_require_64072__(27); + +function Layout(isRemoteUse) { + Emitter.call(this); + + //Layout Quality: 0:draft, 1:default, 2:proof + this.layoutQuality = LayoutConstants.QUALITY; + //Whether layout should create bendpoints as needed or not + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + //Whether layout should be incremental or not + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + //Whether we animate from before to after layout node positions + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + //Whether we animate the layout process or not + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + //Number iterations that should be done between two successive animations + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + /** + * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When + * they are, both spring and repulsion forces between two leaf nodes can be + * calculated without the expensive clipping point calculations, resulting + * in major speed-up. + */ + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + /** + * This is used for creation of bendpoints by using dummy nodes and edges. + * Maps an LEdge to its dummy bendpoint path. + */ + this.edgeToDummyNodes = new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } +} + +Layout.RANDOM_SEED = 1; + +Layout.prototype = Object.create(Emitter.prototype); + +Layout.prototype.getGraphManager = function () { + return this.graphManager; +}; + +Layout.prototype.getAllNodes = function () { + return this.graphManager.getAllNodes(); +}; + +Layout.prototype.getAllEdges = function () { + return this.graphManager.getAllEdges(); +}; + +Layout.prototype.getAllNodesToApplyGravitation = function () { + return this.graphManager.getAllNodesToApplyGravitation(); +}; + +Layout.prototype.newGraphManager = function () { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; +}; + +Layout.prototype.newGraph = function (vGraph) { + return new LGraph(null, this.graphManager, vGraph); +}; + +Layout.prototype.newNode = function (vNode) { + return new LNode(this.graphManager, vNode); +}; + +Layout.prototype.newEdge = function (vEdge) { + return new LEdge(null, null, vEdge); +}; + +Layout.prototype.checkLayoutSuccess = function () { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); +}; + +Layout.prototype.runLayout = function () { + this.isLayoutFinished = false; + + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + + this.initParameters(); + var isLayoutSuccessfull; + + if (this.checkLayoutSuccess()) { + isLayoutSuccessfull = false; + } else { + isLayoutSuccessfull = this.layout(); + } + + if (LayoutConstants.ANIMATE === 'during') { + // If this is a 'during' layout animation. Layout is not finished yet. + // We need to perform these in index.js when layout is really finished. + return false; + } + + if (isLayoutSuccessfull) { + if (!this.isSubLayout) { + this.doPostLayout(); + } + } + + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + + this.isLayoutFinished = true; + + return isLayoutSuccessfull; +}; + +/** + * This method performs the operations required after layout. + */ +Layout.prototype.doPostLayout = function () { + //assert !isSubLayout : "Should not be called on sub-layout!"; + // Propagate geometric changes to v-level objects + if (!this.incremental) { + this.transform(); + } + this.update(); +}; + +/** + * This method updates the geometry of the target graph according to + * calculated layout. + */ +Layout.prototype.update2 = function () { + // update bend points + if (this.createBendsAsNeeded) { + this.createBendpointsFromDummyNodes(); + + // reset all edges, since the topology has changed + this.graphManager.resetAllEdges(); + } + + // perform edge, node and root updates if layout is not called + // remotely + if (!this.isRemoteUse) { + // update all edges + var edge; + var allEdges = this.graphManager.getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + // this.update(edge); + } + + // recursively update nodes + var node; + var nodes = this.graphManager.getRoot().getNodes(); + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + // this.update(node); + } + + // update root graph + this.update(this.graphManager.getRoot()); + } +}; + +Layout.prototype.update = function (obj) { + if (obj == null) { + this.update2(); + } else if (obj instanceof LNode) { + var node = obj; + if (node.getChild() != null) { + // since node is compound, recursively update child nodes + var nodes = node.getChild().getNodes(); + for (var i = 0; i < nodes.length; i++) { + update(nodes[i]); + } + } + + // if the l-level node is associated with a v-level graph object, + // then it is assumed that the v-level node implements the + // interface Updatable. + if (node.vGraphObject != null) { + // cast to Updatable without any type check + var vNode = node.vGraphObject; + + // call the update method of the interface + vNode.update(node); + } + } else if (obj instanceof LEdge) { + var edge = obj; + // if the l-level edge is associated with a v-level graph object, + // then it is assumed that the v-level edge implements the + // interface Updatable. + + if (edge.vGraphObject != null) { + // cast to Updatable without any type check + var vEdge = edge.vGraphObject; + + // call the update method of the interface + vEdge.update(edge); + } + } else if (obj instanceof LGraph) { + var graph = obj; + // if the l-level graph is associated with a v-level graph object, + // then it is assumed that the v-level object implements the + // interface Updatable. + + if (graph.vGraphObject != null) { + // cast to Updatable without any type check + var vGraph = graph.vGraphObject; + + // call the update method of the interface + vGraph.update(graph); + } + } +}; + +/** + * This method is used to set all layout parameters to default values + * determined at compile time. + */ +Layout.prototype.initParameters = function () { + if (!this.isSubLayout) { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + + if (this.animationDuringLayout) { + this.animationOnLayout = false; + } +}; + +Layout.prototype.transform = function (newLeftTop) { + if (newLeftTop == undefined) { + this.transform(new PointD(0, 0)); + } else { + // create a transformation object (from Eclipse to layout). When an + // inverse transform is applied, we get upper-left coordinate of the + // drawing or the root graph at given input coordinate (some margins + // already included in calculation of left-top). + + var trans = new Transform(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + + if (leftTop != null) { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + + var nodes = this.getAllNodes(); + var node; + + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + node.transform(trans); + } + } + } +}; + +Layout.prototype.positionNodesRandomly = function (graph) { + + if (graph == undefined) { + //assert !this.incremental; + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } else { + var lNode; + var childGraph; + + var nodes = graph.getNodes(); + for (var i = 0; i < nodes.length; i++) { + lNode = nodes[i]; + childGraph = lNode.getChild(); + + if (childGraph == null) { + lNode.scatter(); + } else if (childGraph.getNodes().length == 0) { + lNode.scatter(); + } else { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } +}; + +/** + * This method returns a list of trees where each tree is represented as a + * list of l-nodes. The method returns a list of size 0 when: + * - The graph is not flat or + * - One of the component(s) of the graph is not a tree. + */ +Layout.prototype.getFlatForest = function () { + var flatForest = []; + var isForest = true; + + // Quick reference for all nodes in the graph manager associated with + // this layout. The list should not be changed. + var allNodes = this.graphManager.getRoot().getNodes(); + + // First be sure that the graph is flat + var isFlat = true; + + for (var i = 0; i < allNodes.length; i++) { + if (allNodes[i].getChild() != null) { + isFlat = false; + } + } + + // Return empty forest if the graph is not flat. + if (!isFlat) { + return flatForest; + } + + // Run BFS for each component of the graph. + + var visited = new Set(); + var toBeVisited = []; + var parents = new Map(); + var unProcessedNodes = []; + + unProcessedNodes = unProcessedNodes.concat(allNodes); + + // Each iteration of this loop finds a component of the graph and + // decides whether it is a tree or not. If it is a tree, adds it to the + // forest and continued with the next component. + + while (unProcessedNodes.length > 0 && isForest) { + toBeVisited.push(unProcessedNodes[0]); + + // Start the BFS. Each iteration of this loop visits a node in a + // BFS manner. + while (toBeVisited.length > 0 && isForest) { + //pool operation + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + + // Traverse all neighbors of this node + var neighborEdges = currentNode.getEdges(); + + for (var i = 0; i < neighborEdges.length; i++) { + var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); + + // If BFS is not growing from this neighbor. + if (parents.get(currentNode) != currentNeighbor) { + // We haven't previously visited this neighbor. + if (!visited.has(currentNeighbor)) { + toBeVisited.push(currentNeighbor); + parents.set(currentNeighbor, currentNode); + } + // Since we have previously visited this neighbor and + // this neighbor is not parent of currentNode, given + // graph contains a component that is not tree, hence + // it is not a forest. + else { + isForest = false; + break; + } + } + } + } + + // The graph contains a component that is not a tree. Empty + // previously found trees. The method will end. + if (!isForest) { + flatForest = []; + } + // Save currently visited nodes as a tree in our forest. Reset + // visited and parents lists. Continue with the next component of + // the graph, if any. + else { + var temp = [].concat(_toConsumableArray(visited)); + flatForest.push(temp); + //flatForest = flatForest.concat(temp); + //unProcessedNodes.removeAll(visited); + for (var i = 0; i < temp.length; i++) { + var value = temp[i]; + var index = unProcessedNodes.indexOf(value); + if (index > -1) { + unProcessedNodes.splice(index, 1); + } + } + visited = new Set(); + parents = new Map(); + } + } + + return flatForest; +}; + +/** + * This method creates dummy nodes (an l-level node with minimal dimensions) + * for the given edge (one per bendpoint). The existing l-level structure + * is updated accordingly. + */ +Layout.prototype.createDummyNodesForBendpoints = function (edge) { + var dummyNodes = []; + var prev = edge.source; + + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + + for (var i = 0; i < edge.bendpoints.length; i++) { + // create new dummy node + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + + graph.add(dummyNode); + + // create new dummy edge between prev and dummy node + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, dummyNode); + + dummyNodes.add(dummyNode); + prev = dummyNode; + } + + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, edge.target); + + this.edgeToDummyNodes.set(edge, dummyNodes); + + // remove real edge from graph manager if it is inter-graph + if (edge.isInterGraph()) { + this.graphManager.remove(edge); + } + // else, remove the edge from the current graph + else { + graph.remove(edge); + } + + return dummyNodes; +}; + +/** + * This method creates bendpoints for edges from the dummy nodes + * at l-level. + */ +Layout.prototype.createBendpointsFromDummyNodes = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); + + for (var k = 0; k < edges.length; k++) { + var lEdge = edges[k]; + + if (lEdge.bendpoints.length > 0) { + var path = this.edgeToDummyNodes.get(lEdge); + + for (var i = 0; i < path.length; i++) { + var dummyNode = path[i]; + var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); + + // update bendpoint's location according to dummy node + var ebp = lEdge.bendpoints.get(i); + ebp.x = p.x; + ebp.y = p.y; + + // remove the dummy node, dummy edges incident with this + // dummy node is also removed (within the remove method) + dummyNode.getOwner().remove(dummyNode); + } + + // add the real edge to graph + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } +}; + +Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != undefined && maxMul != undefined) { + var value = defaultValue; + + if (sliderValue <= 50) { + var minValue = defaultValue / minDiv; + value -= (defaultValue - minValue) / 50 * (50 - sliderValue); + } else { + var maxValue = defaultValue * maxMul; + value += (maxValue - defaultValue) / 50 * (sliderValue - 50); + } + + return value; + } else { + var a, b; + + if (sliderValue <= 50) { + a = 9.0 * defaultValue / 500.0; + b = defaultValue / 10.0; + } else { + a = 9.0 * defaultValue / 50.0; + b = -8 * defaultValue; + } + + return a * sliderValue + b; + } +}; + +/** + * This method finds and returns the center of the given nodes, assuming + * that the given nodes form a tree in themselves. + */ +Layout.findCenterOfTree = function (nodes) { + var list = []; + list = list.concat(nodes); + + var removedNodes = []; + var remainingDegrees = new Map(); + var foundCenter = false; + var centerNode = null; + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + var degree = node.getNeighborsList().size; + remainingDegrees.set(node, node.getNeighborsList().size); + + if (degree == 1) { + removedNodes.push(node); + } + } + + var tempList = []; + tempList = tempList.concat(removedNodes); + + while (!foundCenter) { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + + var index = list.indexOf(node); + if (index >= 0) { + list.splice(index, 1); + } + + var neighbours = node.getNeighborsList(); + + neighbours.forEach(function (neighbour) { + if (removedNodes.indexOf(neighbour) < 0) { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + + if (newDegree == 1) { + tempList.push(neighbour); + } + + remainingDegrees.set(neighbour, newDegree); + } + }); + } + + removedNodes = removedNodes.concat(tempList); + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + } + + return centerNode; +}; + +/** + * During the coarsening process, this layout may be referenced by two graph managers + * this setter function grants access to change the currently being used graph manager + */ +Layout.prototype.setGraphManager = function (gm) { + this.graphManager = gm; +}; + +module.exports = Layout; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RandomSeed() {} +// adapted from: https://stackoverflow.com/a/19303725 +RandomSeed.seed = 1; +RandomSeed.x = 0; + +RandomSeed.nextDouble = function () { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; + return RandomSeed.x - Math.floor(RandomSeed.x); +}; + +module.exports = RandomSeed; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __nested_webpack_require_81860__) { + +"use strict"; + + +var PointD = __nested_webpack_require_81860__(4); + +function Transform(x, y) { + this.lworldOrgX = 0.0; + this.lworldOrgY = 0.0; + this.ldeviceOrgX = 0.0; + this.ldeviceOrgY = 0.0; + this.lworldExtX = 1.0; + this.lworldExtY = 1.0; + this.ldeviceExtX = 1.0; + this.ldeviceExtY = 1.0; +} + +Transform.prototype.getWorldOrgX = function () { + return this.lworldOrgX; +}; + +Transform.prototype.setWorldOrgX = function (wox) { + this.lworldOrgX = wox; +}; + +Transform.prototype.getWorldOrgY = function () { + return this.lworldOrgY; +}; + +Transform.prototype.setWorldOrgY = function (woy) { + this.lworldOrgY = woy; +}; + +Transform.prototype.getWorldExtX = function () { + return this.lworldExtX; +}; + +Transform.prototype.setWorldExtX = function (wex) { + this.lworldExtX = wex; +}; + +Transform.prototype.getWorldExtY = function () { + return this.lworldExtY; +}; + +Transform.prototype.setWorldExtY = function (wey) { + this.lworldExtY = wey; +}; + +/* Device related */ + +Transform.prototype.getDeviceOrgX = function () { + return this.ldeviceOrgX; +}; + +Transform.prototype.setDeviceOrgX = function (dox) { + this.ldeviceOrgX = dox; +}; + +Transform.prototype.getDeviceOrgY = function () { + return this.ldeviceOrgY; +}; + +Transform.prototype.setDeviceOrgY = function (doy) { + this.ldeviceOrgY = doy; +}; + +Transform.prototype.getDeviceExtX = function () { + return this.ldeviceExtX; +}; + +Transform.prototype.setDeviceExtX = function (dex) { + this.ldeviceExtX = dex; +}; + +Transform.prototype.getDeviceExtY = function () { + return this.ldeviceExtY; +}; + +Transform.prototype.setDeviceExtY = function (dey) { + this.ldeviceExtY = dey; +}; + +Transform.prototype.transformX = function (x) { + var xDevice = 0.0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0.0) { + xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; + } + + return xDevice; +}; + +Transform.prototype.transformY = function (y) { + var yDevice = 0.0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0.0) { + yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; + } + + return yDevice; +}; + +Transform.prototype.inverseTransformX = function (x) { + var xWorld = 0.0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0.0) { + xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; + } + + return xWorld; +}; + +Transform.prototype.inverseTransformY = function (y) { + var yWorld = 0.0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0.0) { + yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; + } + return yWorld; +}; + +Transform.prototype.inverseTransformPoint = function (inPoint) { + var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); + return outPoint; +}; + +module.exports = Transform; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __nested_webpack_require_84747__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var Layout = __nested_webpack_require_84747__(15); +var FDLayoutConstants = __nested_webpack_require_84747__(7); +var LayoutConstants = __nested_webpack_require_84747__(0); +var IGeometry = __nested_webpack_require_84747__(8); +var IMath = __nested_webpack_require_84747__(9); + +function FDLayout() { + Layout.call(this); + + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0.0; + this.oldTotalDisplacement = 0.0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; +} + +FDLayout.prototype = Object.create(Layout.prototype); + +for (var prop in Layout) { + FDLayout[prop] = Layout[prop]; +} + +FDLayout.prototype.initParameters = function () { + Layout.prototype.initParameters.call(this, arguments); + + this.totalIterations = 0; + this.notAnimatedIterations = 0; + + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + + this.grid = []; +}; + +FDLayout.prototype.calcIdealEdgeLengths = function () { + var edge; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + + var allEdges = this.getGraphManager().getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + + edge.idealLength = this.idealEdgeLength; + + if (edge.isInterGraph) { + source = edge.getSource(); + target = edge.getTarget(); + + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + + if (this.useSmartIdealEdgeLengthCalculation) { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + + lcaDepth = edge.getLca().getInclusionTreeDepth(); + + edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } +}; + +FDLayout.prototype.initSpringEmbedder = function () { + + var s = this.getAllNodes().length; + if (this.incremental) { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } else { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } else { + this.coolingFactor = 1.0; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + + this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); + + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + + this.repulsionRange = this.calcRepulsionRange(); +}; + +FDLayout.prototype.calcSpringForces = function () { + var lEdges = this.getAllEdges(); + var edge; + + for (var i = 0; i < lEdges.length; i++) { + edge = lEdges[i]; + + this.calcSpringForce(edge, edge.idealLength); + } +}; + +FDLayout.prototype.calcRepulsionForces = function () { + var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var i, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + + if (this.useFRGridVariant) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { + this.updateGrid(); + } + + processedNodeSet = new Set(); + + // calculate repulsion forces between each nodes and its surrounding + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } else { + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + + for (j = i + 1; j < lNodes.length; j++) { + nodeB = lNodes[j]; + + // If both nodes are not members of the same graph, skip. + if (nodeA.getOwner() != nodeB.getOwner()) { + continue; + } + + this.calcRepulsionForce(nodeA, nodeB); + } + } + } +}; + +FDLayout.prototype.calcGravitationalForces = function () { + var node; + var lNodes = this.getAllNodesToApplyGravitation(); + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + this.calcGravitationalForce(node); + } +}; + +FDLayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.move(); + } +}; + +FDLayout.prototype.calcSpringForce = function (edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + + var length; + var springForce; + var springForceX; + var springForceY; + + // Update edge length + if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { + edge.updateLengthSimple(); + } else { + edge.updateLength(); + + if (edge.isOverlapingSourceAndTarget) { + return; + } + } + + length = edge.getLength(); + + if (length == 0) return; + + // Calculate spring forces + springForce = this.springConstant * (length - idealLength); + + // Project force onto x and y axes + springForceX = springForce * (edge.lengthX / length); + springForceY = springForce * (edge.lengthY / length); + + // Apply forces on the end nodes + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; +}; + +FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + + if (rectA.intersects(rectB)) // two nodes overlap + { + // calculate separation amount in x and y directions + IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); + + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + + // Apply forces on the two nodes + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } else // no overlap + { + // calculate distance + + if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers + { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } else // use clipping points + { + IGeometry.getIntersection(rectA, rectB, clipPoints); + + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + + // No repulsion range. FR grid variant should take care of this. + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance = Math.sqrt(distanceSquared); + + repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + + // Project force onto x and y axes + repulsionForceX = repulsionForce * distanceX / distance; + repulsionForceY = repulsionForce * distanceY / distance; + + // Apply forces on the two nodes + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } +}; + +FDLayout.prototype.calcGravitationalForce = function (node) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node.getOwner(); + + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node.getCenterX() - ownerCenterX; + distanceY = node.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; + + if (node.getOwner() == this.graphManager.getRoot()) // in the root graph + { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX; + node.gravitationForceY = -this.gravityConstant * distanceY; + } + } else // inside a compound + { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; + node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; + } + } +}; + +FDLayout.prototype.isConverged = function () { + var converged; + var oscilating = false; + + if (this.totalIterations > this.maxIterations / 3) { + oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + + converged = this.totalDisplacement < this.totalDisplacementThreshold; + + this.oldTotalDisplacement = this.totalDisplacement; + + return converged || oscilating; +}; + +FDLayout.prototype.animate = function () { + if (this.animationDuringLayout && !this.isSubLayout) { + if (this.notAnimatedIterations == this.animationPeriod) { + this.update(); + this.notAnimatedIterations = 0; + } else { + this.notAnimatedIterations++; + } + } +}; + +//This method calculates the number of children (weight) for all nodes +FDLayout.prototype.calcNoOfChildrenForAllNodes = function () { + var node; + var allNodes = this.graphManager.getAllNodes(); + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + node.noOfChildren = node.getNoOfChildren(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: FR-Grid Variant Repulsion Force Calculation +// ----------------------------------------------------------------------------- + +FDLayout.prototype.calcGrid = function (graph) { + + var sizeX = 0; + var sizeY = 0; + + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + + var grid = new Array(sizeX); + + for (var i = 0; i < sizeX; i++) { + grid[i] = new Array(sizeY); + } + + for (var i = 0; i < sizeX; i++) { + for (var j = 0; j < sizeY; j++) { + grid[i][j] = new Array(); + } + } + + return grid; +}; + +FDLayout.prototype.addNodeToGrid = function (v, left, top) { + + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + + startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); + + for (var i = startX; i <= finishX; i++) { + for (var j = startY; j <= finishY; j++) { + this.grid[i][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } +}; + +FDLayout.prototype.updateGrid = function () { + var i; + var nodeA; + var lNodes = this.getAllNodes(); + + this.grid = this.calcGrid(this.graphManager.getRoot()); + + // put all nodes to proper grid cells + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } +}; + +FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { + + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { + var surrounding = new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + + for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { + for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { + if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { + for (var k = 0; k < grid[i][j].length; k++) { + nodeB = grid[i][j][k]; + + // If both nodes are not members of the same graph, + // or both nodes are the same, skip. + if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { + continue; + } + + // check if the repulsion force between + // nodeA and nodeB has already been calculated + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { + var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); + var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); + + // if the distance between nodeA and nodeB + // is less then calculation range + if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { + //then add nodeB to surrounding of nodeA + surrounding.add(nodeB); + } + } + } + } + } + } + + nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); + } + for (i = 0; i < nodeA.surrounding.length; i++) { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); + } +}; + +FDLayout.prototype.calcRepulsionRange = function () { + return 0.0; +}; + +module.exports = FDLayout; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __nested_webpack_require_100902__) { + +"use strict"; + + +var LEdge = __nested_webpack_require_100902__(1); +var FDLayoutConstants = __nested_webpack_require_100902__(7); + +function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +} + +FDLayoutEdge.prototype = Object.create(LEdge.prototype); + +for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; +} + +module.exports = FDLayoutEdge; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __nested_webpack_require_101387__) { + +"use strict"; + + +var LNode = __nested_webpack_require_101387__(3); + +function FDLayoutNode(gm, loc, size, vNode) { + // alternative constructor is handled inside LNode + LNode.call(this, gm, loc, size, vNode); + //Spring, repulsion and gravitational forces acting on this node + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + //Amount by which this node is to be moved in this iteration + this.displacementX = 0; + this.displacementY = 0; + + //Start and finish grid coordinates that this node is fallen into + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + + //Geometric neighbors of this node + this.surrounding = []; +} + +FDLayoutNode.prototype = Object.create(LNode.prototype); + +for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; +} + +FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) { + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; +}; + +module.exports = FDLayoutNode; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function DimensionD(width, height) { + this.width = 0; + this.height = 0; + if (width !== null && height !== null) { + this.height = height; + this.width = width; + } +} + +DimensionD.prototype.getWidth = function () { + return this.width; +}; + +DimensionD.prototype.setWidth = function (width) { + this.width = width; +}; + +DimensionD.prototype.getHeight = function () { + return this.height; +}; + +DimensionD.prototype.setHeight = function (height) { + this.height = height; +}; + +module.exports = DimensionD; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __nested_webpack_require_103173__) { + +"use strict"; + + +var UniqueIDGeneretor = __nested_webpack_require_103173__(14); + +function HashMap() { + this.map = {}; + this.keys = []; +} + +HashMap.prototype.put = function (key, value) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value; + this.keys.push(key); + } +}; + +HashMap.prototype.contains = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[key] != null; +}; + +HashMap.prototype.get = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; +}; + +HashMap.prototype.keySet = function () { + return this.keys; +}; + +module.exports = HashMap; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __nested_webpack_require_103901__) { + +"use strict"; + + +var UniqueIDGeneretor = __nested_webpack_require_103901__(14); + +function HashSet() { + this.set = {}; +} +; + +HashSet.prototype.add = function (obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) this.set[theId] = obj; +}; + +HashSet.prototype.remove = function (obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; +}; + +HashSet.prototype.clear = function () { + this.set = {}; +}; + +HashSet.prototype.contains = function (obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; +}; + +HashSet.prototype.isEmpty = function () { + return this.size() === 0; +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +//concats this.set to the given list +HashSet.prototype.addAllTo = function (list) { + var keys = Object.keys(this.set); + var length = keys.length; + for (var i = 0; i < length; i++) { + list.push(this.set[keys[i]]); + } +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +HashSet.prototype.addAll = function (list) { + var s = list.length; + for (var i = 0; i < s; i++) { + var v = list[i]; + this.add(v); + } +}; + +module.exports = HashSet; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __nested_webpack_require_105138__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A classic Quicksort algorithm with Hoare's partition + * - Works also on LinkedList objects + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var LinkedList = __nested_webpack_require_105138__(11); + +var Quicksort = function () { + function Quicksort(A, compareFunction) { + _classCallCheck(this, Quicksort); + + if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction; + + var length = void 0; + if (A instanceof LinkedList) length = A.size();else length = A.length; + + this._quicksort(A, 0, length - 1); + } + + _createClass(Quicksort, [{ + key: '_quicksort', + value: function _quicksort(A, p, r) { + if (p < r) { + var q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + }, { + key: '_partition', + value: function _partition(A, p, r) { + var x = this._get(A, p); + var i = p; + var j = r; + while (true) { + while (this.compareFunction(x, this._get(A, j))) { + j--; + }while (this.compareFunction(this._get(A, i), x)) { + i++; + }if (i < j) { + this._swap(A, i, j); + i++; + j--; + } else return j; + } + } + }, { + key: '_get', + value: function _get(object, index) { + if (object instanceof LinkedList) return object.get_object_at(index);else return object[index]; + } + }, { + key: '_set', + value: function _set(object, index, value) { + if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value; + } + }, { + key: '_swap', + value: function _swap(A, i, j) { + var temp = this._get(A, i); + this._set(A, i, this._get(A, j)); + this._set(A, j, temp); + } + }, { + key: '_defaultCompareFunction', + value: function _defaultCompareFunction(a, b) { + return b > a; + } + }]); + + return Quicksort; +}(); + +module.exports = Quicksort; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string + * sequences by S.B.Needleman and C.D.Wunsch (1970). + * + * Aside from the inputs, you can assign the scores for, + * - Match: The two characters at the current index are same. + * - Mismatch: The two characters at the current index are different. + * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. + */ + +var NeedlemanWunsch = function () { + function NeedlemanWunsch(sequence1, sequence2) { + var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; + var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1; + + _classCallCheck(this, NeedlemanWunsch); + + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + + // Just the remove redundancy + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + + // Grid matrix of scores + this.grid = new Array(this.iMax); + for (var i = 0; i < this.iMax; i++) { + this.grid[i] = new Array(this.jMax); + + for (var j = 0; j < this.jMax; j++) { + this.grid[i][j] = 0; + } + } + + // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) + this.tracebackGrid = new Array(this.iMax); + for (var _i = 0; _i < this.iMax; _i++) { + this.tracebackGrid[_i] = new Array(this.jMax); + + for (var _j = 0; _j < this.jMax; _j++) { + this.tracebackGrid[_i][_j] = [null, null, null]; + } + } + + // The aligned sequences (return multiple possibilities) + this.alignments = []; + + // Final alignment score + this.score = -1; + + // Calculate scores and tracebacks + this.computeGrids(); + } + + _createClass(NeedlemanWunsch, [{ + key: "getScore", + value: function getScore() { + return this.score; + } + }, { + key: "getAlignments", + value: function getAlignments() { + return this.alignments; + } + + // Main dynamic programming procedure + + }, { + key: "computeGrids", + value: function computeGrids() { + // Fill in the first row + for (var j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + + // Fill in the first column + for (var i = 1; i < this.iMax; i++) { + this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; + this.tracebackGrid[i][0] = [false, true, false]; + } + + // Fill the rest of the grid + for (var _i2 = 1; _i2 < this.iMax; _i2++) { + for (var _j2 = 1; _j2 < this.jMax; _j2++) { + // Find the max score(s) among [`Diag`, `Up`, `Left`] + var diag = void 0; + if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; + + var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; + var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; + + // If there exists multiple max values, capture them for multiple paths + var maxOf = [diag, up, left]; + var indices = this.arrayAllMaxIndexes(maxOf); + + // Update Grids + this.grid[_i2][_j2] = maxOf[indices[0]]; + this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + + // Update alignment score + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + + // Gets all possible valid sequence combinations + + }, { + key: "alignmentTraceback", + value: function alignmentTraceback() { + var inProcessAlignments = []; + + inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + + while (inProcessAlignments[0]) { + var current = inProcessAlignments[0]; + var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + + if (directions[0]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (directions[1]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: '-' + current.seq2 + }); + } + if (directions[2]) { + inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1], + seq1: '-' + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + + if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1, + sequence2: current.seq2 + }); + + inProcessAlignments.shift(); + } + + return this.alignments; + } + + // Helper Functions + + }, { + key: "getAllIndexes", + value: function getAllIndexes(arr, val) { + var indexes = [], + i = -1; + while ((i = arr.indexOf(val, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + }, { + key: "arrayAllMaxIndexes", + value: function arrayAllMaxIndexes(array) { + return this.getAllIndexes(array, Math.max.apply(null, array)); + } + }]); + + return NeedlemanWunsch; +}(); + +module.exports = NeedlemanWunsch; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __nested_webpack_require_115611__) { + +"use strict"; + + +var layoutBase = function layoutBase() { + return; +}; + +layoutBase.FDLayout = __nested_webpack_require_115611__(18); +layoutBase.FDLayoutConstants = __nested_webpack_require_115611__(7); +layoutBase.FDLayoutEdge = __nested_webpack_require_115611__(19); +layoutBase.FDLayoutNode = __nested_webpack_require_115611__(20); +layoutBase.DimensionD = __nested_webpack_require_115611__(21); +layoutBase.HashMap = __nested_webpack_require_115611__(22); +layoutBase.HashSet = __nested_webpack_require_115611__(23); +layoutBase.IGeometry = __nested_webpack_require_115611__(8); +layoutBase.IMath = __nested_webpack_require_115611__(9); +layoutBase.Integer = __nested_webpack_require_115611__(10); +layoutBase.Point = __nested_webpack_require_115611__(12); +layoutBase.PointD = __nested_webpack_require_115611__(4); +layoutBase.RandomSeed = __nested_webpack_require_115611__(16); +layoutBase.RectangleD = __nested_webpack_require_115611__(13); +layoutBase.Transform = __nested_webpack_require_115611__(17); +layoutBase.UniqueIDGeneretor = __nested_webpack_require_115611__(14); +layoutBase.Quicksort = __nested_webpack_require_115611__(24); +layoutBase.LinkedList = __nested_webpack_require_115611__(11); +layoutBase.LGraphObject = __nested_webpack_require_115611__(2); +layoutBase.LGraph = __nested_webpack_require_115611__(5); +layoutBase.LEdge = __nested_webpack_require_115611__(1); +layoutBase.LGraphManager = __nested_webpack_require_115611__(6); +layoutBase.LNode = __nested_webpack_require_115611__(3); +layoutBase.Layout = __nested_webpack_require_115611__(15); +layoutBase.LayoutConstants = __nested_webpack_require_115611__(0); +layoutBase.NeedlemanWunsch = __nested_webpack_require_115611__(25); + +module.exports = layoutBase; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Emitter() { + this.listeners = []; +} + +var p = Emitter.prototype; + +p.addListener = function (event, callback) { + this.listeners.push({ + event: event, + callback: callback + }); +}; + +p.removeListener = function (event, callback) { + for (var i = this.listeners.length; i >= 0; i--) { + var l = this.listeners[i]; + + if (l.event === event && l.callback === callback) { + this.listeners.splice(i, 1); + } + } +}; + +p.emit = function (event, data) { + for (var i = 0; i < this.listeners.length; i++) { + var l = this.listeners[i]; + + if (event === l.event) { + l.callback(data); + } + } +}; + +module.exports = Emitter; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 47724: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "diagram": () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(87115); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59373); +/* harmony import */ var cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71377); +/* harmony import */ var cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14607); +/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(91619); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(12281); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(7201); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27484); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17967); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20683); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70277); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45625); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(39354); +/* harmony import */ var dagre_d3_es__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91518); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(59542); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(10285); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28734); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_12__); + + + + + + + + + + + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; + var parser2 = { + trace: 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: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 6: + case 7: + return yy; + case 8: + yy.getLogger().trace("Stop NL "); + break; + case 9: + yy.getLogger().trace("Stop EOF "); + break; + case 11: + yy.getLogger().trace("Stop NL2 "); + break; + case 12: + yy.getLogger().trace("Stop EOF2 "); + break; + case 15: + yy.getLogger().info("Node: ", $$[$0].id); + yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 16: + yy.getLogger().trace("Icon: ", $$[$0]); + yy.decorateNode({ icon: $$[$0] }); + break; + case 17: + case 21: + yy.decorateNode({ class: $$[$0] }); + break; + case 18: + yy.getLogger().trace("SPACELIST"); + break; + case 19: + yy.getLogger().trace("Node: ", $$[$0].id); + yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 20: + yy.decorateNode({ icon: $$[$0] }); + break; + case 25: + yy.getLogger().trace("node found ..", $$[$0 - 2]); + this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + case 26: + this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; + break; + case 27: + yy.getLogger().trace("node found ..", $$[$0 - 3]); + this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function parseError2(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + 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 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return 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).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + 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 + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + yy.getLogger().trace("Found comment", yy_.yytext); + break; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + this.popState(); + return 16; + case 4: + this.popState(); + break; + case 5: + yy.getLogger().trace("Begin icon"); + this.begin("ICON"); + break; + case 6: + yy.getLogger().trace("SPACELINE"); + return 6; + case 7: + return 7; + case 8: + return 15; + case 9: + yy.getLogger().trace("end icon"); + this.popState(); + break; + case 10: + yy.getLogger().trace("Exploding node"); + this.begin("NODE"); + return 19; + case 11: + yy.getLogger().trace("Cloud"); + this.begin("NODE"); + return 19; + case 12: + yy.getLogger().trace("Explosion Bang"); + this.begin("NODE"); + return 19; + case 13: + yy.getLogger().trace("Cloud Bang"); + this.begin("NODE"); + return 19; + case 14: + this.begin("NODE"); + return 19; + case 15: + this.begin("NODE"); + return 19; + case 16: + this.begin("NODE"); + return 19; + case 17: + this.begin("NODE"); + return 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + yy.getLogger().trace("Starting NSTR"); + this.begin("NSTR"); + break; + case 22: + yy.getLogger().trace("description:", yy_.yytext); + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + this.popState(); + yy.getLogger().trace("node end ))"); + return "NODE_DEND"; + case 25: + this.popState(); + yy.getLogger().trace("node end )"); + return "NODE_DEND"; + case 26: + this.popState(); + yy.getLogger().trace("node end ...", yy_.yytext); + return "NODE_DEND"; + case 27: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 28: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 29: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 30: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 31: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 32: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + case 33: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + } + }, + 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], + conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR": { "rules": [22, 23], "inclusive": false }, "NODE": { "rules": [21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const mindmapParser = parser; +const sanitizeText = (text) => (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.n)(text, (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)()); +let nodes = []; +let cnt = 0; +let elements = {}; +const clear = () => { + nodes = []; + cnt = 0; + elements = {}; +}; +const getParent = function(level) { + for (let i = nodes.length - 1; i >= 0; i--) { + if (nodes[i].level < level) { + return nodes[i]; + } + } + return null; +}; +const getMindmap = () => { + return nodes.length > 0 ? nodes[0] : null; +}; +const addNode = (level, id, descr, type) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.info("addNode", level, id, descr, type); + const conf = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)(); + const node = { + id: cnt++, + nodeId: sanitizeText(id), + level, + descr: sanitizeText(descr), + type, + children: [], + width: (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)().mindmap.maxNodeWidth + }; + switch (node.type) { + case nodeType.ROUNDED_RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.HEXAGON: + node.padding = 2 * conf.mindmap.padding; + break; + default: + node.padding = conf.mindmap.padding; + } + const parent = getParent(level); + if (parent) { + parent.children.push(node); + nodes.push(node); + } else { + if (nodes.length === 0) { + nodes.push(node); + } else { + let error = new Error( + 'There can be only one root. No parent could be found for ("' + node.descr + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } + } +}; +const nodeType = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 +}; +const getType = (startStr, endStr) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.debug("In get type", startStr, endStr); + switch (startStr) { + case "[": + return nodeType.RECT; + case "(": + return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; + case "((": + return nodeType.CIRCLE; + case ")": + return nodeType.CLOUD; + case "))": + return nodeType.BANG; + case "{{": + return nodeType.HEXAGON; + default: + return nodeType.DEFAULT; + } +}; +const setElementForId = (id, element) => { + elements[id] = element; +}; +const decorateNode = (decoration) => { + const node = nodes[nodes.length - 1]; + if (decoration && decoration.icon) { + node.icon = sanitizeText(decoration.icon); + } + if (decoration && decoration.class) { + node.class = sanitizeText(decoration.class); + } +}; +const type2Str = (type) => { + switch (type) { + case nodeType.DEFAULT: + return "no-border"; + case nodeType.RECT: + return "rect"; + case nodeType.ROUNDED_RECT: + return "rounded-rect"; + case nodeType.CIRCLE: + return "circle"; + case nodeType.CLOUD: + return "cloud"; + case nodeType.BANG: + return "bang"; + case nodeType.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } +}; +let parseError; +const setErrorHandler = (handler) => { + parseError = handler; +}; +const getLogger = () => _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l; +const getNodeById = (id) => nodes[id]; +const getElementById = (id) => elements[id]; +const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addNode, + clear, + decorateNode, + getElementById, + getLogger, + getMindmap, + getNodeById, + getType, + nodeType, + get parseError() { + return parseError; + }, + sanitizeText, + setElementForId, + setErrorHandler, + type2Str +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +function wrap(text, width) { + text.each(function() { + var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(this), words = text2.text().split(/(\s+|
    )/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "
    ") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "
    ") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const rectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("width", node.width); +}; +const cloudBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r1 = 0.15 * w; + const r2 = 0.25 * w; + const r3 = 0.35 * w; + const r4 = 0.2 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} + a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} + a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} + + a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35} + a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65} + + a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15} + a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0} + a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15} + + a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} + a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} + + H0 V0 Z` + ); +}; +const bangBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r = 0.15 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} + + a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} + a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33} + + a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15} + + a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} + a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} + + H0 V0 Z` + ); +}; +const circleBkg = function(elem, node) { + elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("r", node.width / 2); +}; +function insertPolygonShape(parent, w, h, points, node) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); +} +const hexagonBkg = function(elem, node) { + const h = node.height; + const f = 4; + const m = h / f; + const w = node.width - node.padding + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + insertPolygonShape(elem, w, h, points, node); +}; +const roundedRectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width); +}; +const drawNode = function(elem, node, fullSection, conf) { + const section = fullSection % (MAX_SECTIONS - 1); + const nodeElem = elem.append("g"); + node.section = section; + let sectionClass = "section-" + section; + if (section < 0) { + sectionClass += " section-root"; + } + nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.width = bbox.width + 2 * node.padding; + if (node.icon) { + if (node.type === nodeType.CIRCLE) { + node.height += 50; + node.width += 50; + const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" + ); + } else { + node.width += 50; + const orgHeight = node.height; + node.height = Math.max(orgHeight, 60); + const heightDiff = Math.abs(node.height - orgHeight); + const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" + ); + } + } else { + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + } + switch (node.type) { + case nodeType.DEFAULT: + defaultBkg(bkgElem, node, section); + break; + case nodeType.ROUNDED_RECT: + roundedRectBkg(bkgElem, node); + break; + case nodeType.RECT: + rectBkg(bkgElem, node); + break; + case nodeType.CIRCLE: + bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")"); + circleBkg(bkgElem, node); + break; + case nodeType.CLOUD: + cloudBkg(bkgElem, node); + break; + case nodeType.BANG: + bangBkg(bkgElem, node); + break; + case nodeType.HEXAGON: + hexagonBkg(bkgElem, node); + break; + } + setElementForId(node.id, nodeElem); + return node.height; +}; +const drawEdge = function drawEdge2(edgesElem, mindmap, parent, depth, fullSection) { + const section = fullSection % (MAX_SECTIONS - 1); + const sx = parent.x + parent.width / 2; + const sy = parent.y + parent.height / 2; + const ex = mindmap.x + mindmap.width / 2; + const ey = mindmap.y + mindmap.height / 2; + const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2; + const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2; + const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx; + const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy; + edgesElem.append("path").attr( + "d", + parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}` + ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth); +}; +const positionNode = function(node) { + const nodeElem = getElementById(node.id); + const x = node.x || 0; + const y = node.y || 0; + nodeElem.attr("transform", "translate(" + x + "," + y + ")"); +}; +const svgDraw = { drawNode, positionNode, drawEdge }; +cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1___default().use((cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2___default())); +function drawNodes(svg, mindmap, section, conf) { + svgDraw.drawNode(svg, mindmap, section, conf); + if (mindmap.children) { + mindmap.children.forEach((child, index) => { + drawNodes(svg, child, section < 0 ? index : section, conf); + }); + } +} +function drawEdges(edgesEl, cy) { + cy.edges().map((edge, id) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds = edge[0]._private.rscratch; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.trace("Edge: ", id, data); + edgesEl.insert("path").attr( + "d", + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + } + }); +} +function addNodes(mindmap, cy, conf, level) { + cy.add({ + group: "nodes", + data: { + id: mindmap.id, + labelText: mindmap.descr, + height: mindmap.height, + width: mindmap.width, + level, + nodeId: mindmap.id, + padding: mindmap.padding, + type: mindmap.type + }, + position: { + x: mindmap.x, + y: mindmap.y + } + }); + if (mindmap.children) { + mindmap.children.forEach((child) => { + addNodes(child, cy, conf, level + 1); + cy.add({ + group: "edges", + data: { + id: `${mindmap.id}_${child.id}`, + source: mindmap.id, + target: child.id, + depth: level, + section: child.section + } + }); + }); + } +} +function layoutMindmap(node, conf) { + return new Promise((resolve) => { + const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body").append("div").attr("id", "cy").attr("style", "display:none"); + const cy = cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1___default()({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + renderEl.remove(); + addNodes(node, cy, conf, 0); + cy.nodes().forEach(function(n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + cy.layout({ + name: "cose-bilkent", + quality: "proof", + // headless: true, + styleEnabled: false, + animate: false + }).run(); + cy.ready((e) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.info("Ready", e); + resolve(cy); + }); + }); +} +function positionNodes(cy) { + cy.nodes().map((node, id) => { + const data = node.data(); + data.x = node.position().x; + data.y = node.position().y; + svgDraw.positionNode(data); + const el = getElementById(data.nodeId); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); + el.attr( + "transform", + `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` + ); + el.attr("attr", `apa-${id})`); + }); +} +const draw = async (text, id, version, diagObj) => { + const conf = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)(); + diagObj.db.clear(); + diagObj.parser.parse(text); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.debug("Renering info diagram\n" + text); + const securityLevel = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body"); + const svg = root.select("#" + id); + svg.append("g"); + const mm = diagObj.db.getMindmap(); + const edgesElem = svg.append("g"); + edgesElem.attr("class", "mindmap-edges"); + const nodesElem = svg.append("g"); + nodesElem.attr("class", "mindmap-nodes"); + drawNodes(nodesElem, mm, -1, conf); + const cy = await layoutMindmap(mm, conf); + drawEdges(edgesElem, cy); + positionNodes(cy); + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.s)(void 0, svg, conf.mindmap.padding, conf.mindmap.useMaxWidth); +}; +const mindmapRenderer = { + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if ((0,khroma__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)(options["lineColor" + i])) { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .Z)(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } +`; +const mindmapStyles = getStyles; +const diagram = { + db: mindmapDb, + renderer: mindmapRenderer, + parser: mindmapParser, + styles: mindmapStyles +}; + +//# sourceMappingURL=mindmap-definition-44684416.js.map + + +/***/ }), + +/***/ 91619: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + "Z": () => (/* binding */ is_dark) +}); + +// EXTERNAL MODULE: ./node_modules/khroma/dist/utils/index.js + 3 modules +var utils = __webpack_require__(61691); +// EXTERNAL MODULE: ./node_modules/khroma/dist/color/index.js + 4 modules +var dist_color = __webpack_require__(71610); +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/luminance.js +/* IMPORT */ + + +/* MAIN */ +//SOURCE: https://planetcalc.com/7779 +const luminance = (color) => { + const { r, g, b } = dist_color/* default.parse */.Z.parse(color); + const luminance = .2126 * utils/* default.channel.toLinear */.Z.channel.toLinear(r) + .7152 * utils/* default.channel.toLinear */.Z.channel.toLinear(g) + .0722 * utils/* default.channel.toLinear */.Z.channel.toLinear(b); + return utils/* default.lang.round */.Z.lang.round(luminance); +}; +/* EXPORT */ +/* harmony default export */ const methods_luminance = (luminance); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_light.js +/* IMPORT */ + +/* MAIN */ +const isLight = (color) => { + return methods_luminance(color) >= .5; +}; +/* EXPORT */ +/* harmony default export */ const is_light = (isLight); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_dark.js +/* IMPORT */ + +/* MAIN */ +const isDark = (color) => { + return !is_light(color); +}; +/* EXPORT */ +/* harmony default export */ const is_dark = (isDark); + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/72c6abc6.bad8ba18.js b/assets/js/72c6abc6.bad8ba18.js new file mode 100644 index 0000000000..9be80f6bbe --- /dev/null +++ b/assets/js/72c6abc6.bad8ba18.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9425],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),p=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},c=function(e){var t=p(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=p(n),u=r,h=d["".concat(l,".").concat(u)]||d[u]||m[u]||o;return n?a.createElement(h,s(s({ref:t},c),{},{components:n})):a.createElement(h,s({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,s=new Array(o);s[0]=u;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:r,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>p});var a=n(87462),r=(n(67294),n(3905));const o={},s="Running Tracetest With Datadog",i={unversionedId:"examples-tutorials/recipes/running-tracetest-with-datadog",id:"examples-tutorials/recipes/running-tracetest-with-datadog",title:"Running Tracetest With Datadog",description:"Check out the source code on GitHub here.",source:"@site/docs/examples-tutorials/recipes/running-tracetest-with-datadog.md",sourceDirName:"examples-tutorials/recipes",slug:"/examples-tutorials/recipes/running-tracetest-with-datadog",permalink:"/examples-tutorials/recipes/running-tracetest-with-datadog",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/examples-tutorials/recipes/running-tracetest-with-datadog.md",tags:[],version:"current",frontMatter:{},sidebar:"examplesTutorialsSidebar",previous:{title:"Running Tracetest with AWS Step Functions, AWS X-Ray and Terraform",permalink:"/examples-tutorials/recipes/running-tracetest-with-step-functions-terraform"},next:{title:"Running Tracetest With Dynatrace",permalink:"/examples-tutorials/recipes/running-tracetest-with-dynatrace"}},l={},p=[{value:"OpenTelemetry Demo v1.3.0 with Datadog, OpenTelemetry and Tracetest",id:"opentelemetry-demo-v130-with-datadog-opentelemetry-and-tracetest",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"Project Structure",id:"project-structure",level:2},{value:"1. OpenTelemetry Demo",id:"1-opentelemetry-demo",level:3},{value:"2. Tracetest",id:"2-tracetest",level:3},{value:"Docker Compose Network",id:"docker-compose-network",level:3},{value:"OpenTelemetry Demo",id:"opentelemetry-demo",level:2},{value:"Tracetest",id:"tracetest",level:2},{value:"Run Both the OpenTelemetry Demo App and Tracetest",id:"run-both-the-opentelemetry-demo-app-and-tracetest",level:2},{value:"Run Tracetest Tests with the Tracetest CLI",id:"run-tracetest-tests-with-the-tracetest-cli",level:2},{value:"View Trace Spans Over Time in Datadog",id:"view-trace-spans-over-time-in-datadog",level:2},{value:"Learn more",id:"learn-more",level:2}],c={toc:p},d="wrapper";function m(e){let{components:t,...o}=e;return(0,r.kt)(d,(0,a.Z)({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-tracetest-with-datadog"},"Running Tracetest With Datadog"),(0,r.kt)("admonition",{type:"note"},(0,r.kt)("p",{parentName:"admonition"},(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-datadog"},"Check out the source code on GitHub here."))),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," is a testing tool based on ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/"},"OpenTelemetry")," that allows you to test your distributed application. It allows you to use data from distributed traces generated by OpenTelemetry to validate and assert if your application has the desired behavior defined by your test definitions."),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://www.datadoghq.com/"},"Datadog")," is an observability solution for cloud-scale applications, providing solutions to monitor databases, servers, tools and services. It provides integrated distributed tracing, logs and metrics solutions and supports OpenTelemetry standards."),(0,r.kt)("h2",{id:"opentelemetry-demo-v130-with-datadog-opentelemetry-and-tracetest"},"OpenTelemetry Demo ",(0,r.kt)("inlineCode",{parentName:"h2"},"v1.3.0")," with Datadog, OpenTelemetry and Tracetest"),(0,r.kt)("p",null,"This is a simple sample app on how to configure the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/open-telemetry/opentelemetry-demo"},"OpenTelemetry Demo ",(0,r.kt)("inlineCode",{parentName:"a"},"v1.3.0"))," to use ",(0,r.kt)("a",{parentName:"p",href:"https://tracetest.io/"},"Tracetest")," for enhancing your E2E and integration tests with trace-based testing and ",(0,r.kt)("a",{parentName:"p",href:"https://www.datadoghq.com/"},"Datadog")," as a trace data store."),(0,r.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("p",null,"You will need ",(0,r.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker")," and ",(0,r.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your machine to run this sample app! Additionally, you will need a Datadog account and an API. Sign up to Datadog on their ",(0,r.kt)("a",{parentName:"p",href:"https://www.datadoghq.com/"},"homepage")," by clicking on ",(0,r.kt)("inlineCode",{parentName:"p"},"Get Started Free"),"."),(0,r.kt)("h2",{id:"project-structure"},"Project Structure"),(0,r.kt)("p",null,"The project is built with Docker Compose. It contains two distinct ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," files."),(0,r.kt)("h3",{id:"1-opentelemetry-demo"},"1. OpenTelemetry Demo"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file and ",(0,r.kt)("inlineCode",{parentName:"p"},".env")," file in the root directory are for the OpenTelemetry Demo."),(0,r.kt)("h3",{id:"2-tracetest"},"2. Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," file, ",(0,r.kt)("inlineCode",{parentName:"p"},"collector.config.yaml"),", ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml"),", and ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory are for setting up Tracetest and the OpenTelemetry Collector."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is self-contained and will run all the prerequisites for enabling OpenTelemetry traces and trace-based testing with Tracetest, as well as routing all traces the OpenTelemetry Demo generates to Lightstep."),(0,r.kt)("h3",{id:"docker-compose-network"},"Docker Compose Network"),(0,r.kt)("p",null,"All ",(0,r.kt)("inlineCode",{parentName:"p"},"services")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," are on the same network, defined by the ",(0,r.kt)("inlineCode",{parentName:"p"},"networks")," section on each file, and will be reachable by hostname from within other services. E.g. ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," will map to the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," service, where port ",(0,r.kt)("inlineCode",{parentName:"p"},"4317")," is the port where Tracetest accepts traces."),(0,r.kt)("h2",{id:"opentelemetry-demo"},"OpenTelemetry Demo"),(0,r.kt)("p",null,"The ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/open-telemetry/opentelemetry-demo"},"OpenDelemetry Demo")," is a sample microservice-based app with the purpose to demo how to correctly set up OpenTelemetry distributed tracing."),(0,r.kt)("p",null,"Read more about the OpenTelemetry Demo ",(0,r.kt)("a",{parentName:"p",href:"https://opentelemetry.io/blog/2022/announcing-opentelemetry-demo-release/"},"here"),"."),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," contains 14 services."),(0,r.kt)("p",null,"To start the OpenTelemetry Demo by itself, run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker compose up\n")),(0,r.kt)("p",null,"This will start the OpenTelemetry Demo. Open up ",(0,r.kt)("inlineCode",{parentName:"p"},"http://localhost:8084")," to make sure it's working. But, you're not sending the traces anywhere."),(0,r.kt)("p",null,"Let's fix this by configuring Tracetest and the OpenTelemetry Collector to forward trace data to both Lightstep and Tracetest."),(0,r.kt)("h2",{id:"tracetest"},"Tracetest"),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose.yaml")," in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory is configured with three services."),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Postgres")," - Postgres is a prerequisite for Tracetest to work. It stores trace data when running trace-based tests."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://opentelemetry.io/docs/collector/"},(0,r.kt)("strong",{parentName:"a"},"OpenTelemetry Collector"))," - A vendor-agnostic implementation of how to receive, process and export telemetry data. To support sending traces to Datadog, we are using the ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/open-telemetry/opentelemetry-collector-contrib"},(0,r.kt)("inlineCode",{parentName:"a"},"contrib")," version"),", which contains vendor-related code."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://tracetest.io/"},(0,r.kt)("strong",{parentName:"a"},"Tracetest"))," - Trace-based testing that generates end-to-end tests automatically from traces.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3.9"\n\nnetworks:\n default:\n name: opentelemetry-demo\n driver: bridge\n\nservices:\n tracetest:\n restart: unless-stopped\n image: kubeshop/tracetest:${TAG:-latest}\n container_name: tracetest\n platform: linux/amd64\n ports:\n - 11633:11633\n extra_hosts:\n - "host.docker.internal:host-gateway"\n volumes:\n - type: bind\n source: ./tracetest-config.yaml\n target: /app/tracetest.yaml\n - type: bind\n source: ./tracetest-provision.yaml\n target: /app/provisioning.yaml\n command: --provisioning-file /app/provisioning.yaml\n healthcheck:\n test: ["CMD", "wget", "--spider", "localhost:11633"]\n interval: 1s\n timeout: 3s\n retries: 60\n depends_on:\n tt-postgres:\n condition: service_healthy\n otel-collector:\n condition: service_started\n environment:\n TRACETEST_DEV: ${TRACETEST_DEV}\n\n tt-postgres:\n image: postgres:14\n container_name: tt-postgres\n environment:\n POSTGRES_PASSWORD: postgres\n POSTGRES_USER: postgres\n healthcheck:\n test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"\n interval: 1s\n timeout: 5s\n retries: 60\n\n otel-collector:\n image: otel/opentelemetry-collector-contrib:0.68.0\n container_name: otel-collector\n restart: unless-stopped\n command:\n - "--config"\n - "/otel-local-config.yaml"\n volumes:\n - ./tracetest/collector.config.yaml:/otel-local-config.yaml\n\n')),(0,r.kt)("p",null,"Tracetest depends on both Postgres and the OpenTelemetry Collector. Both Tracetest and the OpenTelemetry Collector require config files to be loaded via a volume. The volumes are mapped from the root directory into the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest")," directory and the respective config files."),(0,r.kt)("p",null,"To start both the OpenTelemetry Demo and Tracetest we will run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-config.yaml")," file contains the basic setup of connecting Tracetest to the Postgres instance and telemetry exporter. The exporter is set to the OpenTelemetry Collector."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"# tracetest-config.yaml\n\n---\npostgres:\n host: postgres\n user: postgres\n password: postgres\n port: 5432\n dbname: postgres\n params: sslmode=disable\n\ntelemetry:\n exporters:\n collector:\n serviceName: tracetest\n sampling: 100\n exporter:\n type: collector\n collector:\n endpoint: otel-collector:4317\n\nserver:\n telemetry:\n exporter: collector\n applicationExporter: collector\n")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest-provision.yaml")," file contains the setup of the demo APIs that Tracetest can use as an example for tests, the polling profiles that say how Tracetest should fetch traces from the data store and the configuration for the data store, in our case, Datadog."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'---\ntype: Demo\nspec:\n name: "OpenTelemetry Shop"\n enabled: true\n type: otelstore\n opentelemetryStore:\n frontendEndpoint: http://frontend:8084\n productCatalogEndpoint: productcatalogservice:3550\n cartEndpoint: cartservice:7070\n checkoutEndpoint: checkoutservice:5050\n\n---\ntype: PollingProfile\nspec:\n name: Default\n strategy: periodic\n default: true\n periodic:\n retryDelay: 5s\n timeout: 180s\n\n---\ntype: DataStore\nspec:\n name: datadog\n type: datadog\n\n')),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Sending Traces to Tracetest and Datadog")),(0,r.kt)("p",null,"The ",(0,r.kt)("inlineCode",{parentName:"p"},"collector.config.yaml")," explains that. It receives traces via either ",(0,r.kt)("inlineCode",{parentName:"p"},"grpc")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"http"),". Then, exports them to Tracetest's OTLP endpoint ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest:4317")," in one pipeline, and to Datadog in another."),(0,r.kt)("p",null,"Make sure to add your Datadog API Key to the ",(0,r.kt)("inlineCode",{parentName:"p"},"datadog")," exporter."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"receivers:\n otlp:\n protocols:\n http:\n grpc:\n\nprocessors:\n batch: # this configuration is needed to guarantee that the data is sent correctly to Datadog\n send_batch_max_size: 100\n send_batch_size: 10\n timeout: 10s\n\nexporters:\n # OTLP for Tracetest\n otlp/tracetest:\n endpoint: tracetest:4317\n # Send traces to Tracetest.\n # Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector\n tls:\n insecure: true\n # Datadog exporter\n datadog:\n api:\n site: datadoghq.com\n key: ${DATADOG_API_KEY} # Add here you API key for Datadog\n # One example on how to set up a collector configuration for Datadog can be seen here:\n # https://docs.datadoghq.com/opentelemetry/otel_collector_datadog_exporter/?tab=onahost\n\nservice:\n pipelines:\n traces/tracetest:\n receivers: [otlp]\n processors: [batch]\n exporters: [otlp/tracetest]\n traces/datadog:\n receivers: [otlp]\n processors: [batch]\n exporters: [datadog]\n")),(0,r.kt)("h2",{id:"run-both-the-opentelemetry-demo-app-and-tracetest"},"Run Both the OpenTelemetry Demo App and Tracetest"),(0,r.kt)("p",null,"To start both OpenTelemetry and Tracetest, run this command:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"docker-compose -f docker-compose.yaml -f tracetest/docker-compose.yaml up\n")),(0,r.kt)("p",null,"This will start your Tracetest instance on ",(0,r.kt)("inlineCode",{parentName:"p"},"http://localhost:11633/"),". "),(0,r.kt)("p",null,"Open the URL and ",(0,r.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/web-ui/creating-tests"},"start creating tests in the Web UI"),"! Make sure to use the endpoints within your Docker network like ",(0,r.kt)("inlineCode",{parentName:"p"},"http://frontend:8084/")," when creating tests."),(0,r.kt)("p",null,"This is because your OpenTelemetry Demo and Tracetest are in the same network."),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Note: View the ",(0,r.kt)("inlineCode",{parentName:"p"},"demo")," section in the ",(0,r.kt)("inlineCode",{parentName:"p"},"tracetest.config.yaml")," to see which endpoints from the OpenTelemetry Demo are available for running tests.")),(0,r.kt)("p",null,"Here's a sample of a failed test run, which happens if you add this assertion:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-css"},"attr:tracetest.span.duration < 10ms\n")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(17573).Z,width:"2820",height:"1784"})),(0,r.kt)("p",null,"Increasing the duration to a more reasonable ",(0,r.kt)("inlineCode",{parentName:"p"},"500ms")," will make the test pass."),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(22188).Z,width:"2816",height:"1782"})),(0,r.kt)("h2",{id:"run-tracetest-tests-with-the-tracetest-cli"},"Run Tracetest Tests with the Tracetest CLI"),(0,r.kt)("p",null,"First, ",(0,r.kt)("a",{parentName:"p",href:"https://docs.tracetest.io/getting-started/installation#install-the-tracetest-cli"},"install the CLI"),".\nThen, configure the CLI:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest configure --endpoint http://localhost:11633\n")),(0,r.kt)("p",null,"Once configured, you can run a test against the Tracetest instance via the terminal."),(0,r.kt)("p",null,"Check out the ",(0,r.kt)("inlineCode",{parentName:"p"},"http-test.yaml")," file."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'# http-test.yaml\n\ntype: Test\nspec:\n id: JBYAfKJ4R\n name: OpenTelemetry Shop - List Products\n description: List Products available on OTel shop\n trigger:\n type: http\n httpRequest:\n url: http://frontend:8084/api/products\n method: GET\n headers:\n - key: Content-Type\n value: application/json\n specs:\n - selector: span[tracetest.span.type="general" name="Tracetest trigger"]\n assertions:\n - attr:tracetest.response.status = 200\n - attr:tracetest.span.duration < 10ms\n - selector: span[tracetest.span.type="rpc" name="grpc.hipstershop.ProductCatalogService/ListProducts"]\n assertions:\n - attr:rpc.grpc.status_code = 0\n - selector: span[tracetest.span.type="rpc" name="hipstershop.ProductCatalogService/ListProducts"\n rpc.system="grpc" rpc.method="ListProducts" rpc.service="hipstershop.ProductCatalogService"]\n assertions:\n - attr:rpc.grpc.status_code = 0\n')),(0,r.kt)("p",null,"This file defines a test the same way you would through the Web UI."),(0,r.kt)("p",null,"To run the test, run this command in the terminal:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"tracetest run test -f ./http-test.yaml\n")),(0,r.kt)("p",null,"This test will fail just like the sample above due to the ",(0,r.kt)("inlineCode",{parentName:"p"},"attr:tracetest.span.duration < 10ms")," assertion."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},'\u2718 OpenTelemetry Shop - List Products (http://localhost:11633/test/JBYAfKJ4R/run/3/test)\n \u2718 span[tracetest.span.type="general" name="Tracetest trigger"]\n \u2718 #2d1b0dcbd75b3a42\n \u2714 attr:tracetest.response.status = 200 (200)\n \u2718 attr:tracetest.span.duration < 10ms (24ms) (http://localhost:11633/test/JBYAfKJ4R/run/3/test?selectedAssertion=0&selectedSpan=2d1b0dcbd75b3a42)\n \u2714 span[tracetest.span.type="rpc" name="grpc.hipstershop.ProductCatalogService/ListProducts"]\n \u2714 #90aeab1e9db4617b\n \u2714 attr:rpc.grpc.status_code = 0 (http://localhost:11633/test/JBYAfKJ4R/run/3/test?selectedAssertion=1)\n \u2714 span[tracetest.span.type="rpc" name="hipstershop.ProductCatalogService/ListProducts" rpc.system="grpc" rpc.method="ListProducts" rpc.service="hipstershop.ProductCatalogService"]\n \u2714 #44b836b092b4d708\n \u2714 attr:rpc.grpc.status_code = 0 (http://localhost:11633/test/JBYAfKJ4R/run/3/test?selectedAssertion=2)\n')),(0,r.kt)("p",null,"If you edit the duration as in the Web UI example above, the test will pass!"),(0,r.kt)("h2",{id:"view-trace-spans-over-time-in-datadog"},"View Trace Spans Over Time in Datadog"),(0,r.kt)("p",null,"To access a historical overview of all the trace spans the OpenTelemetry Demo generates, jump over to your Datadog account on ",(0,r.kt)("inlineCode",{parentName:"p"},"APM > Traces")," area."),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(58654).Z,width:"3536",height:"1712"})),(0,r.kt)("p",null,"You can also drill down into a particular trace as well."),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(57484).Z,width:"3508",height:"1702"})),(0,r.kt)("p",null,"With Datadog and Tracetest, you get the best of both worlds. You can run trace-based tests and automate running E2E and integration tests against real trace data. And, use Datadog to get a historical overview of all traces your distributed application generates."),(0,r.kt)("h2",{id:"learn-more"},"Learn more"),(0,r.kt)("p",null,"Feel free to check out our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/kubeshop/tracetest/tree/main/examples"},"examples in GitHub")," and join our ",(0,r.kt)("a",{parentName:"p",href:"https://discord.gg/8MtcMrQNbX"},"Discord Community")," for more info!"))}m.isMDXComponent=!0},58654:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/datadog-recipe-apm-front-page-eb3cdbdad6efa34856f07a1cd0d1b5a4.png"},57484:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/datadog-recipe-apm-trace-drilldown-97a709e3a918dc076ea359f1210cc9f6.png"},17573:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/datadog-recipe-failed-test-23031370c2172cb217548d9c238449bf.png"},22188:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/datadog-recipe-successful-test-3e0574377a09678fea7e8b80ba175b84.png"}}]); \ No newline at end of file diff --git a/assets/js/72e14192.8568b746.js b/assets/js/72e14192.8568b746.js new file mode 100644 index 0000000000..2805acefbf --- /dev/null +++ b/assets/js/72e14192.8568b746.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7239],{3905:(t,e,r)=>{r.d(e,{Zo:()=>u,kt:()=>k});var n=r(67294);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var s=n.createContext({}),l=function(t){var e=n.useContext(s),r=e;return t&&(r="function"==typeof t?t(e):c(c({},e),t)),r},u=function(t){var e=l(t.components);return n.createElement(s.Provider,{value:e},t.children)},p="mdxType",d={inlineCode:"code",wrapper:function(t){var e=t.children;return n.createElement(n.Fragment,{},e)}},f=n.forwardRef((function(t,e){var r=t.components,a=t.mdxType,o=t.originalType,s=t.parentName,u=i(t,["components","mdxType","originalType","parentName"]),p=l(r),f=a,k=p["".concat(s,".").concat(f)]||p[f]||d[f]||o;return r?n.createElement(k,c(c({ref:e},u),{},{components:r})):n.createElement(k,c({ref:e},u))}));function k(t,e){var r=arguments,a=e&&e.mdxType;if("string"==typeof t||a){var o=r.length,c=new Array(o);c[0]=f;var i={};for(var s in e)hasOwnProperty.call(e,s)&&(i[s]=e[s]);i.originalType=t,i[p]="string"==typeof t?t:a,c[1]=i;for(var l=2;l{r.r(e),r.d(e,{assets:()=>s,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var n=r(87462),a=(r(67294),r(3905));const o={},c="Quick Start",i={unversionedId:"quick-start",id:"quick-start",title:"Quick Start",description:"In this section, you will:",source:"@site/docs/quick-start.md",sourceDirName:".",slug:"/quick-start",permalink:"/quick-start",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/quick-start.md",tags:[],version:"current",frontMatter:{}},s={},l=[{value:"1. Install the Tracetest CLI",id:"1-install-the-tracetest-cli",level:3},{value:"2. Scaffold Tracetest Docker config with the CLI",id:"2-scaffold-tracetest-docker-config-with-the-cli",level:3},{value:"3. Point Tracetest to a trace back end",id:"3-point-tracetest-to-a-trace-back-end",level:3},{value:"4. Run Tracetest with Docker or the CLI",id:"4-run-tracetest-with-docker-or-the-cli",level:3},{value:"5. Create and run a test",id:"5-create-and-run-a-test",level:3},{value:"6. View trace and set assertions",id:"6-view-trace-and-set-assertions",level:3},{value:"Next Steps",id:"next-steps",level:2}],u={toc:l},p="wrapper";function d(t){let{components:e,...r}=t;return(0,a.kt)(p,(0,n.Z)({},u,r,{components:e,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"quick-start"},"Quick Start"),(0,a.kt)("p",null,"In this section, you will:"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"..."),(0,a.kt)("li",{parentName:"ol"},"..."),(0,a.kt)("li",{parentName:"ol"},"..."),(0,a.kt)("li",{parentName:"ol"},"...")),(0,a.kt)("h3",{id:"1-install-the-tracetest-cli"},(0,a.kt)("strong",{parentName:"h3"},"1. Install the Tracetest CLI")),(0,a.kt)("p",null,"..."),(0,a.kt)("h3",{id:"2-scaffold-tracetest-docker-config-with-the-cli"},(0,a.kt)("strong",{parentName:"h3"},"2. Scaffold Tracetest Docker config with the CLI")),(0,a.kt)("p",null,"..."),(0,a.kt)("h3",{id:"3-point-tracetest-to-a-trace-back-end"},(0,a.kt)("strong",{parentName:"h3"},"3. Point Tracetest to a trace back end")),(0,a.kt)("p",null,"..."),(0,a.kt)("h3",{id:"4-run-tracetest-with-docker-or-the-cli"},(0,a.kt)("strong",{parentName:"h3"},"4. Run Tracetest with Docker or the CLI")),(0,a.kt)("p",null,"..."),(0,a.kt)("h3",{id:"5-create-and-run-a-test"},(0,a.kt)("strong",{parentName:"h3"},"5. Create and run a test")),(0,a.kt)("p",null,"..."),(0,a.kt)("h3",{id:"6-view-trace-and-set-assertions"},(0,a.kt)("strong",{parentName:"h3"},"6. View trace and set assertions")),(0,a.kt)("p",null,"..."),(0,a.kt)("h2",{id:"next-steps"},"Next Steps"),(0,a.kt)("p",null,"..."),(0,a.kt)("p",null,"And, if you want, connect with us on ",(0,a.kt)("a",{parentName:"p",href:"https://discord.gg/6zupCZFQbe"},"Discord")," to tell us about your experience!"))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/73a67a21.f193fc69.js b/assets/js/73a67a21.f193fc69.js new file mode 100644 index 0000000000..023e13f659 --- /dev/null +++ b/assets/js/73a67a21.f193fc69.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[4724],{3905:(e,t,r)=>{r.d(t,{Zo:()=>a,kt:()=>d});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),s=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},a=function(e){var t=s(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,l=e.originalType,p=e.parentName,a=i(e,["components","mdxType","originalType","parentName"]),u=s(r),m=o,d=u["".concat(p,".").concat(m)]||u[m]||f[m]||l;return r?n.createElement(d,c(c({ref:t},a),{},{components:r})):n.createElement(d,c({ref:t},a))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=r.length,c=new Array(l);c[0]=m;var i={};for(var p in t)hasOwnProperty.call(t,p)&&(i[p]=t[p]);i.originalType=e,i[u]="string"==typeof e?e:o,c[1]=i;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>i,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const l={},c="CLI Reference",i={unversionedId:"cli/reference/tracetest_completion_powershell",id:"cli/reference/tracetest_completion_powershell",title:"CLI Reference",description:"tracetest completion powershell",source:"@site/docs/cli/reference/tracetest_completion_powershell.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_completion_powershell",permalink:"/cli/reference/tracetest_completion_powershell",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_completion_powershell.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_completion_fish"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_completion_zsh"}},p={},s=[{value:"tracetest completion powershell",id:"tracetest-completion-powershell",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],a={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},a,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,o.kt)("h2",{id:"tracetest-completion-powershell"},"tracetest completion powershell"),(0,o.kt)("p",null,"Generate the autocompletion script for powershell"),(0,o.kt)("h3",{id:"synopsis"},"Synopsis"),(0,o.kt)("p",null,"Generate the autocompletion script for powershell."),(0,o.kt)("p",null,"To load completions in your current shell session:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"tracetest completion powershell | Out-String | Invoke-Expression\n")),(0,o.kt)("p",null,"To load completions for every new session, add the output of the above command\nto your powershell profile."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"tracetest completion powershell [flags]\n")),(0,o.kt)("h3",{id:"options"},"Options"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," -h, --help help for powershell\n --no-descriptions disable completion descriptions\n")),(0,o.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,o.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/cli/reference/tracetest_completion"},"tracetest completion"),"\t - Generate the autocompletion script for the specified shell")),(0,o.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/74e78895.a5243aec.js b/assets/js/74e78895.a5243aec.js new file mode 100644 index 0000000000..16a2f884bd --- /dev/null +++ b/assets/js/74e78895.a5243aec.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[5353],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>d});var s=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=s.createContext({}),c=function(e){var t=s.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return s.createElement(o.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return s.createElement(s.Fragment,{},t)}},h=s.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,o=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),h=r,d=p["".concat(o,".").concat(h)]||p[h]||f[h]||a;return n?s.createElement(d,i(i({ref:t},u),{},{components:n})):s.createElement(d,i({ref:t},u))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=h;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l[p]="string"==typeof e?e:r,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var s=n(87462),r=(n(67294),n(3905));const a={},i="Test Results",l={unversionedId:"web-ui/test-results",id:"web-ui/test-results",title:"Test Results",description:"From the All Tests screen, you can access all your existing tests, create new tests and see the results of any test that has been run.",source:"@site/docs/web-ui/test-results.md",sourceDirName:"web-ui",slug:"/web-ui/test-results",permalink:"/web-ui/test-results",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/web-ui/test-results.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Creating Test Outputs",permalink:"/web-ui/creating-test-outputs"},next:{title:"Exporting Tests",permalink:"/web-ui/exporting-tests"}},o={},c=[],u={toc:c},p="wrapper";function f(e){let{components:t,...a}=e;return(0,r.kt)(p,(0,s.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"test-results"},"Test Results"),(0,r.kt)("p",null,"From the ",(0,r.kt)("strong",{parentName:"p"},"All Tests")," screen, you can access all your existing tests, create new tests and see the results of any test that has been run. "),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"All Tests List",src:n(263).Z,width:"2874",height:"1554"})),(0,r.kt)("p",null,"CLick on the settings icon to the right of each test. You can delete the test from here:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Tests Actions",src:n(98534).Z,width:"2874",height:"1558"})),(0,r.kt)("p",null,"Click on the arrow next to the test name and the list of test runs will appear:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Select Test",src:n(80010).Z,width:"2874",height:"1582"})),(0,r.kt)("p",null,"Click on a test run and the Trigger Details screen will open. From here, you can change and save the details of the test. On the top right, there is a button to run the test and a settings icon with the following options:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"JUnit Results - The test results in JUnit format."),(0,r.kt)("li",{parentName:"ul"},"Test Definition - The test defintion YAML file."),(0,r.kt)("li",{parentName:"ul"},"Edit - Edit the test."),(0,r.kt)("li",{parentName:"ul"},"Delete - Delete the test.")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Run Tests & Options",src:n(32710).Z,width:"2874",height:"1586"})),(0,r.kt)("p",null,"Click on the ",(0,r.kt)("strong",{parentName:"p"},"Trace")," tab to open the Trace Details screen:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Trace Tab View",src:n(91445).Z,width:"2874",height:"1586"})),(0,r.kt)("p",null," Use the icons at the bottom left to manipulate the test image. The options are:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Graph View"),(0,r.kt)("li",{parentName:"ul"},"Timeline View"),(0,r.kt)("li",{parentName:"ul"},"Zoom In"),(0,r.kt)("li",{parentName:"ul"},"Zoom Out"),(0,r.kt)("li",{parentName:"ul"},"Fit View"),(0,r.kt)("li",{parentName:"ul"},"Mini Map")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Trace Tab Icons",src:n(50653).Z,width:"2874",height:"1586"})),(0,r.kt)("p",null,"The following shows the test in the ",(0,r.kt)("strong",{parentName:"p"},"Timeline View"),":"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Timeline View",src:n(47822).Z,width:"2874",height:"1586"})),(0,r.kt)("p",null,"Click on the ",(0,r.kt)("strong",{parentName:"p"},"Test")," tab to see the details of Test Specs and Assertions for the test:"),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"Test Tab",src:n(4374).Z,width:"2874",height:"1584"})))}f.isMDXComponent=!0},263:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/all-tests-list-0.11-231fc1c1fef9683f263210d9f57f291e.png"},32710:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/run-test-and-option-0.11-282b7fc9ff92732e7d508ffcd1344846.png"},80010:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/select-test-0.11-c720e0d79fbd0bc99f2793396ff58d48.png"},4374:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/test-tab-0.11-8e609bdade721107f2a92ac8dfe95246.png"},98534:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/tests-actions-0.11-880a879a4790fad3cffd3d903e7da62e.png"},47822:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/timeline-view-0.11-97113f448ab8e13df55c08c6b9b839ee.png"},91445:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/trace-tab-0.11-8e44b48a80772acb2f47388e354d52e8.png"},50653:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/trace-tab-icons-0.11-98f2d60ee0e1195adb9cdbb22f27eebb.png"}}]); \ No newline at end of file diff --git a/assets/js/755b216a.5cbff439.js b/assets/js/755b216a.5cbff439.js new file mode 100644 index 0000000000..fce95c4e7b --- /dev/null +++ b/assets/js/755b216a.5cbff439.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[9395],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,c=e.originalType,l=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),u=s(r),d=o,m=u["".concat(l,".").concat(d)]||u[d]||f[d]||c;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var c=r.length,i=new Array(c);i[0]=d;var a={};for(var l in t)hasOwnProperty.call(t,l)&&(a[l]=t[l]);a.originalType=e,a[u]="string"==typeof e?e:o,i[1]=a;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>f,frontMatter:()=>c,metadata:()=>a,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const c={},i="CLI Reference",a={unversionedId:"cli/reference/tracetest_configure",id:"cli/reference/tracetest_configure",title:"CLI Reference",description:"tracetest configure",source:"@site/docs/cli/reference/tracetest_configure.md",sourceDirName:"cli/reference",slug:"/cli/reference/tracetest_configure",permalink:"/cli/reference/tracetest_configure",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/cli/reference/tracetest_configure.md",tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"CLI Reference",permalink:"/cli/reference/tracetest_completion_zsh"},next:{title:"CLI Reference",permalink:"/cli/reference/tracetest_dashboard"}},l={},s=[{value:"tracetest configure",id:"tracetest-configure",level:2},{value:"Synopsis",id:"synopsis",level:3},{value:"Options",id:"options",level:3},{value:"Options inherited from parent commands",id:"options-inherited-from-parent-commands",level:3},{value:"SEE ALSO",id:"see-also",level:3},{value:"Auto generated by spf13/cobra on 8-Sep-2023",id:"auto-generated-by-spf13cobra-on-8-sep-2023",level:6}],p={toc:s},u="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(u,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"cli-reference"},"CLI Reference"),(0,o.kt)("h2",{id:"tracetest-configure"},"tracetest configure"),(0,o.kt)("p",null,"Configure your tracetest CLI"),(0,o.kt)("h3",{id:"synopsis"},"Synopsis"),(0,o.kt)("p",null,"Configure your tracetest CLI"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"tracetest configure [flags]\n")),(0,o.kt)("h3",{id:"options"},"Options"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"}," -e, --endpoint string set the value for the endpoint, so the CLI won't ask for this value\n -g, --global configuration will be saved in your home dir\n -h, --help help for configure\n")),(0,o.kt)("h3",{id:"options-inherited-from-parent-commands"},"Options inherited from parent commands"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},' -c, --config string config file will be used by the CLI (default "config.yml")\n -o, --output string output format [pretty|json|yaml]\n -s, --server-url string server url\n -v, --verbose display debug information\n')),(0,o.kt)("h3",{id:"see-also"},"SEE ALSO"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"/cli/reference/tracetest"},"tracetest"),"\t - CLI to configure, install and execute tests on a Tracetest server")),(0,o.kt)("h6",{id:"auto-generated-by-spf13cobra-on-8-sep-2023"},"Auto generated by spf13/cobra on 8-Sep-2023"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7724.9c188343.js b/assets/js/7724.9c188343.js new file mode 100644 index 0000000000..ad74abcc98 --- /dev/null +++ b/assets/js/7724.9c188343.js @@ -0,0 +1,2 @@ +/*! For license information please see 7724.9c188343.js.LICENSE.txt */ +(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7724],{84182:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.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},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))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))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var 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=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!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(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(c.WORLD_CENTER_X-o.x/2,c.WORLD_CENTER_Y-o.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var y=v[0];v.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),g--,h--}d=null!=t?(c.indexOf(v[0])+1)%g:0;for(var x=Math.abs(r-n)/h,w=d;p!=h;w=++w%g){var E=c[w].getOtherEnd(e);if(E!=t){var T=(n+p*x)%360,_=(T+x)%360;m.branchRadialLayout(E,e,T,_,i+a,a),p++}}},m.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)}))},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rl&&(l=c.rect.height)}n+=l+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a,o,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),a=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(o=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var c=i;c<=a;c++)l[0]+=this.grid[c][o-1].length+this.grid[c][o].length-1;if(a0)for(c=o;c<=s;c++)l[3]+=this.grid[i-1][c].length+this.grid[i][c].length-1;for(var h,d,p=g.MAX_VALUE,f=0;f0&&(o=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(o,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var p=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&p(cytoscape),e.exports=p}])},e.exports=r(n(84182))},71377:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt?1:0},Z=function(e,t){return-1*K(e,t)},Q=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+H+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)o=s=l=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,d=2*i-h;o=Math.round(255*u(d,h,n+1/3)),s=Math.round(255*u(d,h,n)),l=Math.round(255*u(d,h,n-1/3))}t=[o,s,l,a]}return t},te=function(e){var t,n=new RegExp("^"+U+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if("%"===a[a.length-1]&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},ne=function(e){return ie[e.toLowerCase()]},re=function(e){return(w(e)?e:null)||ne(e)||J(e)||te(e)||ee(e)},ie={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]},ae=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i=t||n<0||h&&e-u>=a}function y(){var e=ge();if(v(e))return m(e);s=setTimeout(y,f(e))}function m(e){return s=void 0,d&&r?p(e):(r=i=void 0,o)}function b(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return void 0===s?o:m(ge())}function w(){var e=ge(),n=v(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return g(l);if(h)return clearTimeout(s),s=setTimeout(y,t),p(l)}return void 0===s&&(s=setTimeout(y,t)),o}return t=qe(t)||0,le(n)&&(c=!!n.leading,a=(h="maxWait"in n)?$e(qe(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),w.cancel=b,w.flush=x,w}var Qe=Ze,Je=d?d.performance:null,et=Je&&Je.now?function(){return Je.now()}:function(){return Date.now()},tt=function(){if(d){if(d.requestAnimationFrame)return function(e){d.requestAnimationFrame(e)};if(d.mozRequestAnimationFrame)return function(e){d.mozRequestAnimationFrame(e)};if(d.webkitRequestAnimationFrame)return function(e){d.webkitRequestAnimationFrame(e)};if(d.msRequestAnimationFrame)return function(e){d.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(et())}),1e3/60)}}(),nt=function(e){return tt(e)},rt=et,it=9261,at=65599,ot=5381,st=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it;!(t=e.next()).done;)n=n*at+t.value|0;return n},lt=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:it)*at+e|0},ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot;return(t<<5)+t+e|0},ct=function(e,t){return 2097152*e+t},ht=function(e){return 2097152*e[0]+e[1]},dt=function(e,t){return[lt(e[0],t[0]),ut(e[1],t[1])]},pt=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return st({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Rt=function(e){e.splice(0,e.length)},Bt=function(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&S(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Ut,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.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}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];w(t.classes)?l=t.classes:b(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,i,a,o){var s;if(null==i&&(i=0),null==o&&(o=n),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=e.length);in;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;af;0<=f?++d:--d)v.push(a(e,r));return v},g=function(e,t,r,i){var a,o,s;for(null==i&&(i=n),a=e[r];r>t&&i(a,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=a},f=function(e,t,r){var i,a,o,s,l;for(null==r&&(r=n),a=e.length,l=t,o=e[t],i=2*t+1;i0;){var T=y.pop(),_=f(T),D=T.id();if(h[D]=_,_!==1/0)for(var C=T.neighborhood().intersect(p),N=0;N0)for(n.unshift(t);c[i];){var a=c[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return o.spawn(n)}}}},Qt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=new Array(i),o=n,s=function(e){for(var t=0;t0;){if(x(),E++,u===h){for(var T=[],_=i,D=h,C=m[D];T.unshift(_),null!=C&&T.unshift(C),null!=(_=y[D]);)C=m[D=_.id()];return{found:!0,distance:d[u],path:this.spawn(T),steps:E}}g[u]=!0;for(var N=l._private.edges,A=0;AN&&(p[C]=N,y[C]=D,m[C]=w),!i){var A=D*u+_;!i&&p[A]>N&&(p[A]=N,y[A]=_,m[A]=w)}}}for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:a,r=[],i=m(e);;){if(null==i)return t.spawn();var o=y(i),l=o.edge,u=o.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=l&&r.unshift(l),i=u}return s.spawn(r)},E=0;E=0;u--){var c=l[u],h=c[1],d=c[2];(t[h]===o&&t[d]===s||t[h]===s&&t[d]===o)&&l.splice(u,1)}for(var p=0;pr;){var i=Math.floor(Math.random()*t.length);t=sn(i,e,t),n--}return t},un={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,a=r.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/on);if(!(i<2)){for(var l=[],u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var a=0,o=e.length-1;o>=0;o--){var s=e[o];i?isFinite(s)||(e[o]=-1/0,a++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+a]:(e[u-1+a]+e[u+a])/2},mn=function(e){return Math.PI*e/180},bn=function(e,t){return Math.atan2(t,e)-Math.PI/2},xn=Math.log2||function(e){return Math.log(e)/Math.log(2)},wn=function(e){return e>0?1:e<0?-1:0},En=function(e,t){return Math.sqrt(Tn(e,t))},Tn=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},_n=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Sn=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},On=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},In=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},kn=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Mn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Pn=function(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)t=n=r=i=a[0];else if(2===a.length)t=r=a[0],i=n=a[1];else if(4===a.length){var s=o(a,4);t=s[0],n=s[1],r=s[2],i=s[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Rn=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Bn=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},Fn=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},zn=function(e,t){return Fn(e,t.x,t.y)},Gn=function(e,t){return Fn(e,t.x1,t.y1)&&Fn(e,t.x2,t.y2)},Yn=function(e,t,n,r,i,a,o){var s,l=cr(i,a),u=i/2,c=a/2,h=r-c-o;if((s=rr(e,t,n,r,n-u+l-o,h,n+u-l+o,h,!1)).length>0)return s;var d=n+u+o;if((s=rr(e,t,n,r,d,r-c+l-o,d,r+c-l+o,!1)).length>0)return s;var p=r+c+o;if((s=rr(e,t,n,r,n-u+l-o,p,n+u-l+o,p,!1)).length>0)return s;var g,f=n-u-o;if((s=rr(e,t,n,r,f,r-c+l-o,f,r+c-l+o,!1)).length>0)return s;var v=n-u+l,y=r-c+l;if((g=tr(e,t,n,r,v,y,l+o)).length>0&&g[0]<=v&&g[1]<=y)return[g[0],g[1]];var m=n+u-l,b=r-c+l;if((g=tr(e,t,n,r,m,b,l+o)).length>0&&g[0]>=m&&g[1]<=b)return[g[0],g[1]];var x=n+u-l,w=r+c-l;if((g=tr(e,t,n,r,x,w,l+o)).length>0&&g[0]>=x&&g[1]>=w)return[g[0],g[1]];var E=n-u+l,T=r+c-l;return(g=tr(e,t,n,r,E,T,l+o)).length>0&&g[0]<=E&&g[1]>=T?[g[0],g[1]]:[]},Xn=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,a),h=Math.max(r,a);return l-s<=e&&e<=u+s&&c-s<=t&&t<=h+s},Vn=function(e,t,n,r,i,a,o,s,l){var u={x1:Math.min(n,o,i)-l,x2:Math.max(n,o,i)+l,y1:Math.min(r,s,a)-l,y2:Math.max(r,s,a)+l};return!(eu.x2||tu.y2)},Un=function(e,t,n,r){var i=t*t-4*e*(n-=r);if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},jn=function(e,t,n,r,i){var a,o,s,l,u,c,h,d;return 0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),a=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,i[1]=0,h=t/3,a>0?(u=(u=s+Math.sqrt(a))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+u+c,h+=(u+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+u)/2,i[3]=h,void(i[5]=-h)):(i[5]=i[3]=0,0===a?(d=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*d-h,void(i[4]=i[2]=-(d+h))):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),d=2*Math.sqrt(o),i[0]=-h+d*Math.cos(l/3),i[2]=-h+d*Math.cos((l+2*Math.PI)/3),void(i[4]=-h+d*Math.cos((l+4*Math.PI)/3))))},Hn=function(e,t,n,r,i,a,o,s){var l=[];jn(1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,l);for(var u=1e-7,c=[],h=0;h<6;h+=2)Math.abs(l[h+1])=0&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var d,p,g,f=-1,v=0;v=0?gl?(e-i)*(e-i)+(t-a)*(t-a):u-h},Wn=function(e,t,n){for(var r,i,a,o,s=0,l=0;l=e&&e>=a||r<=e&&e<=a))continue;(e-r)/(a-r)*(o-i)+i>t&&s++}return s%2!=0},$n=function(e,t,n,r,i,a,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,d=Math.cos(-u),p=Math.sin(-u),g=0;g0){var f=Qn(c,-l);h=Zn(f)}else h=c;return Wn(e,t,h)},Kn=function(e,t,n,r,i,a,o){for(var s=new Array(n.length),l=a/2,u=o/2,c=hr(a,o),h=c*c,d=0;d=0&&g<=1&&v.push(g),f>=0&&f<=1&&v.push(f),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},nr=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},rr=function(e,t,n,r,i,a,o,s,l){var u=e-i,c=n-e,h=o-i,d=t-a,p=r-t,g=s-a,f=h*d-g*u,v=c*d-p*u,y=g*c-h*p;if(0!==y){var m=f/y,b=v/y,x=.001,w=0-x,E=1+x;return w<=m&&m<=E&&w<=b&&b<=E||l?[e+m*c,t+m*p]:[]}return 0===f||0===v?nr(e,n,o)===o?[o,s]:nr(e,n,i)===i?[i,a]:nr(i,o,n)===n?[n,r]:[]:[]},ir=function(e,t,n,r,i,a,o,s){var l,u,c,h,d,p,g=[],f=new Array(n.length),v=!0;if(null==a&&(v=!1),v){for(var y=0;y0){var m=Qn(f,-s);u=Zn(m)}else u=f}else u=n;for(var b=0;b2){for(var A=[u[0],u[1]],L=Math.pow(A[0]-e,2)+Math.pow(A[1]-t,2),S=1;Su&&(u=t)},get:function(e){return l[e]}},h=0;h0?m.edgesTo(y)[0]:y.edgesTo(m)[0];var x=r(b);y=y.id(),h[y]>h[f]+x&&(h[y]=h[f]+x,d.nodes.indexOf(y)<0?d.push(y):d.updateItem(y),u[y]=0,l[y]=[]),h[y]==h[f]+x&&(u[y]=u[y]+u[f],l[y].push(f))}else for(var w=0;w0;){for(var D=n.pop(),C=0;C0&&o.push(n[s]);0!==o.length&&i.push(r.collection(o))}return i},kr=function(e,t){for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:Br,o=r,s=0;s=2?Vr(e,t,n,0,Gr,Yr):Vr(e,t,n,0,zr)},squaredEuclidean:function(e,t,n){return Vr(e,t,n,0,Gr)},manhattan:function(e,t,n){return Vr(e,t,n,0,zr)},max:function(e,t,n){return Vr(e,t,n,-1/0,Xr)}};function jr(e,t,n,r,i,a){var o;return o=x(e)?e:Ur[e]||Ur.euclidean,0===t&&x(e)?o(i,a):o(t,n,r,i,a)}Ur["squared-euclidean"]=Ur.squaredEuclidean,Ur.squaredeuclidean=Ur.squaredEuclidean;var Hr=Mt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),qr=function(e){return Hr(e)},Wr=function(e,t,n,r,i){var a="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},o=function(e){return r[e](t)},s=n,l=t;return jr(e,r.length,a,o,s,l)},$r=function(e,t,n){for(var r=n.length,i=new Array(r),a=new Array(r),o=new Array(t),s=null,l=0;ln)return!1;return!0},ei=function(e,t,n){for(var r=0;ri&&(i=t[l][u],a=u);o[a].push(e[l])}for(var c=0;c=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p,g=t[o],f=t[r[o]];p="dendrogram"===i.mode?{left:g,right:f,key:g.key}:{value:g.value.concat(f.value),key:g.key},e[g.index]=p,e.splice(f.index,1),t[g.key]=p;for(var v=0;vn[f.key][y.key]&&(a=n[f.key][y.key])):"max"===i.linkage?(a=n[g.key][y.key],n[g.key][y.key]0&&r.push(i);return r},Ei=function(e,t,n){for(var r=[],i=0;io&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;ul&&(s=u,l=c)}n[i]=a[s]}return r=Ei(e,t,n)},_i=function(e){for(var t,n,r,i,a,o,s=this.cy(),l=this.nodes(),u=mi(e),c={},h=0;h=C?(N=C,C=L,A=S):L>N&&(N=L);for(var O=0;O0?1:0;T[E%u.minIterations*t+B]=F,R+=F}if(R>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var z=0,G=0;G1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var d={found:!1,trail:void 0};if(u)return d;if(r&&n)if(s){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=l[0].id());var p=function(e){for(var t,n,r,i=e,a=[e];c[i].length;)t=c[i].shift(),n=h[t][0],i!=(r=h[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),i=r):s||i==n||(c[n]=c[n].filter((function(e){return e!=t})),i=n),a.unshift(t),a.unshift(i);return a},g=[],f=[];for(f=p(i);1!=f.length;)0==c[f[0]].length?(g.unshift(l.getElementById(f.shift())),g.unshift(l.getElementById(f.shift()))):f=p(f.shift()).concat(f);for(var v in g.unshift(l.getElementById(f.shift())),c)if(c[v].length)return d;return d.found=!0,d.trail=this.spawn(g,!0),d}},Ai=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter((function(e){return e.isLoop()}))):l.merge(i)}))})),i.push(l)},l=function l(u,c,h){u===h&&(r+=1),t[c]={id:n,low:n++,cutVertex:!1};var d,p,g,f,v=e.getElementById(c).connectedEdges().intersection(e);0===v.size()?i.push(e.spawn(e.getElementById(c))):v.forEach((function(e){d=e.source().id(),p=e.target().id(),(g=d===c?p:d)!==h&&(f=e.id(),o[f]||(o[f]=!0,a.push({x:c,y:g,edge:e})),g in t?t[c].low=Math.min(t[c].low,t[g].id):(l(u,g,c),t[c].low=Math.min(t[c].low,t[g].low),t[c].id<=t[g].low&&(t[c].cutVertex=!0,s(c,g))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,l(n,n),t[n].cutVertex=r>1)}}));var u=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(u),components:i}},Li=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function o(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),h=l.merge(c);r.push(h),a=a.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:a,components:r}},Si={};[qt,Zt,Qt,en,nn,an,un,vr,mr,xr,Er,Rr,si,vi,Di,Ni,{hopcroftTarjanBiconnected:Ai,htbc:Ai,htb:Ai,hopcroftTarjanBiconnectedComponents:Ai},{tarjanStronglyConnected:Li,tsc:Li,tscc:Li,tarjanStronglyConnectedComponents:Li}].forEach((function(e){Q(Si,e)}));var Oi=0,Ii=1,ki=2,Mi=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=Oi,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Mi.prototype={fulfill:function(e){return Pi(this,Ii,"fulfillValue",e)},reject:function(e){return Pi(this,ki,"rejectReason",e)},then:function(e,t){var n=this,r=new Mi;return n.onFulfilled.push(Fi(e,r,"fulfill")),n.onRejected.push(Fi(t,r,"reject")),Ri(n),r.proxy}};var Pi=function(e,t,n,r){return e.state===Oi&&(e.state=t,e[n]=r,Ri(e)),e},Ri=function(e){e.state===Ii?Bi(e,"onFulfilled",e.fulfillValue):e.state===ki&&Bi(e,"onRejected",e.rejectReason)},Bi=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}var Za=Ka;function Qa(e,t){var n=this.__data__,r=Ua(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Ja=Qa;function eo(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){w(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};ps.className=ps.classNames=ps.classes;var gs={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:V,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};gs.variable="(?:[\\w-.]|(?:\\\\"+gs.metaChar+"))+",gs.className="(?:[\\w-]|(?:\\\\"+gs.metaChar+"))+",gs.value=gs.string+"|"+gs.number,gs.id=gs.variable,function(){var e,t,n;for(e=gs.comparatorOp.split("|"),n=0;n=0||"="!==t&&(gs.comparatorOp+="|\\!"+t)}();var fs=function(){return{checks:[]}},vs={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},ys=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return Z(e.selector,t.selector)})),ms=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return Nt("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Nt("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Nt("The selector `"+e+"` 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},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return b(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,a){var o=r.type,s=r.value;switch(o){case vs.GROUP:var l=e(s);return l.substring(0,l.length-1);case vs.DATA_COMPARE:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case vs.DATA_BOOL:var h=r.operator,d=r.field;return"["+e(h)+d+"]";case vs.DATA_EXIST:return"["+r.field+"]";case vs.META_COMPARE:var p=r.operator;return"[["+r.field+n(e(p))+t(s)+"]]";case vs.STATE:return s;case vs.ID:return"#"+s;case vs.CLASS:return"."+s;case vs.PARENT:case vs.CHILD:return i(r.parent,a)+n(">")+i(r.child,a);case vs.ANCESTOR:case vs.DESCENDANT:return i(r.ancestor,a)+" "+i(r.descendant,a);case vs.COMPOUND_SPLIT:var g=i(r.left,a),f=i(r.subject,a),v=i(r.right,a);return g+(g.length>0?" ":"")+f+v;case vs.TRUE:return""}},i=function(e,t){return e.checks.reduce((function(n,i,a){return n+(t===e&&0===a?"$":"")+r(i,t)}),"")},a="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(i=o||s?""+e:"",a=""+n),u&&(e=i=i.toLowerCase(),n=a=a.toLowerCase()),t){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function Vs(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],Vs)},Ys.forEachUp=function(e){return Xs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Us)},Ys.forEachUpAndDown=function(e){return Xs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],js)},Ys.ancestors=Ys.parents,(Fs=zs={data:hs.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:hs.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:hs.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:hs.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:hs.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:hs.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Fs.data,Fs.removeAttr=Fs.removeData;var Hs,qs,Ws=zs,$s={};function Ks(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;ot})),minIndegree:Zs("indegree",(function(e,t){return et})),minOutdegree:Zs("outdegree",(function(e,t){return et}))}),Q($s,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var h=c?l.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var d=0;d0,v=f;f&&(g=g[0]);var y=v?g.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}}).modelPosition=Hs.point=Hs.position,Hs.modelPositions=Hs.points=Hs.positions,Hs.renderedPoint=Hs.renderedPosition,Hs.relativePoint=Hs.relativePosition;var el,tl,nl=qs;el=tl={},tl.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},tl.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},tl.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==a.w&&0!==a.h||((a={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var c=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var h=y(i.width.val-a.w,s,l),d=h.biasDiff,p=h.biasComplementDiff,g=y(i.height.val-a.h,u,c),f=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=m(a.w,a.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-d+a.x1+a.x2+p)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-f+a.y1+a.y2+v)/2}function y(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}function m(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},al=function(e,t){return null==t?e:il(e,t.x1,t.y1,t.x2,t.y2)},ol=function(e,t,n){return Ft(e,t,n)},sl=function(e,t,n){if(!t.cy().headless()){var r,i,a=t._private,o=a.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,i=o.srcY):"target"===n?(r=o.tgtX,i=o.tgtY):(r=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Mn(u,1),il(e,u.x1,u.y1,u.x2,u.y2)}}},ll=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,a=i.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),h=t.pstyle("text-valign"),d=ol(a,"labelWidth",n),p=ol(a,"labelHeight",n),g=ol(a,"labelX",n),f=ol(a,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,T=2,_=p,D=d,C=D/2,N=_/2;if(m)o=g-C,s=g+C,l=f-N,u=f+N;else{switch(c.value){case"left":o=g-D,s=g;break;case"center":o=g-C,s=g+C;break;case"right":o=g,s=g+D}switch(h.value){case"top":l=f-_,u=f;break;case"center":l=f-N,u=f+N;break;case"bottom":l=f,u=f+_}}o+=v-Math.max(x,w)-E-T,s+=v+Math.max(x,w)+E+T,l+=y-Math.max(x,w)-E-T,u+=y+Math.max(x,w)+E+T;var A=n||"main",L=i.labelBounds,S=L[A]=L[A]||{};S.x1=o,S.y1=l,S.x2=s,S.y2=u,S.w=s-o,S.h=u-l;var O=m&&"autorotate"===b.strValue,I=null!=b.pfValue&&0!==b.pfValue;if(O||I){var k=O?ol(i.rstyle,"labelAngle",n):b.pfValue,M=Math.cos(k),P=Math.sin(k),R=(o+s)/2,B=(l+u)/2;if(!m){switch(c.value){case"left":R=s;break;case"right":R=o}switch(h.value){case"top":B=u;break;case"bottom":B=l}}var F=function(e,t){return{x:(e-=R)*M-(t-=B)*P+R,y:e*P+t*M+B}},z=F(o,l),G=F(o,u),Y=F(s,l),X=F(s,u);o=Math.min(z.x,G.x,Y.x,X.x),s=Math.max(z.x,G.x,Y.x,X.x),l=Math.min(z.y,G.y,Y.y,X.y),u=Math.max(z.y,G.y,Y.y,X.y)}var V=A+"Rot",U=L[V]=L[V]||{};U.x1=o,U.y1=l,U.x2=s,U.y2=u,U.w=s-o,U.h=u-l,il(e,o,l,s,u),il(i.labelBounds.all,o,l,s,u)}return e}},ul=function(e,t){var n,r,i,a,o,s,l=e._private.cy,u=l.styleEnabled(),c=l.headless(),h=Ln(),d=e._private,p=e.isNode(),g=e.isEdge(),f=d.rstyle,v=p&&u?e.pstyle("bounds-expansion").pfValue:[0],y=function(e){return"none"!==e.pstyle("display").value},m=!u||y(e)&&(!g||y(e.source())&&y(e.target()));if(m){var b=0;u&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(b=e.pstyle("overlay-padding").value);var x=0;u&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(x=e.pstyle("underlay-padding").value);var w=Math.max(b,x),E=0;if(u&&(E=e.pstyle("width").pfValue/2),p&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var _=e.outerWidth()/2,D=e.outerHeight()/2;il(h,n=o-_,i=s-D,r=o+_,a=s+D)}else if(g&&t.includeEdges)if(u&&!c){var C=e.pstyle("curve-style").strValue;if(n=Math.min(f.srcX,f.midX,f.tgtX),r=Math.max(f.srcX,f.midX,f.tgtX),i=Math.min(f.srcY,f.midY,f.tgtY),a=Math.max(f.srcY,f.midY,f.tgtY),il(h,n-=E,i-=E,r+=E,a+=E),"haystack"===C){var N=f.haystackPts;if(N&&2===N.length){if(n=N[0].x,i=N[0].y,n>(r=N[1].x)){var A=n;n=r,r=A}if(i>(a=N[1].y)){var L=i;i=a,a=L}il(h,n-E,i-E,r+E,a+E)}}else if("bezier"===C||"unbundled-bezier"===C||"segments"===C||"taxi"===C){var S;switch(C){case"bezier":case"unbundled-bezier":S=f.bezierPts;break;case"segments":case"taxi":S=f.linePts}if(null!=S)for(var O=0;O(r=M.x)){var P=n;n=r,r=P}if((i=k.y)>(a=M.y)){var R=i;i=a,a=R}il(h,n-=E,i-=E,r+=E,a+=E)}if(u&&t.includeEdges&&g&&(sl(h,e,"mid-source"),sl(h,e,"mid-target"),sl(h,e,"source"),sl(h,e,"target")),u&&"yes"===e.pstyle("ghost").value){var B=e.pstyle("ghost-offset-x").pfValue,F=e.pstyle("ghost-offset-y").pfValue;il(h,h.x1+B,h.y1+F,h.x2+B,h.y2+F)}var z=d.bodyBounds=d.bodyBounds||{};Rn(z,h),Pn(z,v),Mn(z,1),u&&(n=h.x1,r=h.x2,i=h.y1,a=h.y2,il(h,n-w,i-w,r+w,a+w));var G=d.overlayBounds=d.overlayBounds||{};Rn(G,h),Pn(G,v),Mn(G,1);var Y=d.labelBounds=d.labelBounds||{};null!=Y.all?On(Y.all):Y.all=Ln(),u&&t.includeLabels&&(t.includeMainLabels&&ll(h,e,null),g&&(t.includeSourceLabels&&ll(h,e,"source"),t.includeTargetLabels&&ll(h,e,"target")))}return h.x1=rl(h.x1),h.y1=rl(h.y1),h.x2=rl(h.x2),h.y2=rl(h.y2),h.w=rl(h.x2-h.x1),h.h=rl(h.y2-h.y1),h.w>0&&h.h>0&&m&&(Pn(h,v),Mn(h,1)),h},cl=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:Pl,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},Bl.removeAllListeners=function(){return this.removeListener("*")},Bl.emit=Bl.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,w(t)||(t=[t]),Gl(this,(function(e,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(n){var i=r[n];if(i.type===a.type&&(!i.namespace||i.namespace===a.namespace||i.namespace===Il)&&e.eventMatches(e.context,i,a)){var o=[a];null!=t&&Bt(o,t),e.beforeEmit(e.context,i,a),i.conf&&i.conf.one&&(e.listeners=e.listeners.filter((function(e){return e!==i})));var s=e.callbackContext(e.context,i,a),l=i.callback.apply(s,o);e.afterEmit(e.context,i,a),!1===l&&(a.stopPropagation(),a.preventDefault())}},s=0;s1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,i=0;ir&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,a=0;a=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(E(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify("style")}else if(b(e)){if(void 0===t){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var a=0;a0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),du.neighbourhood=du.neighborhood,du.closedNeighbourhood=du.closedNeighborhood,du.openNeighbourhood=du.openNeighborhood,Q(du,{source:Gs((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Gs((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:vu({attr:"source"}),targets:vu({attr:"target"})}),Q(du,{edgesWith:Gs(yu(),"edgesWith"),edgesTo:Gs(yu({thisIsSrc:!0}),"edgesTo")}),Q(du,{connectedEdges:Gs((function(e){for(var t=[],n=this,r=0;r0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),du.componentsOf=du.components;var bu=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var i=new Yt,a=!1;if(t){if(t.length>0&&E(t[0])&&!A(t[0])){a=!0;for(var o=[],s=new Ut,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],u=0,c=i.length;u0){for(var B=e.length===i.length?i:new bu(a,e),F=0;F0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function o(e){for(var t=e._private.edges,n=0;n0&&(e?D.emitAndNotify("remove"):t&&D.emit("remove"));for(var C=0;C0?i=l:r=l}while(Math.abs(a)>o&&++u=a?m(t,s):0===c?s:x(t,r,r+u)}var E=!1;function T(){E=!0,e===t&&n===r||b()}var _=function(i){return E||T(),e===t&&n===r?i:0===i?0:1===i?1:v(w(i),t,r)};_.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var D="generateBezier("+[e,t,n,r]+")";return _.toString=function(){return D},_}var Tu=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,.5*r,i),o=t(n,.5*r,a),s=t(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,h=1e-4,d=.016;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,o=(a=null!==i)?(c=e(t,r))/i*d:d;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return a?function(e){return u[e*(u.length-1)|0]}:c}}(),_u=function(e,t,n,r){var i=Eu(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Du={linear:function(e,t,n){return e+(t-e)*n},ease:_u(.25,.1,.25,1),"ease-in":_u(.42,0,1,1),"ease-out":_u(0,0,.58,1),"ease-in-out":_u(.42,0,.58,1),"ease-in-sine":_u(.47,0,.745,.715),"ease-out-sine":_u(.39,.575,.565,1),"ease-in-out-sine":_u(.445,.05,.55,.95),"ease-in-quad":_u(.55,.085,.68,.53),"ease-out-quad":_u(.25,.46,.45,.94),"ease-in-out-quad":_u(.455,.03,.515,.955),"ease-in-cubic":_u(.55,.055,.675,.19),"ease-out-cubic":_u(.215,.61,.355,1),"ease-in-out-cubic":_u(.645,.045,.355,1),"ease-in-quart":_u(.895,.03,.685,.22),"ease-out-quart":_u(.165,.84,.44,1),"ease-in-out-quart":_u(.77,0,.175,1),"ease-in-quint":_u(.755,.05,.855,.06),"ease-out-quint":_u(.23,1,.32,1),"ease-in-out-quint":_u(.86,0,.07,1),"ease-in-expo":_u(.95,.05,.795,.035),"ease-out-expo":_u(.19,1,.22,1),"ease-in-out-expo":_u(1,0,0,1),"ease-in-circ":_u(.6,.04,.98,.335),"ease-out-circ":_u(.075,.82,.165,1),"ease-in-out-circ":_u(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Du.linear;var r=Tu(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":_u};function Cu(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var a=i(t,n,r);return null==e||((e.roundValue||e.color)&&(a=Math.round(a)),void 0!==e.min&&(a=Math.max(a,e.min)),void 0!==e.max&&(a=Math.min(a,e.max))),a}function Nu(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Au(e,t,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var o=Nu(e,i),s=Nu(t,i);if(_(o)&&_(s))return Cu(a,o,s,n,r);if(w(o)&&w(s)){for(var l=[],u=0;u0?("spring"===h&&d.push(o.duration),o.easingImpl=Du[h].apply(null,d)):o.easingImpl=Du[h]}var p,g=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var f=o.startPosition,v=o.position;if(v&&i&&!e.locked()){var y={};Su(f.x,v.x)&&(y.x=Au(f.x,v.x,p,g)),Su(f.y,v.y)&&(y.y=Au(f.y,v.y,p,g)),e.position(y)}var m=o.startPan,x=o.pan,w=a.pan,E=null!=x&&r;E&&(Su(m.x,x.x)&&(w.x=Au(m.x,x.x,p,g)),Su(m.y,x.y)&&(w.y=Au(m.y,x.y,p,g)),e.emit("pan"));var T=o.startZoom,_=o.zoom,D=null!=_&&r;D&&(Su(T,_)&&(a.zoom=An(a.minZoom,Au(T,_,p,g),a.maxZoom)),e.emit("zoom")),(E||D)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&i){for(var N=0;N=0;t--)(0,e[t])();e.splice(0,e.length)},c=a.length-1;c>=0;c--){var h=a[c],d=h._private;d.stopped?(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||Ou(t,h,e),Lu(t,h,e,n),d.applying&&(d.applying=!1),u(d.frames),null!=d.step&&d.step(e),h.completed()&&(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.completes)),s=!0)}return n||0!==a.length||0!==o.length||r.push(t),s}for(var a=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var ku={animate:hs.animate(),animation:hs.animation(),animated:hs.animated(),clearQueue:hs.clearQueue(),delay:hs.delay(),delayAnimation:hs.delayAnimation(),stop:hs.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Iu(n,e)}),t.beforeRenderPriorities.animations):n()}function n(){e._private.animationsRunning&&nt((function(t){Iu(t,e),n()}))}}},Mu={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&A(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Pu=function(e){return b(e)?new Ps(e):e},Ru={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Rl(Mu,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Pu(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Pu(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Pu(t),n),this},once:function(e,t,n){return this.emitter().one(e,Pu(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};hs.eventAliasesOn(Ru);var Bu={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Bu.jpeg=Bu.jpg;var Fu={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var i;i=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var a=new r(Q({},e,{cy:t,eles:i}));return a}Dt("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Dt("A `name` must be specified to make a layout");else Dt("Layout options must be specified to make a layout")}};Fu.createLayout=Fu.makeLayout=Fu.layout;var zu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Yu.invalidateDimensions=Yu.resize;var Xu={collection:function(e,t){return b(e)?this.$(e):N(e)?e.collection():w(e)?(t||(t={}),new bu(this,e,t.unique,t.removed)):new bu(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Xu.elements=Xu.filter=Xu.$;var Vu={},Uu="t",ju="f";Vu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(d||h&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var f=0;f1&&(v=1),s.color){var w=i.valueMin[0],E=i.valueMax[0],T=i.valueMin[1],D=i.valueMax[1],C=i.valueMin[2],N=i.valueMax[2],A=null==i.valueMin[3]?1:i.valueMin[3],L=null==i.valueMax[3]?1:i.valueMax[3],S=[Math.round(w+(E-w)*v),Math.round(T+(D-T)*v),Math.round(C+(N-C)*v),Math.round(A+(L-A)*v)];n={bypass:i.bypass,name:i.name,value:S,strValue:"rgb("+S[0]+", "+S[1]+", "+S[2]+")"}}else{if(!s.number)return!1;var O=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,O,i.bypass,d)}if(!n)return f(),!1;n.mapping=i,i=n;break;case o.data:for(var I=i.field.split("."),k=h.data,M=0;M0&&a>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},Vu.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);null!=s&&s(n,r)&&a(o)},Vu.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},Vu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||("curve-style"!==t||"bezier"!==n&&"bezier"!==r)&&("display"!==t||"none"!==n&&"none"!==r)||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()}))}))},Vu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Hu={applyBypass:function(e,t,n,r){var i=this,a=[],o=!0;if("*"===t||"**"===t){if(void 0!==n)for(var s=0;st.length?o.substr(t.length):""}function l(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");!o.match(/^\s*$/);){var u=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){Nt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}t=u[0];var c=u[1];if("core"!==c&&new Ps(c).invalid)Nt("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),s();else{var h=u[2],d=!1;n=h;for(var p=[];!n.match(/^\s*$/);){var g=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!g){Nt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}r=g[0];var f=g[1],v=g[2];i.properties[f]?a.parse(f,v)?(p.push({name:f,val:v}),l()):(Nt("Skipping property: Invalid property definition in: "+r),l()):(Nt("Skipping property: Invalid property name in: "+r),l())}if(d){s();break}a.selector(c);for(var y=0;y=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var d=s.data;return{name:e,value:u,strValue:""+t,mapped:d,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var p=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,c[4]);if(!g||g.mapped)return!1;var f=this.parse(e,c[5]);if(!f||f.mapped)return!1;if(g.pfValue===f.pfValue||g.strValue===f.strValue)return Nt("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,y=f.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:g.value,valueMax:f.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):w(t)?t:[t],h.evenMultiple&&m.length%2!=0)return null;for(var E=[],T=[],_=[],C="",N=!1,A=0;A0?" ":"")+L.strValue}return h.validate&&!h.validate(E,T)?null:h.singleEnum&&N?1===E.length&&b(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:_,strValue:C,bypass:n,units:T}}var S=function(){for(var r=0;rh.max||h.strictMax&&t===h.max))return null;var P={name:e,value:t,strValue:""+t+(O||""),units:O,bypass:n};return h.unitless||"px"!==O&&"em"!==O?P.pfValue=t:P.pfValue="px"!==O&&O?this.getEmSizeInPixels()*t:t,"ms"!==O&&"s"!==O||(P.pfValue="ms"===O?t:1e3*t),"deg"!==O&&"rad"!==O||(P.pfValue="rad"===O?t:mn(t)),"%"===O&&(P.pfValue=t/100),P}if(h.propList){var R=[],B=""+t;if("none"===B);else{for(var F=B.split(/\s*,\s*|\s+/),G=0;G0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((o-2*t)/n.w,(s-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,a=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),_(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=hn(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;_(l.x)&&(t.pan.x=l.x,o=!1),_(l.y)&&(t.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(b(e)){var n=e;e=this.mutableElements().filter(n)}else N(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),a=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=d.getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};rc.centre=rc.center,rc.autolockNodes=rc.autolock,rc.autoungrabifyNodes=rc.autoungrabify;var ic={data:hs.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:hs.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:hs.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:hs.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ic.attr=ic.data,ic.removeAttr=ic.removeData;var ac=function(e){var t=this,n=(e=Q({},e)).container;n&&!C(n)&&C(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=void 0!==d&&void 0!==n&&!e.headless,o=e;o.layout=Q({name:a?"grid":"null"},o.layout),o.renderer=Q({name:a?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new bu(this),listeners:[],aniEles:new bu(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:_(o.zoom)?o.zoom:1,pan:{x:E(o.pan)&&_(o.pan.x)?o.pan.x:0,y:E(o.pan)&&_(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var u=function(e,t){if(e.some(R))return Gi.all(e).then(t);t(e)};l.styleEnabled&&t.setStyle([]);var c=Q({},o,o.renderer);t.initRenderer(c);var h=function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(E(e)||w(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var a=Q({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()};u([o.style,o.elements],(function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),h(a,(function(){t.startAnimationLoop(),l.ready=!0,x(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=Ln(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(N(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],h=0;h0;){var M=k(),P=L(M,O);if(P)M.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(I);else if(null===P){Nt("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}A();var R=0;if(n.avoidOverlap)for(var B=0;B0&&y[0].length<=3?l/2:0),h=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(c=1),{x:$.x+c*Math.cos(h),y:$.y+c*Math.sin(h)}}return{x:$.x+(i+1-(a+1)/2)*o,y:(r+1)*s}};return i.nodes().layoutPositions(this,n,Q),this};var hc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,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:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function dc(e){this.options=Q({},hc,e)}dc.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var o,s=Ln(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},u=(void 0===t.sweep?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),c=0,h=0;h1&&t.avoidOverlap){c*=1.75;var f=Math.cos(u)-Math.cos(0),v=Math.sin(u)-Math.sin(0),y=Math.sqrt(c*c/(f*f+v*v));o=Math.max(y,o)}var m=function(e,n){var r=t.startAngle+n*u*(i?1:-1),a=o*Math.cos(r),s=o*Math.sin(r);return{x:l.x+a,y:l.y+s}};return r.nodes().layoutPositions(this,t,m),this};var pc,gc={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function fc(e){this.options=Q({},gc,e)}fc.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,a=i.nodes().not(":parent"),o=Ln(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=[],u=0,c=0;c0&&Math.abs(y[0].value-b.value)>=f&&(y=[],v.push(y)),y.push(b)}var x=u+t.minNodeSpacing;if(!t.avoidOverlap){var w=v.length>0&&v[0].length>1,E=(Math.min(o.w,o.h)/2-x)/(v.length+w?1:0);x=Math.min(x,E)}for(var T=0,_=0;_1&&t.avoidOverlap){var A=Math.cos(N)-Math.cos(0),L=Math.sin(N)-Math.sin(0),S=Math.sqrt(x*x/(A*A+L*L));T=Math.max(S,T)}D.r=T,T+=x}if(t.equidistant){for(var O=0,I=0,k=0;k=e.numIter||(Dc(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&a(),nt(t)):(Bc(r,e),s())}();else{for(;u;)u=o(l),l++;Bc(r,e),s()}return this},yc.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},yc.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var mc,bc=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:Ln(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},o=n.eles.components(),s={},l=0;l0)for(a.graphSet.push(w),l=0;lr.count?0:r.graph},wc=function e(t,n,r,i){var a=i.graphSet[r];if(-10)var l=(c=r.nodeOverlap*s)*i/(v=Math.sqrt(i*i+a*a)),u=c*a/v;else{var c,h=Sc(e,i,a),d=Sc(t,-1*i,-1*a),p=d.x-h.x,g=d.y-h.y,f=p*p+g*g,v=Math.sqrt(f);l=(c=(e.nodeRepulsion+t.nodeRepulsion)/f)*p/v,u=c*g/v}e.isLocked||(e.offsetX-=l,e.offsetY-=u),t.isLocked||(t.offsetX+=l,t.offsetY+=u)}},Lc=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Sc=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return 0===t&&0n?(u.x=r,u.y=i+a/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-a*t/2/n,u.y=i-a/2,u):u},Oc=function(e,t){for(var n=0;nn){var f=t.gravity*d/g,v=t.gravity*p/g;h.offsetX+=f,h.offsetY+=v}}}}},kc=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},Rc=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],a=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(null==i.minY||t.minY-i.padTopg&&(h+=p+t.componentSpacing,c=0,d=0,p=0)}}},Fc={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:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function zc(e){this.options=Q({},Fc,e)}zc.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=Ln(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,t,(function(e){return{x:a.x1,y:a.y1}}));else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},h=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},d=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=d&&null!=p)l=d,u=p;else if(null!=d&&null==p)l=d,u=Math.ceil(o/l);else if(null==d&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var g=c(),f=h();(g-1)*f>=o?c(g-1):(f-1)*g>=o&&h(f-1)}else for(;u*l=o?h(y+1):c(v+1)}var m=a.w/u,b=a.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(O=0,S++)},k={},M=0;M(r=qn(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,w=0;w+5(r=Hn(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||i.source,b=b||i.target;var E=o.getArrowWidth(l,c),T=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return Ft(e,t,n)}function x(n,r){var i,a=n._private,o=g;i=r?r+"-":"",n.boundingBox();var s=a.labelBounds[r||"main"],l=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(a.rscratch,"labelX",r),c=b(a.rscratch,"labelY",r),h=b(a.rscratch,"labelAngle",r),d=n.pstyle(i+"text-margin-x").pfValue,p=n.pstyle(i+"text-margin-y").pfValue,f=s.x1-o-d,y=s.x2+o-d,m=s.y1-o-p,x=s.y2+o-p;if(h){var w=Math.cos(h),E=Math.sin(h),T=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},_=T(f,m),D=T(f,x),C=T(y,m),N=T(y,x),A=[_.x+d,_.y+p,C.x+d,C.y+p,N.x+d,N.y+p,D.x+d,D.y+p];if(Wn(e,t,A))return v(n),!0}else if(Fn(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i=this.getCachedZSortedEles().interactive,a=[],o=Math.min(e,n),s=Math.max(e,n),l=Math.min(t,r),u=Math.max(t,r),c=Ln({x1:e=o,y1:t=l,x2:n=s,y2:r=u}),h=0;h0?Math.max(e-t,0):Math.min(e+t,0)},A=N(D,T),L=N(C,_),S=!1;y===u?v=Math.abs(A)>Math.abs(L)?i:r:y===l||y===s?(v=r,S=!0):y!==a&&y!==o||(v=i,S=!0);var O,I=v===r,k=I?L:A,M=I?C:D,P=wn(M),R=!1;S&&(b||w)||!(y===s&&M<0||y===l&&M>0||y===a&&M>0||y===o&&M<0)||(k=(P*=-1)*Math.abs(k),R=!0);var B=function(e){return Math.abs(e)=Math.abs(k)},F=B(O=b?(x<0?1+x:x)*k:(x<0?k:0)+x*P),z=B(Math.abs(k)-Math.abs(O));if(!F&&!z||R)if(I){var G=c.y1+O+(f?d/2*P:0),Y=c.x1,X=c.x2;n.segpts=[Y,G,X,G]}else{var V=c.x1+O+(f?h/2*P:0),U=c.y1,j=c.y2;n.segpts=[V,U,V,j]}else if(I){var H=Math.abs(M)<=d/2,q=Math.abs(D)<=p/2;if(H){var W=(c.x1+c.x2)/2,$=c.y1,K=c.y2;n.segpts=[W,$,W,K]}else if(q){var Z=(c.y1+c.y2)/2,Q=c.x1,J=c.x2;n.segpts=[Q,Z,J,Z]}else n.segpts=[c.x1,c.y2]}else{var ee=Math.abs(M)<=h/2,te=Math.abs(C)<=g/2;if(ee){var ne=(c.y1+c.y2)/2,re=c.x1,ie=c.x2;n.segpts=[re,ne,ie,ne]}else if(te){var ae=(c.x1+c.x2)/2,oe=c.y1,se=c.y2;n.segpts=[ae,oe,ae,se]}else n.segpts=[c.x2,c.y1]}},Jc.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,h=!_(n.startX)||!_(n.startY),d=!_(n.arrowStartX)||!_(n.arrowStartY),p=!_(n.endX)||!_(n.endY),g=!_(n.arrowEndX)||!_(n.arrowEndY),f=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,v=En({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),y=vd.poolIndex()){var p=h;h=d,d=p}var g=s.srcPos=h.position(),f=s.tgtPos=d.position(),v=s.srcW=h.outerWidth(),y=s.srcH=h.outerHeight(),m=s.tgtW=d.outerWidth(),b=s.tgtH=d.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(h)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(d)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var E=0;E0){var X=u,V=Tn(X,pn(t)),U=Tn(X,pn(Y)),j=V;U2&&Tn(X,{x:Y[2],y:Y[3]})0){var ie=c,ae=Tn(ie,pn(t)),oe=Tn(ie,pn(re)),se=ae;oe2&&Tn(ie,{x:re[2],y:re[3]})=u||m){c={cp:f,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-d)/x.length,E=x.t1-x.t0,T=s?x.t0+E*w:x.t1-E*w;T=An(0,T,1),t=Cn(b.p0,b.p1,b.p2,T),i=sh(b.p0,b.p1,b.p2,T);break;case"straight":case"segments":case"haystack":for(var _,D,C,N,A=0,L=r.allpts.length,S=0;S+3=u));S+=2);var O=(u-D)/_;O=An(0,O,1),t=Nn(C,N,O),i=oh(C,N)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},ih.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},ih.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=Ft(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=i.height/l,c=u*a,h=i.width,d=i.height+(l-1)*(a-1)*u;zt(n.rstyle,"labelWidth",t,h),zt(n.rscratch,"labelWidth",t,h),zt(n.rstyle,"labelHeight",t,d),zt(n.rscratch,"labelHeight",t,d),zt(n.rscratch,"labelLineHeight",t,c)},ih.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,o=function(e,r){return r?(zt(n.rscratch,e,t,r),r):Ft(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u="\u200b",c=i.split("\n"),h=e.pstyle("text-max-width").pfValue,d="anywhere"===e.pstyle("text-overflow-wrap").value,p=[],g=/[\s\u200b]+/,f=d?"":" ",v=0;vh){for(var x=y.split(g),w="",E=0;ED);L++)C+=i[L],L===i.length-1&&(A=!0);return A||(C+=N),C}return i},ih.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},ih.calculateLabelDimensions=function(e,t){var n=this,r=gt(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),a=i[r];if(null!=a)return a;var o=0,s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=document.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var p=h.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var g=0,f=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var C=r(t);v&&(e.hoverData.tapholdCancelled=!0);var N=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])};a=!0,n(g,["mousemove","vmousemove","tapdrag"],t,{x:u[0],y:u[1]});var L=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:u[0],y:u[1]}}),d[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var S={originalEvent:t,type:"cxtdrag",position:{x:u[0],y:u[1]}};m?m.emit(S):o.emit(S),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&g===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:u[0],y:u[1]}}),e.hoverData.cxtOver=g,g&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:u[0],y:u[1]}}))}}else if(e.hoverData.dragging){if(a=!0,o.panningEnabled()&&o.userPanningEnabled()){var O;if(e.hoverData.justStartedPan){var I=e.hoverData.mdownPos;O={x:(u[0]-I[0])*s,y:(u[1]-I[1])*s},e.hoverData.justStartedPan=!1}else O={x:b[0]*s,y:b[1]*s};o.panBy(O),o.emit("dragpan"),e.hoverData.dragged=!0}u=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=d[4]||null!=m&&!m.pannable()){if(m&&m.pannable()&&m.active()&&m.unactivate(),m&&m.grabbed()||g==y||(y&&n(y,["mouseout","tapdragout"],t,{x:u[0],y:u[1]}),g&&n(g,["mouseover","tapdragover"],t,{x:u[0],y:u[1]}),e.hoverData.last=g),m)if(v){if(o.boxSelectionEnabled()&&C)m&&m.grabbed()&&(f(x),m.emit("freeon"),x.emit("free"),e.dragData.didDrag&&(m.emit("dragfreeon"),x.emit("dragfree"))),L();else if(m&&m.grabbed()&&e.nodeIsDraggable(m)){var k=!e.dragData.didDrag;k&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||p(x,{inDragLayer:!0});var M={x:0,y:0};if(_(b[0])&&_(b[1])&&(M.x+=b[0],M.y+=b[1],k)){var P=e.hoverData.dragDelta;P&&_(P[0])&&_(P[1])&&(M.x+=P[0],M.y+=P[1])}e.hoverData.draggingEles=!0,x.silentShift(M).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else N();a=!0}else v&&(e.hoverData.dragging||!o.boxSelectionEnabled()||!C&&o.panningEnabled()&&o.userPanningEnabled()?!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()&&i(m,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,d[4]=0,e.data.bgActivePosistion=pn(c),e.redrawHint("select",!0),e.redraw()):L(),m&&m.pannable()&&m.active()&&m.unactivate());return d[2]=u[0],d[3]=u[1],a?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(i){if(e.hoverData.capture){e.hoverData.capture=!1;var a=e.cy,o=e.projectIntoViewport(i.clientX,i.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=r(i);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var d={originalEvent:i,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(d):a.emit(d),!e.hoverData.cxtDragged){var p={originalEvent:i,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(p):a.emit(p)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(n(l,["mouseup","tapend","vmouseup"],i,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(n(c,["click","tap","vclick"],i,{x:o[0],y:o[1]}),D=!1,i.timeStamp-C<=a.multiClickDebounceTime()?(T&&clearTimeout(T),D=!0,C=null,n(c,["dblclick","dbltap","vdblclick"],i,{x:o[0],y:o[1]})):(T=setTimeout((function(){D||n(c,["oneclick","onetap","voneclick"],i,{x:o[0],y:o[1]})}),a.multiClickDebounceTime()),C=i.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||r(i)||(a.$(t).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=a.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===a.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(a.$(t).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=a.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),a.emit({type:"boxend",originalEvent:i,position:{x:o[0],y:o[1]}});var v=function(e){return e.selectable()&&!e.selected()};"additive"===a.selectionType()||h||a.$(t).unmerge(g).unselect(),g.emit("box").stdFilter(v).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();f(u),y&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var L,S,O,I,k,M,P,R,B,F,z,G,Y,X=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),a=e.projectIntoViewport(t.clientX,t.clientY),o=[a[0]*r+i.x,a[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||N())t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",X,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||X(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var V,U,j,H,q,W,$,K=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},Z=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",V=function(t){if(e.hasTouchStarted=!0,A(t)){y(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,i=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=o[0],i[1]=o[1]}if(t.touches[1]&&(o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=o[0],i[3]=o[1]),t.touches[2]&&(o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=o[0],i[5]=o[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,f(e.dragData.touchDragEles);var s=e.findContainerClientCoords();B=s[0],F=s[1],z=s[2],G=s[3],L=t.touches[0].clientX-B,S=t.touches[0].clientY-F,O=t.touches[1].clientX-B,I=t.touches[1].clientY-F,Y=0<=L&&L<=z&&0<=O&&O<=z&&0<=S&&S<=G&&0<=I&&I<=G;var l=r.pan(),c=r.zoom();k=K(L,S,O,I),M=Z(L,S,O,I),R=[((P=[(L+O)/2,(S+I)/2])[0]-l.x)/c,(P[1]-l.y)/c];var h=200;if(M=1){for(var T=e.touchData.startPosition=[],_=0;_=e.touchTapThreshold2}if(r&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-B,w=t.touches[0].clientY-F,E=t.touches[1].clientX-B,T=t.touches[1].clientY-F,D=Z(x,w,E,T),C=150,N=1.5;if(D/M>=N*N||D>=C*C){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var P={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(P),e.touchData.start=null):o.emit(P)}}if(r&&e.touchData.cxt){P={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(P):o.emit(P),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var z=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&z===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=z,z&&z.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(r&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ne=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var G=0;G0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(window,"touchcancel",j=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",H=function(r){var i=e.touchData.start;if(e.touchData.capture){0===r.touches.length&&(e.touchData.capture=!1),r.preventDefault();var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(r.touches[0]){var h=e.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(r.touches[1]&&(h=e.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY),u[2]=h[0],u[3]=h[1]),r.touches[2]&&(h=e.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY),u[4]=h[0],u[5]=h[1]),i&&i.unactivate(),e.touchData.cxt){if(o={originalEvent:r,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(o):s.emit(o),!e.touchData.cxtDragged){var d={originalEvent:r,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(d):s.emit(d)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:u[0],y:u[1]}});var g=function(e){return e.selectable()&&!e.selected()};p.emit("box").stdFilter(g).select().emit("boxselect"),p.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),r.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var v=e.dragData.touchDragEles;if(null!=i){var y=i._private.grabbed;f(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(i.emit("freeon"),v.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),v.emit("dragfree"))),n(i,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);n(m,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]})}var b=e.touchData.startPosition[0]-u[0],x=b*b,w=e.touchData.startPosition[1]-u[1],E=(x+w*w)*l*l;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),n(i,["tap","vclick"],r,{x:u[0],y:u[1]}),q=!1,r.timeStamp-$<=s.multiClickDebounceTime()?(W&&clearTimeout(W),q=!0,$=null,n(i,["dbltap","vdblclick"],r,{x:u[0],y:u[1]})):(W=setTimeout((function(){q||n(i,["onetap","voneclick"],r,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),$=r.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&E0)return p[0]}return null},d=Object.keys(c),p=0;p0?l:Yn(i,a,e,t,n,r,o)},checkPoint:function(e,t,n,r,i,a,o){var s=cr(r,i),l=2*s;if($n(e,t,this.points,a,o,r,i-l,[0,-1],n))return!0;if($n(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,c=i/2+2*n;return!!Wn(e,t,[a-u,o-c,a-u,o,a+u,o,a+u,o-c])||!!er(e,t,l,l,a+r/2-s,o+i/2-s,n)||!!er(e,t,l,l,a-r/2+s,o+i/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",sr(3,0)),this.generateRoundPolygon("round-triangle",sr(3,0)),this.generatePolygon("rectangle",sr(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",sr(5,0)),this.generateRoundPolygon("round-pentagon",sr(5,0)),this.generatePolygon("hexagon",sr(6,0)),this.generateRoundPolygon("round-hexagon",sr(6,0)),this.generatePolygon("heptagon",sr(7,0)),this.generateRoundPolygon("round-heptagon",sr(7,0)),this.generatePolygon("octagon",sr(8,0)),this.generateRoundPolygon("round-octagon",sr(8,0));var r=new Array(20),i=ur(5,0),a=ur(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*f)break}else if(i){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*wh)break;var v=e.deq(t,h,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,c)&&r())},a=e.priority||_t;n.beforeRender(i,a(t))}}}},Th=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Et;t(this,e),this.idsByKey=new Yt,this.keyForId=new Yt,this.cachesByLvl=new Yt,this.lvls=[],this.getKey=n,this.doesEleInvalidateKey=r}return i(e,[{key:"getIdsFor",value:function(e){null==e&&Dt("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Ut,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Yt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),_h=25,Dh=50,Ch=-4,Nh=3,Ah=7.99,Lh=8,Sh=1024,Oh=1024,Ih=1024,kh=.2,Mh=.8,Ph=10,Rh=.15,Bh=.1,Fh=.9,zh=.9,Gh=100,Yh=1,Xh={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Vh=Mt({getKey:null,doesEleInvalidateKey:Et,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:wt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Uh=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Vh(t);Q(n,r),n.lookup=new Th(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},jh=Uh.prototype;jh.reasons=Xh,jh.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},jh.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},jh.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new $t((function(e,t){return t.reqs-e.reqs}))},jh.getElementKeyToQueue=function(){var e=this;return e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{}},jh.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(xn(s*n))),r=Ah||r>Nh)return null;var u=Math.pow(2,r),c=t.h*u,h=t.w*u,d=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p,g=l.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(p=c<=_h?_h:c<=Dh?Dh:Math.ceil(c/Dh)*Dh,c>Ih||h>Oh)return null;var f=a.getTextureQueue(p),v=f[f.length-2],y=function(){return a.recycleTexture(p,h)||a.addTexture(p,h)};v||(v=f[f.length-1]),v||(v=y()),v.width-v.usedWidthr;N--)D=a.getElement(e,t,n,N,Xh.downscale);C()}else{var A;if(!x&&!w&&!E)for(var L=r-1;L>=Ch;L--){var S=l.get(e,L);if(S){A=S;break}}if(b(A))return a.queueElement(e,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:c,scaledLabelShown:d},v.usedWidth+=Math.ceil(h+Lh),v.eleCaches.push(g),l.set(e,r,g),a.checkTextureFullness(v),g},jh.invalidateElements=function(e){for(var t=0;t=kh*e.width&&this.retireTexture(e)},jh.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>Mh&&e.fullnessChecks>=Ph?Pt(t,e):e.fullnessChecks++},jh.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n),i=this.lookup;Pt(r,e),e.retired=!0;for(var a=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Rt(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Pt(i,o),r.push(o),o}},jh.queueElement=function(e,t){var n=this,r=n.getElementQueue(),i=n.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,r.updateItem(o);else{var s={eles:e.spawn().merge(e),level:t,reqs:1,key:a};r.push(s),i[a]=s}},jh.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=a.hasCache(u,s.level);if(r[l]=null,!c){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,Xh.dequeue)}}return i},jh.removeFromQueue=function(e){var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=this.getKey(e),a=r[i];null!=a&&(1===a.eles.length?(a.reqs=xt,n.updateItem(a),n.pop(),r[i]=null):a.eles.unmerge(e))},jh.onDequeue=function(e){this.onDequeues.push(e)},jh.offDequeue=function(e){Pt(this.onDequeues,e)},jh.setupDequeueing=Eh.setupDequeueing({deqRedrawThreshold:Gh,deqCost:Rh,deqAvgCost:Bh,deqNoDrawCost:Fh,deqFastCost:zh,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=$h||n>Wh)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[],h=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},i=function(e){if(!s)for(var r=n+e;qh<=r&&r<=Wh&&!t(r);r+=e);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var o=c[a];o.invalid&&Pt(c,o)}};if(r.levelIsComplete(n,e))return c;h();var d=function(){if(!o){o=Ln();for(var t=0;tid)return null;var i=r.makeLayer(o,n);if(null!=t){var a=c.indexOf(t)+1;c.splice(a,0,i)}else(void 0===e.insert||e.insert)&&c.unshift(i);return i};if(r.skipping&&!a)return null;for(var g=null,f=e.length/Hh,v=!a,y=0;y=f||!Gn(g.bb,m.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;s||v?r.queueLayer(g,m):r.drawEleInLayer(g,m,n,t),g.eles.push(m),x[n]=g}}return s||(v?null:c)},sd.getEleLevelForLayerLevel=function(e,t){return e},sd.drawEleInLayer=function(e,t,n,r){var i=this,a=this.renderer,o=e.context,s=t.boundingBox();0!==s.w&&0!==s.h&&t.visible()&&(n=i.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,ad),a.setImgSmoothing(o,!0))},sd.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===t.length},sd.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){t=!0;break}}return t},sd.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=rt(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},sd.invalidateLayer=function(e){if(this.lastInvalidationTime=rt(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Pt(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!a||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,c=a?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,f=u*c,v=u*c,y=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;"straight-triangle"===h?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=g,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")},m=function(){i&&o.drawEdgeOverlay(e,t)},b=function(){i&&o.drawEdgeUnderlay(e,t)},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;o.drawArrowheads(e,t,n)},w=function(){o.drawElementText(e,t,null,r)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var E=t.pstyle("ghost-offset-x").pfValue,T=t.pstyle("ghost-offset-y").pfValue,_=t.pstyle("ghost-opacity").value,D=f*_;e.translate(E,T),y(D),x(D),e.translate(-E,-T)}b(),y(),x(),m(),w(),n&&e.translate(l.x1,l.y1)}}},Dd=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||a?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,"solid")}}}};_d.drawEdgeOverlay=Dd("overlay"),_d.drawEdgeUnderlay=Dd("underlay"),_d.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,s=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5;e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath(),e.fill()}Nd.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(xn(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(a&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),h=t.pstyle("source-label"),d=t.pstyle("target-label");if(u||(!c||!c.value)&&(!h||!h.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,g=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==i?(o.drawText(e,t,null,g,a),t.isEdge()&&(o.drawText(e,t,"source",g,a),o.drawText(e,t,"target",g,a))):o.drawText(e,t,i,g,a),n&&e.translate(p.x1,p.y1)},Nd.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Nd.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),a=Ft(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?a:0:"none"===i.strValue?0:i.pfValue},Nd.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!i||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=Ft(a,"labelX",n),c=Ft(a,"labelY",n),h=this.getLabelText(t,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,i);var d,p=n?n+"-":"",g=Ft(a,"labelWidth",n),f=Ft(a,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(d),u=0,c=0),x){case"top":break;case"center":c+=f/2;break;case"bottom":c+=f}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,T=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue;if(w>0||T>0&&E>0){var D=u-_;switch(b){case"left":D-=g;break;case"center":D-=g/2}var C=c-f-_,N=g+2*_,A=f+2*_;if(w>0){var L=e.fillStyle,S=t.pstyle("text-background-color").value;e.fillStyle="rgba("+S[0]+","+S[1]+","+S[2]+","+w*o+")",0===t.pstyle("text-background-shape").strValue.indexOf("round")?Ad(e,D,C,N,A,2):e.fillRect(D,C,N,A),e.fillStyle=L}if(T>0&&E>0){var O=e.strokeStyle,I=e.lineWidth,k=t.pstyle("text-border-color").value,M=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+k[0]+","+k[1]+","+k[2]+","+E*o+")",e.lineWidth=T,e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=T/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(D,C,N,A),"double"===M){var P=T/2;e.strokeRect(D+P,C+P,N-2*P,A-2*P)}e.setLineDash&&e.setLineDash([]),e.lineWidth=I,e.strokeStyle=O}}var R=2*t.pstyle("text-outline-width").pfValue;if(R>0&&(e.lineWidth=R),"wrap"===t.pstyle("text-wrap").value){var B=Ft(a,"labelWrapCachedLines",n),F=Ft(a,"labelLineHeight",n),z=g/2,G=this.getLabelJustification(t);switch("auto"===G||("left"===b?"left"===G?u+=-g:"center"===G&&(u+=-z):"center"===b?"left"===G?u+=-z:"right"===G&&(u+=z):"right"===b&&("center"===G?u+=z:"right"===G&&(u+=g))),x){case"top":case"center":case"bottom":c-=(B.length-1)*F}for(var Y=0;Y0&&e.strokeText(B[Y],u,c),e.fillText(B[Y],u,c),c+=F}else R>0&&e.strokeText(h,u,c),e.fillText(h,u,c);0!==d&&(e.rotate(-d),e.translate(-s,-l))}}};var Ld={drawNode:function(e,t,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,h=t.position();if(_(h.x)&&_(h.y)&&(!s||t.visible())){var d,p,g=s?t.effectiveOpacity():1,f=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,i=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:A;l.eleFillStyle(e,t,n)},k=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;l.colorStrokeStyle(e,L[0],L[1],L[2],t)},M=t.pstyle("shape").strValue,P=t.pstyle("shape-polygon-points").pfValue;if(f){e.translate(h.x,h.y);var R=l.nodePathCache=l.nodePathCache||[],B=ft("polygon"===M?M+","+P.join(","):M,""+i,""+r),F=R[B];null!=F?(d=F,v=!0,c.pathCache=d):(d=new Path2D,R[B]=c.pathCache=d)}var z=function(){if(!v){var n=h;f&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(d||e,n.x,n.y,r,i)}f?e.fill(d):e.fill()},G=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,a=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;l.hasPie(t)&&(l.drawPie(e,t,a),n&&(f||l.nodeShapes[l.getNodeShape(t)].draw(e,h.x,h.y,r,i)))},X=function(){var t=(C>0?C:-C)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=C>0?0:255;0!==C&&(l.colorFillStyle(e,n,n,n,t),f?e.fill(d):e.fill())},V=function(){if(N>0){if(e.lineWidth=N,e.lineCap="butt",e.setLineDash)switch(S){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(f?e.stroke(d):e.stroke(),"double"===S){e.lineWidth=N/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(d):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},U=function(){o&&l.drawNodeOverlay(e,t,h,r,i)},j=function(){o&&l.drawNodeUnderlay(e,t,h,r,i)},H=function(){l.drawElementText(e,t,null,a)};if("yes"===t.pstyle("ghost").value){var q=t.pstyle("ghost-offset-x").pfValue,W=t.pstyle("ghost-offset-y").pfValue,$=t.pstyle("ghost-opacity").value,K=$*g;e.translate(q,W),I($*A),z(),G(K,!0),k($*O),V(),Y(0!==C||0!==N),G(K,!1),X(K),e.translate(-q,-W)}f&&e.translate(-h.x,-h.y),j(),f&&e.translate(h.x,h.y),I(),z(),G(g,!0),k(),V(),Y(0!==C||0!==N),G(g,!1),X(),f&&e.translate(-h.x,-h.y),H(),U(),n&&e.translate(p.x1,p.y1)}}},Sd=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,i,a){var o=this;if(n.visible()){var s=n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-opacity")).value,u=n.pstyle("".concat(e,"-color")).value,c=n.pstyle("".concat(e,"-shape")).value;if(l>0){if(r=r||n.position(),null==i||null==a){var h=n.padding();i=n.width()+2*h,a=n.height()+2*h}o.colorFillStyle(t,u[0],u[1],u[2],l),o.nodeShapes[c].draw(t,r.x,r.y,i+2*s,a+2*s),t.fill()}}}};Ld.drawNodeOverlay=Sd("overlay"),Ld.drawNodeUnderlay=Sd("underlay"),Ld.hasPie=function(e){return(e=e[0])._private.hasPie},Ld.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,h=0;this.usePaths()&&(o=0,s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var p=t.pstyle("pie-"+d+"-background-size").value,g=t.pstyle("pie-"+d+"-background-color").value,f=t.pstyle("pie-"+d+"-background-opacity").value*n,v=p/100;v+h>1&&(v=1-h);var y=1.5*Math.PI+2*Math.PI*h,m=y+2*Math.PI*v;0===p||h>=1||h+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],f),e.fill(),h+=v)}};var Od={},Id=100;Od.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},Od.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;io.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!h&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==i?i:b,w=l.pan(),E={x:w.x,y:w.y},T={zoom:b,pan:{x:w.x,y:w.y}},_=o.prevViewport;void 0===_||T.zoom!==_.zoom||T.pan.x!==_.pan.x||T.pan.y!==_.pan.y||f&&!g||(o.motionBlurPxRatio=1),a&&(E=a),x*=s,E.x*=s,E.y*=s;var D=o.getCachedZSortedEles();function C(e,t,n,r,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=a}function N(e,r){var s,l,c,h;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,h=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,h=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,c,h):t||void 0!==r&&!r||e.clearRect(0,0,c,h),n||(e.translate(s.x,s.y),e.scale(l,l)),a&&e.translate(a.x,a.y),i&&e.scale(i,i)}if(h||(o.textureDrawLastFrame=!1),h){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var A=o.data.bufferContexts[o.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(T=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-T.pan.x)/T.zoom,y:(0-T.pan.y)/T.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var L=u.contexts[o.NODE],S=o.textureCache.texture;T=o.textureCache.viewport,L.setTransform(1,0,0,1,0,0),d?C(L,0,0,T.width,T.height):L.clearRect(0,0,T.width,T.height);var O=m.core("outside-texture-bg-color").value,I=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(L,O[0],O[1],O[2],I),L.fillRect(0,0,T.width,T.height),b=l.zoom(),N(L,!1),L.clearRect(T.mpan.x,T.mpan.y,T.width/T.zoom/s,T.height/T.zoom/s),L.drawImage(S,T.mpan.x,T.mpan.y,T.width/T.zoom/s,T.height/T.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var k=l.extent(),M=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),P=o.hideEdgesOnViewport&&M,R=[];if(R[o.NODE]=!c[o.NODE]&&d&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,R[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),R[o.DRAG]=!c[o.DRAG]&&d&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,R[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||R[o.NODE]){var B=d&&!R[o.NODE]&&1!==p;N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.nondrag,s,k):o.drawLayeredElements(L,D.nondrag,s,k),o.debug&&o.drawDebugPoints(L,D.nondrag),n||d||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||R[o.DRAG])&&(B=d&&!R[o.DRAG]&&1!==p,N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.drag,s,k):o.drawCachedElements(L,D.drag,s,k),o.debug&&o.drawDebugPoints(L,D.drag),n||d||(c[o.DRAG]=!1)),o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(N(L=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var F=m.core("selection-box-border-width").value/b;L.lineWidth=F,L.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",L.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),F>0&&(L.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",L.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var z=u.bgActivePosistion;L.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",L.beginPath(),L.arc(z.x,z.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),L.fill()}var G=o.lastRedrawTime;if(o.showFps&&G){G=Math.round(G);var Y=Math.round(1e3/G);L.setTransform(1,0,0,1,0,0),L.fillStyle="rgba(255, 0, 0, 0.75)",L.strokeStyle="rgba(255, 0, 0, 0.75)",L.lineWidth=1,L.fillText("1 frame = "+G+" ms = "+Y+" fps",0,20);var X=60;L.strokeRect(0,30,250,20),L.fillRect(0,30,250*Math.min(Y/X,1),20)}n||(c[o.SELECT_BOX]=!1)}if(d&&1!==p){var V=u.contexts[o.NODE],U=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],j=u.contexts[o.DRAG],H=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):C(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||R[o.NODE])&&(q(V,U,R[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||R[o.DRAG])&&(q(j,H,R[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=T,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),d&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!h,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),Id)),t||l.emit("render")};for(var kd={drawPolygonPath:function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var g=t.pan(),f={x:g.x*l,y:g.y*l};l*=t.zoom(),d.translate(f.x,f.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-f.x,-f.y)}e.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=e.bg,d.rect(0,0,i,a),d.fill())}return h},Gd.png=function(e){return Vd(e,this.bufferCanvasImage(e),"image/png")},Gd.jpg=function(e){return Vd(e,this.bufferCanvasImage(e),"image/jpeg")};var Ud={nodeShapeImpl:function(e,t,n,r,i,a,o){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,a);case"polygon":return this.drawPolygonPath(t,n,r,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,i,a,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,i,a);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,i,a);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,a);case"barrel":return this.drawBarrelPath(t,n,r,i,a)}}},jd=qd,Hd=qd.prototype;function qd(e){var t=this;t.data={canvases:new Array(Hd.CANVAS_LAYERS),contexts:new Array(Hd.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Hd.CANVAS_LAYERS),bufferCanvases:new Array(Hd.BUFFER_COUNT),bufferContexts:new Array(Hd.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,i.position="relative",i.zIndex="0",i.overflow="hidden";var a=e.cy.container();a.appendChild(t.data.canvasContainer),a.style[n]=r;var o={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};B()&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var s=0;st&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),c=n(12),h=n(11);function d(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof o?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},d.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(u,1),a.target!=a.source&&a.target.edges.splice(c,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l(e=u.getTop())&&(r=e),a>(t=u.getLeft())&&(a=t)}return r==i.MAX_VALUE?null:(n=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new c(this.left,this.top))},d.prototype.updateBounds=function(e){for(var t,n,r,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,h=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g(t=f.getLeft())&&(s=t),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),h<(a=f.getBottom())&&(h=a)}var v=new u(s,c,l-s,h-c);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=v.x-o,this.right=v.x+v.width+o,this.top=v.y-o,this.bottom=v.y+v.height+o},d.calculateBounds=function(e){for(var t,n,r,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,h=e.length,d=0;d(t=p.getLeft())&&(o=t),s<(n=p.getRight())&&(s=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new u(o,l,s-o,c-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var l=0;i.forEach((function(t){t.owner==e&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=d},function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var a=(r=t).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],o=(a=a.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(ia)return n[0]=s,n[1]=i,n[2]=y,n[3]=o,!1;if(ra?(n[0]=c,n[1]=h,T=!0):(n[0]=u,n[1]=l,T=!0):D===N&&(r>a?(n[0]=s,n[1]=l,T=!0):(n[0]=d,n[1]=h,T=!0)),-C===N?a>r?(n[2]=m,n[3]=b,_=!0):(n[2]=y,n[3]=v,_=!0):C===N&&(a>r?(n[2]=f,n[3]=v,_=!0):(n[2]=x,n[3]=b,_=!0)),T&&_)return!1;if(r>a?i>o?(A=this.getCardinalDirection(D,N,4),L=this.getCardinalDirection(C,N,2)):(A=this.getCardinalDirection(-D,N,3),L=this.getCardinalDirection(-C,N,1)):i>o?(A=this.getCardinalDirection(-D,N,1),L=this.getCardinalDirection(-C,N,3)):(A=this.getCardinalDirection(D,N,2),L=this.getCardinalDirection(C,N,4)),!T)switch(A){case 1:O=l,S=r+-g/N,n[0]=S,n[1]=O;break;case 2:S=d,O=i+p*N,n[0]=S,n[1]=O;break;case 3:O=h,S=r+g/N,n[0]=S,n[1]=O;break;case 4:S=c,O=i+-p*N,n[0]=S,n[1]=O}if(!_)switch(L){case 1:k=v,I=a+-E/N,n[2]=I,n[3]=k;break;case 2:I=x,k=o+w*N,n[2]=I,n[3]=k;break;case 3:k=b,I=a+E/N,n[2]=I,n[3]=k;break;case 4:I=m,k=o+-w*N,n[2]=I,n[3]=k}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var a,o,s,l,u,c,h,d=e.x,p=e.y,g=t.x,f=t.y,v=n.x,y=n.y,m=i.x,b=i.y;return 0==(h=(a=f-p)*(l=v-m)-(o=b-y)*(s=d-g))?null:new r((s*(c=m*y-v*b)-l*(u=g*p-d*f))/h,(o*u-a*c)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),o.add(c);var h=c.getEdges();for(a=0;a-1&&u.splice(f,1)}o=new Set,l=new Map}else e=[]}return e},d.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(h,1),c.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&l.push(e),r.set(e,t)}}))}n=n.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},d.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=d},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),a=n(0),o=n(8),s=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,o,s,l=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,e=0;e(l=t.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a):(o>(l=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||u>=s[0].length))for(var c=0;ce}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{"use strict";n.r(t),n.d(t,{diagram:()=>L});var r=n(16432),i=n(59373),a=n(71377),o=n.n(a),s=n(14607),l=n.n(s),u=n(91619),c=n(12281),h=n(7201),d=(n(27484),n(17967),n(27856),n(70277),n(45625),n(39354),n(91518),n(59542),n(10285),n(28734),function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],c=[1,24],h=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],f=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:function(){},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:function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace("Icon: ",a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])}}},table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:u,7:c,10:23,11:h},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:s}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:c,10:32,11:h},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(p,[2,14],{7:g,11:f}),e(v,[2,8]),e(v,[2,9]),e(v,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:g,11:f}),e(v,[2,11]),e(v,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",l=0,u=0,c=1,h=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;a.push(f);var v=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,m,b,x,w,E,T,_,D,C={};;){if(m=n[n.length-1],this.defaultActions[m]?b=this.defaultActions[m]:(null==y&&(D=void 0,"number"!=typeof(D=r.pop()||d.lex()||c)&&(D instanceof Array&&(D=(r=D).pop()),D=t.symbols_[D]||D),y=D),b=o[m]&&o[m][y]),void 0===b||!b.length||!b[0]){var N="";for(w in _=[],o[m])this.terminals_[w]&&w>2&&_.push("'"+this.terminals_[w]+"'");N=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(y==c?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[y]||y,line:d.yylineno,loc:f,expected:_})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+y);switch(b[0]){case 1:n.push(y),i.push(d.yytext),a.push(d.yylloc),n.push(b[1]),y=null,u=d.yyleng,s=d.yytext,l=d.yylineno,f=d.yylloc;break;case 2:if(E=this.productions_[b[1]][1],C.$=i[i.length-E],C._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[s,u,l,p.yy,b[1],i,a].concat(h))))return x;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[b[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},m={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,r){switch(n){case 0:e.getLogger().trace("Found comment",t.yytext);break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.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:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 22:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 24:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 25:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 26:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 27:case 30:case 31:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 28:case 29:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 32:case 33:return e.getLogger().trace("Long description:",t.yytext),20}},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],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR:{rules:[22,23],inclusive:!1},NODE:{rules:[21,24,25,26,27,28,29,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};function b(){this.yy={}}return y.lexer=m,b.prototype=y,y.Parser=b,new b}());d.parser=d;const p=d,g=e=>(0,r.n)(e,(0,r.g)());let f=[],v=0,y={};const m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},b=(e,t)=>{y[e]=t},x=e=>{switch(e){case m.DEFAULT:return"no-border";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded-rect";case m.CIRCLE:return"circle";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexgon";default:return"no-border"}};let w;const E=e=>y[e],T=Object.freeze(Object.defineProperty({__proto__:null,addNode:(e,t,n,i)=>{r.l.info("addNode",e,t,n,i);const a=(0,r.g)(),o={id:v++,nodeId:g(t),level:e,descr:g(n),type:i,children:[],width:(0,r.g)().mindmap.maxNodeWidth};switch(o.type){case m.ROUNDED_RECT:case m.RECT:case m.HEXAGON:o.padding=2*a.mindmap.padding;break;default:o.padding=a.mindmap.padding}const s=function(e){for(let t=f.length-1;t>=0;t--)if(f[t].level{f=[],v=0,y={}},decorateNode:e=>{const t=f[f.length-1];e&&e.icon&&(t.icon=g(e.icon)),e&&e.class&&(t.class=g(e.class))},getElementById:E,getLogger:()=>r.l,getMindmap:()=>f.length>0?f[0]:null,getNodeById:e=>f[e],getType:(e,t)=>{switch(r.l.debug("In get type",e,t),e){case"[":return m.RECT;case"(":return")"===t?m.ROUNDED_RECT:m.CLOUD;case"((":return m.CIRCLE;case")":return m.CLOUD;case"))":return m.BANG;case"{{":return m.HEXAGON;default:return m.DEFAULT}},nodeType:m,get parseError(){return w},sanitizeText:g,setElementForId:b,setErrorHandler:e=>{w=e},type2Str:x},Symbol.toStringTag,{value:"Module"}));function _(e,t){e.each((function(){var e,n=(0,i.Ys)(this),r=n.text().split(/(\s+|
    )/).reverse(),a=[],o=n.attr("y"),s=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em");for(let i=0;it||"
    "===e)&&(a.pop(),l.text(a.join(" ").trim()),a="
    "===e?[""]:[e],l=n.append("tspan").attr("x",0).attr("y",o).attr("dy","1.1em").text(e))}))}const D={drawNode:function(e,t,n,r){const i=n%11,a=e.append("g");t.section=i;let o="section-"+i;i<0&&(o+=" section-root"),a.attr("class",(t.class?t.class+" ":"")+"mindmap-node "+o);const s=a.append("g"),l=a.append("g"),u=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(_,t.width).node().getBBox(),c=r.fontSize.replace?r.fontSize.replace("px",""):r.fontSize;if(t.height=u.height+1.1*c*.5+t.padding,t.width=u.width+2*t.padding,t.icon)if(t.type===m.CIRCLE){t.height+=50,t.width+=50;a.append("foreignObject").attr("height","50px").attr("width",t.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+t.icon),l.attr("transform","translate("+t.width/2+", "+(t.height/2-1.5*t.padding)+")")}else{t.width+=50;const e=t.height;t.height=Math.max(e,60);const n=Math.abs(t.height-e);a.append("foreignObject").attr("width","60px").attr("height",t.height).attr("style","text-align: center;margin-top:"+n/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+t.icon),l.attr("transform","translate("+(25+t.width/2)+", "+(n/2+t.padding/2)+")")}else l.attr("transform","translate("+t.width/2+", "+t.padding/2+")");switch(t.type){case m.DEFAULT:!function(e,t,n){e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)}(s,t,i);break;case m.ROUNDED_RECT:!function(e,t){e.append("rect").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("height",t.height).attr("rx",t.padding).attr("ry",t.padding).attr("width",t.width)}(s,t);break;case m.RECT:!function(e,t){e.append("rect").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("height",t.height).attr("width",t.width)}(s,t);break;case m.CIRCLE:s.attr("transform","translate("+t.width/2+", "+ +t.height/2+")"),function(e,t){e.append("circle").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("r",t.width/2)}(s,t);break;case m.CLOUD:!function(e,t){const n=t.width,r=t.height,i=.15*n,a=.25*n,o=.35*n,s=.2*n;e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("d",`M0 0 a${i},${i} 0 0,1 ${.25*n},${-1*n*.1}\n a${o},${o} 1 0,1 ${.4*n},${-1*n*.1}\n a${a},${a} 1 0,1 ${.35*n},${1*n*.2}\n\n a${i},${i} 1 0,1 ${.15*n},${1*r*.35}\n a${s},${s} 1 0,1 ${-1*n*.15},${1*r*.65}\n\n a${a},${i} 1 0,1 ${-1*n*.25},${.15*n}\n a${o},${o} 1 0,1 ${-1*n*.5},0\n a${i},${i} 1 0,1 ${-1*n*.25},${-1*n*.15}\n\n a${i},${i} 1 0,1 ${-1*n*.1},${-1*r*.35}\n a${s},${s} 1 0,1 ${.1*n},${-1*r*.65}\n\n H0 V0 Z`)}(s,t);break;case m.BANG:!function(e,t){const n=t.width,r=t.height,i=.15*n;e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("d",`M0 0 a${i},${i} 1 0,0 ${.25*n},${-1*r*.1}\n a${i},${i} 1 0,0 ${.25*n},0\n a${i},${i} 1 0,0 ${.25*n},0\n a${i},${i} 1 0,0 ${.25*n},${1*r*.1}\n\n a${i},${i} 1 0,0 ${.15*n},${1*r*.33}\n a${.8*i},${.8*i} 1 0,0 0,${1*r*.34}\n a${i},${i} 1 0,0 ${-1*n*.15},${1*r*.33}\n\n a${i},${i} 1 0,0 ${-1*n*.25},${.15*r}\n a${i},${i} 1 0,0 ${-1*n*.25},0\n a${i},${i} 1 0,0 ${-1*n*.25},0\n a${i},${i} 1 0,0 ${-1*n*.25},${-1*r*.15}\n\n a${i},${i} 1 0,0 ${-1*n*.1},${-1*r*.33}\n a${.8*i},${.8*i} 1 0,0 0,${-1*r*.34}\n a${i},${i} 1 0,0 ${.1*n},${-1*r*.33}\n\n H0 V0 Z`)}(s,t);break;case m.HEXAGON:!function(e,t){const n=t.height,r=n/4,i=t.width-t.padding+2*r;!function(e,t,n,r,i){e.insert("polygon",":first-child").attr("points",r.map((function(e){return e.x+","+e.y})).join(" ")).attr("transform","translate("+(i.width-t)/2+", "+n+")")}(e,i,n,[{x:r,y:0},{x:i-r,y:0},{x:i,y:-n/2},{x:i-r,y:-n},{x:r,y:-n},{x:0,y:-n/2}],t)}(s,t)}return b(t.id,a),t.height},positionNode:function(e){const t=E(e.id),n=e.x||0,r=e.y||0;t.attr("transform","translate("+n+","+r+")")},drawEdge:function(e,t,n,r,i){const a=i%11,o=n.x+n.width/2,s=n.y+n.height/2,l=t.x+t.width/2,u=t.y+t.height/2,c=l>o?o+Math.abs(o-l)/2:o-Math.abs(o-l)/2,h=u>s?s+Math.abs(s-u)/2:s-Math.abs(s-u)/2,d=l>o?Math.abs(o-c)/2+o:-Math.abs(o-c)/2+o,p=u>s?Math.abs(s-h)/2+s:-Math.abs(s-h)/2+s;e.append("path").attr("d","TB"===n.direction||"BT"===n.direction?`M${o},${s} Q${o},${p} ${c},${h} T${l},${u}`:`M${o},${s} Q${d},${s} ${c},${h} T${l},${u}`).attr("class","edge section-edge-"+a+" edge-depth-"+r)}};function C(e,t,n,r){D.drawNode(e,t,n,r),t.children&&t.children.forEach(((t,i)=>{C(e,t,n<0?i:n,r)}))}function N(e,t,n,r){t.add({group:"nodes",data:{id:e.id,labelText:e.descr,height:e.height,width:e.width,level:r,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach((i=>{N(i,t,n,r+1),t.add({group:"edges",data:{id:`${e.id}_${i.id}`,source:e.id,target:i.id,depth:r,section:i.section}})}))}function A(e,t){return new Promise((n=>{const a=(0,i.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),s=o()({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),N(e,s,t,0),s.nodes().forEach((function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}})),s.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),s.ready((e=>{r.l.info("Ready",e),n(s)}))}))}o().use(l());const L={db:T,renderer:{draw:async(e,t,n,a)=>{const o=(0,r.g)();a.db.clear(),a.parser.parse(e),r.l.debug("Renering info diagram\n"+e);const s=(0,r.g)().securityLevel;let l;"sandbox"===s&&(l=(0,i.Ys)("#i"+t));const u=("sandbox"===s?(0,i.Ys)(l.nodes()[0].contentDocument.body):(0,i.Ys)("body")).select("#"+t);u.append("g");const c=a.db.getMindmap(),h=u.append("g");h.attr("class","mindmap-edges");const d=u.append("g");d.attr("class","mindmap-nodes"),C(d,c,-1,o);const p=await A(c,o);!function(e,t){t.edges().map(((t,n)=>{const i=t.data();if(t[0]._private.bodyBounds){const a=t[0]._private.rscratch;r.l.trace("Edge: ",n,i),e.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}}))}(h,p),function(e){e.nodes().map(((e,t)=>{const n=e.data();n.x=e.position().x,n.y=e.position().y,D.positionNode(n);const i=E(n.nodeId);r.l.info("Id:",t,"Position: (",e.position().x,", ",e.position().y,")",n),i.attr("transform",`translate(${e.position().x-n.width/2}, ${e.position().y-n.height/2})`),i.attr("attr",`apa-${t})`)}))}(p),(0,r.s)(void 0,u,o.mindmap.padding,o.mindmap.useMaxWidth)}},parser:p,styles:e=>`\n .edge {\n stroke-width: 3;\n }\n ${(e=>{let t="";for(let n=0;n{"use strict";n.d(t,{Z:()=>s});var r=n(61691),i=n(71610);const a=e=>{const{r:t,g:n,b:a}=i.Z.parse(e),o=.2126*r.Z.channel.toLinear(t)+.7152*r.Z.channel.toLinear(n)+.0722*r.Z.channel.toLinear(a);return r.Z.lang.round(o)},o=e=>a(e)>=.5,s=e=>!o(e)}}]); \ No newline at end of file diff --git a/assets/js/7724.9c188343.js.LICENSE.txt b/assets/js/7724.9c188343.js.LICENSE.txt new file mode 100644 index 0000000000..a58daed496 --- /dev/null +++ b/assets/js/7724.9c188343.js.LICENSE.txt @@ -0,0 +1,9 @@ +/*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + +/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + +/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ diff --git a/assets/js/77708c82.00d0ee02.js b/assets/js/77708c82.00d0ee02.js new file mode 100644 index 0000000000..ceee9745a3 --- /dev/null +++ b/assets/js/77708c82.00d0ee02.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[3090],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>y});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i=n.createContext({}),s=function(e){var t=n.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):p(p({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(i.Provider,{value:t},e.children)},l="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=s(r),m=o,y=l["".concat(i,".").concat(m)]||l[m]||f[m]||a;return r?n.createElement(y,p(p({ref:t},u),{},{components:r})):n.createElement(y,p({ref:t},u))}));function y(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,p=new Array(a);p[0]=m;var c={};for(var i in t)hasOwnProperty.call(t,i)&&(c[i]=t[i]);c.originalType=e,c[l]="string"==typeof e?e:o,p[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>i,contentTitle:()=>p,default:()=>f,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var n=r(87462),o=(r(67294),r(3905));const a={},p=void 0,c={unversionedId:"openapi",id:"openapi",title:"openapi",description:"!!swagger-http https://raw.githubusercontent.com/kubeshop/tracetest/main/api/openapi.yaml!!",source:"@site/docs/openapi.md",sourceDirName:".",slug:"/openapi",permalink:"/openapi",draft:!1,editUrl:"https://github.com/kubeshop/tracetest/blob/main/docs/docs/openapi.md",tags:[],version:"current",frontMatter:{}},i={},s=[],u={toc:s},l="wrapper";function f(e){let{components:t,...r}=e;return(0,o.kt)(l,(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"!!swagger-http ",(0,o.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/kubeshop/tracetest/main/api/openapi.yaml"},"https://raw.githubusercontent.com/kubeshop/tracetest/main/api/openapi.yaml"),"!!"))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7856.85f64f34.js b/assets/js/7856.85f64f34.js new file mode 100644 index 0000000000..fb47ccfd2c --- /dev/null +++ b/assets/js/7856.85f64f34.js @@ -0,0 +1,2 @@ +/*! For license information please see 7856.85f64f34.js.LICENSE.txt */ +(self.webpackChunktracetest_docs=self.webpackChunktracetest_docs||[]).push([[7856],{27856:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,a){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var a=new(Function.bind.apply(e,o));return r&&t(a,r.prototype),a},r.apply(null,arguments)}function o(e){return a(e)||i(e)||l(e)||s()}function a(e){if(Array.isArray(e))return c(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o/gm),X=g(/\${[\w\W]*}/gm),Z=g(/^data-[\-\w.\u00B7-\uFFFF]/),J=g(/^aria-[\-\w]+$/),Q=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=g(/^(?:\w+script|data):/i),te=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=g(/^html$/i),re=function(){return"undefined"==typeof window?null:window},oe=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(i){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function ae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re(),n=function(e){return ae(e)};if(n.version="2.4.3",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,a=t.document,i=t.DocumentFragment,l=t.HTMLTemplateElement,c=t.Node,s=t.Element,u=t.NodeFilter,m=t.NamedNodeMap,f=void 0===m?t.NamedNodeMap||t.MozNamedAttrMap:m,p=t.HTMLFormElement,d=t.DOMParser,g=t.trustedTypes,y=s.prototype,b=F(y,"cloneNode"),v=F(y,"nextSibling"),T=F(y,"childNodes"),L=F(y,"parentNode");if("function"==typeof l){var R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}var ie=oe(g,r),le=ie?ie.createHTML(""):"",ce=a,se=ce.implementation,ue=ce.createNodeIterator,me=ce.createDocumentFragment,fe=ce.getElementsByTagName,pe=r.importNode,de={};try{de=I(a).documentMode?a.documentMode:{}}catch(Lt){}var he={};n.isSupported="function"==typeof L&&se&&void 0!==se.createHTMLDocument&&9!==de;var ge,ye,be=K,ve=V,Te=X,Ne=Z,Ae=J,Ee=ee,we=te,Se=Q,ke=null,xe=M({},[].concat(o(U),o(H),o(z),o(B),o(G))),_e=null,Oe=M({},[].concat(o(W),o(q),o(Y),o($))),De=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Le=null,Re=!0,Me=!0,Ie=!1,Fe=!1,Ue=!1,He=!1,ze=!1,Pe=!1,Be=!1,je=!1,Ge=!0,We=!1,qe="user-content-",Ye=!0,$e=!1,Ke={},Ve=null,Xe=M({},["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"]),Ze=null,Je=M({},["audio","video","img","source","image","track"]),Qe=null,et=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",rt="http://www.w3.org/1999/xhtml",ot=rt,at=!1,it=null,lt=M({},[tt,nt,rt],S),ct=["application/xhtml+xml","text/html"],st="text/html",ut=null,mt=a.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(t){ut&&ut===t||(t&&"object"===e(t)||(t={}),t=I(t),ge=ge=-1===ct.indexOf(t.PARSER_MEDIA_TYPE)?st:t.PARSER_MEDIA_TYPE,ye="application/xhtml+xml"===ge?S:w,ke="ALLOWED_TAGS"in t?M({},t.ALLOWED_TAGS,ye):xe,_e="ALLOWED_ATTR"in t?M({},t.ALLOWED_ATTR,ye):Oe,it="ALLOWED_NAMESPACES"in t?M({},t.ALLOWED_NAMESPACES,S):lt,Qe="ADD_URI_SAFE_ATTR"in t?M(I(et),t.ADD_URI_SAFE_ATTR,ye):et,Ze="ADD_DATA_URI_TAGS"in t?M(I(Je),t.ADD_DATA_URI_TAGS,ye):Je,Ve="FORBID_CONTENTS"in t?M({},t.FORBID_CONTENTS,ye):Xe,Ce="FORBID_TAGS"in t?M({},t.FORBID_TAGS,ye):{},Le="FORBID_ATTR"in t?M({},t.FORBID_ATTR,ye):{},Ke="USE_PROFILES"in t&&t.USE_PROFILES,Re=!1!==t.ALLOW_ARIA_ATTR,Me=!1!==t.ALLOW_DATA_ATTR,Ie=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=t.SAFE_FOR_TEMPLATES||!1,Ue=t.WHOLE_DOCUMENT||!1,Pe=t.RETURN_DOM||!1,Be=t.RETURN_DOM_FRAGMENT||!1,je=t.RETURN_TRUSTED_TYPE||!1,ze=t.FORCE_BODY||!1,Ge=!1!==t.SANITIZE_DOM,We=t.SANITIZE_NAMED_PROPS||!1,Ye=!1!==t.KEEP_CONTENT,$e=t.IN_PLACE||!1,Se=t.ALLOWED_URI_REGEXP||Se,ot=t.NAMESPACE||rt,t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(Me=!1),Be&&(Pe=!0),Ke&&(ke=M({},o(G)),_e=[],!0===Ke.html&&(M(ke,U),M(_e,W)),!0===Ke.svg&&(M(ke,H),M(_e,q),M(_e,$)),!0===Ke.svgFilters&&(M(ke,z),M(_e,q),M(_e,$)),!0===Ke.mathMl&&(M(ke,B),M(_e,Y),M(_e,$))),t.ADD_TAGS&&(ke===xe&&(ke=I(ke)),M(ke,t.ADD_TAGS,ye)),t.ADD_ATTR&&(_e===Oe&&(_e=I(_e)),M(_e,t.ADD_ATTR,ye)),t.ADD_URI_SAFE_ATTR&&M(Qe,t.ADD_URI_SAFE_ATTR,ye),t.FORBID_CONTENTS&&(Ve===Xe&&(Ve=I(Ve)),M(Ve,t.FORBID_CONTENTS,ye)),Ye&&(ke["#text"]=!0),Ue&&M(ke,["html","head","body"]),ke.table&&(M(ke,["tbody"]),delete Ce.tbody),h&&h(t),ut=t)},dt=M({},["mi","mo","mn","ms","mtext"]),ht=M({},["foreignobject","desc","title","annotation-xml"]),gt=M({},["title","style","font","a","script"]),yt=M({},H);M(yt,z),M(yt,P);var bt=M({},B);M(bt,j);var vt=function(e){var t=L(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});var n=w(e.tagName),r=w(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===rt?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===r||dt[r]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===rt?"math"===n:t.namespaceURI===nt?"math"===n&&ht[r]:Boolean(bt[n]):e.namespaceURI===rt?!(t.namespaceURI===nt&&!ht[r])&&!(t.namespaceURI===tt&&!dt[r])&&!bt[n]&&(gt[n]||!yt[n]):!("application/xhtml+xml"!==ge||!it[e.namespaceURI]))},Tt=function(e){E(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(Lt){try{e.outerHTML=le}catch(Lt){e.remove()}}},Nt=function(e,t){try{E(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(Lt){E(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!_e[e])if(Pe||Be)try{Tt(t)}catch(Lt){}else try{t.setAttribute(e,"")}catch(Lt){}},At=function(e){var t,n;if(ze)e=""+e;else{var r=k(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ge&&ot===rt&&(e=''+e+"");var o=ie?ie.createHTML(e):e;if(ot===rt)try{t=(new d).parseFromString(o,ge)}catch(Lt){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=at?le:o}catch(Lt){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),ot===rt?fe.call(t,Ue?"html":"body")[0]:Ue?t.documentElement:i},Et=function(e){return ue.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},wt=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},kt=function(e,t,r){he[e]&&N(he[e],(function(e){e.call(n,t,r,ut)}))},xt=function(e){var t;if(kt("beforeSanitizeElements",e,null),wt(e))return Tt(e),!0;if(D(/[\u0080-\uFFFF]/,e.nodeName))return Tt(e),!0;var r=ye(e.nodeName);if(kt("uponSanitizeElement",e,{tagName:r,allowedTags:ke}),e.hasChildNodes()&&!St(e.firstElementChild)&&(!St(e.content)||!St(e.content.firstElementChild))&&D(/<[/\w]/g,e.innerHTML)&&D(/<[/\w]/g,e.textContent))return Tt(e),!0;if("select"===r&&D(/